短信对接
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user