| | |
| | | package com.ltkj.framework.interceptor; |
| | | |
| | | import cn.hutool.core.util.StrUtil; |
| | | import cn.hutool.json.JSONObject; |
| | | import cn.hutool.json.JSONUtil; |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.google.gson.Gson; |
| | |
| | | * @Date: 2025/2/7 11:07 |
| | | */ |
| | | @Component |
| | | @Order(2) |
| | | @Order(1) |
| | | public class DBChangeInterceptor implements HandlerInterceptor { |
| | | |
| | | @Autowired |
| | |
| | | if (StrUtil.isBlank(hospId)){ |
| | | response.setStatus(HttpServletResponse.SC_UNAUTHORIZED); |
| | | response.setContentType("application/json;charset=UTF-8"); |
| | | response.getWriter().write("{\"message\":\"401:找不到院区编号\"}"); |
| | | JSONObject object = JSONUtil.createObj(); |
| | | object.putOpt("code",401); |
| | | object.putOpt("msg","找不到院区编号"); |
| | | response.getWriter().write(JSONUtil.toJsonStr(object)); |
| | | return false; |
| | | } |
| | | // DictHosp hosp = null; |