提交修改
This commit is contained in:
parent
9ea0c97cdd
commit
c30ce3c750
@ -8,6 +8,7 @@ import com.dingtalk.api.response.OapiMessageCorpconversationAsyncsendV2Response;
|
||||
import com.lz.common.utils.DingTalkUtil;
|
||||
import com.lz.common.utils.R;
|
||||
import com.lz.common.utils.StringUtil;
|
||||
import com.lz.modules.app.dto.DingDingMsg;
|
||||
import com.lz.modules.app.entity.StaffEntity;
|
||||
import com.lz.modules.app.service.StaffService;
|
||||
import com.lz.modules.third.entity.ThirdAppConfig;
|
||||
@ -40,7 +41,10 @@ public class DingDingController {
|
||||
|
||||
//http://localhost:8080/lz_management/dingding/msg?username=18458195149&title=%E8%AF%B7%E6%B3%A8%E6%84%8F&content=%E9%A1%B9%E7%9B%AE%E8%A6%81%E8%BF%87%E6%9C%9F%E4%BA%86
|
||||
@RequestMapping("/msg")
|
||||
public R dingdingxiaoxi(String username, String title, String content) {
|
||||
public R dingdingxiaoxi(DingDingMsg msg) {
|
||||
String username = msg.getUsername();
|
||||
String title = msg.getTitle();
|
||||
String content = msg.getContent();
|
||||
String appid = "856016278";
|
||||
StaffEntity staffEntity = staffService.selectByPhone(username);
|
||||
ThirdAppConfig thirdAppConfig = thirdAppConfigService.getByAppId(appid);
|
||||
@ -107,9 +111,9 @@ public class DingDingController {
|
||||
} else {
|
||||
j = 0;
|
||||
String xx = sb.toString();
|
||||
if(StringUtil.isNotBlank(xx)){
|
||||
char [] yy = xx.toCharArray();
|
||||
if(yy[yy.length -1 ] == '#'){
|
||||
if (StringUtil.isNotBlank(xx)) {
|
||||
char[] yy = xx.toCharArray();
|
||||
if (yy[yy.length - 1] == '#') {
|
||||
sb.append(" ");
|
||||
}
|
||||
}
|
||||
|
||||
11
src/main/java/com/lz/modules/app/dto/DingDingMsg.java
Normal file
11
src/main/java/com/lz/modules/app/dto/DingDingMsg.java
Normal file
@ -0,0 +1,11 @@
|
||||
package com.lz.modules.app.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class DingDingMsg {
|
||||
private String username;
|
||||
private String title;
|
||||
private String content ;
|
||||
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user