Commit 7616f1fb by 墨竹

Merge branch 'feature-daiban-12-14' into developer

parents 5b086c29 6e3d948f
...@@ -24,6 +24,12 @@ public class PendingTaskDetailDTO implements Serializable { ...@@ -24,6 +24,12 @@ public class PendingTaskDetailDTO implements Serializable {
private String relationId; private String relationId;
/** /**
* 业务字段
*/
private String businessId;
/**
* 0-不良评价回访 1-ecm话务任务 ,3群发任务 4活动 * 0-不良评价回访 1-ecm话务任务 ,3群发任务 4活动
*/ */
private Integer taskType; private Integer taskType;
...@@ -42,6 +48,10 @@ public class PendingTaskDetailDTO implements Serializable { ...@@ -42,6 +48,10 @@ public class PendingTaskDetailDTO implements Serializable {
* 逾期时间 * 逾期时间
*/ */
private Date overdueTime; private Date overdueTime;
/**
* 失效时间
*/
private Date invalidTime;
/** /**
* 门店id * 门店id
...@@ -77,6 +87,22 @@ public class PendingTaskDetailDTO implements Serializable { ...@@ -77,6 +87,22 @@ public class PendingTaskDetailDTO implements Serializable {
*/ */
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
public Date getInvalidTime() {
return invalidTime;
}
public void setInvalidTime(Date invalidTime) {
this.invalidTime = invalidTime;
}
public String getBusinessId() {
return businessId;
}
public void setBusinessId(String businessId) {
this.businessId = businessId;
}
public String getExtendContent() { public String getExtendContent() {
return extendContent; return extendContent;
} }
......
...@@ -17,6 +17,29 @@ public class NoticeMessageQDTO implements Serializable { ...@@ -17,6 +17,29 @@ public class NoticeMessageQDTO implements Serializable {
private int messageType; private int messageType;
private String templateCode; private String templateCode;
private Map<String, String> contentMap; private Map<String, String> contentMap;
public NoticeMessageQDTO() {
}
/**
* 发送队列需要序列化的字段
*
* @param enterpriseId
* @param clerkId
* @param optTargetId
* @param messageType
* @param contentMap
* @param extendContent
*/
public NoticeMessageQDTO(String enterpriseId, String clerkId, String optTargetId, int messageType, Map<String, String> contentMap, Map<String, Object> extendContent) {
this.enterpriseId = enterpriseId;
this.clerkId = clerkId;
this.optTargetId = optTargetId;
this.messageType = messageType;
this.contentMap = contentMap;
this.extendContent = extendContent;
}
/** /**
* 拓展内容 * 拓展内容
*/ */
......
...@@ -23,14 +23,20 @@ public class PendingTaskQDTO implements Serializable { ...@@ -23,14 +23,20 @@ public class PendingTaskQDTO implements Serializable {
*/ */
private String relationId; private String relationId;
/**
* 业务id 如果是活动:活动id;话务:ecmid;群发:ecmid;月指标-1
*/
private String businessId;
/** /**
* NoticeMessageTypeEnum * NoticeMessageTypeEnum
* 0-不良评价回访 1-ecm话务任务 ,3群发任务 4活动 * 0-月指标 1-ecm话务任务 ,3群发任务 4活动
*/ */
private Integer taskType; private Integer taskType;
/** /**
* * 标题
*/ */
private String title; private String title;
...@@ -60,11 +66,46 @@ public class PendingTaskQDTO implements Serializable { ...@@ -60,11 +66,46 @@ public class PendingTaskQDTO implements Serializable {
*/ */
private String clerkId; private String clerkId;
public PendingTaskQDTO() {
}
/**
* @param enterpriseId 企业id
* @param relationId 关联id relation解释
* @param businessId 业务id 如果是活动:活动id;话务:ecmid;群发:ecmid;月指标-1
* @param taskType 任务类型
* @param title 标题
* @param description 描述
* @param overdueTime 逾期时间
* @param invalidTime 失效时间
* @param storeId 门店id
* @param clerkId 导购id
*/
public PendingTaskQDTO(String enterpriseId, String relationId, String businessId, Integer taskType, String title, String description, Date overdueTime, Date invalidTime, String storeId, String clerkId) {
this.enterpriseId = enterpriseId;
this.relationId = relationId;
this.businessId = businessId;
this.taskType = taskType;
this.title = title;
this.description = description;
this.overdueTime = overdueTime;
this.invalidTime = invalidTime;
this.storeId = storeId;
this.clerkId = clerkId;
}
/** /**
*/ */
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
public String getBusinessId() {
return businessId;
}
public void setBusinessId(String businessId) {
this.businessId = businessId;
}
public String getEnterpriseId() { public String getEnterpriseId() {
return enterpriseId; return enterpriseId;
} }
......
...@@ -29,6 +29,7 @@ public enum NoticeMessageTypeEnum { ...@@ -29,6 +29,7 @@ public enum NoticeMessageTypeEnum {
STORE_ACCOUNT(3001, "门店账号申请", NoticeMessageCategoryTypeEnum.OTHER.getType(), "store_account", "/pages/route/index?pageType=", "store_relate_store_record_list"), STORE_ACCOUNT(3001, "门店账号申请", NoticeMessageCategoryTypeEnum.OTHER.getType(), "store_account", "/pages/route/index?pageType=", "store_relate_store_record_list"),
MEMBER_FACE(3002, "门店账号申请", NoticeMessageCategoryTypeEnum.OTHER.getType(), "member_face", "/pages/route/index?pageType=", "hbapp_customer_edit_tag"),
STORE_ACCOUNT_REFUSE(3010, "门店账号申请", NoticeMessageCategoryTypeEnum.OTHER.getType(), "store_account_refuse", "/pages/route/index?pageType=", "store_relate_store_record_list"), STORE_ACCOUNT_REFUSE(3010, "门店账号申请", NoticeMessageCategoryTypeEnum.OTHER.getType(), "store_account_refuse", "/pages/route/index?pageType=", "store_relate_store_record_list"),
STORE_ACCOUNT_AGREE(3011, "门店账号申请", NoticeMessageCategoryTypeEnum.OTHER.getType(), "store_account_agree", "/pages/route/index?pageType=", "store_relate_store_record_list"), STORE_ACCOUNT_AGREE(3011, "门店账号申请", NoticeMessageCategoryTypeEnum.OTHER.getType(), "store_account_agree", "/pages/route/index?pageType=", "store_relate_store_record_list"),
......
...@@ -5,8 +5,9 @@ package com.gic.haoban.manage.api.enums; ...@@ -5,8 +5,9 @@ package com.gic.haoban.manage.api.enums;
*/ */
public enum PendingStatusFlagEnum { public enum PendingStatusFlagEnum {
NORMAL(1, "正常"), NORMAL(1, "正常"),
OVERDUE(2, "逾期"), PRE_OVERDUE(2, "逾期"),
INVALID(3, "逾期失效"); OVERDUE(3, "逾期"),
PRE_INVALID(4, "即将失效");
private int type; private int type;
private String name; private String name;
......
...@@ -7,6 +7,7 @@ import com.gic.haoban.manage.api.dto.notify.dto.PendingTaskDetailDTO; ...@@ -7,6 +7,7 @@ import com.gic.haoban.manage.api.dto.notify.dto.PendingTaskDetailDTO;
import com.gic.haoban.manage.api.dto.notify.qdto.PendingListQDTO; import com.gic.haoban.manage.api.dto.notify.qdto.PendingListQDTO;
import com.gic.haoban.manage.api.dto.notify.qdto.PendingTaskQDTO; import com.gic.haoban.manage.api.dto.notify.qdto.PendingTaskQDTO;
import java.util.Date;
import java.util.List; import java.util.List;
/** /**
...@@ -20,7 +21,7 @@ public interface PendingTaskApiService { ...@@ -20,7 +21,7 @@ public interface PendingTaskApiService {
* *
* @param qdto * @param qdto
*/ */
public void addPendingTask(PendingTaskQDTO qdto); public ServiceResponse<Boolean> addPendingTask(PendingTaskQDTO qdto);
/** /**
* 待办列表查询分页 * 待办列表查询分页
...@@ -74,4 +75,21 @@ public interface PendingTaskApiService { ...@@ -74,4 +75,21 @@ public interface PendingTaskApiService {
*/ */
public ServiceResponse<Boolean> deletePendingTask(List<String> relationIds); public ServiceResponse<Boolean> deletePendingTask(List<String> relationIds);
/**
* 删除执行人
*
* @param relationId
* @return
*/
public ServiceResponse<Boolean> deletePendingTaskByRelationId(String relationId);
/**
* 更新失效或者结束时间
*
* @param relationId
* @param endTime
* @return
*/
public ServiceResponse<Boolean> updateInvalidTime(String relationId, Date endTime);
} }
...@@ -5,9 +5,12 @@ import com.gic.commons.util.GICMQClientUtil; ...@@ -5,9 +5,12 @@ import com.gic.commons.util.GICMQClientUtil;
import com.gic.haoban.manage.api.dto.notify.qdto.NoticeMessageQDTO; import com.gic.haoban.manage.api.dto.notify.qdto.NoticeMessageQDTO;
import com.gic.haoban.manage.api.enums.NoticeMessageTypeEnum; import com.gic.haoban.manage.api.enums.NoticeMessageTypeEnum;
import com.gic.mq.sdk.GicMQClient; import com.gic.mq.sdk.GicMQClient;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger; import org.slf4j.Logger;
import java.util.ArrayList;
import java.util.List;
import java.util.Map; import java.util.Map;
import static org.slf4j.LoggerFactory.getLogger; import static org.slf4j.LoggerFactory.getLogger;
...@@ -58,6 +61,43 @@ public class NoticeMessageUtil { ...@@ -58,6 +61,43 @@ public class NoticeMessageUtil {
} }
} }
/**
* 发送消息
*
* @param list
*/
public static void sendNoticeMessageBatch(List<NoticeMessageQDTO> list) {
if (CollectionUtils.isEmpty(list)) {
logger.info("没有哦需要发送的消息");
return;
}
List<String> ret = new ArrayList<String>();
for (NoticeMessageQDTO noticeMessageQDTO : list) {
String retStr = JSONObject.toJSONString(noticeMessageQDTO);
if (StringUtils.isAnyBlank(noticeMessageQDTO.getEnterpriseId(), noticeMessageQDTO.getClerkId())) {
logger.info("参数不存在:{}", retStr);
throw new RuntimeException("必传参数没传:" + noticeMessageQDTO.getClerkId());
}
NoticeMessageTypeEnum messageTypeEnum = NoticeMessageTypeEnum.getByType(noticeMessageQDTO.getMessageType());
if (messageTypeEnum == null) {
logger.info("类型不存在:{}", retStr);
throw new RuntimeException("消息类型不存在");
}
ret.add(retStr);
logger.info("发送消息单条:{}", retStr);
}
logger.info("批量发送消息:{}", ret.size());
GicMQClient clientInstance = GICMQClientUtil.getClientInstance();
try {
clientInstance.sendBatchMessages(NOTICE_MESSAGE, ret);
} catch (Exception e) {
logger.info("发送消息异常:{}", e);
}
}
/** /**
* 发送消息 使用staffId发送 * 发送消息 使用staffId发送
* *
......
...@@ -25,6 +25,10 @@ public class TabPendingTask implements Serializable { ...@@ -25,6 +25,10 @@ public class TabPendingTask implements Serializable {
* 关联id 对应task_type * 关联id 对应task_type
*/ */
private String relationId; private String relationId;
/**
* 业务id 如果是活动:活动id;话务:ecmid;群发:ecmid
*/
private String businessId;
/** /**
* 0-不良评价回访 1-ecm话务任务 ,3群发任务 4活动 * 0-不良评价回访 1-ecm话务任务 ,3群发任务 4活动
...@@ -136,6 +140,14 @@ public class TabPendingTask implements Serializable { ...@@ -136,6 +140,14 @@ public class TabPendingTask implements Serializable {
this.enterpriseId = enterpriseId; this.enterpriseId = enterpriseId;
} }
public String getBusinessId() {
return businessId;
}
public void setBusinessId(String businessId) {
this.businessId = businessId;
}
/** /**
* This method returns the value of the database column tab_haoban_pending_task.relation_id * This method returns the value of the database column tab_haoban_pending_task.relation_id
* *
......
...@@ -27,6 +27,11 @@ public class PendingTaskBO implements Serializable { ...@@ -27,6 +27,11 @@ public class PendingTaskBO implements Serializable {
private String relationId; private String relationId;
/** /**
* 业务id 如果是活动:活动id;话务:ecmid;群发:ecmid
*/
private String businessId;
/**
* 0-不良评价回访 1-ecm话务任务 ,3群发任务 4活动 * 0-不良评价回访 1-ecm话务任务 ,3群发任务 4活动
*/ */
private Integer taskType; private Integer taskType;
...@@ -100,6 +105,14 @@ public class PendingTaskBO implements Serializable { ...@@ -100,6 +105,14 @@ public class PendingTaskBO implements Serializable {
*/ */
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
public String getBusinessId() {
return businessId;
}
public void setBusinessId(String businessId) {
this.businessId = businessId;
}
public Long getPendingTaskId() { public Long getPendingTaskId() {
return pendingTaskId; return pendingTaskId;
} }
......
package com.gic.haoban.manage.service.service.notify.out; package com.gic.haoban.manage.service.service.notify.out;
import cn.hutool.core.date.DateUtil;
import com.gic.api.base.commons.BasePageInfo; import com.gic.api.base.commons.BasePageInfo;
import com.gic.api.base.commons.Page; import com.gic.api.base.commons.Page;
import com.gic.api.base.commons.ServiceResponse; import com.gic.api.base.commons.ServiceResponse;
...@@ -14,10 +15,12 @@ import com.gic.haoban.manage.api.service.notify.PendingTaskApiService; ...@@ -14,10 +15,12 @@ import com.gic.haoban.manage.api.service.notify.PendingTaskApiService;
import com.gic.haoban.manage.service.pojo.bo.PendingTaskBO; import com.gic.haoban.manage.service.pojo.bo.PendingTaskBO;
import com.gic.haoban.manage.service.service.notify.PendingTaskService; import com.gic.haoban.manage.service.service.notify.PendingTaskService;
import org.apache.commons.collections.CollectionUtils; import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.time.DateFormatUtils; import org.apache.commons.lang3.time.DateFormatUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
import java.util.regex.Matcher; import java.util.regex.Matcher;
...@@ -35,9 +38,10 @@ public class PendingTaskApiServiceImpl implements PendingTaskApiService { ...@@ -35,9 +38,10 @@ public class PendingTaskApiServiceImpl implements PendingTaskApiService {
private PendingTaskService pendingTaskService; private PendingTaskService pendingTaskService;
@Override @Override
public void addPendingTask(PendingTaskQDTO qdto) { public ServiceResponse<Boolean> addPendingTask(PendingTaskQDTO qdto) {
//新增待办 todo 后续优化以及完善 //新增待办 todo 后续优化以及完善
pendingTaskService.addOrUpdatePendingTask(EntityUtil.changeEntityByOrika(PendingTaskBO.class, qdto)); pendingTaskService.addOrUpdatePendingTask(EntityUtil.changeEntityByOrika(PendingTaskBO.class, qdto));
return ServiceResponse.success(true);
} }
...@@ -61,7 +65,7 @@ public class PendingTaskApiServiceImpl implements PendingTaskApiService { ...@@ -61,7 +65,7 @@ public class PendingTaskApiServiceImpl implements PendingTaskApiService {
* @param list * @param list
*/ */
private void buildPending(List<PendingTaskDetailDTO> list) { private void buildPending(List<PendingTaskDetailDTO> list) {
Date currentDate = new Date();
String pattern = ".*([0-9]{6}).*"; String pattern = ".*([0-9]{6}).*";
list.forEach(dto -> { list.forEach(dto -> {
String title = dto.getTitle(); String title = dto.getTitle();
...@@ -70,7 +74,17 @@ public class PendingTaskApiServiceImpl implements PendingTaskApiService { ...@@ -70,7 +74,17 @@ public class PendingTaskApiServiceImpl implements PendingTaskApiService {
return; return;
} }
dto.setDescription(taskTypeEnum.getDescription().replace("{}", title)); dto.setDescription(taskTypeEnum.getDescription().replace("{}", title));
dto.setStatusFlag(dto.getOverdueFlag() == 1 ? PendingStatusFlagEnum.OVERDUE.getType() : PendingStatusFlagEnum.NORMAL.getType());
long betweenOverdueDay = dto.getOverdueTime() != null ? DateUtil.betweenDay(currentDate, dto.getOverdueTime(), true) : -1;
long betweenInvalidDay = dto.getInvalidTime() != null ? DateUtil.betweenDay(currentDate, dto.getInvalidTime(), true) : -1;
if (betweenInvalidDay == 1 || betweenInvalidDay == 0) {
dto.setStatusFlag(PendingStatusFlagEnum.PRE_INVALID.getType());
} else if (betweenOverdueDay == 0 || betweenOverdueDay == 1) {
dto.setStatusFlag(dto.getOverdueFlag() == 1 ? PendingStatusFlagEnum.OVERDUE.getType() : PendingStatusFlagEnum.PRE_INVALID.getType());
} else {
dto.setStatusFlag(PendingStatusFlagEnum.NORMAL.getType());
}
dto.setTitle(taskTypeEnum.getName()); dto.setTitle(taskTypeEnum.getName());
if (dto.getTaskType() == PendingTaskTypeEnum.PERFORMANCE.getType()) { if (dto.getTaskType() == PendingTaskTypeEnum.PERFORMANCE.getType()) {
...@@ -132,4 +146,24 @@ public class PendingTaskApiServiceImpl implements PendingTaskApiService { ...@@ -132,4 +146,24 @@ public class PendingTaskApiServiceImpl implements PendingTaskApiService {
boolean b = pendingTaskService.deletePendingTask(relationIds); boolean b = pendingTaskService.deletePendingTask(relationIds);
return ServiceResponse.success(b); return ServiceResponse.success(b);
} }
@Override
public ServiceResponse<Boolean> deletePendingTaskByRelationId(String relationId) {
if (StringUtils.isBlank(relationId)) {
return ServiceResponse.success();
}
List<String> relationIds = new ArrayList<String>();
relationIds.add(relationId);
boolean b = pendingTaskService.deletePendingTask(relationIds);
return ServiceResponse.success(b);
}
@Override
public ServiceResponse<Boolean> updateInvalidTime(String relationId, Date endTime) {
PendingTaskBO pendingTaskBO = new PendingTaskBO();
pendingTaskBO.setRelationId(relationId);
pendingTaskBO.setInvalidTime(endTime);
boolean b = pendingTaskService.addOrUpdatePendingTask(pendingTaskBO);
return ServiceResponse.success(b);
}
} }
...@@ -11,8 +11,10 @@ import com.gic.haoban.base.api.common.Constant; ...@@ -11,8 +11,10 @@ import com.gic.haoban.base.api.common.Constant;
import com.gic.haoban.manage.api.dto.*; import com.gic.haoban.manage.api.dto.*;
import com.gic.haoban.manage.api.enums.AppPageType; import com.gic.haoban.manage.api.enums.AppPageType;
import com.gic.haoban.manage.api.enums.GicDataType; import com.gic.haoban.manage.api.enums.GicDataType;
import com.gic.haoban.manage.api.enums.NoticeMessageTypeEnum;
import com.gic.haoban.manage.api.enums.WxEditType; import com.gic.haoban.manage.api.enums.WxEditType;
import com.gic.haoban.manage.api.service.*; import com.gic.haoban.manage.api.service.*;
import com.gic.haoban.manage.api.util.notify.NoticeMessageUtil;
import com.gic.haoban.manage.service.config.Config; import com.gic.haoban.manage.service.config.Config;
import com.gic.haoban.manage.service.entity.TabHaobanDepartment; import com.gic.haoban.manage.service.entity.TabHaobanDepartment;
import com.gic.haoban.manage.service.entity.TabHaobanStaff; import com.gic.haoban.manage.service.entity.TabHaobanStaff;
...@@ -472,8 +474,8 @@ public class MessageApiServiceImpl implements MessageApiService { ...@@ -472,8 +474,8 @@ public class MessageApiServiceImpl implements MessageApiService {
jsonObject.put("memberId", memberId); jsonObject.put("memberId", memberId);
jsonObject.put("storeId", storeId); jsonObject.put("storeId", storeId);
jsonObject.put("currentTab", 1); jsonObject.put("currentTab", 1);
String data = jsonObject.toJSONString(); // String data = jsonObject.toJSONString();
String pageUrl = staffDepartmentRelatedApiService.getPageUrl(AppPageType.PERFECT_TAG.getCode(), data); // String pageUrl = staffDepartmentRelatedApiService.getPageUrl(AppPageType.PERFECT_TAG.getCode(), data);
StaffClerkRelationDTO relation = staffClerkRelationApiService.getByClerkId(clerkId); StaffClerkRelationDTO relation = staffClerkRelationApiService.getByClerkId(clerkId);
if (relation == null) { if (relation == null) {
log.info("clerkId未绑定:clerkId={}", clerkId); log.info("clerkId未绑定:clerkId={}", clerkId);
...@@ -488,28 +490,37 @@ public class MessageApiServiceImpl implements MessageApiService { ...@@ -488,28 +490,37 @@ public class MessageApiServiceImpl implements MessageApiService {
if (staffDTO == null) { if (staffDTO == null) {
return false; return false;
} }
String corpId = wxEnterprise.getCorpid(); // String corpId = wxEnterprise.getCorpid();
String wxUserId = ""; // String wxUserId = "";
if (corpId.length() > 20) { // if (corpId.length() > 20) {
wxUserId = staffDTO.getWxOpenUseId(); // wxUserId = staffDTO.getWxOpenUseId();
} else { // } else {
wxUserId = staffDTO.getWxUserId(); // wxUserId = staffDTO.getWxUserId();
} // }
QywxXcxSendMessageDTO messageDTO = new QywxXcxSendMessageDTO(); // QywxXcxSendMessageDTO messageDTO = new QywxXcxSendMessageDTO();
Map<String, String> map = new HashMap<>(); // Map<String, String> map = new HashMap<>();
map.put("事件", "会员完善标签"); // map.put("事件", "会员完善标签");
map.put("会员", memberName); // map.put("会员", memberName);
map.put("消费订单", orderId); // map.put("消费订单", orderId);
map.put("消费时间", customerTime); // map.put("消费时间", customerTime);
List<ItemDTO> items = getItemsList(map); // List<ItemDTO> items = getItemsList(map);
ArrayList<String> list = new ArrayList<>(); // ArrayList<String> list = new ArrayList<>();
list.add(wxUserId); // list.add(wxUserId);
messageDTO.setAppid(config.getAppid()); // messageDTO.setAppid(config.getAppid());
messageDTO.setUserIds(list); // messageDTO.setUserIds(list);
messageDTO.setPage(pageUrl); // messageDTO.setPage(pageUrl);
messageDTO.setTitle("我的顾客通知"); // messageDTO.setTitle("我的顾客通知");
messageDTO.setItems(items); // messageDTO.setItems(items);
return qywxSuiteApiService.sendMessage(wxEnterprise.getCorpid(), config.getWxSuiteid(), messageDTO); //
// return qywxSuiteApiService.sendMessage(wxEnterprise.getCorpid(), config.getWxSuiteid(), messageDTO);
Map<String, String> params = new HashMap<>();
params.put("memberName", memberName);
params.put("orderId", orderId);
params.put("customerTime", customerTime);
NoticeMessageUtil.sendNoticeMessage(relation.getEnterpriseId(), relation.getClerkId(), NoticeMessageTypeEnum.MEMBER_FACE.getType(), null, params, jsonObject);
return true;
} }
......
...@@ -167,7 +167,6 @@ public class FriendSyncNewOperation implements BaseSyncOperation { ...@@ -167,7 +167,6 @@ public class FriendSyncNewOperation implements BaseSyncOperation {
private String dealMerge(ExternalUserDTO externalUserDTO, TabHaobanPreDealLog dataPre) { private String dealMerge(ExternalUserDTO externalUserDTO, TabHaobanPreDealLog dataPre) {
String wxEnterpriseId = dataPre.getWxEnterpriseId(); String wxEnterpriseId = dataPre.getWxEnterpriseId();
String wxUserId = dataPre.getpDataId(); String wxUserId = dataPre.getpDataId();
String taskId = dataPre.getTaskId();
if (externalUserDTO.getFriendType() == 2) { if (externalUserDTO.getFriendType() == 2) {
return "不是微信好友,是企业微信好友:" + externalUserDTO.getFriendType(); return "不是微信好友,是企业微信好友:" + externalUserDTO.getFriendType();
......
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
<id column="id" jdbcType="INTEGER" property="id"/> <id column="id" jdbcType="INTEGER" property="id"/>
<result column="enterprise_id" jdbcType="VARCHAR" property="enterpriseId"/> <result column="enterprise_id" jdbcType="VARCHAR" property="enterpriseId"/>
<result column="relation_id" jdbcType="VARCHAR" property="relationId"/> <result column="relation_id" jdbcType="VARCHAR" property="relationId"/>
<result column="business_id" jdbcType="VARCHAR" property="businessId"/>
<result column="task_type" jdbcType="INTEGER" property="taskType"/> <result column="task_type" jdbcType="INTEGER" property="taskType"/>
<result column="title" jdbcType="VARCHAR" property="title"/> <result column="title" jdbcType="VARCHAR" property="title"/>
<result column="description" jdbcType="VARCHAR" property="description"/> <result column="description" jdbcType="VARCHAR" property="description"/>
...@@ -21,7 +22,7 @@ ...@@ -21,7 +22,7 @@
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime"/> <result column="update_time" jdbcType="TIMESTAMP" property="updateTime"/>
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
id, enterprise_id, relation_id, task_type, title, description, task_status_flag, id, enterprise_id, relation_id,business_id, task_type, title, description, task_status_flag,
overdue_time, invalid_time, store_id, clerk_id, finish_time, finish_flag, overdue_flag, overdue_time, invalid_time, store_id, clerk_id, finish_time, finish_flag, overdue_flag,
delete_flag, create_time, update_time delete_flag, create_time, update_time
</sql> </sql>
...@@ -61,6 +62,9 @@ ...@@ -61,6 +62,9 @@
<if test="relationId != null"> <if test="relationId != null">
relation_id, relation_id,
</if> </if>
<if test="businessId != null">
business_id,
</if>
<if test="taskType != null"> <if test="taskType != null">
task_type, task_type,
</if> </if>
...@@ -114,6 +118,9 @@ ...@@ -114,6 +118,9 @@
<if test="relationId != null"> <if test="relationId != null">
#{relationId,jdbcType=VARCHAR}, #{relationId,jdbcType=VARCHAR},
</if> </if>
<if test="businessId != null">
#{businessId,jdbcType=VARCHAR},
</if>
<if test="taskType != null"> <if test="taskType != null">
#{taskType,jdbcType=INTEGER}, #{taskType,jdbcType=INTEGER},
</if> </if>
...@@ -167,6 +174,9 @@ ...@@ -167,6 +174,9 @@
<if test="relationId != null"> <if test="relationId != null">
relation_id = #{relationId,jdbcType=VARCHAR}, relation_id = #{relationId,jdbcType=VARCHAR},
</if> </if>
<if test="businessId != null">
business_id = #{businessId,jdbcType=VARCHAR},
</if>
<if test="taskType != null"> <if test="taskType != null">
task_type = #{taskType,jdbcType=INTEGER}, task_type = #{taskType,jdbcType=INTEGER},
</if> </if>
...@@ -216,6 +226,7 @@ ...@@ -216,6 +226,7 @@
update tab_haoban_pending_task update tab_haoban_pending_task
set enterprise_id = #{enterpriseId,jdbcType=VARCHAR}, set enterprise_id = #{enterpriseId,jdbcType=VARCHAR},
relation_id = #{relationId,jdbcType=VARCHAR}, relation_id = #{relationId,jdbcType=VARCHAR},
business_id = #{businessId,jdbcType=VARCHAR},
task_type = #{taskType,jdbcType=INTEGER}, task_type = #{taskType,jdbcType=INTEGER},
title = #{title,jdbcType=VARCHAR}, title = #{title,jdbcType=VARCHAR},
description = #{description,jdbcType=VARCHAR}, description = #{description,jdbcType=VARCHAR},
......
...@@ -17,12 +17,14 @@ import org.apache.commons.lang3.time.DateUtils; ...@@ -17,12 +17,14 @@ import org.apache.commons.lang3.time.DateUtils;
public class test { public class test {
public static void main(String[] args) { public static void main(String[] args) {
String content = "测试模板#{test}"; Date date = new Date();
String test = "1test"; Date tomrrow = DateUtils.addDays(date, 1);
String replace = content.replaceAll("\\#\\{" + test + "\\}", "1111"); Date yestory = DateUtils.addDays(date, -1);
System.out.println(replace); long l = DateUtil.betweenDay(tomrrow, date, true);
long l2 = DateUtil.betweenDay(date, tomrrow, true);
System.out.println(l + "=" + l2);
// String key = "3.2.1"; // String key = "3.2.1";
// String[] split = key.split("."); // String[] split = key.split(".");
// //
......
...@@ -10,6 +10,7 @@ import com.gic.clerk.api.service.ClerkNewService; ...@@ -10,6 +10,7 @@ import com.gic.clerk.api.service.ClerkNewService;
import com.gic.clerk.api.service.ClerkService; import com.gic.clerk.api.service.ClerkService;
import com.gic.commons.util.DateUtil; import com.gic.commons.util.DateUtil;
import com.gic.commons.util.EntityUtil; import com.gic.commons.util.EntityUtil;
import com.gic.commons.webapi.reponse.RestResponse;
import com.gic.enterprise.api.dto.EnterpriseDTO; import com.gic.enterprise.api.dto.EnterpriseDTO;
import com.gic.enterprise.api.dto.StoreDTO; import com.gic.enterprise.api.dto.StoreDTO;
import com.gic.enterprise.api.service.EnterpriseService; import com.gic.enterprise.api.service.EnterpriseService;
...@@ -1257,4 +1258,18 @@ public class ClerkController extends WebBaseController { ...@@ -1257,4 +1258,18 @@ public class ClerkController extends WebBaseController {
return resultResponse(HaoBanErrCode.ERR_1, clerkList.size()); return resultResponse(HaoBanErrCode.ERR_1, clerkList.size());
} }
/**
* 根据员工id获取openId
*
* @return {@link RestResponse }
* @author mozhu
* @date 2021-12-29 10:42:24
*/
@RequestMapping("getOpenIdByStaffId")
public RestResponse<String> getOpenIdByStaffId() {
String staffId = this.getLoginUser().getStaffId();
String openId = "";
return RestResponse.successResult(openId);
}
} }
package com.gic.haoban.manage.web.controller; package com.gic.haoban.manage.web.controller;
import com.gic.haoban.auth.api.dto.DisplayRelationShortInfoDTO; import com.gic.haoban.auth.api.dto.DisplayRelationShortInfoDTO;
import com.gic.haoban.auth.api.dto.UserRightDetailDTO; import com.gic.haoban.common.utils.AuthRequestWellDoneUtil;
import com.gic.haoban.common.utils.AuthRequestUtil;
import com.gic.haoban.common.utils.HaobanResponse; import com.gic.haoban.common.utils.HaobanResponse;
import com.gic.haoban.manage.api.dto.WellDoneLoginDTO;
import com.gic.haoban.manage.web.errCode.HaoBanErrCode; import com.gic.haoban.manage.web.errCode.HaoBanErrCode;
import org.apache.commons.collections.CollectionUtils; import org.apache.commons.collections.CollectionUtils;
...@@ -49,8 +49,8 @@ public class WebBaseController { ...@@ -49,8 +49,8 @@ public class WebBaseController {
* *
* @return * @return
*/ */
protected UserRightDetailDTO getLoginUser() { protected WellDoneLoginDTO getLoginUser() {
return (UserRightDetailDTO) AuthRequestUtil.getSessionUser(); return (WellDoneLoginDTO) AuthRequestWellDoneUtil.getLoginUser();
} }
public boolean haveRight(List<DisplayRelationShortInfoDTO> list){ public boolean haveRight(List<DisplayRelationShortInfoDTO> list){
...@@ -71,9 +71,6 @@ public class WebBaseController { ...@@ -71,9 +71,6 @@ public class WebBaseController {
clerkList.add(showDto.getClerkId()); clerkList.add(showDto.getClerkId());
} }
} }
if(CollectionUtils.isEmpty(groupList) && CollectionUtils.isEmpty(storeList) && CollectionUtils.isEmpty(clerkList)){ return !CollectionUtils.isEmpty(groupList) || !CollectionUtils.isEmpty(storeList) || !CollectionUtils.isEmpty(clerkList);
return false;
}
return true;
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment