1111111
							parent
							
								
									6111c30c7a
								
							
						
					
					
						commit
						3711239f55
					
				|  | @ -920,7 +920,6 @@ public class AppHiddenController extends BaseController { | ||||||
| 			hs.put("ISDELETE", "0"); | 			hs.put("ISDELETE", "0"); | ||||||
| 			hiddenSchemeService.edit(hs); | 			hiddenSchemeService.edit(hs); | ||||||
| 		} | 		} | ||||||
| 
 |  | ||||||
| 		return map; | 		return map; | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -1,32 +1,23 @@ | ||||||
| package com.zcloud.controller.app; | package com.zcloud.controller.app; | ||||||
| 
 | 
 | ||||||
| import java.util.ArrayList; |  | ||||||
| import java.util.Date; |  | ||||||
| import java.util.HashMap; |  | ||||||
| import java.util.List; |  | ||||||
| import java.util.Map; |  | ||||||
| 
 |  | ||||||
| import org.springframework.beans.factory.annotation.Autowired; |  | ||||||
| import org.springframework.stereotype.Controller; |  | ||||||
| import org.springframework.transaction.annotation.Transactional; |  | ||||||
| import org.springframework.web.bind.annotation.RequestMapping; |  | ||||||
| import org.springframework.web.bind.annotation.ResponseBody; |  | ||||||
| import org.springframework.web.servlet.ModelAndView; |  | ||||||
| 
 |  | ||||||
| import com.zcloud.controller.base.BaseController; | import com.zcloud.controller.base.BaseController; | ||||||
| import com.zcloud.entity.Page; | import com.zcloud.entity.Page; | ||||||
| import com.zcloud.entity.PageData; | import com.zcloud.entity.PageData; | ||||||
| import com.zcloud.service.bus.NoticeCorpService; | import com.zcloud.service.bus.NoticeCorpService; | ||||||
| import com.zcloud.service.bus.NoticeCorpUserService; | import com.zcloud.service.bus.NoticeCorpUserService; | ||||||
| import com.zcloud.service.bus.NoticeLogService; |  | ||||||
| import com.zcloud.service.bus.ServiceNoticeService; | import com.zcloud.service.bus.ServiceNoticeService; | ||||||
| import com.zcloud.service.system.UsersService; | import com.zcloud.service.system.UsersService; | ||||||
| import com.zcloud.util.DateUtil; | import com.zcloud.util.DateUtil; | ||||||
| import com.zcloud.util.Jurisdiction; |  | ||||||
| import com.zcloud.util.ObjectExcelView; |  | ||||||
| import com.zcloud.util.Tools; | import com.zcloud.util.Tools; | ||||||
|  | import org.springframework.beans.factory.annotation.Autowired; | ||||||
|  | import org.springframework.stereotype.Controller; | ||||||
|  | import org.springframework.web.bind.annotation.RequestMapping; | ||||||
|  | import org.springframework.web.bind.annotation.ResponseBody; | ||||||
| 
 | 
 | ||||||
| import org.apache.shiro.authz.annotation.RequiresPermissions; | import java.util.Date; | ||||||
|  | import java.util.HashMap; | ||||||
|  | import java.util.List; | ||||||
|  | import java.util.Map; | ||||||
| 
 | 
 | ||||||
