Browse Source

修改小程序配置

master
zhangye 4 weeks ago
parent
commit
b57f3f6989
  1. 4
      research-common/src/main/java/com/research/common/constant/WeiXinConstants.java
  2. 23
      research-system/src/main/java/com/research/system/service/impl/TaskServiceImpl.java

4
research-common/src/main/java/com/research/common/constant/WeiXinConstants.java

@ -59,9 +59,9 @@ public class WeiXinConstants {
* 小程序消息模板枚举
*/
public enum GzhMessageType {
USER_AUDIT(1, "账号注册申请审批通知", GZH_MSG_TEMPLATE_USER_AUDIT, MINI_PAGE_INDEX),
USER_AUDIT(1, "账号注册申请审批通知", GZH_MSG_TEMPLATE_USER_AUDIT, null),
SYS_AUDIT(2, "任务审核提醒", GZH_MSG_TEMPLATE_SYS_AUDIT, MINI_PAGE_TASK),
MEETING_AUDIT(3, "会议预约成功通知", GZH_MSG_TEMPLATE_MEETING_AUDIT, MINI_PAGE_INDEX),
MEETING_AUDIT(3, "会议预约成功通知", GZH_MSG_TEMPLATE_MEETING_AUDIT, null),
;
public final int value;
public final String phase;

23
research-system/src/main/java/com/research/system/service/impl/TaskServiceImpl.java

@ -7,11 +7,13 @@ import cn.hutool.core.util.IdUtil;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil;
import cn.hutool.poi.excel.BigExcelWriter;
import com.research.common.constant.WeiXinConstants;
import com.research.common.core.domain.entity.SysRole;
import com.research.common.core.domain.model.LoginUser;
import com.research.common.exception.ServiceException;
import com.research.common.exception.base.BaseException;
import com.research.common.utils.SecurityUtils;
import com.research.common.utils.SendGzhMessageUtil;
import com.research.system.domain.dto.TaskDto;
import com.research.system.domain.po.*;
import com.research.system.domain.vo.ClientPrjProjInfoVo;
@ -572,6 +574,27 @@ public class TaskServiceImpl implements ITaskService {
updateMember.setUpdateTime(new Date());
taskMemberMapper.updateByPrimaryKeySelective(updateMember);
}
// try {
// //根据接收者的userId获取对应的公众号openId
// reviewerList.forEach(userId -> {
// String openId = sysUserService.getGzhOpenIdByUnionId(tasTaskMember.get);
// if(ObjectUtil.isNotNull(openId)){
// //发送公众号通知。需要信息:用户名称、联系电话、申请时间、申请岗位
// SendGzhMessageUtil.sendGzhMessage(
// WeiXinConstants.GzhMessageType.USER_AUDIT,
// openId,
// Arrays.asList(ktsKtGroupMemberAduit.getMemberName(),
// ktsKtGroupMemberAduit.getMemberPhone(),
// DateUtil.format(new Date(), "yyyy-MM-dd"),
// ktsKtGroupMemberAduit.getType().equals("1") ? "单位负责人" : "参与人员")
// );
// }
// });
// }catch (Exception e){
// log.error("发送公众号通知失败", e);
// }
}
@Override

Loading…
Cancel
Save