短信对接
This commit is contained in:
@@ -169,9 +169,9 @@ public class LxyHdTjController {
|
||||
List<Lxy_bm> grxxes = lxyGrxxService.dao().query(Lxy_bm.class, Cnd.where("hdid", "=", hdid).and("bmzt", "=", 5));
|
||||
List<String> loginnames = grxxes.stream().map(Lxy_bm::getLoginname).collect(Collectors.toList());
|
||||
loginnames.forEach(loginname -> {
|
||||
msgApi.sendMsg(content, "", "", "", "4", new ArrayList<>() {{
|
||||
/* msgApi.sendMsg(content, "", "", "", "4", new ArrayList<>() {{
|
||||
add(NutMap.NEW().addv("userId", loginname));
|
||||
}});
|
||||
}});*/
|
||||
});
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -125,19 +125,19 @@ public class MsgNotifyServiceImpl extends ViServiceImpl<MsgNotify> implements Ms
|
||||
@Override
|
||||
public void run() {
|
||||
if (sendTypes.contains("0")) {
|
||||
msgApi.sendMsg(content, null, null, null, "0", receivers);
|
||||
// msgApi.sendMsg(content, null, null, null, "0", receivers);
|
||||
}
|
||||
if (sendTypes.contains("1")) {
|
||||
msgApi.sendMsg(content, null, null, null, "1", receivers);
|
||||
// msgApi.sendMsg(content, null, null, null, "1", receivers);
|
||||
}
|
||||
if (sendTypes.contains("2")) {
|
||||
msgApi.sendMsg(content, null, null, null, "2", receivers);
|
||||
// msgApi.sendMsg(content, null, null, null, "2", receivers);
|
||||
}
|
||||
if (sendTypes.contains("4")) {
|
||||
msgApi.sendMsg(content, null, null, null, "4", receivers);
|
||||
// msgApi.sendMsg(content, null, null, null, "4", receivers);
|
||||
}
|
||||
if (sendTypes.contains("5")) {
|
||||
msgApi.sendMsg(content, null, null, null, "5", receivers);
|
||||
// msgApi.sendMsg(content, null, null, null, "5", receivers);
|
||||
}
|
||||
}
|
||||
}.start();
|
||||
|
||||
@@ -10,6 +10,7 @@ import io.v.nutz.base.dao.CndPlus;
|
||||
import io.v.nutz.base.query.PageForm;
|
||||
import io.v.nutz.sys.models.Sys_home_activity;
|
||||
import io.v.nutz.task.services.TaskPlatformService;
|
||||
import io.v.nutz.web.commons.base.Globals;
|
||||
import io.v.nutz.zhgh.data.model.MatchConditionStructure;
|
||||
import io.v.nutz.zhgh.data.service.MatchConditionStructureService;
|
||||
import io.v.nutz.zhgh.mobileHome.service.MobileHomeService;
|
||||
@@ -42,10 +43,7 @@ import org.nutz.mvc.annotation.Ok;
|
||||
import org.nutz.mvc.annotation.Param;
|
||||
import org.nutz.trans.Trans;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
@@ -263,7 +261,7 @@ public class WelfareProjectMangeController {
|
||||
projectService.dao().delete(MatchConditionStructure.class, project.getConditionStructureId());
|
||||
}
|
||||
projectService.dao().clear(WelfareProjectSubject.class, Cnd.where("projectId", "=", id));
|
||||
if(ObjectUtil.isNotEmpty(welfareProjectSubject)){
|
||||
if (ObjectUtil.isNotEmpty(welfareProjectSubject)) {
|
||||
projectService.dao().clear(WelfareProjectSubjectOption.class, Cnd.where("subjectId", "=", welfareProjectSubject.getId()));
|
||||
}
|
||||
projectService.dao().clear(WelfareUserSelection.class, Cnd.where("welfareId", "=", id));
|
||||
@@ -301,7 +299,7 @@ public class WelfareProjectMangeController {
|
||||
public Object sendMsgToNotWelfareUsers(String projectId, String sendMsgValue) {
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
u.loginname as userId
|
||||
u.loginname
|
||||
FROM
|
||||
welfare_list wl
|
||||
left join sys_user u on u.id = wl.userId
|
||||
@@ -318,7 +316,13 @@ public class WelfareProjectMangeController {
|
||||
""");
|
||||
sql.setParam("projectId", projectId);
|
||||
List<NutMap> userList = listService.listMap(sql);
|
||||
msgApi.sendMsg(sendMsgValue, "福利选择链接", "", "https://zhgh.jiangnan.edu.cn/mobile/welfare/list/receive?projectId=4fa233704ddb41bc8e34e966efeda0a4", "4", userList);
|
||||
Set<String> loginNameList = userList.stream().map(user -> user.getString("loginname")).collect(Collectors.toSet());
|
||||
String loginNames = loginNameList.stream().collect(Collectors.joining(","));
|
||||
|
||||
WelfareProject project = dao.fetch(WelfareProject.class, projectId);
|
||||
String link = Globals.AppDomain + "/mobile/welfare/list/receive?projectId=%s".formatted(projectId);
|
||||
String imageUrl = Globals.AppDomain + "/file_server/fileStreamPreview?id=" + project.getCover();
|
||||
msgApi.sendMsg(List.of("DingTalk"), loginNames, 0, "职工福利", sendMsgValue, imageUrl, link);
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
@@ -464,9 +464,9 @@ public class RxdjShController {
|
||||
sql.setParam("year", year);
|
||||
List<Record> list = baseService.list(sql);
|
||||
for (Record r : list) {
|
||||
msgApi.sendMsg(content, "", "", "", "4", new ArrayList<>() {{
|
||||
/* msgApi.sendMsg(content, "", "", "", "4", new ArrayList<>() {{
|
||||
add(NutMap.NEW().addv("userId", r.getString("loginname")));
|
||||
}});
|
||||
}});*/
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user