Browse Source

Merge branch 'develop' of gitadmin/tuoheng_telecomumale into release

tags/v1.0.0^2
chengwang 1 year ago
parent
commit
b6aac29d25
4 changed files with 11 additions and 5 deletions
  1. +1
    -0
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/third/dsp/NoticeWeChatMiniProgramService.java
  2. +5
    -0
      tuoheng-service/tuoheng-miniprogram/src/main/java/com/tuoheng/miniprogram/entity/wx/WxMessageRequest.java
  3. +1
    -1
      tuoheng-service/tuoheng-miniprogram/src/main/java/com/tuoheng/miniprogram/enums/WeiXinRequestEnum.java
  4. +4
    -4
      tuoheng-service/tuoheng-miniprogram/src/main/java/com/tuoheng/miniprogram/service/impl/WxServiceImpl.java

+ 1
- 0
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/third/dsp/NoticeWeChatMiniProgramService.java View File

@@ -39,6 +39,7 @@ public class NoticeWeChatMiniProgramService {
String url = CommonConfig.wechatURL + SystemConstant.API_WEIXIN_SEND_MESSAGE;
JSONObject jsonObject = new JSONObject();
jsonObject.put("tenantId", inspection.getTenantId());
jsonObject.put("deptId", inspection.getDeptId());
jsonObject.put("inspectionId", inspection.getId());
jsonObject.put("questionName", questionType.getName());
jsonObject.put("questionDesc", questionType.getContent());

+ 5
- 0
tuoheng-service/tuoheng-miniprogram/src/main/java/com/tuoheng/miniprogram/entity/wx/WxMessageRequest.java View File

@@ -14,6 +14,11 @@ public class WxMessageRequest {
*/
private String inspectionId;

/**
* 部门id
*/
private String deptId;

/**
* 问题id
*/

+ 1
- 1
tuoheng-service/tuoheng-miniprogram/src/main/java/com/tuoheng/miniprogram/enums/WeiXinRequestEnum.java View File

@@ -12,7 +12,7 @@ package com.tuoheng.miniprogram.enums;
public enum WeiXinRequestEnum {

INSPECTION_ID_IS_NULL(120010, "任务id为空"),
QUESTION_ID_IS_NULL(120011, "问题id为空"),
DEPT_ID_IS_NULL(120011, "问题id为空"),
TENANT_ID_NOT_EXIST(120012, "租户id为空"),
CREATE_TIME_IS_NULL(120013, "上报时间为空"),
INSPECTION_NAME_NOT_EXIST(120014, "问题标题不存在"),

+ 4
- 4
tuoheng-service/tuoheng-miniprogram/src/main/java/com/tuoheng/miniprogram/service/impl/WxServiceImpl.java View File

@@ -243,9 +243,9 @@ public class WxServiceImpl implements IWxService {
if(StringUtils.isEmpty(wxMessageRequest.getInspectionId())){
return JsonResult.error(WeiXinRequestEnum.INSPECTION_ID_IS_NULL.getCode(),WeiXinRequestEnum.INSPECTION_ID_IS_NULL.getMsg());
}
// if(StringUtils.isEmpty(wxMessageRequest.getQuestionId())){
// return JsonResult.error(WeiXinRequestEnum.QUESTION_ID_IS_NULL.getCode(),WeiXinRequestEnum.QUESTION_ID_IS_NULL.getMsg());
// }
if(StringUtils.isEmpty(wxMessageRequest.getDeptId())){
return JsonResult.error(WeiXinRequestEnum.DEPT_ID_IS_NULL.getCode(),WeiXinRequestEnum.DEPT_ID_IS_NULL.getMsg());
}
if(StringUtils.isEmpty(wxMessageRequest.getCreateTime())){
return JsonResult.error(WeiXinRequestEnum.CREATE_TIME_IS_NULL.getCode(),WeiXinRequestEnum.CREATE_TIME_IS_NULL.getMsg());
}
@@ -258,7 +258,7 @@ public class WxServiceImpl implements IWxService {
//根据租户id查询用户列表
List<User> users = userMapper.selectList(Wrappers.<User>lambdaQuery()
.eq(User::getMark, MarkEnum.VALID.getCode())
.eq(User::getTenantId, wxMessageRequest.getTenantId())
.eq(User::getDeptId, wxMessageRequest.getDeptId())
.eq(User::getStatus, 1));
if(CollectionUtil.isEmpty(users) || users.size() == 0){
return JsonResult.error("此租户下没有用户");

Loading…
Cancel
Save