| /**  | /**  | ||||||
|  * 说明:通知公告 |  * 说明:通知公告 | ||||||
|  |  | ||||||
|  | @ -734,6 +734,7 @@ public class SafetyEnvironmentalController extends BaseController { | ||||||
|         pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());    //企业ID
 |         pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());    //企业ID
 | ||||||
|         pd.put("waffle", Jurisdiction.getUSER_ID()); |         pd.put("waffle", Jurisdiction.getUSER_ID()); | ||||||
|         page.setPd(pd); |         page.setPd(pd); | ||||||
|  |         pd.put("loginUserId", Jurisdiction.getUSER_ID()); | ||||||
|         List<PageData> varList = safetyenvironmentalService.checkList(page);    //列出SafetyEnvironmental列表
 |         List<PageData> varList = safetyenvironmentalService.checkList(page);    //列出SafetyEnvironmental列表
 | ||||||
|         /* 针对验收部分特殊处理 */ |         /* 针对验收部分特殊处理 */ | ||||||
|         for (PageData vector : varList) { |         for (PageData vector : varList) { | ||||||
|  |  | ||||||
|  | @ -42,7 +42,9 @@ public class SafetyEnvironmentalExplainController extends BaseController { | ||||||
|     @Resource |     @Resource | ||||||
|     private NoticeCorpUtil noticeCorpUtil; |     private NoticeCorpUtil noticeCorpUtil; | ||||||
| 
 | 
 | ||||||
| 	/**列表 |     /** | ||||||
|  |      * 列表 | ||||||
|  |      * | ||||||
|      * @param page |      * @param page | ||||||
|      * @throws Exception |      * @throws Exception | ||||||
|      */ |      */ | ||||||
|  | @ -58,6 +60,7 @@ public class SafetyEnvironmentalExplainController extends BaseController { | ||||||
|         if (Tools.notEmpty(KEYWORDS)) pd.put("KEYWORDS", KEYWORDS.trim()); |         if (Tools.notEmpty(KEYWORDS)) pd.put("KEYWORDS", KEYWORDS.trim()); | ||||||
| //		pd.put("INSPECTED_SITEUSER_ID", Jurisdiction.getUSER_ID());	//被检查单位现场负责人
 | //		pd.put("INSPECTED_SITEUSER_ID", Jurisdiction.getUSER_ID());	//被检查单位现场负责人
 | ||||||
|         pd = Jurisdiction.getUserDataJurisdiction(pd); |         pd = Jurisdiction.getUserDataJurisdiction(pd); | ||||||
|  |         pd.put("loginUserId", Jurisdiction.getUSER_ID()); | ||||||
|         page.setPd(pd); |         page.setPd(pd); | ||||||
|         List<PageData> varList = safetyenvironmentalexplainService.list(page);    //列出SafetyEnvironmentalExplain列表
 |         List<PageData> varList = safetyenvironmentalexplainService.list(page);    //列出SafetyEnvironmentalExplain列表
 | ||||||
|         for (PageData vector : varList) { |         for (PageData vector : varList) { | ||||||
|  | @ -90,7 +93,9 @@ public class SafetyEnvironmentalExplainController extends BaseController { | ||||||
|         return map; |         return map; | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
| 	/**新增 |     /** | ||||||
|  |      * 新增 | ||||||
|  |      * | ||||||
|      * @param |      * @param | ||||||
|      * @throws Exception |      * @throws Exception | ||||||
|      */ |      */ | ||||||
|  | @ -150,7 +155,9 @@ public class SafetyEnvironmentalExplainController extends BaseController { | ||||||
|         return map; |         return map; | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
| 	/**删除 |     /** | ||||||
|  |      * 删除 | ||||||
|  |      * | ||||||
|      * @param |      * @param | ||||||
|      * @throws Exception |      * @throws Exception | ||||||
|      */ |      */ | ||||||
|  | @ -169,7 +176,9 @@ public class SafetyEnvironmentalExplainController extends BaseController { | ||||||
|         return map; |         return map; | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
| 	/**修改 |     /** | ||||||
|  |      * 修改 | ||||||
|  |      * | ||||||
|      * @param |      * @param | ||||||
|      * @throws Exception |      * @throws Exception | ||||||
|      */ |      */ | ||||||
|  | @ -189,7 +198,9 @@ public class SafetyEnvironmentalExplainController extends BaseController { | ||||||
|         return map; |         return map; | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
| 	 /**去修改页面获取数据 |     /** | ||||||
|  |      * 去修改页面获取数据 | ||||||
|  |      * | ||||||
|      * @param |      * @param | ||||||
|      * @throws Exception |      * @throws Exception | ||||||
|      */ |      */ | ||||||
|  | @ -207,7 +218,9 @@ public class SafetyEnvironmentalExplainController extends BaseController { | ||||||
|         return map; |         return map; | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
| 	 /**批量删除 |     /** | ||||||
|  |      * 批量删除 | ||||||
|  |      * | ||||||
|      * @param |      * @param | ||||||
|      * @throws Exception |      * @throws Exception | ||||||
|      */ |      */ | ||||||
|  | @ -234,7 +247,9 @@ public class SafetyEnvironmentalExplainController extends BaseController { | ||||||
|         return map; |         return map; | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
| 	 /**导出到excel |     /** | ||||||
|  |      * 导出到excel | ||||||
|  |      * | ||||||
|      * @param |      * @param | ||||||
|      * @throws Exception |      * @throws Exception | ||||||
|      */ |      */ | ||||||
|  | @ -276,7 +291,9 @@ public class SafetyEnvironmentalExplainController extends BaseController { | ||||||
|         return mv; |         return mv; | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
| 	/**查询安环检查是否有隐患 |     /** | ||||||
|  |      * 查询安环检查是否有隐患 | ||||||
|  |      * | ||||||
|      * @param |      * @param | ||||||
|      * @throws Exception |      * @throws Exception | ||||||
|      */ |      */ | ||||||
|  |  | ||||||
|  | @ -0,0 +1,76 @@ | ||||||
|  | package com.zcloud.controller.messages; | ||||||
|  | 
 | ||||||
|  | import cn.hutool.core.convert.Convert; | ||||||
|  | import cn.hutool.crypto.asymmetric.KeyType; | ||||||
|  | import cn.hutool.crypto.asymmetric.RSA; | ||||||
|  | import cn.hutool.crypto.symmetric.SymmetricAlgorithm; | ||||||
|  | import cn.hutool.crypto.symmetric.SymmetricCrypto; | ||||||
|  | import com.alibaba.fastjson.JSON; | ||||||
|  | import com.zcloud.entity.messages.PushRecords; | ||||||
|  | import com.zcloud.service.messages.MessagesService; | ||||||
|  | import lombok.RequiredArgsConstructor; | ||||||
|  | import lombok.extern.slf4j.Slf4j; | ||||||
|  | import org.springframework.web.bind.annotation.PostMapping; | ||||||
|  | import org.springframework.web.bind.annotation.RequestBody; | ||||||
|  | import org.springframework.web.bind.annotation.RequestMapping; | ||||||
|  | import org.springframework.web.bind.annotation.RestController; | ||||||
|  | 
 | ||||||
|  | import javax.validation.ConstraintViolation; | ||||||
|  | import javax.validation.ConstraintViolationException; | ||||||
|  | import javax.validation.Validator; | ||||||
|  | import java.nio.charset.StandardCharsets; | ||||||
|  | import java.util.HashMap; | ||||||
|  | import java.util.Map; | ||||||
|  | import java.util.Set; | ||||||
|  | 
 | ||||||
|  | @Slf4j | ||||||
|  | @RestController | ||||||
|  | @RequiredArgsConstructor | ||||||
|  | @RequestMapping("/api/messages") | ||||||
|  | public class MessagesController { | ||||||
|  | 
 | ||||||
|  |     private static final String privateKey = "MIICdgIBADANBgkqhkiG9w0BAQEFAASCAmAwggJcAgEAAoGBAI/0e9Q2v5Hi9j2BRHz2U/0skmjTX" + | ||||||
|  |             "iqNsl/hEylAZdfA4vTdFT9VSf9Pl91MqTAVi1rTojLEQV/QLdGuqY/6bHyb0PL0A/4Lx0ddVRs3hNPmX32JD8HgPiRIxdXyzKkZHskvUg6gPYYPgzv" + | ||||||
|  |             "OPWjxeVZz8QA4bDYUKr+X7WrEyu+bAgMBAAECgYAITF9Z0uDrmUoSyC5foIvwtsHAq2df8me7cWXIEkj5c7DBmjMDQevjloqz4s6H+CrFDOXqbkTK4" + | ||||||
|  |             "xAytUWO1RbgaGhEJpVGHxxzml+npbI4KGbs11IVcaH70FJcL44gYyX+G+2aj372aykldUH56IwPO7Z8cV0WTTZaIel3D5NDKQJBAKN90RJ1dpiMROg" + | ||||||
|  |             "qGChoshstpkEgRRdFBA26hmIeMaQZyrgzLGvcjEETo5zbzcwvSi5jMLK8FhlAquof3db8sBMCQQDhaMIaKfSmghrl3eBf7PxoXvmBNqWy7ZpmOWcA0" + | ||||||
|  |             "GfvNdHc1NAsSw272CFl7cSwdI6DW9vu1ULZy5Iw6rJuyINZAkACzxiWfpopCM/uRTrhBtt4iBJBMDK/sZneOoQwj2A+94p6G7b5q3Jlc9btzQD+Lxn" + | ||||||
|  |             "RLjcZ+w1OJcRJ/X4sQW8tAkEAvrSZ2/b5NNLInQguKBphppAL+iVY5VwfEDOqkMbB2GGpb3NhuMe7E90UzJ7wlPXYCQzzs0oc6BVSVy6Jzi646QJAP" + | ||||||
|  |             "4uFZIPgEAGi4iw4uvio1URXVVwqTgIaqiQ/cJ8rpV2txiSdbEsGrR9V8QYPyxS//rVSK8JJAHVJGWRiuxZ24A=="; | ||||||
|  | 
 | ||||||
|  |     private final MessagesService service; | ||||||
|  |     private final Validator validator; | ||||||
|  | 
 | ||||||
|  |     @PostMapping(value = "/push") | ||||||
|  |     public Map<String, Object> push(@RequestBody Map<String, Object> body) throws Exception { | ||||||
|  |         Map<String, Object> result = new HashMap<>(); | ||||||
|  |         if (body == null || !body.containsKey("key") || !body.containsKey("value")) { | ||||||
|  |             throw new RuntimeException("参数为空"); | ||||||
|  |         } | ||||||
|  |         PushRecords pushRecords = JSON.parseObject(decrypt(body, privateKey), PushRecords.class); | ||||||
|  |         Set<ConstraintViolation<PushRecords>> validate = validator.validate(pushRecords); | ||||||
|  |         if (!validate.isEmpty()) { | ||||||
|  |             throw new ConstraintViolationException(validate); | ||||||
|  |         } | ||||||
|  |         // 校验 发送时间 距离当前时间不能超过6 秒
 | ||||||
|  | //        if (DateUtil.betweenMs(DateUtil.parseDateTime(pushRecords.getSendTime()), new Date()) > 6000) {
 | ||||||
|  | //            throw new RuntimeException("发送时间距离当前时间不能超过10 秒");
 | ||||||
|  | //        }
 | ||||||
|  |         service.push(pushRecords); | ||||||
|  |         result.put("code", 0); | ||||||
|  |         result.put("msg", "成功"); | ||||||
|  |         return result; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     private String decrypt(Map<String, Object> body, String privateKey) { | ||||||
|  |         try { | ||||||
|  |             RSA rsa = new RSA(privateKey, null); | ||||||
|  |             byte[] aesKey = rsa.decrypt(Convert.toStr(body.get("key")), KeyType.PrivateKey); | ||||||
|  |             SymmetricCrypto aes = new SymmetricCrypto(SymmetricAlgorithm.AES, aesKey); | ||||||
|  |             return aes.decryptStr(Convert.toStr(body.get("value")), StandardCharsets.UTF_8); | ||||||
|  |         } catch (Exception e) { | ||||||
|  |             log.error("对接消息接口解密失败", e); | ||||||
|  |             throw new RuntimeException("解密失败"); | ||||||
|  |         } | ||||||
|  |     } | ||||||
|  | } | ||||||
|  | @ -0,0 +1,55 @@ | ||||||
|  | package com.zcloud.controller.messages; | ||||||
|  | 
 | ||||||
|  | import lombok.extern.slf4j.Slf4j; | ||||||
|  | import org.springframework.messaging.handler.annotation.support.MethodArgumentNotValidException; | ||||||
|  | import org.springframework.validation.BindingResult; | ||||||
|  | import org.springframework.validation.FieldError; | ||||||
|  | import org.springframework.web.bind.annotation.ExceptionHandler; | ||||||
|  | import org.springframework.web.bind.annotation.RestControllerAdvice; | ||||||
|  | 
 | ||||||
|  | import javax.validation.ConstraintViolationException; | ||||||
|  | import java.util.HashMap; | ||||||
|  | import java.util.Map; | ||||||
|  | 
 | ||||||
|  | @Slf4j | ||||||
|  | @RestControllerAdvice(assignableTypes = MessagesController.class) | ||||||
|  | public class MessagesControllerExceptionHandler { | ||||||
|  | 
 | ||||||
|  |     @ExceptionHandler(MethodArgumentNotValidException.class) | ||||||
|  |     public Map<String, Object> handleMethodArgumentNotValidException(MethodArgumentNotValidException ex) { | ||||||
|  |         Map<String, Object> result = new HashMap<>(); | ||||||
|  |         BindingResult bindingResult = ex.getBindingResult(); | ||||||
|  |         StringBuilder sb = new StringBuilder("校验失败:"); | ||||||
|  |         for (FieldError fieldError : bindingResult.getFieldErrors()) { | ||||||
|  |             sb.append(fieldError.getField()).append(":").append(fieldError.getDefaultMessage()).append(", "); | ||||||
|  |         } | ||||||
|  |         result.put("msg", sb.toString()); | ||||||
|  |         result.put("code", 500); | ||||||
|  |         return result; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     @ExceptionHandler(ConstraintViolationException.class) | ||||||
|  |     public Map<String, Object> handleConstraintViolationException(ConstraintViolationException ex) { | ||||||
|  |         Map<String, Object> result = new HashMap<>(); | ||||||
|  |         result.put("msg", ex.getMessage()); | ||||||
|  |         result.put("code", 500); | ||||||
|  |         return result; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     @ExceptionHandler(RuntimeException.class) | ||||||
|  |     public Map<String, Object> handleRuntimeException(RuntimeException ex) { | ||||||
|  |         Map<String, Object> result = new HashMap<>(); | ||||||
|  |         result.put("msg", ex.getMessage()); | ||||||
|  |         result.put("code", 500); | ||||||
|  |         return result; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     @ExceptionHandler(Exception.class) | ||||||
|  |     public Map<String, Object> handleRuntimeException(Exception ex) { | ||||||
|  |         log.error("系统异常,请稍后重试", ex); | ||||||
|  |         Map<String, Object> result = new HashMap<>(); | ||||||
|  |         result.put("msg", ex.getMessage()); | ||||||
|  |         result.put("code", 500); | ||||||
|  |         return result; | ||||||
|  |     } | ||||||
|  | } | ||||||
|  | @ -0,0 +1,35 @@ | ||||||
|  | package com.zcloud.entity.messages; | ||||||
|  | 
 | ||||||
|  | import lombok.Data; | ||||||
|  | import org.hibernate.validator.constraints.Length; | ||||||
|  | import org.hibernate.validator.constraints.Range; | ||||||
|  | 
 | ||||||
|  | import javax.validation.constraints.NotBlank; | ||||||
|  | import javax.validation.constraints.NotNull; | ||||||
|  | import java.io.Serializable; | ||||||
|  | 
 | ||||||
|  | @Data | ||||||
|  | public class PushRecords implements Serializable { | ||||||
|  | 
 | ||||||
|  |     private static final long serialVersionUID = 1L; | ||||||
|  | 
 | ||||||
|  |     private String id; | ||||||
|  | 
 | ||||||
|  |     @NotBlank(message = "要发送人的手机号不能为空") | ||||||
|  |     @Length(min = 1, max = 12, message = "手机号长度为1-11位") | ||||||
|  |     private String phone; | ||||||
|  | 
 | ||||||
|  |     @Length(max = 255, message = "消息标题长度不能大于255") | ||||||
|  |     private String messageTitle; | ||||||
|  | 
 | ||||||
|  |     @NotBlank(message = "消息内容不能为空") | ||||||
|  |     @Length(max = 255, message = "消息内容长度不能大于255") | ||||||
|  |     private String messageContent; | ||||||
|  | 
 | ||||||
|  |     @NotNull(message = "消息类型不能为空") | ||||||
|  |     @Range(min = 1, max = 3, message = "消息类型只能是1或2或3") | ||||||
|  |     private Integer messageType; | ||||||
|  | 
 | ||||||
|  |     @NotBlank(message = "发送时间不能为空") | ||||||
|  |     private String sendTime; | ||||||
|  | } | ||||||
|  | @ -0,0 +1,10 @@ | ||||||
|  | package com.zcloud.mapper.datasource.messages; | ||||||
|  | 
 | ||||||
|  | import com.zcloud.entity.messages.PushRecords; | ||||||
|  | import org.apache.ibatis.annotations.Param; | ||||||
|  | 
 | ||||||
|  | public interface MessagesMapper { | ||||||
|  |     void install(PushRecords pushRecords); | ||||||
|  | 
 | ||||||
|  |     String findUserIdByPhone(@Param("phone") String phone); | ||||||
|  | } | ||||||
|  | @ -1,13 +1,14 @@ | ||||||
| package com.zcloud.service.bus.impl; | package com.zcloud.service.bus.impl; | ||||||
| 
 | 
 | ||||||
| import java.util.List; |  | ||||||
| import org.springframework.beans.factory.annotation.Autowired; |  | ||||||
| import org.springframework.stereotype.Service; |  | ||||||
| import org.springframework.transaction.annotation.Transactional; |  | ||||||
| import com.zcloud.entity.Page; | import com.zcloud.entity.Page; | ||||||
| import com.zcloud.entity.PageData; | import com.zcloud.entity.PageData; | ||||||
| import com.zcloud.mapper.datasource.bus.CorpInfoMapper; | import com.zcloud.mapper.datasource.bus.CorpInfoMapper; | ||||||
| import com.zcloud.service.bus.CorpInfoService; | import com.zcloud.service.bus.CorpInfoService; | ||||||
|  | import org.springframework.beans.factory.annotation.Autowired; | ||||||
|  | import org.springframework.stereotype.Service; | ||||||
|  | import org.springframework.transaction.annotation.Transactional; | ||||||
|  | 
 | ||||||
|  | import java.util.List; | ||||||
| 
 | 
 | ||||||
| /** | /** | ||||||
|  * 说明:企业管理 |  * 说明:企业管理 | ||||||
|  | @ -83,7 +84,7 @@ public class CorpInfoServiceImpl implements CorpInfoService{ | ||||||
| 	 */ | 	 */ | ||||||
| 	public PageData findById(PageData pd)throws Exception{ | 	public PageData findById(PageData pd)throws Exception{ | ||||||
| 		PageData byId = corpinfoMapper.findById(pd); | 		PageData byId = corpinfoMapper.findById(pd); | ||||||
| 		if (byId.get("FOURTYPE") != null) { | 		if (byId != null && byId.get("FOURTYPE") != null) { | ||||||
| 			String fourtype = byId.get("FOURTYPE").toString(); | 			String fourtype = byId.get("FOURTYPE").toString(); | ||||||
| 			byId.put("FOURTYPE", fourtype); | 			byId.put("FOURTYPE", fourtype); | ||||||
| 		} | 		} | ||||||
|  |  | ||||||
|  | @ -0,0 +1,8 @@ | ||||||
|  | package com.zcloud.service.messages; | ||||||
|  | 
 | ||||||
|  | import com.zcloud.entity.messages.PushRecords; | ||||||
|  | 
 | ||||||
|  | public interface MessagesService { | ||||||
|  | 
 | ||||||
|  |     void push(PushRecords pushRecords) throws Exception; | ||||||
|  | } | ||||||
|  | @ -0,0 +1,85 @@ | ||||||
|  | package com.zcloud.service.messages.impl; | ||||||
|  | 
 | ||||||
|  | import cn.hutool.core.util.StrUtil; | ||||||
|  | import com.zcloud.entity.PageData; | ||||||
|  | import com.zcloud.entity.messages.PushRecords; | ||||||
|  | import com.zcloud.mapper.datasource.messages.MessagesMapper; | ||||||
|  | import com.zcloud.service.bus.NoticeCorpService; | ||||||
|  | import com.zcloud.service.messages.MessagesService; | ||||||
|  | import com.zcloud.util.DateUtil; | ||||||
|  | import com.zcloud.util.UuidUtil; | ||||||
|  | import lombok.RequiredArgsConstructor; | ||||||
|  | import lombok.extern.slf4j.Slf4j; | ||||||
|  | import org.springframework.stereotype.Service; | ||||||
|  | import org.springframework.transaction.annotation.Transactional; | ||||||
|  | 
 | ||||||
|  | @Slf4j | ||||||
|  | @Service | ||||||
|  | @RequiredArgsConstructor | ||||||
|  | public class MessagesServiceImpl implements MessagesService { | ||||||
|  | 
 | ||||||
|  |     private final MessagesMapper mapper; | ||||||
|  |     private final NoticeCorpService noticeCorpService; | ||||||
|  | 
 | ||||||
|  |     @Override | ||||||
|  |     @Transactional(rollbackFor = Exception.class) | ||||||
|  |     public void push(PushRecords pushRecords) throws Exception { | ||||||
|  |         // 先记录数据
 | ||||||
|  |         pushRecords.setId(UuidUtil.get32UUID()); | ||||||
|  |         pushRecords.setSendTime(DateUtil.getTime()); | ||||||
|  |         mapper.install(pushRecords); | ||||||
|  |         // 根据手机号查找用户id
 | ||||||
|  |         String userId = mapper.findUserIdByPhone(pushRecords.getPhone()); | ||||||
|  |         if (StrUtil.isEmpty(userId)) { | ||||||
|  |             throw new RuntimeException("该用户不存在"); | ||||||
|  |         } | ||||||
|  |         Integer type = pushRecords.getMessageType(); | ||||||
|  |         // 1-短信 2-平台信息 3-全发
 | ||||||
|  |         if (type == 1) { | ||||||
|  |             pushSms(pushRecords); | ||||||
|  |         } else if (type == 2) { | ||||||
|  |             PageData data = pushInfo(pushRecords, userId); | ||||||
|  |             noticeCorpService.sendNotice(data); | ||||||
|  |         } else if (type == 3) { | ||||||
|  |             pushSms(pushRecords); | ||||||
|  |             PageData data = pushInfo(pushRecords, userId); | ||||||
|  |             noticeCorpService.sendNotice(data); | ||||||
|  |         } else { | ||||||
|  |             throw new RuntimeException("消息类型:【" + type + "】错误"); | ||||||
|  |         } | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 推送平台信息(站内信) | ||||||
|  |      * 注意 不能再此方法中调用数据库 再类中直接调用 会导致事务失效 private 也会导致事务失效 | ||||||
|  |      * | ||||||
|  |      * @param pushRecords 消息 | ||||||
|  |      * @param userId      接收人id | ||||||
|  |      */ | ||||||
|  |     private PageData pushInfo(PushRecords pushRecords, String userId) throws Exception { | ||||||
|  |         PageData mes = new PageData(); | ||||||
|  |         mes.put("BIANMA", "PUSH_RECORDS"); | ||||||
|  |         mes.put("SENDER_ID", "九公司应急管理");    // 发送人员ID
 | ||||||
|  |         mes.put("SENDER_NAME", "九公司应急管理");    // 发送人员姓名
 | ||||||
|  |         mes.put("SYNOPSIS", pushRecords.getMessageTitle());    // 站内信标题
 | ||||||
|  |         //mes.put("WORKURL", "/pages/application/high-risk-work/limited-space/gas-analysis/list?NameLikes=" + pd.getString("WORK_PERMIT_NUMBER"));    // 操作链接
 | ||||||
|  |         mes.put("CORPINFO_ID", "48a8ca9815814c979814ddcf041c5cd5");// 企业id
 | ||||||
|  |         mes.put("RECEIVER_ID", userId);    // 接收人员ID
 | ||||||
|  |         PageData content = new PageData(); | ||||||
|  |         content.put("msg", pushRecords.getMessageContent());// 作业编号
 | ||||||
|  |         mes.put("CONTENT", content);// 站内信内容
 | ||||||
|  |         return mes; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 推送平台信息(站内信) | ||||||
|  |      * 注意 不能再此方法中调用数据库 再类中直接调用 会导致事务失效 private 也会导致事务失效 | ||||||
|  |      * | ||||||
|  |      * @param pushRecords 消息 | ||||||
|  |      */ | ||||||
|  |     private void pushSms(PushRecords pushRecords) { | ||||||
|  |         // todo
 | ||||||
|  |         log.error("===================>推送短信信息"); | ||||||
|  |         log.error("消息内容:{}", pushRecords); | ||||||
|  |     } | ||||||
|  | } | ||||||
|  | @ -2,16 +2,10 @@ datasource.no1.driver-class-name: com.mysql.cj.jdbc.Driver | ||||||
| datasource.no1.url=jdbc:mysql://39.101.130.96:33068/qa-gwj-prevention?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=utf-8 | datasource.no1.url=jdbc:mysql://39.101.130.96:33068/qa-gwj-prevention?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=utf-8 | ||||||
| datasource.no1.username=dev | datasource.no1.username=dev | ||||||
| datasource.no1.password=Zykj@dev123456 | datasource.no1.password=Zykj@dev123456 | ||||||
| #datasource.no1.url=jdbc:mysql://127.0.0.1:3306/qa-gwj-prevention?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=utf-8 |  | ||||||
| #datasource.no1.username=root |  | ||||||
| #datasource.no1.password=123456 |  | ||||||
| datasource.no2.driver-class-name: com.mysql.cj.jdbc.Driver | datasource.no2.driver-class-name: com.mysql.cj.jdbc.Driver | ||||||
| datasource.no2.url=jdbc:mysql://39.101.130.96:33068/qa-gwj-regulatory?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=utf-8 | datasource.no2.url=jdbc:mysql://39.101.130.96:33068/qa-gwj-regulatory?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=utf-8 | ||||||
| datasource.no2.username=dev | datasource.no2.username=dev | ||||||
| datasource.no2.password=Zykj@dev123456 | datasource.no2.password=Zykj@dev123456 | ||||||
| #datasource.no2.url=jdbc:mysql://127.0.0.1:3306/qa-gwj-regulatory?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=utf-8 |  | ||||||
| #datasource.no2.username=root |  | ||||||
| #datasource.no2.password=123456 |  | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| #druid??? | #druid??? | ||||||
|  | @ -112,6 +106,7 @@ perLoc.url=http://192.168.210.32:8084 | ||||||
| perLoc.userName=qaaqadmin | perLoc.userName=qaaqadmin | ||||||
| perLoc.pwd=Cfd2023@ | perLoc.pwd=Cfd2023@ | ||||||
| baseimgpath =http://192.168.192.201:8991/file/ | baseimgpath =http://192.168.192.201:8991/file/ | ||||||
|  | tongbu.url=http://127.0.0.1:9006/qa-prevention-gwj-tongbu/ | ||||||
| 
 | 
 | ||||||
| mq.csy.data.topic=csy_docking | mq.csy.data.topic=csy_docking | ||||||
| mq.csy.data.group=scheduled_tasks_csy_docking | mq.csy.data.group=scheduled_tasks_csy_docking | ||||||
|  | @ -150,7 +145,6 @@ gongJiangXueYuanProdUrl=https://gjxy.bjttsx.com | ||||||
| gongJiangXueYuanGetImgUrl=https://wwag.qhdsafety.com/file/ | gongJiangXueYuanGetImgUrl=https://wwag.qhdsafety.com/file/ | ||||||
| 
 | 
 | ||||||
| # \u4E2D\u53F0 | # \u4E2D\u53F0 | ||||||
| tongbu.url=http://127.0.0.1:8094 |  | ||||||
| # \u6D88\u8D39\u4E2D\u53F0\u901A\u77E5 | # \u6D88\u8D39\u4E2D\u53F0\u901A\u77E5 | ||||||
| mq.consumer.dataChange.tongbu-data-change.topic=tongbu_dataChange_docking | mq.consumer.dataChange.tongbu-data-change.topic=tongbu_dataChange_docking | ||||||
| mq.consumer.dataChange.tongbu-data-change.group=tongbu_dataChange_group | mq.consumer.dataChange.tongbu-data-change.group=tongbu_dataChange_group | ||||||
|  |  | ||||||
|  | @ -120,13 +120,14 @@ | ||||||
| 
 | 
 | ||||||
| 	<!-- 列表 --> | 	<!-- 列表 --> | ||||||
| 	<select id="datalistPage" parameterType="page" resultType="pd"> | 	<select id="datalistPage" parameterType="page" resultType="pd"> | ||||||
| 		select |         select iou.NAME                                                 INSPECTION_ORIGINATOR_NAME, | ||||||
| 			iou.NAME INSPECTION_ORIGINATOR_NAME, |  | ||||||
|                iod.NAME                                                 INSPECTION_DEPARTMENT_NAME, |                iod.NAME                                                 INSPECTION_DEPARTMENT_NAME, | ||||||
|                isd.NAME                                                 INSPECTED_DEPARTMENT_NAME, |                isd.NAME                                                 INSPECTED_DEPARTMENT_NAME, | ||||||
|                isu.NAME                                                 INSPECTED_SITEUSER_NAME, |                isu.NAME                                                 INSPECTED_SITEUSER_NAME, | ||||||
|                IFNULL(GROUP_CONCAT(REPLACE(siu.NAME, '/', ',')), '') AS INSPECTION_USER_NAME, |                IFNULL(GROUP_CONCAT(REPLACE(siu.NAME, '/', ',')), '') AS INSPECTION_USER_NAME, | ||||||
| 			CASE WHEN IFNULL(se.INSPECTION_TYPE_OTHER, '') = '' THEN d.NAME ELSE se.INSPECTION_TYPE_OTHER END INSPECTION_TYPE_NAME, |                CASE | ||||||
|  |                    WHEN IFNULL(se.INSPECTION_TYPE_OTHER, '') = '' THEN d.NAME | ||||||
|  |                    ELSE se.INSPECTION_TYPE_OTHER END                    INSPECTION_TYPE_NAME, | ||||||
|                se.INSPECTION_TIME_START, |                se.INSPECTION_TIME_START, | ||||||
|                se.INSPECTION_TIME_END, |                se.INSPECTION_TIME_END, | ||||||
|                se.INSPECTION_STATUS, |                se.INSPECTION_STATUS, | ||||||
|  | @ -144,54 +145,70 @@ | ||||||
|                  LEFT JOIN VI_DEPARTMENT_ALL iod ON iod.DEPARTMENT_ID = iou.DEPARTMENT_ID |                  LEFT JOIN VI_DEPARTMENT_ALL iod ON iod.DEPARTMENT_ID = iou.DEPARTMENT_ID | ||||||
|                  LEFT JOIN OA_DEPARTMENT isd ON isd.DEPARTMENT_ID = se.INSPECTED_DEPARTMENT_ID |                  LEFT JOIN OA_DEPARTMENT isd ON isd.DEPARTMENT_ID = se.INSPECTED_DEPARTMENT_ID | ||||||
|                  LEFT JOIN SYS_USER isu ON isu.USER_ID = se.INSPECTED_SITEUSER_ID |                  LEFT JOIN SYS_USER isu ON isu.USER_ID = se.INSPECTED_SITEUSER_ID | ||||||
| 			LEFT JOIN bus_inspection_safetyenvironmental_inspector si ON si.INSPECTION_ID = se.INSPECTION_ID and si.ISDELETE = '0' |                  LEFT JOIN bus_inspection_safetyenvironmental_inspector si | ||||||
|  |                            ON si.INSPECTION_ID = se.INSPECTION_ID and si.ISDELETE = '0' | ||||||
|                  LEFT JOIN vi_user_all siu ON siu.USER_ID = si.INSPECTION_USER_ID |                  LEFT JOIN vi_user_all siu ON siu.USER_ID = si.INSPECTION_USER_ID | ||||||
|                  LEFT JOIN sys_dictionaries d ON d.BIANMA = se.INSPECTION_TYPE |                  LEFT JOIN sys_dictionaries d ON d.BIANMA = se.INSPECTION_TYPE | ||||||
|         where se.ISDELETE = '0' and se.INSPECTION_STATUS = '2' |         where se.ISDELETE = '0' and se.INSPECTION_STATUS = '2' | ||||||
| 		<if test="pd.roleLevel != null and pd.roleLevel != ''"><!-- 权限显示 --> |         <if test="pd.roleLevel != null and pd.roleLevel != ''"> | ||||||
|  |             <!-- 权限显示 --> | ||||||
|             <choose> |             <choose> | ||||||
|                 <when test='pd.roleLevel == "0"'> |                 <when test='pd.roleLevel == "0"'> | ||||||
|                 </when> |                 </when> | ||||||
|                 <when test='pd.roleLevel == "1"'> |                 <when test='pd.roleLevel == "1"'> | ||||||
| 					and siu.DEPARTMENT_ID in (${pd.supDeparIds}) or se.INSPECTED_DEPARTMENT_ID in (${pd.supDeparIds}) |                     and siu.DEPARTMENT_ID in (${pd.supDeparIds}) | ||||||
|  |                        or se.INSPECTED_DEPARTMENT_ID in (${pd.supDeparIds}) | ||||||
|                 </when> |                 </when> | ||||||
|                 <when test='pd.roleLevel == "2"'> |                 <when test='pd.roleLevel == "2"'> | ||||||
| 					and siu.USER_ID in (#{pd.loginUserId}) or se.INSPECTED_SITEUSER_ID in (#{pd.loginUserId}) |                     and siu.USER_ID in (#{pd.loginUserId}) | ||||||
|  |                        or se.INSPECTED_SITEUSER_ID in (#{pd.loginUserId}) | ||||||
|                 </when> |                 </when> | ||||||
|             </choose> |             </choose> | ||||||
|         </if> |         </if> | ||||||
| 		<if test='pd.INSPECTED_SITEUSER_ID != null and pd.INSPECTED_SITEUSER_ID != ""'><!-- 被检查单位现场负责人 --> |         <if test='pd.INSPECTED_SITEUSER_ID != null and pd.INSPECTED_SITEUSER_ID != ""'> | ||||||
|  |             <!-- 被检查单位现场负责人 --> | ||||||
|             and se.INSPECTED_SITEUSER_ID = #{pd.INSPECTED_SITEUSER_ID} |             and se.INSPECTED_SITEUSER_ID = #{pd.INSPECTED_SITEUSER_ID} | ||||||
|         </if> |         </if> | ||||||
| 		<if test="pd.INSPECTION_SUBJECT != null and pd.INSPECTION_SUBJECT != ''"><!-- 检查题目 --> |         <if test="pd.INSPECTION_SUBJECT != null and pd.INSPECTION_SUBJECT != ''"> | ||||||
|  |             <!-- 检查题目 --> | ||||||
|             and se.INSPECTION_SUBJECT = #{pd.INSPECTION_SUBJECT,jdbcType=VARCHAR} |             and se.INSPECTION_SUBJECT = #{pd.INSPECTION_SUBJECT,jdbcType=VARCHAR} | ||||||
|         </if> |         </if> | ||||||
| 		<if test="pd.INSPECTED_DEPARTMENT_NAME != null and pd.INSPECTED_DEPARTMENT_NAME != ''"><!-- 被检查单位 --> |         <if test="pd.INSPECTED_DEPARTMENT_NAME != null and pd.INSPECTED_DEPARTMENT_NAME != ''"> | ||||||
|  |             <!-- 被检查单位 --> | ||||||
|             and isd.NAME LIKE CONCAT(CONCAT('%', #{pd.INSPECTED_DEPARTMENT_NAME}), '%') |             and isd.NAME LIKE CONCAT(CONCAT('%', #{pd.INSPECTED_DEPARTMENT_NAME}), '%') | ||||||
|         </if> |         </if> | ||||||
| 		<if test="pd.INSPECTION_DEPARTMENT_NAME != null and pd.INSPECTION_DEPARTMENT_NAME != ''"><!-- 检查部门 --> |         <if test="pd.INSPECTION_DEPARTMENT_NAME != null and pd.INSPECTION_DEPARTMENT_NAME != ''"> | ||||||
|  |             <!-- 检查部门 --> | ||||||
|             and iod.NAME LIKE CONCAT(CONCAT('%', #{pd.INSPECTION_DEPARTMENT_NAME}), '%') |             and iod.NAME LIKE CONCAT(CONCAT('%', #{pd.INSPECTION_DEPARTMENT_NAME}), '%') | ||||||
|         </if> |         </if> | ||||||
| 		<if test="pd.INSPECTION_ORIGINATOR_NAME != null and pd.INSPECTION_ORIGINATOR_NAME != ''"><!-- 检查发起人 --> |         <if test="pd.INSPECTION_ORIGINATOR_NAME != null and pd.INSPECTION_ORIGINATOR_NAME != ''"> | ||||||
|  |             <!-- 检查发起人 --> | ||||||
|             and iou.NAME LIKE CONCAT(CONCAT('%', #{pd.INSPECTION_ORIGINATOR_NAME}), '%') |             and iou.NAME LIKE CONCAT(CONCAT('%', #{pd.INSPECTION_ORIGINATOR_NAME}), '%') | ||||||
|         </if> |         </if> | ||||||
| 		<if test="pd.INSPECTION_TYPE != null and pd.INSPECTION_TYPE != ''"><!-- 检查类型 --> |         <if test="pd.INSPECTION_TYPE != null and pd.INSPECTION_TYPE != ''"> | ||||||
|  |             <!-- 检查类型 --> | ||||||
|             and se.INSPECTION_TYPE = #{pd.INSPECTION_TYPE} |             and se.INSPECTION_TYPE = #{pd.INSPECTION_TYPE} | ||||||
|         </if> |         </if> | ||||||
| 		<if test="pd.INSPECTION_TIME_START != null and pd.INSPECTION_TIME_START != ''"><!-- 检查时间 --> |         <if test="pd.INSPECTION_TIME_START != null and pd.INSPECTION_TIME_START != ''"> | ||||||
|  |             <!-- 检查时间 --> | ||||||
|             and se.INSPECTION_TIME_START >= CONCAT(#{pd.INSPECTION_TIME_START}, ' 00:00') |             and se.INSPECTION_TIME_START >= CONCAT(#{pd.INSPECTION_TIME_START}, ' 00:00') | ||||||
|         </if> |         </if> | ||||||
| 		<if test="pd.INSPECTION_TIME_END != null and pd.INSPECTION_TIME_END != ''"><!-- 检查时间 --> |         <if test="pd.INSPECTION_TIME_END != null and pd.INSPECTION_TIME_END != ''"> | ||||||
|  |             <!-- 检查时间 --> | ||||||
|             and se.INSPECTION_TIME_END <= CONCAT(#{pd.INSPECTION_TIME_END}, ' 23:59') |             and se.INSPECTION_TIME_END <= CONCAT(#{pd.INSPECTION_TIME_END}, ' 23:59') | ||||||
|         </if> |         </if> | ||||||
| 		<if test="pd.INSPECTION_STATUS != null and pd.INSPECTION_STATUS != ''"><!-- 检查状态 --> |         <if test="pd.INSPECTION_STATUS != null and pd.INSPECTION_STATUS != ''"> | ||||||
|  |             <!-- 检查状态 --> | ||||||
|             and se.INSPECTION_STATUS = #{pd.INSPECTION_STATUS} |             and se.INSPECTION_STATUS = #{pd.INSPECTION_STATUS} | ||||||
|         </if> |         </if> | ||||||
| 		<if test="pd.CORPINFO_ID != null and pd.CORPINFO_ID != ''"><!-- 关键词检索 --> |         <if test="pd.CORPINFO_ID != null and pd.CORPINFO_ID != ''"> | ||||||
|  |             <!-- 关键词检索 --> | ||||||
|             and se.CORPINFO_ID = #{pd.CORPINFO_ID} |             and se.CORPINFO_ID = #{pd.CORPINFO_ID} | ||||||
|         </if> |         </if> | ||||||
|         GROUP BY se.INSPECTION_ID |         GROUP BY se.INSPECTION_ID | ||||||
| 		ORDER BY se.INSPECTION_TIME_START DESC |         ORDER BY FIELD(se.INSPECTION_STATUS, '2', '1', '0', '3', '4', '5', '6', '7', '8', '-1', '-2'), | ||||||
|  |                  FIELD(if(se.INSPECTED_SITEUSER_ID = #{pd.loginUserId},se.INSPECTED_SITEUSER_ID,'1'), se.INSPECTED_SITEUSER_ID, '1'), | ||||||
|  |                  se.INSPECTION_TIME_START DESC | ||||||
|     </select> |     </select> | ||||||
| 
 | 
 | ||||||
| 	<!-- 列表(全部) --> | 	<!-- 列表(全部) --> | ||||||
|  |  | ||||||
|  | @ -721,7 +721,9 @@ | ||||||
| 			) | 			) | ||||||
| 		</if> | 		</if> | ||||||
| 		GROUP BY f.INSPECTION_ID | 		GROUP BY f.INSPECTION_ID | ||||||
| 		ORDER BY f.INSPECTION_TIME_END DESC | 		ORDER BY FIELD(if(f.INSPECTED_SITEUSER_ID = #{pd.loginUserId},f.INSPECTED_SITEUSER_ID,'1'), f.INSPECTED_SITEUSER_ID, '1'), | ||||||
|  | 		field(f.INSPECTION_STATUS , '3','4','6','7','5','0','1','2','8','-1','-2'), | ||||||
|  | 		f.INSPECTION_TIME_END DESC | ||||||
| 	</select> | 	</select> | ||||||
| 
 | 
 | ||||||
| 	<select id="statisticsBranchGroupDept" parameterType="pd" resultType="pd"> | 	<select id="statisticsBranchGroupDept" parameterType="pd" resultType="pd"> | ||||||
|  |  | ||||||
|  | @ -0,0 +1,53 @@ | ||||||
|  | <?xml version="1.0" encoding="UTF-8"?> | ||||||
|  | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | ||||||
|  | <mapper namespace="com.zcloud.mapper.datasource.messages.MessagesMapper"> | ||||||
|  | 
 | ||||||
|  |     <select id="install"> | ||||||
|  |         insert into push_records | ||||||
|  |         <trim prefix="(" suffix=")" suffixOverrides=","> | ||||||
|  |             <if test="id != null"> | ||||||
|  |                 ID, | ||||||
|  |             </if> | ||||||
|  |             <if test="phone != null and phone != ''"> | ||||||
|  |                 PHONE, | ||||||
|  |             </if> | ||||||
|  |             <if test="messageTitle != null and messageTitle != ''"> | ||||||
|  |                 MESSAGE_TITLE, | ||||||
|  |             </if> | ||||||
|  |             <if test="messageContent != null and messageContent != ''"> | ||||||
|  |                 MESSAGE_CONTENT, | ||||||
|  |             </if> | ||||||
|  |             <if test="messageType != null"> | ||||||
|  |                 MESSAGE_TYPE, | ||||||
|  |             </if> | ||||||
|  |             <if test="sendTime != null and sendTime != ''"> | ||||||
|  |                 SEND_TIME, | ||||||
|  |             </if> | ||||||
|  |         </trim> | ||||||
|  |         values | ||||||
|  |         <trim prefix="(" suffix=")" suffixOverrides=","> | ||||||
|  |             <if test="id != null"> | ||||||
|  |                 #{id}, | ||||||
|  |             </if> | ||||||
|  |             <if test="phone != null and phone != ''"> | ||||||
|  |                 #{phone}, | ||||||
|  |             </if> | ||||||
|  |             <if test="messageTitle != null and messageTitle != ''"> | ||||||
|  |                 #{messageTitle}, | ||||||
|  |             </if> | ||||||
|  |             <if test="messageContent != null and messageContent != ''"> | ||||||
|  |                 #{messageContent}, | ||||||
|  |             </if> | ||||||
|  |             <if test="messageType != null"> | ||||||
|  |                 #{messageType}, | ||||||
|  |             </if> | ||||||
|  |             <if test="sendTime != null and sendTime != ''"> | ||||||
|  |                 #{sendTime}, | ||||||
|  |             </if> | ||||||
|  |         </trim> | ||||||
|  |     </select> | ||||||
|  | 
 | ||||||
|  |     <select id="findUserIdByPhone" resultType="java.lang.String"> | ||||||
|  |         select USER_ID from sys_user where USERNAME = #{phone} and ISDELETE = 0 limit 1 | ||||||
|  |     </select> | ||||||
|  | </mapper> | ||||||
		Loading…
	
		Reference in New Issue