ycl-common/src/main/java/com/ycl/entity/user/UmsAdmin.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
ycl-platform/src/main/java/com/ycl/common/dingding/DingCommon.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
ycl-platform/src/main/java/com/ycl/entity/message/DingMessage.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
ycl-platform/src/main/java/com/ycl/service/auth/impl/AuthService.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
ycl-platform/src/main/java/com/ycl/timer/SendDingMsg.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
ycl-platform/src/main/resources/application-online.yml | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
ycl-common/src/main/java/com/ycl/entity/user/UmsAdmin.java
@@ -103,6 +103,7 @@ private String openid; @ApiModelProperty(value = "钉钉账户id") @TableField("account_id") private Long accountId; @ApiModelProperty(value = "是否为网格管理员:0->不是;1->是") ycl-platform/src/main/java/com/ycl/common/dingding/DingCommon.java
@@ -62,7 +62,6 @@ // 判断ding 信息是否存在 boolean hasDing = redisTemplate.hasKey("ding"); if (hasDing) { log.info("redis正常有消息"); String dingStr = redisTemplate.opsForValue().get("ding"); JSONObject dingObj = JSONObject.parseObject(dingStr); String getToken = dingObj.getString("token"); @@ -86,6 +85,12 @@ DingUserInfo dingUserInfo = BeanUtil.toBean(resObj, DingUserInfo.class); String accId = DingEncodeUtil.getMD5(resObj.getString("employeeCode").getBytes()); dingUserInfo.setUserId(Long.parseLong(accId)); String employeeCode = resObj.getString("employeeCode"); JSONArray users = getAccountId(Arrays.asList(employeeCode)); JSONObject jsonObject = users.getJSONObject(0); String accountId = jsonObject.getString("accountId"); dingUserInfo.setAccountId(Long.parseLong(accountId)); return dingUserInfo; } } ycl-platform/src/main/java/com/ycl/entity/message/DingMessage.java
@@ -68,7 +68,7 @@ /** * 发送时间 */ @TableField("body") @TableField("send_time") @ApiModelProperty(value = "发送时间") private Date sendTime; @@ -76,8 +76,8 @@ /** * 是否扫描,0未扫描-1已扫描 */ @TableField("status") @TableField("if_scan") @ApiModelProperty(value = "是否扫描,0未扫描-1已扫描") private Short if_scan; private Short ifScan; } ycl-platform/src/main/java/com/ycl/service/auth/impl/AuthService.java
@@ -58,6 +58,7 @@ userParam.setOpenid(openid); //openid userParam.setIsDy(Byte.parseByte("0")); userParam.setMobile(""); userParam.setAccountId(dingUserInfo.getAccountId()); String encodePassword = passwordEncoder.encode("123456"); userParam.setPassword(encodePassword); //密码 userParam.setStatus(1); //状态 ycl-platform/src/main/java/com/ycl/timer/SendDingMsg.java
@@ -51,12 +51,12 @@ String baseCaseCode = dingMessage.getBaseCaseCode(); Long accountId = dingMessage.getAccountId(); Long messageId = dingMessage.getId(); String text = "# 遂昌云执法:有待处理的任务 \n " + String text = "遂昌云执法:有待处理的任务\n" + "·您有1条待处理事件。事件编号: \n " + baseCaseCode; String title = "您有一条工作通知"; try { dingMessage.setIf_scan(SCAN_FINISH); dingMessage.setIfScan(SCAN_FINISH); dingMessage.setSendTime(new Date()); dingCommon.sendDingMsgStr(accountId + "", text); log.info("发送一条工作通知,消息id{}", messageId); ycl-platform/src/main/resources/application-online.yml
@@ -74,12 +74,6 @@ passWord: a12345677 ip: 10.10.10.10 DH: web_url: http://172.28.194.185:8281 port: 8281 userName: zfgy passWord: zfj12345 aliyun: oss: endpoint: http://oss-cn-zjls-lszwy-d01-a.ops.zjlscloud.com @@ -92,6 +86,7 @@ port: 8281 userName: zfgy passWord: zfj12345 #专有钉钉参数 zzding : app-key : sczhzfpt-81R3ErbU00G4VoXaEBruq