Merge branch 'cc_20250724_notice' into 'master'
Cc 20250724 notice See merge request hangzhou/java/custom_zxjp!140
This commit is contained in:
@@ -287,6 +287,12 @@ public enum ErrorCodeEnum {
|
|||||||
PRODUCTS_DISCARDED(1511034,"产品已报销,无法操作",null),
|
PRODUCTS_DISCARDED(1511034,"产品已报销,无法操作",null),
|
||||||
PRODUCTS_SALES_COMPLETED(1511034,"含有销售完成的产品,无法批量报销",null),
|
PRODUCTS_SALES_COMPLETED(1511034,"含有销售完成的产品,无法批量报销",null),
|
||||||
STORE_IS_EXIST(1511035,"该门店已存在",null),
|
STORE_IS_EXIST(1511035,"该门店已存在",null),
|
||||||
|
|
||||||
|
|
||||||
|
MESSAGE_TEMPLATE_NOT_SUPPORT_EDIT(1610001,"当前消息已发布,不支持编辑!",null),
|
||||||
|
MESSAGE_TEMPLATE_NOT_SUPPORT_DELETED(1610002,"只有未发布的消息能删除,请确认!",null),
|
||||||
|
STORE_MESSAGE_REVOKE(1610003,"当前门店消息已撤销,请务重复操作",null),
|
||||||
|
STORE_MESSAGE_HANDLED(1610004,"当前门店消息已处理,无法撤销!",null),
|
||||||
;
|
;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,43 @@
|
|||||||
|
package com.cool.store.enums.notice;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author suzhuhong
|
||||||
|
* @Date 2025/7/24 14:03
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
public enum MatterTypeEnum {
|
||||||
|
|
||||||
|
QUESTION(0,"门店违规工单"),
|
||||||
|
LICENSE(1,"证照过期提醒"),
|
||||||
|
NOTICE(2,"通知消息"),
|
||||||
|
;
|
||||||
|
|
||||||
|
MatterTypeEnum(Integer code, String message) {
|
||||||
|
this.code = code;
|
||||||
|
this.message = message;
|
||||||
|
}
|
||||||
|
|
||||||
|
private Integer code;
|
||||||
|
|
||||||
|
private String message;
|
||||||
|
|
||||||
|
public Integer getCode() {
|
||||||
|
return code;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCode(Integer code) {
|
||||||
|
this.code = code;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMessage() {
|
||||||
|
return message;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMessage(String message) {
|
||||||
|
this.message = message;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,54 @@
|
|||||||
|
package com.cool.store.enums.notice;
|
||||||
|
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author suzhuhong
|
||||||
|
* @Date 2025/7/24 13:59
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
public enum ModuleCodeEnum {
|
||||||
|
|
||||||
|
STORE_WORK(0,"店务", Arrays.asList(MatterTypeEnum.QUESTION,MatterTypeEnum.LICENSE,MatterTypeEnum.NOTICE)),
|
||||||
|
PRODUCT_UPDATE(1,"营销政策/产品上新",Arrays.asList(MatterTypeEnum.NOTICE)),
|
||||||
|
INVENTORY_MODULE(2,"库存模块",Arrays.asList(MatterTypeEnum.NOTICE)),
|
||||||
|
DISH(3,"菜品",Arrays.asList(MatterTypeEnum.NOTICE)),
|
||||||
|
;
|
||||||
|
|
||||||
|
ModuleCodeEnum(Integer code, String message,List<MatterTypeEnum> matterTypeEnums) {
|
||||||
|
this.code = code;
|
||||||
|
this.message = message;
|
||||||
|
this.matterTypeEnums = matterTypeEnums;
|
||||||
|
}
|
||||||
|
|
||||||
|
private Integer code;
|
||||||
|
|
||||||
|
private String message;
|
||||||
|
|
||||||
|
private List<MatterTypeEnum> matterTypeEnums;
|
||||||
|
|
||||||
|
public Integer getCode() {
|
||||||
|
return code;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCode(Integer code) {
|
||||||
|
this.code = code;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMessage() {
|
||||||
|
return message;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMessage(String message) {
|
||||||
|
this.message = message;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<MatterTypeEnum> getMatterTypeEnums() {
|
||||||
|
return matterTypeEnums;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMatterTypeEnums(List<MatterTypeEnum> matterTypeEnums) {
|
||||||
|
this.matterTypeEnums = matterTypeEnums;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,40 @@
|
|||||||
|
package com.cool.store.enums.notice;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author suzhuhong
|
||||||
|
* @Date 2025/7/24 13:50
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
public enum ProcessStatusEnum {
|
||||||
|
|
||||||
|
UNTREATED(0,"未处理"),
|
||||||
|
PROCESSED(1,"已处理"),
|
||||||
|
;
|
||||||
|
|
||||||
|
ProcessStatusEnum(Integer code, String message) {
|
||||||
|
this.code = code;
|
||||||
|
this.message = message;
|
||||||
|
}
|
||||||
|
|
||||||
|
private Integer code;
|
||||||
|
|
||||||
|
private String message;
|
||||||
|
|
||||||
|
public Integer getCode() {
|
||||||
|
return code;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCode(Integer code) {
|
||||||
|
this.code = code;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMessage() {
|
||||||
|
return message;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMessage(String message) {
|
||||||
|
this.message = message;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,40 @@
|
|||||||
|
package com.cool.store.enums.notice;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author suzhuhong
|
||||||
|
* @Date 2025/7/24 13:54
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
public enum ProcessTypeEnum {
|
||||||
|
|
||||||
|
READ(1,"仅阅读"),
|
||||||
|
HANDLE(2,"需处理"),
|
||||||
|
;
|
||||||
|
|
||||||
|
ProcessTypeEnum(Integer code, String message) {
|
||||||
|
this.code = code;
|
||||||
|
this.message = message;
|
||||||
|
}
|
||||||
|
|
||||||
|
private Integer code;
|
||||||
|
|
||||||
|
private String message;
|
||||||
|
|
||||||
|
public Integer getCode() {
|
||||||
|
return code;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCode(Integer code) {
|
||||||
|
this.code = code;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMessage() {
|
||||||
|
return message;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMessage(String message) {
|
||||||
|
this.message = message;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,42 @@
|
|||||||
|
package com.cool.store.enums.notice;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author suzhuhong
|
||||||
|
* @Date 2025/7/24 13:52
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
public enum PublishStatusEnum {
|
||||||
|
|
||||||
|
UNPUBLISHED(0,"未发布"),
|
||||||
|
PUBLISHED(1,"已发布"),
|
||||||
|
REVOKED(2,"已撤销"),
|
||||||
|
;
|
||||||
|
|
||||||
|
PublishStatusEnum(Integer code, String message) {
|
||||||
|
this.code = code;
|
||||||
|
this.message = message;
|
||||||
|
}
|
||||||
|
|
||||||
|
private Integer code;
|
||||||
|
|
||||||
|
private String message;
|
||||||
|
|
||||||
|
public Integer getCode() {
|
||||||
|
return code;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCode(Integer code) {
|
||||||
|
this.code = code;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMessage() {
|
||||||
|
return message;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMessage(String message) {
|
||||||
|
this.message = message;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,39 @@
|
|||||||
|
package com.cool.store.enums.notice;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author suzhuhong
|
||||||
|
* @Date 2025/7/24 11:29
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
public enum ReadStatusEnum {
|
||||||
|
|
||||||
|
UNREAD(0,"未读"),
|
||||||
|
READ(1,"已读"),
|
||||||
|
;
|
||||||
|
|
||||||
|
|
||||||
|
ReadStatusEnum(Integer code, String message) {
|
||||||
|
this.code = code;
|
||||||
|
this.message = message;
|
||||||
|
}
|
||||||
|
|
||||||
|
private Integer code;
|
||||||
|
|
||||||
|
private String message;
|
||||||
|
|
||||||
|
public Integer getCode() {
|
||||||
|
return code;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCode(Integer code) {
|
||||||
|
this.code = code;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMessage() {
|
||||||
|
return message;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMessage(String message) {
|
||||||
|
this.message = message;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,40 @@
|
|||||||
|
package com.cool.store.enums.notice;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author suzhuhong
|
||||||
|
* @Date 2025/7/24 13:57
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
public enum RemindTypeEnum {
|
||||||
|
|
||||||
|
CONTINUOUS_REMINDER(0,"持续提醒"),
|
||||||
|
STAGE_REMINDER(1,"阶段提醒"),
|
||||||
|
;
|
||||||
|
|
||||||
|
RemindTypeEnum(Integer code, String message) {
|
||||||
|
this.code = code;
|
||||||
|
this.message = message;
|
||||||
|
}
|
||||||
|
|
||||||
|
private Integer code;
|
||||||
|
|
||||||
|
private String message;
|
||||||
|
|
||||||
|
public Integer getCode() {
|
||||||
|
return code;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCode(Integer code) {
|
||||||
|
this.code = code;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMessage() {
|
||||||
|
return message;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMessage(String message) {
|
||||||
|
this.message = message;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,39 @@
|
|||||||
|
package com.cool.store.enums.notice;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author suzhuhong
|
||||||
|
* @Date 2025/7/24 11:33
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
public enum RevokeStatusEnum {
|
||||||
|
|
||||||
|
NOT_REVOKE(0,"未撤销"),
|
||||||
|
REVOKE(1,"已撤销"),
|
||||||
|
;
|
||||||
|
|
||||||
|
RevokeStatusEnum(Integer code, String message) {
|
||||||
|
this.code = code;
|
||||||
|
this.message = message;
|
||||||
|
}
|
||||||
|
|
||||||
|
private Integer code;
|
||||||
|
|
||||||
|
private String message;
|
||||||
|
|
||||||
|
public Integer getCode() {
|
||||||
|
return code;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCode(Integer code) {
|
||||||
|
this.code = code;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMessage() {
|
||||||
|
return message;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMessage(String message) {
|
||||||
|
this.message = message;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,38 @@
|
|||||||
|
package com.cool.store.enums.notice;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author suzhuhong
|
||||||
|
* @Date 2025/7/24 14:41
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
public enum SystemSourceEnum {
|
||||||
|
|
||||||
|
QUESTION(0,"CRM"),
|
||||||
|
;
|
||||||
|
|
||||||
|
SystemSourceEnum(Integer code, String message) {
|
||||||
|
this.code = code;
|
||||||
|
this.message = message;
|
||||||
|
}
|
||||||
|
|
||||||
|
private Integer code;
|
||||||
|
|
||||||
|
private String message;
|
||||||
|
|
||||||
|
public Integer getCode() {
|
||||||
|
return code;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCode(Integer code) {
|
||||||
|
this.code = code;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMessage() {
|
||||||
|
return message;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMessage(String message) {
|
||||||
|
this.message = message;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,44 @@
|
|||||||
|
package com.cool.store.enums.notice;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author suzhuhong
|
||||||
|
* @Date 2025/7/25 10:05
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
public enum TypeEnum {
|
||||||
|
|
||||||
|
|
||||||
|
PERSON("人员","person", "按人员"),
|
||||||
|
POSITION("人员","position", "按职位"),
|
||||||
|
USER_GROUP("人员","userGroup", "按人员分组"),
|
||||||
|
ORGANIZATION("人员","organization", "按组织架构"),
|
||||||
|
REGION("门店","region", "按区域架构"),
|
||||||
|
STORE("门店","store", "按门店架构"),
|
||||||
|
GROUP("门店","group", "按门店分钟"),
|
||||||
|
|
||||||
|
;
|
||||||
|
private String group;
|
||||||
|
|
||||||
|
private String type;
|
||||||
|
|
||||||
|
private String message;
|
||||||
|
|
||||||
|
|
||||||
|
TypeEnum(String group, String type, String message) {
|
||||||
|
this.group = group;
|
||||||
|
this.type = type;
|
||||||
|
this.message = message;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getGroup() {
|
||||||
|
return group;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getType() {
|
||||||
|
return type;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMessage() {
|
||||||
|
return message;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,54 @@
|
|||||||
|
package com.cool.store.dao;
|
||||||
|
|
||||||
|
import com.cool.store.entity.MatterConfigDO;
|
||||||
|
import com.cool.store.mapper.MatterConfigMapper;
|
||||||
|
import com.cool.store.request.notice.MatterConfigQueryRequest;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.apache.commons.collections4.CollectionUtils;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author suzhuhong
|
||||||
|
* @Date 2025/7/24 14:22
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
@Repository
|
||||||
|
public class MatterConfigDAO {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
MatterConfigMapper matterConfigMapper;
|
||||||
|
|
||||||
|
public int insert(MatterConfigDO matterConfigDO){
|
||||||
|
return matterConfigMapper.insertSelective(matterConfigDO);
|
||||||
|
}
|
||||||
|
|
||||||
|
public int update(MatterConfigDO matterConfigDO){
|
||||||
|
return matterConfigMapper.updateByPrimaryKeySelective(matterConfigDO);
|
||||||
|
}
|
||||||
|
|
||||||
|
public MatterConfigDO getById(Long id){
|
||||||
|
return matterConfigMapper.selectByPrimaryKey(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
public int updateForce(MatterConfigDO matterConfigDO){
|
||||||
|
return matterConfigMapper.updateForce(matterConfigDO);
|
||||||
|
}
|
||||||
|
|
||||||
|
public int batchDelete(List<Long> ids, String userId){
|
||||||
|
if (CollectionUtils.isEmpty(ids)){
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
return matterConfigMapper.updateDeleteStatus(ids,userId);
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<MatterConfigDO> ListByCondition(MatterConfigQueryRequest request){
|
||||||
|
return matterConfigMapper.ListByCondition(request);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,76 @@
|
|||||||
|
package com.cool.store.dao;
|
||||||
|
|
||||||
|
import com.cool.store.dto.notice.NoticeDTO;
|
||||||
|
import com.cool.store.entity.MessageTemplateDO;
|
||||||
|
import com.cool.store.mapper.MessageTemplateMapper;
|
||||||
|
import com.cool.store.request.notice.MessageTemplateQueryRequest;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.apache.commons.collections4.CollectionUtils;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author suzhuhong
|
||||||
|
* @Date 2025/7/25 9:40
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
@Repository
|
||||||
|
public class MessageTemplateDAO {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private MessageTemplateMapper messageTemplateMapper;
|
||||||
|
|
||||||
|
|
||||||
|
public int insert(MessageTemplateDO messageTemplateDO) {
|
||||||
|
return messageTemplateMapper.insertSelective(messageTemplateDO);
|
||||||
|
}
|
||||||
|
|
||||||
|
public int update(MessageTemplateDO messageTemplateDO) {
|
||||||
|
return messageTemplateMapper.updateByPrimaryKeySelective(messageTemplateDO);
|
||||||
|
}
|
||||||
|
|
||||||
|
public MessageTemplateDO getById(Long id) {
|
||||||
|
return messageTemplateMapper.selectByPrimaryKey(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<MessageTemplateDO> getByIds(List<Long> ids) {
|
||||||
|
if (CollectionUtils.isEmpty(ids)){
|
||||||
|
return new ArrayList<>();
|
||||||
|
}
|
||||||
|
return messageTemplateMapper.selectByIds(ids);
|
||||||
|
}
|
||||||
|
|
||||||
|
public int updateDeleteStatusBatch(List<Long> ids,String userId) {
|
||||||
|
return messageTemplateMapper.updateDeleteStatusBatch(ids,userId);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public List<NoticeDTO> getMessageTemplateList(MessageTemplateQueryRequest request) {
|
||||||
|
return messageTemplateMapper.getMessageTemplateList(request);
|
||||||
|
}
|
||||||
|
|
||||||
|
public int batchUpdateStoreInfoAndUserInfo(List<Long> ids,
|
||||||
|
String storeInfo,
|
||||||
|
String userInfo,
|
||||||
|
String userId) {
|
||||||
|
if (CollectionUtils.isEmpty(ids)){
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
return messageTemplateMapper.batchUpdateStoreInfoAndUserInfo(ids,storeInfo,userInfo,userId);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public int batchUpdatePublishStatus(List<Long> ids) {
|
||||||
|
if (CollectionUtils.isEmpty(ids)){
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
return messageTemplateMapper.batchUpdatePublishStatus(ids);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,90 @@
|
|||||||
|
package com.cool.store.dao;
|
||||||
|
|
||||||
|
import cn.hutool.core.collection.CollUtil;
|
||||||
|
import com.cool.store.dto.notice.MessageTemplateCountDTO;
|
||||||
|
import com.cool.store.entity.StoreMessageDO;
|
||||||
|
import com.cool.store.mapper.StoreMessageMapper;
|
||||||
|
import com.cool.store.request.notice.StoreMessageRequest;
|
||||||
|
import com.cool.store.vo.notice.MessageDetailVO;
|
||||||
|
import com.cool.store.vo.notice.StoreMessageVO;
|
||||||
|
import io.swagger.models.auth.In;
|
||||||
|
import org.apache.commons.collections4.CollectionUtils;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author suzhuhong
|
||||||
|
* @Date 2025/7/25 15:04
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Repository
|
||||||
|
public class StoreMessageDAO {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
StoreMessageMapper storeMessageMapper;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public StoreMessageDO getById(Long id){
|
||||||
|
return storeMessageMapper.selectByPrimaryKey(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
public int update(StoreMessageDO storeMessageDO){
|
||||||
|
return storeMessageMapper.updateByPrimaryKey(storeMessageDO);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量新增
|
||||||
|
* @param list
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public int batchInsert(List<StoreMessageDO> list){
|
||||||
|
if (CollectionUtils.isEmpty(list)){
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
return storeMessageMapper.insertBatch(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<MessageTemplateCountDTO> getMessageTemplateCountList(List<Long> templateIds){
|
||||||
|
if (CollUtil.isEmpty(templateIds)){
|
||||||
|
return new ArrayList<>();
|
||||||
|
}
|
||||||
|
return storeMessageMapper.getMessageTemplateCountList(templateIds);
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<StoreMessageDO> getStoreMessageList(StoreMessageRequest request){
|
||||||
|
return storeMessageMapper.getStoreMessageList(request);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer batchRevoke(List<Long> ids, String userId, String userName){
|
||||||
|
if (CollectionUtils.isEmpty(ids)){
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
return storeMessageMapper.batchRevoke(ids,userId,userName);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer revokeById(Long id, String userId, String userName){
|
||||||
|
if (id == null){
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
return storeMessageMapper.revokeById(id,userId,userName);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer queryStoreModuleCount(String storeId,String userId, Integer moduleCode){
|
||||||
|
if (storeId == null|| userId == null){
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
return storeMessageMapper.queryStoreModuleCount(storeId,userId,moduleCode);
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<StoreMessageVO> getStoreMessageListByCondition(String storeId, Integer moduleCode, Integer todayTask, Integer pendingFlag, String userId){
|
||||||
|
return storeMessageMapper.getStoreMessageListByCondition(storeId,moduleCode,todayTask,pendingFlag,userId);
|
||||||
|
}
|
||||||
|
|
||||||
|
public MessageDetailVO getMessageDetail(Long id){
|
||||||
|
return storeMessageMapper.getMessageDetail(id);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
package com.cool.store.mapper;
|
||||||
|
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author suzhuhong
|
||||||
|
* @Date 2025/7/25 11:03
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Mapper
|
||||||
|
public interface EnterpriseUserGroupMappingMapper {
|
||||||
|
|
||||||
|
List<String> getUserIdsByGroupIdList(@Param("groupIdList") List<String> groupIdList);
|
||||||
|
|
||||||
|
}
|
||||||
@@ -99,4 +99,6 @@ public interface EnterpriseUserMapper {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
List<EnterpriseUserDO> searchUserByUserIdsAndKeyword( @Param("userIdList") List<String> userIdList, @Param("keyword") String keyword);
|
List<EnterpriseUserDO> searchUserByUserIdsAndKeyword( @Param("userIdList") List<String> userIdList, @Param("keyword") String keyword);
|
||||||
|
|
||||||
|
List<String> getUserIdsByRegionIdList( @Param("regionIdList") List<String> regionIdList);
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
package com.cool.store.mapper;
|
||||||
|
|
||||||
|
import com.cool.store.entity.MatterConfigDO;
|
||||||
|
import com.cool.store.request.notice.MatterConfigQueryRequest;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
import tk.mybatis.mapper.common.Mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public interface MatterConfigMapper extends Mapper<MatterConfigDO> {
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 强制修改
|
||||||
|
* @param matterConfigDO
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
int updateForce(@Param("matterConfigDO") MatterConfigDO matterConfigDO);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量修改删除状态
|
||||||
|
*/
|
||||||
|
int updateDeleteStatus(@Param("ids") List<Long> ids, @Param("userId") String userId);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 条件查询
|
||||||
|
* @param request
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<MatterConfigDO> ListByCondition(@Param("request") MatterConfigQueryRequest request);
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
package com.cool.store.mapper;
|
||||||
|
|
||||||
|
import com.cool.store.dto.notice.CommonDTO;
|
||||||
|
import com.cool.store.dto.notice.NoticeDTO;
|
||||||
|
import com.cool.store.entity.MessageTemplateDO;
|
||||||
|
import com.cool.store.request.notice.MessageTemplateQueryRequest;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
import tk.mybatis.mapper.common.Mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public interface MessageTemplateMapper extends Mapper<MessageTemplateDO> {
|
||||||
|
|
||||||
|
List<MessageTemplateDO> selectByIds(@Param("ids") List<Long> ids);
|
||||||
|
|
||||||
|
int updateDeleteStatusBatch(@Param("ids") List<Long> ids, @Param("userId") String userId);
|
||||||
|
|
||||||
|
List<NoticeDTO> getMessageTemplateList(@Param("request") MessageTemplateQueryRequest request);
|
||||||
|
|
||||||
|
int batchUpdateStoreInfoAndUserInfo(@Param("ids") List<Long> ids,
|
||||||
|
@Param("storeInfo") String storeInfo,
|
||||||
|
@Param("userInfo") String userInfo,
|
||||||
|
@Param("userId") String userId);
|
||||||
|
|
||||||
|
int batchUpdatePublishStatus(@Param("ids") List<Long> ids);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
package com.cool.store.mapper;
|
|
||||||
|
|
||||||
import com.cool.store.entity.ShopAccountDO;
|
|
||||||
import tk.mybatis.mapper.common.Mapper;
|
|
||||||
|
|
||||||
public interface ShopAccountMapper extends Mapper<ShopAccountDO> {
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
package com.cool.store.mapper;
|
||||||
|
|
||||||
|
import com.cool.store.entity.StoreGroupMappingDO;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author suzhuhong
|
||||||
|
* @Date 2025/7/25 10:21
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Mapper
|
||||||
|
public interface StoreGroupMappingMapper {
|
||||||
|
|
||||||
|
List<StoreGroupMappingDO> getStoreGroupMappingByGroupIDs( @Param("groupIds")List<String> groupIds);
|
||||||
|
|
||||||
|
}
|
||||||
@@ -45,4 +45,6 @@ public interface StoreMapper {
|
|||||||
|
|
||||||
List<StoreDO> getStoreNumByStoreCodes(@Param("storeCodeIds") List<String> storeCodeIds);
|
List<StoreDO> getStoreNumByStoreCodes(@Param("storeCodeIds") List<String> storeCodeIds);
|
||||||
|
|
||||||
|
List<StoreAreaDTO> listStoreByRegionPathList(@Param("regionPathList") List<String> regionPathList);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,38 @@
|
|||||||
|
package com.cool.store.mapper;
|
||||||
|
|
||||||
|
import com.cool.store.dto.notice.MessageTemplateCountDTO;
|
||||||
|
import com.cool.store.entity.StoreMessageDO;
|
||||||
|
import com.cool.store.request.notice.StoreMessageRequest;
|
||||||
|
import com.cool.store.vo.notice.MessageDetailVO;
|
||||||
|
import com.cool.store.vo.notice.StoreMessageVO;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
import tk.mybatis.mapper.common.Mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public interface StoreMessageMapper extends Mapper<StoreMessageDO> {
|
||||||
|
|
||||||
|
int insertBatch(@Param("list") List<StoreMessageDO> list);
|
||||||
|
|
||||||
|
|
||||||
|
List<MessageTemplateCountDTO> getMessageTemplateCountList(@Param("templateIds") List<Long> templateIds);
|
||||||
|
|
||||||
|
List<StoreMessageDO> getStoreMessageList(@Param("request") StoreMessageRequest request);
|
||||||
|
|
||||||
|
int batchRevoke(@Param("ids") List<Long> ids, @Param("userId") String userId, @Param("userName") String userName);
|
||||||
|
|
||||||
|
int revokeById(@Param("id") Long id, @Param("userId") String userId, @Param("userName") String userName);
|
||||||
|
|
||||||
|
Integer queryStoreModuleCount(@Param("storeId") String storeId,
|
||||||
|
@Param("userId") String userId,
|
||||||
|
@Param("moduleCode") Integer moduleCode);
|
||||||
|
|
||||||
|
List<StoreMessageVO> getStoreMessageListByCondition(@Param("storeId") String storeId,
|
||||||
|
@Param("moduleCode") Integer moduleCode,
|
||||||
|
@Param("todayTask") Integer todayTask,
|
||||||
|
@Param("pendingFlag") Integer pendingFlag,
|
||||||
|
@Param("userId") String userId);
|
||||||
|
|
||||||
|
MessageDetailVO getMessageDetail(Long id);
|
||||||
|
|
||||||
|
}
|
||||||
@@ -203,4 +203,15 @@
|
|||||||
</if>
|
</if>
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="getUserIdsByRegionIdList" resultType="string">
|
||||||
|
select
|
||||||
|
user_id
|
||||||
|
from enterprise_user_${enterpriseId} where user_id != 'a100000001' and active=1
|
||||||
|
<if test="regionIdList != null and regionIdList.size >0 ">
|
||||||
|
<foreach collection="regionIdList" item="regionId" separator=" or " open="and (" close=" )">
|
||||||
|
user_region_ids like concat('%/', #{regionId}, '/%')
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
@@ -0,0 +1,78 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.cool.store.mapper.MatterConfigMapper">
|
||||||
|
<resultMap id="BaseResultMap" type="com.cool.store.entity.MatterConfigDO">
|
||||||
|
<!--
|
||||||
|
WARNING - @mbg.generated
|
||||||
|
-->
|
||||||
|
<id column="id" jdbcType="BIGINT" property="id" />
|
||||||
|
<result column="module_code" jdbcType="TINYINT" property="moduleCode" />
|
||||||
|
<result column="matter_type" jdbcType="TINYINT" property="matterType" />
|
||||||
|
<result column="system_source" jdbcType="VARCHAR" property="systemSource" />
|
||||||
|
<result column="jump_type" jdbcType="BIT" property="jumpType" />
|
||||||
|
<result column="jump_url" jdbcType="VARCHAR" property="jumpUrl" />
|
||||||
|
<result column="status" jdbcType="BIT" property="status" />
|
||||||
|
<result column="remark" jdbcType="VARCHAR" property="remark" />
|
||||||
|
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||||
|
<result column="create_user_id" jdbcType="VARCHAR" property="createUserId" />
|
||||||
|
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
||||||
|
<result column="update_user_id" jdbcType="VARCHAR" property="updateUserId" />
|
||||||
|
<result column="deleted" jdbcType="BIT" property="deleted" />
|
||||||
|
<result column="default_handle_person_info" jdbcType="LONGVARCHAR" property="defaultHandlePersonInfo" />
|
||||||
|
<result column="default_store_info" jdbcType="LONGVARCHAR" property="defaultStoreInfo" />
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<update id="updateForce" parameterType="com.cool.store.entity.MatterConfigDO">
|
||||||
|
UPDATE zxjp_matter_config
|
||||||
|
SET
|
||||||
|
module_code = #{matterConfigDO.moduleCode,jdbcType=TINYINT},
|
||||||
|
matter_type = #{matterConfigDO.matterType,jdbcType=TINYINT},
|
||||||
|
system_source = #{matterConfigDO.systemSource,jdbcType=VARCHAR},
|
||||||
|
jump_type = #{matterConfigDO.jumpType,jdbcType=BIT},
|
||||||
|
jump_url = #{matterConfigDO.jumpUrl,jdbcType=VARCHAR},
|
||||||
|
status = #{matterConfigDO.status,jdbcType=BIT},
|
||||||
|
remark = #{matterConfigDO.remark,jdbcType=VARCHAR},
|
||||||
|
update_time = now(),
|
||||||
|
update_user_id = #{matterConfigDO.updateUserId,jdbcType=VARCHAR},
|
||||||
|
default_handle_person_info = #{matterConfigDO.defaultHandlePersonInfo,jdbcType=LONGVARCHAR},
|
||||||
|
default_store_info = #{matterConfigDO.defaultStoreInfo,jdbcType=LONGVARCHAR}
|
||||||
|
WHERE id = #{matterConfigDO.id,jdbcType=BIGINT}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
|
||||||
|
<update id="updateDeleteStatus" parameterType="map">
|
||||||
|
UPDATE zxjp_matter_config
|
||||||
|
SET
|
||||||
|
deleted = 1,
|
||||||
|
update_time = now(),
|
||||||
|
update_user_id = #{userId,jdbcType=VARCHAR}
|
||||||
|
WHERE id IN
|
||||||
|
<foreach collection="ids" item="id" open="(" separator="," close=")">
|
||||||
|
#{id,jdbcType=BIGINT}
|
||||||
|
</foreach>
|
||||||
|
</update>
|
||||||
|
|
||||||
|
|
||||||
|
<select id="ListByCondition" resultMap="BaseResultMap">
|
||||||
|
SELECT
|
||||||
|
*
|
||||||
|
FROM zxjp_matter_config
|
||||||
|
WHERE deleted = 0
|
||||||
|
<if test="request.moduleCode != null">
|
||||||
|
AND module_code = #{request.moduleCode,jdbcType=TINYINT}
|
||||||
|
</if>
|
||||||
|
<if test="request.matterType != null">
|
||||||
|
AND matter_type = #{request.matterType,jdbcType=TINYINT}
|
||||||
|
</if>
|
||||||
|
<if test="request.systemSource != null and request.systemSource != ''">
|
||||||
|
AND system_source = #{request.systemSource,jdbcType=VARCHAR}
|
||||||
|
</if>
|
||||||
|
<if test="request.status != null">
|
||||||
|
AND status = #{request.status,jdbcType=BIT}
|
||||||
|
</if>
|
||||||
|
ORDER BY create_time DESC
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</mapper>
|
||||||
@@ -0,0 +1,130 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.cool.store.mapper.MessageTemplateMapper">
|
||||||
|
<resultMap id="BaseResultMap" type="com.cool.store.entity.MessageTemplateDO">
|
||||||
|
<!--
|
||||||
|
WARNING - @mbg.generated
|
||||||
|
-->
|
||||||
|
<id column="id" jdbcType="BIGINT" property="id" />
|
||||||
|
<result column="message_code" jdbcType="VARCHAR" property="messageCode" />
|
||||||
|
<result column="module_code" jdbcType="TINYINT" property="moduleCode" />
|
||||||
|
<result column="matter_type" jdbcType="TINYINT" property="matterType" />
|
||||||
|
<result column="message_title" jdbcType="VARCHAR" property="messageTitle" />
|
||||||
|
<result column="system_source" jdbcType="VARCHAR" property="systemSource" />
|
||||||
|
<result column="process_type" jdbcType="TINYINT" property="processType" />
|
||||||
|
<result column="remind_type" jdbcType="TINYINT" property="remindType" />
|
||||||
|
<result column="remind_start_time" jdbcType="TIMESTAMP" property="remindStartTime" />
|
||||||
|
<result column="remind_end_time" jdbcType="TIMESTAMP" property="remindEndTime" />
|
||||||
|
<result column="deadline" jdbcType="TIMESTAMP" property="deadline" />
|
||||||
|
<result column="today_task" jdbcType="BIT" property="todayTask" />
|
||||||
|
<result column="message_image" jdbcType="VARCHAR" property="messageImage" />
|
||||||
|
<result column="publish_status" jdbcType="BIT" property="publishStatus" />
|
||||||
|
<result column="publish_time" jdbcType="TIMESTAMP" property="publishTime" />
|
||||||
|
<result column="publisher_user_id" jdbcType="BIGINT" property="publisherUserId" />
|
||||||
|
<result column="create_user_id" jdbcType="BIGINT" property="createUserId" />
|
||||||
|
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||||
|
<result column="updater_user_id" jdbcType="BIGINT" property="updaterUserId" />
|
||||||
|
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
||||||
|
<result column="deleted" jdbcType="BIT" property="deleted" />
|
||||||
|
<result column="message_content" jdbcType="LONGVARCHAR" property="messageContent" />
|
||||||
|
<result column="handle_person_info" jdbcType="LONGVARCHAR" property="handlePersonInfo" />
|
||||||
|
<result column="store_info" jdbcType="LONGVARCHAR" property="storeInfo" />
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
|
||||||
|
<select id="selectByIds" resultMap="BaseResultMap">
|
||||||
|
SELECT
|
||||||
|
*
|
||||||
|
FROM zxjp_message_template
|
||||||
|
WHERE id IN
|
||||||
|
<foreach collection="ids" item="id" open="(" separator="," close=")">
|
||||||
|
#{id,jdbcType=BIGINT}
|
||||||
|
</foreach>
|
||||||
|
AND deleted = 0
|
||||||
|
ORDER BY create_time DESC
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<update id="updateDeleteStatusBatch" >
|
||||||
|
UPDATE zxjp_message_template
|
||||||
|
SET
|
||||||
|
deleted = 1,
|
||||||
|
update_time = NOW(), updater_user_id = #{userId,jdbcType=VARCHAR}
|
||||||
|
WHERE id IN
|
||||||
|
<foreach collection="ids" item="id" open="(" separator="," close=")">
|
||||||
|
#{id,jdbcType=BIGINT}
|
||||||
|
</foreach>
|
||||||
|
</update>
|
||||||
|
|
||||||
|
|
||||||
|
<select id="getMessageTemplateList" resultType="com.cool.store.dto.notice.NoticeDTO" >
|
||||||
|
SELECT
|
||||||
|
id as id,
|
||||||
|
message_code as messageCode,
|
||||||
|
module_code as moduleCode,
|
||||||
|
matter_type as matterType,
|
||||||
|
message_title as messageTitle,
|
||||||
|
system_source as systemSource,
|
||||||
|
process_type as processType,
|
||||||
|
remind_type as remindType,
|
||||||
|
remind_start_time as remindStartTime,
|
||||||
|
remind_end_time as remindEndTime,
|
||||||
|
deadline as deadline,
|
||||||
|
today_task as todayTask,
|
||||||
|
message_image as messageImage,
|
||||||
|
publish_status as publishStatus,
|
||||||
|
publish_time as publishTime,
|
||||||
|
publisher_user_id as publishUserId,
|
||||||
|
create_user_id as createUserId,
|
||||||
|
create_time as createTime
|
||||||
|
FROM zxjp_message_template
|
||||||
|
WHERE deleted = 0
|
||||||
|
<if test="request.moduleCode != null">
|
||||||
|
AND module_code = #{request.moduleCode,jdbcType=TINYINT}
|
||||||
|
</if>
|
||||||
|
<if test="request.matterType != null">
|
||||||
|
AND matter_type = #{request.matterType,jdbcType=TINYINT}
|
||||||
|
</if>
|
||||||
|
<if test="request.messageTitle != null and request.messageTitle != ''">
|
||||||
|
AND message_title LIKE CONCAT('%', #{request.messageTitle,jdbcType=VARCHAR}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="request.todayTask != null">
|
||||||
|
AND today_task = #{request.todayTask,jdbcType=BIT}
|
||||||
|
</if>
|
||||||
|
<if test="request.systemSource != null and request.systemSource != ''">
|
||||||
|
AND system_source = #{request.systemSource,jdbcType=VARCHAR}
|
||||||
|
</if>
|
||||||
|
<if test="request.publishStatus != null">
|
||||||
|
AND publish_status = #{request.publishStatus,jdbcType=BIT}
|
||||||
|
</if>
|
||||||
|
<if test="request.publishUserId != null">
|
||||||
|
AND publisher_user_id = #{request.publishUserId,jdbcType=BIT}
|
||||||
|
</if>
|
||||||
|
ORDER BY create_time DESC
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<update id="batchUpdateStoreInfoAndUserInfo">
|
||||||
|
UPDATE zxjp_message_template
|
||||||
|
SET
|
||||||
|
store_info = #{storeInfo,jdbcType=LONGVARCHAR},
|
||||||
|
handle_person_info = #{userInfo,jdbcType=LONGVARCHAR},
|
||||||
|
update_time = NOW(),
|
||||||
|
publish_status = 1,
|
||||||
|
publish_time = NOW(),
|
||||||
|
publisher_user_id = #{userId}
|
||||||
|
WHERE id IN
|
||||||
|
<foreach collection="ids" item="id" open="(" separator="," close=")">
|
||||||
|
#{id,jdbcType=BIGINT}
|
||||||
|
</foreach>
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<update id="batchUpdatePublishStatus">
|
||||||
|
UPDATE zxjp_message_template
|
||||||
|
SET
|
||||||
|
publish_status = 2
|
||||||
|
WHERE id IN
|
||||||
|
<foreach collection="ids" item="id" open="(" separator="," close=")">
|
||||||
|
#{id,jdbcType=BIGINT}
|
||||||
|
</foreach>
|
||||||
|
</update>
|
||||||
|
|
||||||
|
</mapper>
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
||||||
|
<mapper namespace="com.cool.store.mapper.StoreGroupMappingMapper">
|
||||||
|
|
||||||
|
<select id="getStoreGroupMappingByGroupIDs"
|
||||||
|
resultType="com.cool.store.entity.StoreGroupMappingDO">
|
||||||
|
select
|
||||||
|
group_id as groupId,
|
||||||
|
store_id as storeId
|
||||||
|
from store_group_mapping_${enterpriseId}
|
||||||
|
<where>
|
||||||
|
<foreach collection="groupIds" open=" group_id in (" close=")" separator="," item="groupId">
|
||||||
|
#{groupId}
|
||||||
|
</foreach>
|
||||||
|
</where>
|
||||||
|
group by group_id,store_id
|
||||||
|
</select>
|
||||||
|
|
||||||
|
</mapper>
|
||||||
@@ -126,6 +126,7 @@
|
|||||||
|
|
||||||
<select id="getStoreAreaList" resultType="com.cool.store.dto.store.StoreAreaDTO">
|
<select id="getStoreAreaList" resultType="com.cool.store.dto.store.StoreAreaDTO">
|
||||||
select
|
select
|
||||||
|
a.store_num as storeCode,
|
||||||
a.store_name as storeName,
|
a.store_name as storeName,
|
||||||
a.store_id as storeId,
|
a.store_id as storeId,
|
||||||
a.region_path as regionPath,
|
a.region_path as regionPath,
|
||||||
@@ -155,4 +156,20 @@
|
|||||||
</if>
|
</if>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="listStoreByRegionPathList" resultType="com.cool.store.dto.store.StoreAreaDTO">
|
||||||
|
select
|
||||||
|
store_name as storeName,
|
||||||
|
store_id as storeId,
|
||||||
|
region_path as regionPath,
|
||||||
|
region_id as regionId,
|
||||||
|
region_id as areaId
|
||||||
|
from store_${enterpriseId}
|
||||||
|
where is_delete = 'effective'
|
||||||
|
<if test="regionPathList != null and regionPathList.size >0 ">
|
||||||
|
<foreach collection="regionPathList" item="regionPath" separator=" or " open="and (" close=" )">
|
||||||
|
region_path like concat(#{regionPath}, '%')
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
@@ -0,0 +1,219 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.cool.store.mapper.StoreMessageMapper">
|
||||||
|
<resultMap id="BaseResultMap" type="com.cool.store.entity.StoreMessageDO">
|
||||||
|
<!--
|
||||||
|
WARNING - @mbg.generated
|
||||||
|
-->
|
||||||
|
<id column="id" property="id" />
|
||||||
|
<result column="store_id" property="storeId" />
|
||||||
|
<result column="store_code" property="storeCode" />
|
||||||
|
<result column="store_name" property="storeName" />
|
||||||
|
<result column="message_template_id" property="messageTemplateId" />
|
||||||
|
<result column="read_status" jdbcType="BIT" property="readStatus" />
|
||||||
|
<result column="read_time" property="readTime" />
|
||||||
|
<result column="process_status" jdbcType="TINYINT" property="processStatus" />
|
||||||
|
<result column="process_time" property="processTime" />
|
||||||
|
<result column="actual_operator_id" property="actualOperatorId" />
|
||||||
|
<result column="actual_operator_name" property="actualOperatorName" />
|
||||||
|
<result column="revoke_status" jdbcType="BIT" property="revokeStatus" />
|
||||||
|
<result column="revoke_time" property="revokeTime" />
|
||||||
|
<result column="revoke_operator_id" property="revokeOperatorId" />
|
||||||
|
<result column="revoke_operator_name" property="revokeOperatorName" />
|
||||||
|
<result column="create_time" property="createTime" />
|
||||||
|
<result column="update_time" property="updateTime" />
|
||||||
|
<result column="operator_list" property="operatorList" />
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<insert id="insertBatch" parameterType="java.util.List">
|
||||||
|
INSERT INTO zxjp_store_message (
|
||||||
|
store_id,
|
||||||
|
store_code,
|
||||||
|
store_name,
|
||||||
|
message_template_id,
|
||||||
|
read_status,
|
||||||
|
read_time,
|
||||||
|
process_status,
|
||||||
|
process_time,
|
||||||
|
operator_list
|
||||||
|
)
|
||||||
|
VALUES
|
||||||
|
<foreach collection="list" item="item" index="index" separator=",">
|
||||||
|
(
|
||||||
|
#{item.storeId},
|
||||||
|
#{item.storeCode},
|
||||||
|
#{item.storeName},
|
||||||
|
#{item.messageTemplateId},
|
||||||
|
#{item.readStatus},
|
||||||
|
#{item.readTime},
|
||||||
|
#{item.processStatus},
|
||||||
|
#{item.processTime},
|
||||||
|
#{item.operatorList}
|
||||||
|
)
|
||||||
|
</foreach>
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<select id="getMessageTemplateCountList" resultType="com.cool.store.dto.notice.MessageTemplateCountDTO">
|
||||||
|
SELECT
|
||||||
|
message_template_id AS templateId,
|
||||||
|
COUNT(DISTINCT store_id) AS totalStoreCount,
|
||||||
|
SUM(CASE WHEN process_status = 1 THEN 1 ELSE 0 END) AS processedStoreCount
|
||||||
|
FROM
|
||||||
|
zxjp_store_message
|
||||||
|
<where>
|
||||||
|
message_template_id IN
|
||||||
|
<foreach item="item" collection="templateIds" index="index" separator="," close=")" open="(">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</where>
|
||||||
|
GROUP BY
|
||||||
|
message_template_id
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="getStoreMessageList" resultMap="BaseResultMap">
|
||||||
|
SELECT
|
||||||
|
id,
|
||||||
|
store_id,
|
||||||
|
store_code,
|
||||||
|
store_name,
|
||||||
|
message_template_id,
|
||||||
|
read_status,
|
||||||
|
read_time,
|
||||||
|
process_status,
|
||||||
|
process_time,
|
||||||
|
actual_operator_id,
|
||||||
|
actual_operator_name,
|
||||||
|
revoke_status,
|
||||||
|
revoke_time,
|
||||||
|
revoke_operator_id,
|
||||||
|
revoke_operator_name,
|
||||||
|
create_time,
|
||||||
|
update_time
|
||||||
|
FROM zxjp_store_message
|
||||||
|
<where>
|
||||||
|
<if test="request.templateId != null">
|
||||||
|
AND message_template_id = #{request.templateId}
|
||||||
|
</if>
|
||||||
|
<if test="request.readStatus != null">
|
||||||
|
AND read_status = #{request.readStatus,jdbcType=BIT}
|
||||||
|
</if>
|
||||||
|
<if test="request.processStatus != null">
|
||||||
|
AND process_status = #{request.processStatus,jdbcType=TINYINT}
|
||||||
|
</if>
|
||||||
|
<if test="request.keyword != null">
|
||||||
|
AND ( store_code LIKE CONCAT('%',#{request.keyword},'%')
|
||||||
|
OR store_name LIKE CONCAT('%',#{request.keyword},'%')
|
||||||
|
)
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
ORDER BY create_time DESC
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<update id="batchRevoke">
|
||||||
|
UPDATE zxjp_store_message
|
||||||
|
SET
|
||||||
|
revoke_status = 1,
|
||||||
|
revoke_time = NOW(),
|
||||||
|
revoke_operator_id = #{userId},
|
||||||
|
revoke_operator_name = #{userName},
|
||||||
|
update_time = NOW()
|
||||||
|
<where>
|
||||||
|
message_template_id IN
|
||||||
|
<foreach item="item" collection="ids" index="index" separator="," close=")" open="(">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
AND process_status = 0
|
||||||
|
AND revoke_status = 0
|
||||||
|
</where>
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<update id="revokeById">
|
||||||
|
UPDATE zxjp_store_message
|
||||||
|
SET
|
||||||
|
revoke_status = 1,
|
||||||
|
revoke_time = NOW(),
|
||||||
|
revoke_operator_id = #{userId},
|
||||||
|
revoke_operator_name = #{userName},
|
||||||
|
update_time = NOW()
|
||||||
|
WHERE
|
||||||
|
id = #{id}
|
||||||
|
AND process_status = 0
|
||||||
|
AND revoke_status = 0
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<select id="queryStoreModuleCount" resultType="java.lang.Integer">
|
||||||
|
select count(1) from zxjp_store_message a
|
||||||
|
left join zxjp_message_template b on a.message_template_id = b.id
|
||||||
|
where a.store_id = #{storeId}
|
||||||
|
and b.module_code = #{moduleCode}
|
||||||
|
and a.operator_list like concat('%',#{userId},'%')
|
||||||
|
limit 1
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="getStoreMessageListByCondition" resultType="com.cool.store.vo.notice.StoreMessageVO">
|
||||||
|
select
|
||||||
|
a.id,
|
||||||
|
a.store_id as storeId,
|
||||||
|
a.store_code as storeCode,
|
||||||
|
a.message_template_id as templateId,
|
||||||
|
a.read_status as readStatus,
|
||||||
|
a.process_status as processStatus,
|
||||||
|
a.create_time as createTime,
|
||||||
|
b.module_code as moduleCode,
|
||||||
|
b.message_title as messageTitle,
|
||||||
|
b.message_image as messageImage,
|
||||||
|
b.today_task as todayTask
|
||||||
|
from zxjp_store_message a
|
||||||
|
left join zxjp_message_template b on a.message_template_id = b.id
|
||||||
|
<where>
|
||||||
|
<if test="storeId != null">
|
||||||
|
and a.store_id = #{storeId}
|
||||||
|
</if>
|
||||||
|
<if test="moduleCode != null">
|
||||||
|
and b.module_code = #{moduleCode}
|
||||||
|
</if>
|
||||||
|
<if test="todayTask != null">
|
||||||
|
and b.today_task = #{todayTask}
|
||||||
|
</if>
|
||||||
|
<if test="pendingFlag != null">
|
||||||
|
and a.process_status = 0
|
||||||
|
and a.process_status = 0
|
||||||
|
and (b.remind_type = 1 or (b.remind_type = 2 and NOW() BETWEEN b.remind_start_time AND b.remind_end_time ))
|
||||||
|
</if>
|
||||||
|
<if test="userId != null">
|
||||||
|
and a.operator_list like concat('%',#{userId},'%')
|
||||||
|
</if>
|
||||||
|
and revoke_status = 0
|
||||||
|
</where>
|
||||||
|
<if test="pendingFlag != null">
|
||||||
|
order by b.today_task desc, a.create_time desc
|
||||||
|
</if>
|
||||||
|
<if test="pendingFlag == null">
|
||||||
|
order by a.create_time desc
|
||||||
|
</if>
|
||||||
|
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="getMessageDetail" resultType="com.cool.store.vo.notice.MessageDetailVO">
|
||||||
|
select
|
||||||
|
a.id,
|
||||||
|
b.message_title,
|
||||||
|
b.message_image,
|
||||||
|
a.create_time,
|
||||||
|
a.read_status as readStatus,
|
||||||
|
a.process_status as processStatus,
|
||||||
|
b.deadline as deadline,
|
||||||
|
b.publisher_user_id as publishUserId,
|
||||||
|
b.message_content as messageContent,
|
||||||
|
b.process_type as processType
|
||||||
|
from
|
||||||
|
zxjp_store_message a
|
||||||
|
left join zxjp_message_template b on a.message_template_id = b.id
|
||||||
|
where
|
||||||
|
a.id = #{id}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</mapper>
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
||||||
|
<mapper namespace="com.cool.store.mapper.EnterpriseUserGroupMappingMapper">
|
||||||
|
|
||||||
|
<select id="getUserIdsByGroupIdList" resultType="string">
|
||||||
|
select
|
||||||
|
user_id
|
||||||
|
from enterprise_user_group_mapping_${enterpriseId}
|
||||||
|
where group_id in (
|
||||||
|
<foreach collection="groupIdList" item="groupId" separator=",">
|
||||||
|
#{groupId}
|
||||||
|
</foreach>
|
||||||
|
)
|
||||||
|
</select>
|
||||||
|
|
||||||
|
</mapper>
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
package com.cool.store.dto.notice;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author suzhuhong
|
||||||
|
* @Date 2025/7/24 15:27
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class CommonDTO {
|
||||||
|
|
||||||
|
@ApiModelProperty("类型")
|
||||||
|
private String type;
|
||||||
|
@ApiModelProperty("ID值")
|
||||||
|
private String value;
|
||||||
|
@ApiModelProperty("名称")
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
package com.cool.store.dto.notice;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author suzhuhong
|
||||||
|
* @Date 2025/7/26 19:47
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class MessageTemplateCountDTO {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 模版ID
|
||||||
|
*/
|
||||||
|
private Long templateId;
|
||||||
|
/**
|
||||||
|
* 总门店数据
|
||||||
|
*/
|
||||||
|
private Integer totalStoreCount;
|
||||||
|
/**
|
||||||
|
* 已处理门店数据
|
||||||
|
*/
|
||||||
|
private Integer processedStoreCount;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,78 @@
|
|||||||
|
package com.cool.store.dto.notice;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import javax.persistence.Column;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author suzhuhong
|
||||||
|
* @Date 2025/7/25 16:49
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class NoticeDTO {
|
||||||
|
|
||||||
|
private Long id ;
|
||||||
|
|
||||||
|
@ApiModelProperty("消息编码")
|
||||||
|
private String messageCode;
|
||||||
|
|
||||||
|
@ApiModelProperty("模块")
|
||||||
|
private Integer moduleCode;
|
||||||
|
|
||||||
|
@ApiModelProperty("事项类型")
|
||||||
|
private Integer matterType;
|
||||||
|
|
||||||
|
@ApiModelProperty("消息标题")
|
||||||
|
private String messageTitle;
|
||||||
|
|
||||||
|
@ApiModelProperty("系统来源")
|
||||||
|
private String systemSource;
|
||||||
|
|
||||||
|
@ApiModelProperty("处理类型")
|
||||||
|
private Integer processType;
|
||||||
|
|
||||||
|
@ApiModelProperty("提醒")
|
||||||
|
private Integer remindType;
|
||||||
|
|
||||||
|
@ApiModelProperty("提醒时间段 开始时间")
|
||||||
|
private Date remindStartTime;
|
||||||
|
|
||||||
|
@ApiModelProperty("提醒时间段 结束时间")
|
||||||
|
private Date remindEndTime;
|
||||||
|
|
||||||
|
@ApiModelProperty("截止日期")
|
||||||
|
private Date deadline;
|
||||||
|
|
||||||
|
@ApiModelProperty("今日必办标识")
|
||||||
|
private Boolean todayTask;
|
||||||
|
|
||||||
|
@ApiModelProperty("发布状态")
|
||||||
|
private Integer publishStatus;
|
||||||
|
|
||||||
|
@ApiModelProperty("处理完数据")
|
||||||
|
private Integer handleNum;
|
||||||
|
@ApiModelProperty("总数")
|
||||||
|
private Integer totalNum;
|
||||||
|
|
||||||
|
@ApiModelProperty("创建人")
|
||||||
|
private String createUserId;
|
||||||
|
|
||||||
|
@ApiModelProperty("创建名称")
|
||||||
|
private String createUserName;
|
||||||
|
|
||||||
|
@ApiModelProperty("总数")
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
|
@ApiModelProperty("发布人id")
|
||||||
|
private String publishUserId;
|
||||||
|
|
||||||
|
@ApiModelProperty("发布人名称")
|
||||||
|
private String publishUserName;
|
||||||
|
|
||||||
|
@ApiModelProperty("发布人时间")
|
||||||
|
private Date publishTime;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -12,6 +12,7 @@ import java.util.List;
|
|||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
public class StoreAreaDTO {
|
public class StoreAreaDTO {
|
||||||
|
private String storeCode;
|
||||||
private String storeId;
|
private String storeId;
|
||||||
private String storeName;
|
private String storeName;
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -0,0 +1,99 @@
|
|||||||
|
package com.cool.store.entity;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
import javax.persistence.*;
|
||||||
|
|
||||||
|
@Table(name = "zxjp_matter_config")
|
||||||
|
@Data
|
||||||
|
public class MatterConfigDO {
|
||||||
|
/**
|
||||||
|
* 主键ID
|
||||||
|
*/
|
||||||
|
@Id
|
||||||
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 模块编码
|
||||||
|
*/
|
||||||
|
@Column(name = "module_code")
|
||||||
|
private Integer moduleCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 事项类型
|
||||||
|
*/
|
||||||
|
@Column(name = "matter_type")
|
||||||
|
private Integer matterType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 系统来源
|
||||||
|
*/
|
||||||
|
@Column(name = "system_source")
|
||||||
|
private String systemSource;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 跳转方式(1:H5 2:小程序 )
|
||||||
|
*/
|
||||||
|
@Column(name = "jump_type")
|
||||||
|
private Integer jumpType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 跳转链接
|
||||||
|
*/
|
||||||
|
@Column(name = "jump_url")
|
||||||
|
private String jumpUrl;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 状态(0:禁用 1:启用)
|
||||||
|
*/
|
||||||
|
private Integer status;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
@Column(name = "create_time")
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建人
|
||||||
|
*/
|
||||||
|
@Column(name = "create_user_id")
|
||||||
|
private String createUserId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新时间
|
||||||
|
*/
|
||||||
|
@Column(name = "update_time")
|
||||||
|
private Date updateTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新人
|
||||||
|
*/
|
||||||
|
@Column(name = "update_user_id")
|
||||||
|
private String updateUserId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除标记(0:未删除 1:已删除)
|
||||||
|
*/
|
||||||
|
private Boolean deleted;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 默认处理人信息 [{type:person,value:}{type:position,value:}]
|
||||||
|
*/
|
||||||
|
@Column(name = "default_handle_person_info")
|
||||||
|
private String defaultHandlePersonInfo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 默认门店范围 [{type:store,value:}{type:region,value:}]
|
||||||
|
*/
|
||||||
|
@Column(name = "default_store_info")
|
||||||
|
private String defaultStoreInfo;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,155 @@
|
|||||||
|
package com.cool.store.entity;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
import javax.persistence.*;
|
||||||
|
|
||||||
|
@Table(name = "zxjp_message_template")
|
||||||
|
@Data
|
||||||
|
public class MessageTemplateDO {
|
||||||
|
/**
|
||||||
|
* 主键ID
|
||||||
|
*/
|
||||||
|
@Id
|
||||||
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 消息编码(唯一标识)
|
||||||
|
*/
|
||||||
|
@Column(name = "message_code")
|
||||||
|
private String messageCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 模块编码
|
||||||
|
*/
|
||||||
|
@Column(name = "module_code")
|
||||||
|
private Integer moduleCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 事项类型
|
||||||
|
*/
|
||||||
|
@Column(name = "matter_type")
|
||||||
|
private Integer matterType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 消息标题
|
||||||
|
*/
|
||||||
|
@Column(name = "message_title")
|
||||||
|
private String messageTitle;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 系统来源
|
||||||
|
*/
|
||||||
|
@Column(name = "system_source")
|
||||||
|
private String systemSource;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 处理类型(1:仅阅读 2:需要处理)
|
||||||
|
*/
|
||||||
|
@Column(name = "process_type")
|
||||||
|
private Integer processType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 提醒类型(1:持续提醒 2:阶段提醒 )
|
||||||
|
*/
|
||||||
|
@Column(name = "remind_type")
|
||||||
|
private Integer remindType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 提醒时间段 开始时间
|
||||||
|
*/
|
||||||
|
@Column(name = "remind_start_time")
|
||||||
|
private Date remindStartTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 提醒时间段 结束时间
|
||||||
|
*/
|
||||||
|
@Column(name = "remind_end_time")
|
||||||
|
private Date remindEndTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 截止日期
|
||||||
|
*/
|
||||||
|
private Date deadline;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 今日必办标识(0:否 1:是)
|
||||||
|
*/
|
||||||
|
@Column(name = "today_task")
|
||||||
|
private Integer todayTask;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 消息图片URL
|
||||||
|
*/
|
||||||
|
@Column(name = "message_image")
|
||||||
|
private String messageImage;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 发布状态(0:未发布 1:已发布 2:已撤销)
|
||||||
|
*/
|
||||||
|
@Column(name = "publish_status")
|
||||||
|
private Integer publishStatus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 发布时间
|
||||||
|
*/
|
||||||
|
@Column(name = "publish_time")
|
||||||
|
private Date publishTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 发布人ID
|
||||||
|
*/
|
||||||
|
@Column(name = "publisher_user_id")
|
||||||
|
private String publisherUserId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建人ID
|
||||||
|
*/
|
||||||
|
@Column(name = "create_user_id")
|
||||||
|
private String createUserId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
@Column(name = "create_time")
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新人ID
|
||||||
|
*/
|
||||||
|
@Column(name = "updater_user_id")
|
||||||
|
private String updaterUserId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新时间
|
||||||
|
*/
|
||||||
|
@Column(name = "update_time")
|
||||||
|
private Date updateTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除标记(0:未删除 1:已删除)
|
||||||
|
*/
|
||||||
|
private Boolean deleted;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 消息详情(富文本内容)
|
||||||
|
*/
|
||||||
|
@Column(name = "message_content")
|
||||||
|
private String messageContent;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 处理人信息 [{type:person,value:}{type:position,value:}]
|
||||||
|
*/
|
||||||
|
@Column(name = "handle_person_info")
|
||||||
|
private String handlePersonInfo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 门店范围 [{type:store,value:}{type:region,value:}]
|
||||||
|
*/
|
||||||
|
@Column(name = "store_info")
|
||||||
|
private String storeInfo;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,62 @@
|
|||||||
|
package com.cool.store.entity;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author suzhuhong
|
||||||
|
* @Date 2025/7/25 10:23
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
public class StoreGroupMappingDO {
|
||||||
|
/**
|
||||||
|
* 自增id
|
||||||
|
*/
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 门店id
|
||||||
|
*/
|
||||||
|
@JsonProperty("store_id")
|
||||||
|
private String storeId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 组别id
|
||||||
|
*/
|
||||||
|
@JsonProperty("group_id")
|
||||||
|
private String groupId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
private Long createTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建人
|
||||||
|
*/
|
||||||
|
private String createUser;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改时间
|
||||||
|
*/
|
||||||
|
private Long updateTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改人
|
||||||
|
*/
|
||||||
|
private String updateUser;
|
||||||
|
|
||||||
|
public StoreGroupMappingDO(String storeId, String groupId, Long createTime, String createUser) {
|
||||||
|
this.storeId = storeId;
|
||||||
|
this.groupId = groupId;
|
||||||
|
this.createTime = createTime;
|
||||||
|
this.createUser = createUser;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,121 @@
|
|||||||
|
package com.cool.store.entity;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
import javax.persistence.*;
|
||||||
|
|
||||||
|
@Table(name = "zxjp_store_message")
|
||||||
|
@Data
|
||||||
|
public class StoreMessageDO {
|
||||||
|
/**
|
||||||
|
* 主键ID
|
||||||
|
*/
|
||||||
|
@Id
|
||||||
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 门店编码
|
||||||
|
*/
|
||||||
|
@Column(name = "store_id")
|
||||||
|
private String storeId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 门店编码
|
||||||
|
*/
|
||||||
|
@Column(name = "store_code")
|
||||||
|
private String storeCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 门店名称
|
||||||
|
*/
|
||||||
|
@Column(name = "store_name")
|
||||||
|
private String storeName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 关联的消息模板ID
|
||||||
|
*/
|
||||||
|
@Column(name = "message_template_id")
|
||||||
|
private Long messageTemplateId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 阅读状态(0:未读 1:已读)
|
||||||
|
*/
|
||||||
|
@Column(name = "read_status")
|
||||||
|
private Integer readStatus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 阅读时间
|
||||||
|
*/
|
||||||
|
@Column(name = "read_time")
|
||||||
|
private Date readTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 处理状态(0:未处理 1:处理中)
|
||||||
|
*/
|
||||||
|
@Column(name = "process_status")
|
||||||
|
private Integer processStatus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 处理时间
|
||||||
|
*/
|
||||||
|
@Column(name = "process_time")
|
||||||
|
private Date processTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 实际操作人ID
|
||||||
|
*/
|
||||||
|
@Column(name = "actual_operator_id")
|
||||||
|
private String actualOperatorId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 实际操作人姓名
|
||||||
|
*/
|
||||||
|
@Column(name = "actual_operator_name")
|
||||||
|
private String actualOperatorName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 撤销状态(0:未撤销 1:已撤销)
|
||||||
|
*/
|
||||||
|
@Column(name = "revoke_status")
|
||||||
|
private Integer revokeStatus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 撤销时间
|
||||||
|
*/
|
||||||
|
@Column(name = "revoke_time")
|
||||||
|
private Date revokeTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 撤销操作人ID
|
||||||
|
*/
|
||||||
|
@Column(name = "revoke_operator_id")
|
||||||
|
private String revokeOperatorId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 撤销操作人姓名
|
||||||
|
*/
|
||||||
|
@Column(name = "revoke_operator_name")
|
||||||
|
private String revokeOperatorName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
@Column(name = "create_time")
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新时间
|
||||||
|
*/
|
||||||
|
@Column(name = "update_time")
|
||||||
|
private Date updateTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 操作人列表 逗号隔开
|
||||||
|
*/
|
||||||
|
@Column(name = "operator_list")
|
||||||
|
private String operatorList;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
package com.cool.store.request.notice;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author suzhuhong
|
||||||
|
* @Date 2025/7/24 16:47
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class BatchDeletedRequest {
|
||||||
|
|
||||||
|
private List<Long> ids;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
package com.cool.store.request.notice;
|
||||||
|
|
||||||
|
import com.cool.store.dto.notice.CommonDTO;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author suzhuhong
|
||||||
|
* @Date 2025/7/25 13:47
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class BatchPublishRequest {
|
||||||
|
|
||||||
|
private List<Long> ids;
|
||||||
|
|
||||||
|
@ApiModelProperty( "默认门店范围 type[region store group]")
|
||||||
|
List<CommonDTO> storeInfoList;
|
||||||
|
|
||||||
|
@ApiModelProperty( "默认处理人信息 type[person position userGroup organization]")
|
||||||
|
List<CommonDTO> userInfoList;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
package com.cool.store.request.notice;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author suzhuhong
|
||||||
|
* @Date 2025/7/27 20:07
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class BatchRevokeRequest {
|
||||||
|
|
||||||
|
@ApiModelProperty("批量撤销的消息ID列表")
|
||||||
|
private List<Long> ids;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,49 @@
|
|||||||
|
package com.cool.store.request.notice;
|
||||||
|
|
||||||
|
import com.aliyun.teautil.Common;
|
||||||
|
import com.cool.store.dto.notice.CommonDTO;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author suzhuhong
|
||||||
|
* @Date 2025/7/24 15:23
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class MatterConfigAddRequest {
|
||||||
|
|
||||||
|
@ApiModelProperty( "Id 新增忽略")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
@ApiModelProperty( "模块CODE")
|
||||||
|
private Integer moduleCode;
|
||||||
|
|
||||||
|
@ApiModelProperty( "事项类型")
|
||||||
|
private Integer matterType;
|
||||||
|
|
||||||
|
@ApiModelProperty( "系统来源")
|
||||||
|
private String systemSource;
|
||||||
|
|
||||||
|
@ApiModelProperty( "1:H5 2:小程序")
|
||||||
|
private Boolean jumpType;
|
||||||
|
|
||||||
|
@ApiModelProperty( "跳转链接")
|
||||||
|
private String jumpUrl;
|
||||||
|
|
||||||
|
@ApiModelProperty( "状态(0:禁用 1:启用)")
|
||||||
|
private Boolean status;
|
||||||
|
|
||||||
|
@ApiModelProperty( "备注")
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
@ApiModelProperty( "默认门店范围 type[region store group]")
|
||||||
|
List<CommonDTO> storeInfoList;
|
||||||
|
|
||||||
|
@ApiModelProperty( "默认处理人信息 type[person position userGroup organization]")
|
||||||
|
List<CommonDTO> userInfoList;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
package com.cool.store.request.notice;
|
||||||
|
|
||||||
|
import com.cool.store.common.PageBasicInfo;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author suzhuhong
|
||||||
|
* @Date 2025/7/24 14:36
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class MatterConfigQueryRequest extends PageBasicInfo {
|
||||||
|
|
||||||
|
private Integer moduleCode;
|
||||||
|
|
||||||
|
private Integer matterType;
|
||||||
|
|
||||||
|
private String systemSource;
|
||||||
|
|
||||||
|
private Integer status;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,42 @@
|
|||||||
|
package com.cool.store.request.notice;
|
||||||
|
|
||||||
|
import com.cool.store.dto.notice.CommonDTO;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author suzhuhong
|
||||||
|
* @Date 2025/7/25 11:10
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class MessageTemplateAddRequest {
|
||||||
|
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
@ApiModelProperty("模块")
|
||||||
|
private Integer moduleCode;
|
||||||
|
@ApiModelProperty("提醒类型")
|
||||||
|
private Integer remindType;
|
||||||
|
@ApiModelProperty("提醒时间段 开始时间 阶段提醒时传")
|
||||||
|
private Date remindStartTime;
|
||||||
|
@ApiModelProperty("提醒时间段 结束时间 阶段提醒时传")
|
||||||
|
private Date remindEndTime;
|
||||||
|
@ApiModelProperty("截止时间")
|
||||||
|
private Date deadline;
|
||||||
|
@ApiModelProperty("处理类型(1:仅阅读 2:需要处理)")
|
||||||
|
private Integer processType;
|
||||||
|
@ApiModelProperty("今日必办标识 0非必办 1必办")
|
||||||
|
private Integer todayTask;
|
||||||
|
@ApiModelProperty("消息标题")
|
||||||
|
private String messageTitle;
|
||||||
|
@ApiModelProperty("消息图片URL")
|
||||||
|
private String messageImage;
|
||||||
|
@ApiModelProperty("消息详情(富文本内容)")
|
||||||
|
private String messageContent;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
package com.cool.store.request.notice;
|
||||||
|
|
||||||
|
import com.cool.store.common.PageBasicInfo;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author suzhuhong
|
||||||
|
* @Date 2025/7/26 19:09
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class MessageTemplateQueryRequest extends PageBasicInfo {
|
||||||
|
|
||||||
|
|
||||||
|
@ApiModelProperty("模块")
|
||||||
|
private Integer moduleCode;
|
||||||
|
@ApiModelProperty("事项类型")
|
||||||
|
private Integer matterType;
|
||||||
|
@ApiModelProperty("事项标题")
|
||||||
|
private String messageTitle;
|
||||||
|
@ApiModelProperty("今日必办")
|
||||||
|
private Integer todayTask;
|
||||||
|
@ApiModelProperty("系统来源")
|
||||||
|
private String systemSource;
|
||||||
|
@ApiModelProperty("发布用户ID")
|
||||||
|
private String publishUserId;
|
||||||
|
@ApiModelProperty("发布状态")
|
||||||
|
private Integer publishStatus;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
package com.cool.store.request.notice;
|
||||||
|
|
||||||
|
import com.cool.store.common.PageBasicInfo;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author suzhuhong
|
||||||
|
* @Date 2025/7/27 21:21
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class StoreMessageListRequest extends PageBasicInfo {
|
||||||
|
|
||||||
|
private String storeId;
|
||||||
|
|
||||||
|
private Integer moduleCode;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
package com.cool.store.request.notice;
|
||||||
|
|
||||||
|
import com.cool.store.common.PageBasicInfo;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotEmpty;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author suzhuhong
|
||||||
|
* @Date 2025/7/27 21:23
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class StoreMessagePendingRequest extends PageBasicInfo {
|
||||||
|
|
||||||
|
private String storeId;
|
||||||
|
|
||||||
|
@ApiModelProperty("待办列表时 不需要传")
|
||||||
|
private Integer moduleCode;
|
||||||
|
|
||||||
|
@ApiModelProperty("手机号")
|
||||||
|
@NotEmpty
|
||||||
|
private String mobile;
|
||||||
|
|
||||||
|
@ApiModelProperty("是否今日必办")
|
||||||
|
private Integer todayTask;
|
||||||
|
|
||||||
|
@ApiModelProperty("待办标识")
|
||||||
|
private Integer pendingFlag;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
package com.cool.store.request.notice;
|
||||||
|
|
||||||
|
import com.cool.store.common.PageBasicInfo;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author suzhuhong
|
||||||
|
* @Date 2025/7/26 20:13
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class StoreMessageRequest extends PageBasicInfo {
|
||||||
|
|
||||||
|
@ApiModelProperty("模板ID")
|
||||||
|
private Long templateId;
|
||||||
|
|
||||||
|
@ApiModelProperty("阅读状态 0未读 1-已读")
|
||||||
|
private Integer readStatus;
|
||||||
|
|
||||||
|
@ApiModelProperty("处理状态 0未处理 1-已处理")
|
||||||
|
private Integer processStatus;
|
||||||
|
|
||||||
|
@ApiModelProperty("关键字查询")
|
||||||
|
private String keyword;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,46 @@
|
|||||||
|
package com.cool.store.vo.notice;
|
||||||
|
|
||||||
|
import com.cool.store.dto.notice.CommonDTO;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author suzhuhong
|
||||||
|
* @Date 2025/7/24 16:50
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class MatterAndMatterDetailVO {
|
||||||
|
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
@ApiModelProperty( "模块CODE")
|
||||||
|
private Integer moduleCode;
|
||||||
|
|
||||||
|
@ApiModelProperty( "事项类型")
|
||||||
|
private Integer matterType;
|
||||||
|
|
||||||
|
@ApiModelProperty( "系统来源")
|
||||||
|
private String systemSource;
|
||||||
|
|
||||||
|
@ApiModelProperty( "1:H5 2:小程序")
|
||||||
|
private Integer jumpType;
|
||||||
|
|
||||||
|
@ApiModelProperty( "跳转链接")
|
||||||
|
private String jumpUrl;
|
||||||
|
|
||||||
|
@ApiModelProperty( "状态(0:禁用 1:启用)")
|
||||||
|
private Integer status;
|
||||||
|
|
||||||
|
@ApiModelProperty( "备注")
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
@ApiModelProperty( "默认门店范围 type[region store group]")
|
||||||
|
List<CommonDTO> storeInfoList;
|
||||||
|
|
||||||
|
@ApiModelProperty( "默认处理人信息 type[person position userGroup organization]")
|
||||||
|
List<CommonDTO> userInfoList;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,43 @@
|
|||||||
|
package com.cool.store.vo.notice;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author suzhuhong
|
||||||
|
* @Date 2025/7/27 21:16
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class MessageDetailVO {
|
||||||
|
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
@ApiModelProperty("消息标题")
|
||||||
|
private String messageTitle;
|
||||||
|
|
||||||
|
@ApiModelProperty("消息图片URL")
|
||||||
|
private String messageImage;
|
||||||
|
|
||||||
|
@ApiModelProperty("消息详情")
|
||||||
|
private String messageContent;
|
||||||
|
|
||||||
|
@ApiModelProperty("发布时间")
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
|
@ApiModelProperty("发布人")
|
||||||
|
private String publishUserName;
|
||||||
|
|
||||||
|
private String publishUserId;
|
||||||
|
|
||||||
|
private Date deadline;
|
||||||
|
|
||||||
|
private Integer readStatus;
|
||||||
|
|
||||||
|
private Integer processStatus;
|
||||||
|
|
||||||
|
private Integer processType;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,56 @@
|
|||||||
|
package com.cool.store.vo.notice;
|
||||||
|
|
||||||
|
import com.cool.store.dto.notice.CommonDTO;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author suzhuhong
|
||||||
|
* @Date 2025/7/25 13:23
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class MessageTemplateDetailVO {
|
||||||
|
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
@ApiModelProperty("模块")
|
||||||
|
private Integer moduleCode;
|
||||||
|
@ApiModelProperty("事项类型")
|
||||||
|
private Integer matterType;
|
||||||
|
@ApiModelProperty("提醒类型")
|
||||||
|
private Integer remindType;
|
||||||
|
@ApiModelProperty("提醒时间段 开始时间 阶段提醒时传")
|
||||||
|
private Date remindStartTime;
|
||||||
|
@ApiModelProperty("提醒时间段 结束时间 阶段提醒时传")
|
||||||
|
private Date remindEndTime;
|
||||||
|
@ApiModelProperty("截止时间")
|
||||||
|
private Date deadline;
|
||||||
|
@ApiModelProperty("处理类型(1:仅阅读 2:需要处理)")
|
||||||
|
private Integer processType;
|
||||||
|
@ApiModelProperty("今日必办标识 0非必办 1必办")
|
||||||
|
private Integer todayTask;
|
||||||
|
@ApiModelProperty("消息标题")
|
||||||
|
private String messageTitle;
|
||||||
|
@ApiModelProperty("消息图片URL")
|
||||||
|
private String messageImage;
|
||||||
|
@ApiModelProperty("消息详情(富文本内容)")
|
||||||
|
private String messageContent;
|
||||||
|
@ApiModelProperty( "默认门店范围 type[region store group]")
|
||||||
|
List<CommonDTO> storeInfoList;
|
||||||
|
@ApiModelProperty( "默认处理人信息 type[person position userGroup organization]")
|
||||||
|
List<CommonDTO> userInfoList;
|
||||||
|
@ApiModelProperty("发布时间")
|
||||||
|
private Date publishTime;
|
||||||
|
@ApiModelProperty("处理完数据")
|
||||||
|
private Integer handleNum;
|
||||||
|
@ApiModelProperty("总数")
|
||||||
|
private Integer totalNum;
|
||||||
|
@ApiModelProperty("系统来源")
|
||||||
|
private String systemSource;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,59 @@
|
|||||||
|
package com.cool.store.vo.notice;
|
||||||
|
|
||||||
|
import com.cool.store.enums.notice.MatterTypeEnum;
|
||||||
|
import com.cool.store.enums.notice.ModuleCodeEnum;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author suzhuhong
|
||||||
|
* @Date 2025/7/24 16:26
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class ModuleAndMatterVO {
|
||||||
|
|
||||||
|
private Integer moduleCode;
|
||||||
|
|
||||||
|
private String moduleName;
|
||||||
|
|
||||||
|
private List<MatterTypeVO> matterTypeList;
|
||||||
|
|
||||||
|
public ModuleAndMatterVO(Integer moduleCode, String moduleName, List<MatterTypeVO> matterTypeList) {
|
||||||
|
this.moduleCode = moduleCode;
|
||||||
|
this.moduleName = moduleName;
|
||||||
|
this.matterTypeList = matterTypeList;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Data
|
||||||
|
static class MatterTypeVO{
|
||||||
|
private Integer matterTypeCode;
|
||||||
|
private String matterTypeName;
|
||||||
|
public MatterTypeVO(Integer matterTypeCode, String matterTypeName) {
|
||||||
|
this.matterTypeCode = matterTypeCode;
|
||||||
|
this.matterTypeName = matterTypeName;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static List<ModuleAndMatterVO> getModuleAndMatterList() {
|
||||||
|
return Arrays.stream(ModuleCodeEnum.values())
|
||||||
|
.map(module -> new ModuleAndMatterVO(
|
||||||
|
module.getCode(),
|
||||||
|
module.getMessage(),
|
||||||
|
convertMatterTypes(module.getMatterTypeEnums())
|
||||||
|
))
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
}
|
||||||
|
|
||||||
|
private static List<MatterTypeVO> convertMatterTypes(List<MatterTypeEnum> matterTypeEnums) {
|
||||||
|
return matterTypeEnums.stream()
|
||||||
|
.map(matterType -> new MatterTypeVO(
|
||||||
|
matterType.getCode(),
|
||||||
|
matterType.getMessage()
|
||||||
|
))
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,102 @@
|
|||||||
|
package com.cool.store.vo.notice;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author suzhuhong
|
||||||
|
* @Date 2025/7/26 20:21
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class StoreMessageDetailVO{
|
||||||
|
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 门店编码
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("门店编码")
|
||||||
|
private String storeCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 门店名称
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("门店名称")
|
||||||
|
private String storeName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 关联的消息模板ID
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("关联的消息模板ID")
|
||||||
|
private Long messageTemplateId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 阅读状态(0:未读 1:已读)
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("阅读状态(0:未读 1:已读)")
|
||||||
|
private Integer readStatus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 阅读时间
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("阅读时间")
|
||||||
|
private Date readTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 处理状态(0:未处理 1:处理中)
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("处理状态(0:未处理 1:处理中)")
|
||||||
|
private Integer processStatus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 处理时间
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("处理时间")
|
||||||
|
private Date processTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 实际操作人ID
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("操作人ID")
|
||||||
|
private String actualOperatorId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 实际操作人姓名
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("操作人姓名")
|
||||||
|
private String actualOperatorName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 撤销状态(0:未撤销 1:已撤销)
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("撤销状态(0:未撤销 1:已撤销)")
|
||||||
|
private Integer revokeStatus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 撤销时间
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("撤销时间")
|
||||||
|
private Date revokeTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 撤销操作人ID
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("撤销操作人ID")
|
||||||
|
private String revokeOperatorId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 撤销操作人姓名
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("撤销操作人姓名")
|
||||||
|
private String revokeOperatorName;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,36 @@
|
|||||||
|
package com.cool.store.vo.notice;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author suzhuhong
|
||||||
|
* @Date 2025/7/27 21:10
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class StoreMessageVO {
|
||||||
|
private Long id;
|
||||||
|
@ApiModelProperty("模版COde")
|
||||||
|
private Integer moduleCode;
|
||||||
|
|
||||||
|
@ApiModelProperty("模版ID")
|
||||||
|
private Long templateId;
|
||||||
|
@ApiModelProperty("已读状态")
|
||||||
|
private Integer readStatus;
|
||||||
|
@ApiModelProperty("处理状态")
|
||||||
|
private Integer processStatus;
|
||||||
|
|
||||||
|
@ApiModelProperty("消息标题")
|
||||||
|
private String messageTitle;
|
||||||
|
|
||||||
|
@ApiModelProperty("消息图片URL")
|
||||||
|
private String messageImage;
|
||||||
|
@ApiModelProperty("发布时间")
|
||||||
|
private Date createTime;
|
||||||
|
@ApiModelProperty("今日必办")
|
||||||
|
private Integer todayTask;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,57 @@
|
|||||||
|
package com.cool.store.service;
|
||||||
|
|
||||||
|
|
||||||
|
import com.cool.store.context.LoginUserInfo;
|
||||||
|
import com.cool.store.dao.MatterConfigDAO;
|
||||||
|
import com.cool.store.entity.MatterConfigDO;
|
||||||
|
import com.cool.store.request.notice.MatterConfigAddRequest;
|
||||||
|
import com.cool.store.request.notice.MatterConfigQueryRequest;
|
||||||
|
import com.cool.store.userholder.CurrentUser;
|
||||||
|
import com.cool.store.vo.notice.MatterAndMatterDetailVO;
|
||||||
|
import com.github.pagehelper.PageInfo;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author suzhuhong
|
||||||
|
* @Date 2025/7/24 15:21
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
public interface MatterConfigService {
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增配置
|
||||||
|
* @param request
|
||||||
|
* @param currentUser
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
int addMatterConfig(MatterConfigAddRequest request, LoginUserInfo currentUser);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 编辑
|
||||||
|
* @param request
|
||||||
|
* @param currentUser
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
int editMatterConfig(MatterConfigAddRequest request, LoginUserInfo currentUser);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除配置
|
||||||
|
* @param ids
|
||||||
|
* @param currentUser
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
Boolean deleteMatterConfig(List<Long> ids, LoginUserInfo currentUser);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询配置
|
||||||
|
* @param request
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
PageInfo<MatterAndMatterDetailVO> listByCondition(MatterConfigQueryRequest request);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,98 @@
|
|||||||
|
package com.cool.store.service;
|
||||||
|
|
||||||
|
import com.cool.store.context.LoginUserInfo;
|
||||||
|
import com.cool.store.dto.notice.NoticeDTO;
|
||||||
|
import com.cool.store.request.notice.*;
|
||||||
|
import com.cool.store.vo.PartnerUserInfoVO;
|
||||||
|
import com.cool.store.vo.notice.*;
|
||||||
|
import com.github.pagehelper.PageInfo;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author suzhuhong
|
||||||
|
* @Date 2025/7/25 9:58
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
public interface MessageTemplateService {
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增消息模版
|
||||||
|
* @param request
|
||||||
|
* @param user
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
Boolean addMessageTemplate(MessageTemplateAddRequest request , LoginUserInfo user);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 编辑消息模版
|
||||||
|
* @param request
|
||||||
|
* @param user
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
Boolean editMessageTemplate(MessageTemplateAddRequest request , LoginUserInfo user);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取详情
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
MessageTemplateDetailVO getMessageTemplateDetail(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除 未发布可以删除
|
||||||
|
* @param request
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
Boolean batchDeleteMessageTemplate(BatchDeletedRequest request, LoginUserInfo user);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* batch 批量发布
|
||||||
|
* @param request
|
||||||
|
* @param user
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
Boolean batchPublishMessageTemplate(BatchPublishRequest request, LoginUserInfo user);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取列表
|
||||||
|
* @param request
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
PageInfo<NoticeDTO> getMessageTemplateList(MessageTemplateQueryRequest request);
|
||||||
|
|
||||||
|
|
||||||
|
PageInfo<StoreMessageDetailVO> getStoreMessageListByTemplateId(StoreMessageRequest request);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量撤销
|
||||||
|
* @param request
|
||||||
|
* @param user
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
Boolean batchRevokeNotice(BatchRevokeRequest request, LoginUserInfo user);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 撤销单个门店通知
|
||||||
|
* @param id
|
||||||
|
* @param user
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
Boolean revokeById(Long id, LoginUserInfo user);
|
||||||
|
|
||||||
|
List<ModuleAndMatterVO> getModuleList(String storeId,PartnerUserInfoVO userInfoVO);
|
||||||
|
|
||||||
|
PageInfo<StoreMessageVO> getStorePendingList(StoreMessagePendingRequest request);
|
||||||
|
|
||||||
|
MessageDetailVO getMessageDetail(Long id);
|
||||||
|
|
||||||
|
Boolean readMessage(Long id, PartnerUserInfoVO userInfoVO);
|
||||||
|
|
||||||
|
Boolean handleMessage(Long id, PartnerUserInfoVO userInfoVO);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
package com.cool.store.service;
|
package com.cool.store.service;
|
||||||
|
|
||||||
import com.cool.store.dto.StoreDTO;
|
import com.cool.store.dto.StoreDTO;
|
||||||
|
import com.cool.store.dto.store.AuthStoreUserDTO;
|
||||||
import com.cool.store.dto.store.StoreUserPositionDTO;
|
import com.cool.store.dto.store.StoreUserPositionDTO;
|
||||||
import com.cool.store.response.MiniShopsResponse;
|
import com.cool.store.response.MiniShopsResponse;
|
||||||
import com.github.pagehelper.PageInfo;
|
import com.github.pagehelper.PageInfo;
|
||||||
@@ -27,4 +28,12 @@ public interface StoreService {
|
|||||||
|
|
||||||
List<StoreUserPositionDTO> getStoreUser(List<String> storeCodeList);
|
List<StoreUserPositionDTO> getStoreUser(List<String> storeCodeList);
|
||||||
|
|
||||||
|
List<AuthStoreUserDTO> authStoreUser(List<String> storeIdList, String positionType);
|
||||||
|
|
||||||
|
List<AuthStoreUserDTO> getStorePositionUserList(List<String> storeIds,
|
||||||
|
List<String> positionIds,
|
||||||
|
List<String> nodePersonList,
|
||||||
|
List<String> groupIdList,
|
||||||
|
List<String> regionIdList);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,83 @@
|
|||||||
|
package com.cool.store.service.impl;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.cool.store.context.LoginUserInfo;
|
||||||
|
import com.cool.store.dao.MatterConfigDAO;
|
||||||
|
import com.cool.store.dto.notice.CommonDTO;
|
||||||
|
import com.cool.store.entity.MatterConfigDO;
|
||||||
|
import com.cool.store.request.notice.MatterConfigAddRequest;
|
||||||
|
import com.cool.store.request.notice.MatterConfigQueryRequest;
|
||||||
|
import com.cool.store.service.MatterConfigService;
|
||||||
|
import com.cool.store.vo.notice.MatterAndMatterDetailVO;
|
||||||
|
import com.github.pagehelper.PageHelper;
|
||||||
|
import com.github.pagehelper.PageInfo;
|
||||||
|
import org.apache.commons.collections4.CollectionUtils;
|
||||||
|
import org.springframework.beans.BeanUtils;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author suzhuhong
|
||||||
|
* @Date 2025/7/24 16:41
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class MatterConfigServiceImpl implements MatterConfigService {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
MatterConfigDAO matterConfigDAO;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int addMatterConfig(MatterConfigAddRequest request, LoginUserInfo currentUser) {
|
||||||
|
MatterConfigDO matterConfigDO = new MatterConfigDO();
|
||||||
|
BeanUtils.copyProperties(request, matterConfigDO);
|
||||||
|
matterConfigDO.setCreateUserId(currentUser.getUserId());
|
||||||
|
matterConfigDO.setDefaultStoreInfo(JSONObject.toJSONString(request.getStoreInfoList()));
|
||||||
|
matterConfigDO.setDefaultHandlePersonInfo(JSONObject.toJSONString(request.getUserInfoList()));
|
||||||
|
return matterConfigDAO.insert(matterConfigDO);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int editMatterConfig(MatterConfigAddRequest request, LoginUserInfo currentUser) {
|
||||||
|
MatterConfigDO matterConfigDO = new MatterConfigDO();
|
||||||
|
BeanUtils.copyProperties(request, matterConfigDO);
|
||||||
|
matterConfigDO.setUpdateUserId(currentUser.getUserId());
|
||||||
|
matterConfigDO.setUpdateTime(new Date());
|
||||||
|
matterConfigDO.setDefaultStoreInfo(JSONObject.toJSONString(request.getStoreInfoList()));
|
||||||
|
matterConfigDO.setDefaultHandlePersonInfo(JSONObject.toJSONString(request.getUserInfoList()));
|
||||||
|
return matterConfigDAO.updateForce(matterConfigDO);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Boolean deleteMatterConfig(List<Long> ids, LoginUserInfo currentUser) {
|
||||||
|
matterConfigDAO.batchDelete(ids,currentUser.getUserId());
|
||||||
|
return Boolean.TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PageInfo<MatterAndMatterDetailVO> listByCondition(MatterConfigQueryRequest request) {
|
||||||
|
PageHelper.startPage(request.getPageNum(), request.getPageSize());
|
||||||
|
List<MatterConfigDO> matterConfigDOS = matterConfigDAO.ListByCondition(request);
|
||||||
|
|
||||||
|
if (CollectionUtils.isEmpty(matterConfigDOS)){
|
||||||
|
return new PageInfo<>();
|
||||||
|
}
|
||||||
|
PageInfo result = new PageInfo<>(matterConfigDOS);
|
||||||
|
List<MatterAndMatterDetailVO> list = new ArrayList<>();
|
||||||
|
matterConfigDOS.forEach(x->{
|
||||||
|
MatterAndMatterDetailVO matterAndMatterDetailVO = new MatterAndMatterDetailVO();
|
||||||
|
BeanUtils.copyProperties(x,matterAndMatterDetailVO);
|
||||||
|
matterAndMatterDetailVO.setStoreInfoList(JSONObject.parseArray(x.getDefaultStoreInfo(), CommonDTO.class));
|
||||||
|
matterAndMatterDetailVO.setUserInfoList(JSONObject.parseArray(x.getDefaultHandlePersonInfo(),CommonDTO.class));
|
||||||
|
list.add(matterAndMatterDetailVO);
|
||||||
|
});
|
||||||
|
result.setList(list);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,434 @@
|
|||||||
|
package com.cool.store.service.impl;
|
||||||
|
|
||||||
|
import cn.hutool.core.collection.CollUtil;
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.cool.store.context.LoginUserInfo;
|
||||||
|
import com.cool.store.context.PartnerUserHolder;
|
||||||
|
import com.cool.store.dao.EnterpriseUserDAO;
|
||||||
|
import com.cool.store.dao.MessageTemplateDAO;
|
||||||
|
import com.cool.store.dao.RegionDao;
|
||||||
|
import com.cool.store.dao.StoreMessageDAO;
|
||||||
|
import com.cool.store.dto.notice.CommonDTO;
|
||||||
|
import com.cool.store.dto.notice.MessageTemplateCountDTO;
|
||||||
|
import com.cool.store.dto.notice.NoticeDTO;
|
||||||
|
import com.cool.store.dto.store.AuthStoreUserDTO;
|
||||||
|
import com.cool.store.dto.store.StoreAreaDTO;
|
||||||
|
import com.cool.store.entity.*;
|
||||||
|
import com.cool.store.enums.ErrorCodeEnum;
|
||||||
|
import com.cool.store.enums.notice.*;
|
||||||
|
import com.cool.store.exception.ServiceException;
|
||||||
|
import com.cool.store.mapper.StoreGroupMappingMapper;
|
||||||
|
import com.cool.store.mapper.StoreMapper;
|
||||||
|
import com.cool.store.request.notice.*;
|
||||||
|
import com.cool.store.service.MessageTemplateService;
|
||||||
|
import com.cool.store.service.StoreService;
|
||||||
|
import com.cool.store.utils.CoolDateUtils;
|
||||||
|
import com.cool.store.vo.PartnerUserInfoVO;
|
||||||
|
import com.cool.store.vo.notice.*;
|
||||||
|
import com.github.pagehelper.PageHelper;
|
||||||
|
import com.github.pagehelper.PageInfo;
|
||||||
|
import com.google.gson.JsonObject;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.apache.commons.collections4.CollectionUtils;
|
||||||
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
import org.springframework.beans.BeanUtils;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.util.*;
|
||||||
|
import java.util.concurrent.ThreadLocalRandom;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author suzhuhong
|
||||||
|
* @Date 2025/7/25 9:59
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
@Slf4j
|
||||||
|
public class MessageTemplateServiceImpl implements MessageTemplateService {
|
||||||
|
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
MessageTemplateDAO messageTemplateDAO;
|
||||||
|
@Resource
|
||||||
|
StoreMapper storeMapper;
|
||||||
|
@Resource
|
||||||
|
RegionDao RegionDao;
|
||||||
|
@Resource
|
||||||
|
StoreGroupMappingMapper storeGroupMappingMapper;
|
||||||
|
@Resource
|
||||||
|
StoreService storeService;
|
||||||
|
@Resource
|
||||||
|
StoreMessageDAO storeMessageDAO;
|
||||||
|
@Resource
|
||||||
|
EnterpriseUserDAO enterpriseUserDAO;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Boolean addMessageTemplate(MessageTemplateAddRequest request, LoginUserInfo user) {
|
||||||
|
MessageTemplateDO messageTemplateDO = new MessageTemplateDO();
|
||||||
|
BeanUtils.copyProperties(request, messageTemplateDO);
|
||||||
|
messageTemplateDO.setMessageCode(getMessageTemplateCode());
|
||||||
|
messageTemplateDO.setMatterType(MatterTypeEnum.NOTICE.getCode());
|
||||||
|
messageTemplateDO.setCreateUserId(user.getUserId());
|
||||||
|
messageTemplateDO.setSystemSource("CRM");
|
||||||
|
messageTemplateDAO.insert(messageTemplateDO);
|
||||||
|
return Boolean.TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMessageTemplateCode() {
|
||||||
|
//当前日期
|
||||||
|
String today = CoolDateUtils.getToday();
|
||||||
|
return "16" + today + String.format("%04d", ThreadLocalRandom.current().nextInt(10000));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Boolean editMessageTemplate(MessageTemplateAddRequest request, LoginUserInfo user) {
|
||||||
|
if (request.getId()==null){
|
||||||
|
throw new ServiceException(ErrorCodeEnum.PARAMS_VALIDATE_ERROR);
|
||||||
|
}
|
||||||
|
MessageTemplateDO messageTemplateDO = messageTemplateDAO.getById(request.getId());
|
||||||
|
//只有待发布状态能编辑
|
||||||
|
if (messageTemplateDO.getPublishStatus()!=0){
|
||||||
|
throw new ServiceException(ErrorCodeEnum.MESSAGE_TEMPLATE_NOT_SUPPORT_EDIT);
|
||||||
|
}
|
||||||
|
BeanUtils.copyProperties(request, messageTemplateDO);
|
||||||
|
messageTemplateDO.setUpdaterUserId(user.getUserId());
|
||||||
|
messageTemplateDAO.update(messageTemplateDO);
|
||||||
|
return Boolean.TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public MessageTemplateDetailVO getMessageTemplateDetail(Long id) {
|
||||||
|
MessageTemplateDetailVO messageTemplateDetailVO = new MessageTemplateDetailVO();
|
||||||
|
MessageTemplateDO messageTemplateDO = messageTemplateDAO.getById(id);
|
||||||
|
if(messageTemplateDO==null){
|
||||||
|
return messageTemplateDetailVO;
|
||||||
|
}
|
||||||
|
BeanUtils.copyProperties(messageTemplateDO, messageTemplateDetailVO);
|
||||||
|
messageTemplateDetailVO.setUserInfoList(JSONObject.parseArray(messageTemplateDO.getHandlePersonInfo(), CommonDTO.class));
|
||||||
|
messageTemplateDetailVO.setStoreInfoList(JSONObject.parseArray(messageTemplateDO.getStoreInfo(), CommonDTO.class));
|
||||||
|
List<MessageTemplateCountDTO> messageTemplateCountList = storeMessageDAO.getMessageTemplateCountList(Arrays.asList(messageTemplateDO.getId()));
|
||||||
|
|
||||||
|
if (CollectionUtils.isNotEmpty(messageTemplateCountList)){
|
||||||
|
messageTemplateDetailVO.setTotalNum(messageTemplateCountList.get(0).getTotalStoreCount());
|
||||||
|
messageTemplateDetailVO.setHandleNum(messageTemplateCountList.get(0).getProcessedStoreCount());
|
||||||
|
}
|
||||||
|
return messageTemplateDetailVO;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Boolean batchDeleteMessageTemplate(BatchDeletedRequest request, LoginUserInfo user) {
|
||||||
|
List<MessageTemplateDO> list = messageTemplateDAO.getByIds(request.getIds());
|
||||||
|
//校验是否都是未发布状态
|
||||||
|
if (list.stream().anyMatch(x -> x.getPublishStatus()!= PublishStatusEnum.UNPUBLISHED.getCode())){
|
||||||
|
throw new ServiceException(ErrorCodeEnum.MESSAGE_TEMPLATE_NOT_SUPPORT_DELETED);
|
||||||
|
}
|
||||||
|
messageTemplateDAO.updateDeleteStatusBatch(request.getIds(),user.getUserId());
|
||||||
|
return Boolean.TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Boolean batchPublishMessageTemplate(BatchPublishRequest request, LoginUserInfo user) {
|
||||||
|
if (CollectionUtils.isEmpty(request.getIds())||CollectionUtils.isEmpty(request.getStoreInfoList())||CollectionUtils.isEmpty(request.getUserInfoList())){
|
||||||
|
throw new ServiceException(ErrorCodeEnum.PARAMS_REQUIRED);
|
||||||
|
}
|
||||||
|
|
||||||
|
List<StoreAreaDTO> storeAreaDTOS = getStoreRange(request.getStoreInfoList());
|
||||||
|
List<String> storeIds = storeAreaDTOS.stream().map(StoreAreaDTO::getStoreId).collect(Collectors.toList());
|
||||||
|
|
||||||
|
Map<String, List<String>> authUser = getAuthUser(request.getUserInfoList(), storeIds);
|
||||||
|
|
||||||
|
List<MessageTemplateDO> list = messageTemplateDAO.getByIds(request.getIds());
|
||||||
|
//过滤 只保留未发布的
|
||||||
|
list = list.stream().filter(x -> PublishStatusEnum.UNPUBLISHED.getCode().equals(x.getPublishStatus())).collect(Collectors.toList());
|
||||||
|
|
||||||
|
if (CollUtil.isEmpty(list)){
|
||||||
|
log.info("未找到待发布消息模板");
|
||||||
|
}
|
||||||
|
|
||||||
|
list.stream().forEach(x -> {
|
||||||
|
List<StoreMessageDO> result = new ArrayList<>();
|
||||||
|
storeAreaDTOS.forEach(y->{
|
||||||
|
if (CollectionUtils.isEmpty(authUser.get(y.getStoreId()))){
|
||||||
|
log.info("当前门店没有人员 门店名称:{}",y.getStoreName());
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
StoreMessageDO storeMessageDO = new StoreMessageDO();
|
||||||
|
storeMessageDO.setStoreId(y.getStoreId());
|
||||||
|
storeMessageDO.setStoreName(y.getStoreName());
|
||||||
|
storeMessageDO.setStoreCode(y.getStoreCode());
|
||||||
|
storeMessageDO.setMessageTemplateId(x.getId());
|
||||||
|
storeMessageDO.setReadStatus(ReadStatusEnum.UNREAD.getCode());
|
||||||
|
storeMessageDO.setReadTime(new Date());
|
||||||
|
storeMessageDO.setProcessStatus(ProcessStatusEnum.UNTREATED.getCode());
|
||||||
|
storeMessageDO.setProcessTime(new Date());
|
||||||
|
String userIdStr = authUser.get(y.getStoreId()).stream().collect(Collectors.joining(","));
|
||||||
|
storeMessageDO.setOperatorList(userIdStr);
|
||||||
|
result.add(storeMessageDO);
|
||||||
|
});
|
||||||
|
storeMessageDAO.batchInsert(result);
|
||||||
|
});
|
||||||
|
|
||||||
|
List<Long> updateIds = list.stream().map(MessageTemplateDO::getId).collect(Collectors.toList());
|
||||||
|
messageTemplateDAO.batchUpdateStoreInfoAndUserInfo(updateIds,
|
||||||
|
JSONObject.toJSONString(request.getStoreInfoList()),
|
||||||
|
JSONObject.toJSONString(request.getUserInfoList()),
|
||||||
|
user.getUserId());
|
||||||
|
return Boolean.TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PageInfo<NoticeDTO> getMessageTemplateList(MessageTemplateQueryRequest request) {
|
||||||
|
PageHelper.startPage(request.getPageNum(), request.getPageSize());
|
||||||
|
List<NoticeDTO> list = messageTemplateDAO.getMessageTemplateList(request);
|
||||||
|
if (CollectionUtils.isEmpty(list)){
|
||||||
|
return new PageInfo<>(list);
|
||||||
|
}
|
||||||
|
//将列表中的创建人id与发布人id 放到同一个list 去重
|
||||||
|
Set<String> userIdSet = new HashSet<>();
|
||||||
|
list.forEach(notice -> {
|
||||||
|
if (notice.getCreateUserId() != null) {
|
||||||
|
userIdSet.add(String.valueOf(notice.getCreateUserId()));
|
||||||
|
}
|
||||||
|
if (notice.getPublishUserId() != null) {
|
||||||
|
userIdSet.add(String.valueOf(notice.getPublishUserId()));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
List<String> uniqueUserIds = new ArrayList<>(userIdSet);
|
||||||
|
List<EnterpriseUserDO> userInfoByUserIds = enterpriseUserDAO.getUserInfoByUserIds(uniqueUserIds);
|
||||||
|
Map<String, String> userMap = userInfoByUserIds.stream().collect(Collectors.toMap(EnterpriseUserDO::getUserId, EnterpriseUserDO::getName));
|
||||||
|
|
||||||
|
|
||||||
|
List<Long> templateIds = list.stream().map(NoticeDTO::getId).collect(Collectors.toList());
|
||||||
|
List<MessageTemplateCountDTO> messageTemplateCountList = storeMessageDAO.getMessageTemplateCountList(templateIds);
|
||||||
|
//根据模板id查询 转为map
|
||||||
|
Map<Long, MessageTemplateCountDTO> messageTemplateCountMap = messageTemplateCountList.stream().collect(Collectors.toMap(MessageTemplateCountDTO::getTemplateId, x -> x));
|
||||||
|
list.forEach(x -> {
|
||||||
|
x.setCreateUserName(userMap.get(x.getCreateUserId()));
|
||||||
|
x.setPublishUserName(userMap.get(x.getPublishUserId()));
|
||||||
|
MessageTemplateCountDTO count = messageTemplateCountMap.getOrDefault(x.getId(), new MessageTemplateCountDTO());
|
||||||
|
x.setHandleNum(count.getProcessedStoreCount());
|
||||||
|
x.setTotalNum(count.getTotalStoreCount());
|
||||||
|
});
|
||||||
|
return new PageInfo<>(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PageInfo<StoreMessageDetailVO> getStoreMessageListByTemplateId(StoreMessageRequest request) {
|
||||||
|
PageHelper.startPage(request.getPageNum(),request.getPageSize());
|
||||||
|
List<StoreMessageDO> list = storeMessageDAO.getStoreMessageList(request);
|
||||||
|
if (CollectionUtils.isEmpty(list)){
|
||||||
|
return new PageInfo<>();
|
||||||
|
}
|
||||||
|
|
||||||
|
List<StoreMessageDetailVO> result = new ArrayList<>();
|
||||||
|
list.forEach(x->{
|
||||||
|
StoreMessageDetailVO storeMessageDetailVO = new StoreMessageDetailVO();
|
||||||
|
BeanUtils.copyProperties(x,storeMessageDetailVO);
|
||||||
|
result.add(storeMessageDetailVO);
|
||||||
|
});
|
||||||
|
PageInfo storeMessageDOPageInfo = new PageInfo<>(list);
|
||||||
|
storeMessageDOPageInfo.setList(result);
|
||||||
|
return storeMessageDOPageInfo;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public Boolean batchRevokeNotice(BatchRevokeRequest request, LoginUserInfo user) {
|
||||||
|
log.info("batchRevokeNotice request:{}", JSONObject.toJSONString(request));
|
||||||
|
List<Long> ids = request.getIds();
|
||||||
|
if (ids == null || ids.size() == 0) {
|
||||||
|
throw new ServiceException(ErrorCodeEnum.PARAMS_REQUIRED);
|
||||||
|
}
|
||||||
|
//将消息置为撤销状态
|
||||||
|
messageTemplateDAO.batchUpdatePublishStatus(ids);
|
||||||
|
//将门店未处理的消息置为撤销状态 已处理和撤销的保持不变
|
||||||
|
storeMessageDAO.batchRevoke(ids, user.getUserId(), user.getName());
|
||||||
|
return Boolean.TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Boolean revokeById(Long id, LoginUserInfo user) {
|
||||||
|
//查询门店消息
|
||||||
|
StoreMessageDO storeMessage = storeMessageDAO.getById(id);
|
||||||
|
if (storeMessage == null){
|
||||||
|
throw new ServiceException(ErrorCodeEnum.PARAMS_REQUIRED);
|
||||||
|
}
|
||||||
|
if (RevokeStatusEnum.REVOKE.getCode().equals(storeMessage.getRevokeStatus())){
|
||||||
|
throw new ServiceException(ErrorCodeEnum.STORE_MESSAGE_REVOKE);
|
||||||
|
}
|
||||||
|
if (ProcessStatusEnum.PROCESSED.getCode().equals(storeMessage.getProcessStatus())){
|
||||||
|
throw new ServiceException(ErrorCodeEnum.STORE_MESSAGE_HANDLED);
|
||||||
|
}
|
||||||
|
storeMessageDAO.revokeById(id,user.getUserId(),user.getName());
|
||||||
|
return Boolean.TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<ModuleAndMatterVO> getModuleList(String storeId,PartnerUserInfoVO userInfoVO) {
|
||||||
|
List<ModuleAndMatterVO> moduleAndMatterList = ModuleAndMatterVO.getModuleAndMatterList();
|
||||||
|
EnterpriseUserDO enterpriseUserDO = enterpriseUserDAO.selectByMobile(userInfoVO.getMobile());
|
||||||
|
if (enterpriseUserDO == null){
|
||||||
|
enterpriseUserDO = new EnterpriseUserDO();
|
||||||
|
}
|
||||||
|
List<ModuleAndMatterVO> list= new ArrayList<>();
|
||||||
|
EnterpriseUserDO finalEnterpriseUserDO = enterpriseUserDO;
|
||||||
|
moduleAndMatterList.forEach(x->{
|
||||||
|
Integer integer = storeMessageDAO.queryStoreModuleCount(storeId, finalEnterpriseUserDO.getUserId(), x.getModuleCode());
|
||||||
|
if (integer > 0){
|
||||||
|
list.add(x);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PageInfo<StoreMessageVO> getStorePendingList(StoreMessagePendingRequest request) {
|
||||||
|
if(request.getMobile()==null||StringUtils.isEmpty(request.getStoreId())){
|
||||||
|
throw new ServiceException(ErrorCodeEnum.PARAMS_REQUIRED);
|
||||||
|
}
|
||||||
|
EnterpriseUserDO enterpriseUserDO = enterpriseUserDAO.selectByMobile(request.getMobile());
|
||||||
|
if (enterpriseUserDO == null){
|
||||||
|
return new PageInfo<>();
|
||||||
|
}
|
||||||
|
PageHelper.startPage(request.getPageNum(), request.getPageSize());
|
||||||
|
List<StoreMessageVO> storeMessageListByCondition = storeMessageDAO.getStoreMessageListByCondition(request.getStoreId(), request.getModuleCode(),
|
||||||
|
request.getTodayTask(), request.getPendingFlag(), enterpriseUserDO.getUserId());
|
||||||
|
return new PageInfo<>(storeMessageListByCondition);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public MessageDetailVO getMessageDetail(Long id) {
|
||||||
|
MessageDetailVO messageDetailVO = storeMessageDAO.getMessageDetail(id);
|
||||||
|
if (messageDetailVO!=null&&messageDetailVO.getPublishUserId()!=null){
|
||||||
|
EnterpriseUserDO userInfoById = enterpriseUserDAO.getUserInfoById(messageDetailVO.getPublishUserId());
|
||||||
|
messageDetailVO.setPublishUserName(userInfoById.getName());
|
||||||
|
}
|
||||||
|
return messageDetailVO;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Boolean readMessage(Long id, PartnerUserInfoVO userInfoVO) {
|
||||||
|
StoreMessageDO message = storeMessageDAO.getById(id);
|
||||||
|
if (ProcessStatusEnum.PROCESSED.getCode().equals(message.getProcessStatus())){
|
||||||
|
log.info("当前消息已读已处理:{}",JSONObject.toJSONString( message));
|
||||||
|
return Boolean.TRUE;
|
||||||
|
}
|
||||||
|
message.setReadStatus(ProcessStatusEnum.PROCESSED.getCode());
|
||||||
|
message.setReadTime(new Date());
|
||||||
|
MessageTemplateDO template = messageTemplateDAO.getById(message.getMessageTemplateId());
|
||||||
|
if (ProcessTypeEnum.READ.getCode().equals(template.getProcessType())){
|
||||||
|
message.setProcessStatus(ProcessStatusEnum.PROCESSED.getCode());
|
||||||
|
message.setProcessTime(new Date());
|
||||||
|
EnterpriseUserDO enterpriseUserDO = enterpriseUserDAO.selectByMobile(userInfoVO.getMobile());
|
||||||
|
if (enterpriseUserDO != null){
|
||||||
|
message.setActualOperatorId(enterpriseUserDO.getId());
|
||||||
|
message.setActualOperatorName(enterpriseUserDO.getName());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
storeMessageDAO.update( message);
|
||||||
|
return Boolean.TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Boolean handleMessage(Long id, PartnerUserInfoVO userInfoVO) {
|
||||||
|
log.info("handleMessage request:{},处理人:{}", JSONObject.toJSONString(id), userInfoVO.getUsername());
|
||||||
|
StoreMessageDO message = storeMessageDAO.getById(id);
|
||||||
|
if (message==null){
|
||||||
|
throw new ServiceException(ErrorCodeEnum.PARAMS_REQUIRED);
|
||||||
|
}
|
||||||
|
message.setProcessStatus(ProcessStatusEnum.PROCESSED.getCode());
|
||||||
|
message.setProcessTime(new Date());
|
||||||
|
EnterpriseUserDO enterpriseUserDO = enterpriseUserDAO.selectByMobile(userInfoVO.getMobile());
|
||||||
|
if (enterpriseUserDO != null){
|
||||||
|
message.setActualOperatorId(enterpriseUserDO.getId());
|
||||||
|
message.setActualOperatorName(enterpriseUserDO.getName());
|
||||||
|
}
|
||||||
|
storeMessageDAO.update( message);
|
||||||
|
return Boolean.TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public Map<String, List<String>> getAuthUser(List<CommonDTO> personInfo, List<String> storeIds){
|
||||||
|
if (CollectionUtils.isEmpty(personInfo)){
|
||||||
|
return new HashMap<>();
|
||||||
|
}
|
||||||
|
List<String> personIds = personInfo.stream().filter(x -> TypeEnum.PERSON.getType().equals(x.getType()))
|
||||||
|
.map(CommonDTO::getValue).collect(Collectors.toList());
|
||||||
|
List<String> positionIds = personInfo.stream().filter(x -> TypeEnum.POSITION.getType().equals(x.getType()))
|
||||||
|
.map(CommonDTO::getValue).collect(Collectors.toList());
|
||||||
|
List<String> groupIdList = personInfo.stream().filter(x -> TypeEnum.USER_GROUP.getType().equals(x.getType()))
|
||||||
|
.map(CommonDTO::getValue).collect(Collectors.toList());
|
||||||
|
List<String> regionIdList = personInfo.stream().filter(x -> TypeEnum.ORGANIZATION.getType().equals(x.getType()))
|
||||||
|
.map(CommonDTO::getValue).collect(Collectors.toList());
|
||||||
|
//权限
|
||||||
|
List<AuthStoreUserDTO> authStoreUserList = storeService.getStorePositionUserList(storeIds, positionIds, personIds, groupIdList, regionIdList);
|
||||||
|
Map<String, List<String>> storeUserMap = new HashMap<>();
|
||||||
|
if (CollectionUtils.isNotEmpty(authStoreUserList)) {
|
||||||
|
storeUserMap = authStoreUserList.stream().collect(Collectors.toMap(AuthStoreUserDTO::getStoreId,
|
||||||
|
AuthStoreUserDTO::getUserIdList, (a, b) -> a));
|
||||||
|
}
|
||||||
|
return storeUserMap;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取门店范围
|
||||||
|
* @param commonDTOS
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
private List<StoreAreaDTO> getStoreRange( List<CommonDTO> commonDTOS){
|
||||||
|
List<String> regionIds = commonDTOS.stream().filter(x -> TypeEnum.REGION.getType().equals(x.getType()))
|
||||||
|
.map(CommonDTO::getValue).collect(Collectors.toList());
|
||||||
|
|
||||||
|
List<RegionDO> regionDOsByRegionIds = new ArrayList<>();
|
||||||
|
Set<String> storeIdSet = new HashSet<>();
|
||||||
|
if (CollectionUtils.isNotEmpty(regionIds)){
|
||||||
|
regionDOsByRegionIds = RegionDao.getRegionByRegionIds(regionIds);
|
||||||
|
//区域全路径地址集合 ["/1/37139128281/","/1/37139128283/"]
|
||||||
|
List<String> regionFullRegionPathList = regionDOsByRegionIds.stream().map(RegionDO::getFullRegionPath).collect(Collectors.toList());
|
||||||
|
//根据regionFullRegionPathList查询区域下所有的门店(包括子区域门店)
|
||||||
|
List<StoreAreaDTO> storeAreaDTOS = storeMapper.listStoreByRegionPathList(regionFullRegionPathList);
|
||||||
|
storeIdSet = storeAreaDTOS.stream().map(StoreAreaDTO::getStoreId).collect(Collectors.toSet());
|
||||||
|
}
|
||||||
|
List<String> storeIdList = commonDTOS.stream().filter(x -> TypeEnum.STORE.getType().equals(x.getType()))
|
||||||
|
.map(CommonDTO::getValue).collect(Collectors.toList());
|
||||||
|
if (CollectionUtils.isNotEmpty(storeIdList)){
|
||||||
|
//将寻找的门店添加到set中
|
||||||
|
storeIdSet.addAll(storeIdList);
|
||||||
|
}
|
||||||
|
List<String> groupList = commonDTOS.stream().filter(x -> TypeEnum.GROUP.getType().equals(x.getType()))
|
||||||
|
.map(CommonDTO::getValue).collect(Collectors.toList());
|
||||||
|
//分组
|
||||||
|
if (CollectionUtils.isNotEmpty(groupList)) {
|
||||||
|
List<StoreGroupMappingDO> groupStoreList = storeGroupMappingMapper.getStoreGroupMappingByGroupIDs(groupList);
|
||||||
|
if (CollectionUtils.isNotEmpty(groupStoreList)) {
|
||||||
|
Set<String> groupStoreSet = groupStoreList.stream().map(StoreGroupMappingDO::getStoreId).collect(Collectors.toSet());
|
||||||
|
if(CollectionUtils.isNotEmpty(groupStoreSet)){
|
||||||
|
//将寻找的门店添加到set中
|
||||||
|
storeIdSet.addAll(groupStoreSet);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(CollectionUtils.isEmpty(storeIdSet)){
|
||||||
|
return new ArrayList<>();
|
||||||
|
}
|
||||||
|
List<StoreAreaDTO> storeDTOList = storeMapper.getStoreAreaList(new ArrayList<>(storeIdSet));
|
||||||
|
if(CollectionUtils.isNotEmpty(storeDTOList)){
|
||||||
|
storeDTOList = storeDTOList.stream().filter(o -> "open".equals(o.getStoreStatus())).collect(Collectors.toList());
|
||||||
|
}
|
||||||
|
return storeDTOList;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -2,6 +2,7 @@ package com.cool.store.service.impl;
|
|||||||
|
|
||||||
import cn.hutool.core.collection.CollUtil;
|
import cn.hutool.core.collection.CollUtil;
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.cool.store.dto.store.AuthStoreUserDTO;
|
import com.cool.store.dto.store.AuthStoreUserDTO;
|
||||||
import com.cool.store.dao.EnterpriseUserDAO;
|
import com.cool.store.dao.EnterpriseUserDAO;
|
||||||
import com.cool.store.dao.EnterpriseUserRoleDao;
|
import com.cool.store.dao.EnterpriseUserRoleDao;
|
||||||
@@ -17,10 +18,7 @@ import com.cool.store.entity.SysRoleDO;
|
|||||||
import com.cool.store.entity.UserAuthMappingDO;
|
import com.cool.store.entity.UserAuthMappingDO;
|
||||||
import com.cool.store.enums.*;
|
import com.cool.store.enums.*;
|
||||||
import com.cool.store.exception.ServiceException;
|
import com.cool.store.exception.ServiceException;
|
||||||
import com.cool.store.mapper.RegionMapper;
|
import com.cool.store.mapper.*;
|
||||||
import com.cool.store.mapper.StoreMapper;
|
|
||||||
import com.cool.store.mapper.SysRoleMapper;
|
|
||||||
import com.cool.store.mapper.UserAuthMappingMapper;
|
|
||||||
import com.cool.store.response.MiniShopsResponse;
|
import com.cool.store.response.MiniShopsResponse;
|
||||||
import com.cool.store.service.StoreService;
|
import com.cool.store.service.StoreService;
|
||||||
import com.cool.store.service.UserAuthMappingService;
|
import com.cool.store.service.UserAuthMappingService;
|
||||||
@@ -68,6 +66,10 @@ public class StoreServiceImpl implements StoreService {
|
|||||||
StoreMapper storeMapper;
|
StoreMapper storeMapper;
|
||||||
@Resource
|
@Resource
|
||||||
UserAuthMappingMapper userAuthMappingMapper;
|
UserAuthMappingMapper userAuthMappingMapper;
|
||||||
|
@Resource
|
||||||
|
EnterpriseUserMapper enterpriseUserMapper;
|
||||||
|
@Resource
|
||||||
|
EnterpriseUserGroupMappingMapper enterpriseUserGroupMappingMapper;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public PageInfo<StoreDTO> getStoreExtendFieldInfo(Integer pageSize, Integer pageNum) {
|
public PageInfo<StoreDTO> getStoreExtendFieldInfo(Integer pageSize, Integer pageNum) {
|
||||||
@@ -169,7 +171,54 @@ public class StoreServiceImpl implements StoreService {
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
private List<AuthStoreUserDTO> authStoreUser(List<String> storeIdList, String positionType) {
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<AuthStoreUserDTO> getStorePositionUserList( List<String> storeIds,
|
||||||
|
List<String> positionIds,
|
||||||
|
List<String> nodePersonList,
|
||||||
|
List<String> groupIdList,
|
||||||
|
List<String> regionIdList) {
|
||||||
|
log.info("StoreServiceImpl getStorePositionUserList param storeIds:{},positionIds:{},nodePersonList:{},groupIdList:{},regionIdList:{}",
|
||||||
|
JSONObject.toJSONString(storeIds),
|
||||||
|
JSONObject.toJSONString(positionIds), JSONObject.toJSONString(nodePersonList),
|
||||||
|
JSONObject.toJSONString(groupIdList), JSONObject.toJSONString(regionIdList));
|
||||||
|
List<AuthStoreUserDTO> authStoreUsers = this.authStoreUser(storeIds, null);
|
||||||
|
if (CollUtil.isEmpty(authStoreUsers)) {
|
||||||
|
return new ArrayList<>();
|
||||||
|
}
|
||||||
|
List<String> allUserIds = Lists.newArrayList();
|
||||||
|
if (CollectionUtils.isNotEmpty(positionIds)) {
|
||||||
|
List<String> userIds = sysRoleMapper.getPositionUserIds(positionIds);
|
||||||
|
allUserIds.addAll(userIds);
|
||||||
|
}
|
||||||
|
if (CollectionUtils.isNotEmpty(groupIdList)) {
|
||||||
|
List<String> groupUserIdList = enterpriseUserGroupMappingMapper.getUserIdsByGroupIdList(groupIdList);
|
||||||
|
if (CollectionUtils.isNotEmpty(groupUserIdList)) {
|
||||||
|
allUserIds.addAll(groupUserIdList);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (CollectionUtils.isNotEmpty(regionIdList)) {
|
||||||
|
List<String> regionUserIdList = enterpriseUserMapper.getUserIdsByRegionIdList(regionIdList);
|
||||||
|
if (CollectionUtils.isNotEmpty(regionUserIdList)) {
|
||||||
|
allUserIds.addAll(regionUserIdList);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (CollectionUtils.isNotEmpty(nodePersonList)) {
|
||||||
|
allUserIds.addAll(nodePersonList);
|
||||||
|
}
|
||||||
|
List<String> finalAllUserIds = allUserIds;
|
||||||
|
authStoreUsers.forEach(f -> f.getUserIdList().retainAll(finalAllUserIds));
|
||||||
|
if (CollectionUtils.isNotEmpty(authStoreUsers)) {
|
||||||
|
authStoreUsers = authStoreUsers.stream().distinct().collect(Collectors.toList());
|
||||||
|
}
|
||||||
|
return authStoreUsers;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<AuthStoreUserDTO> authStoreUser(List<String> storeIdList, String positionType) {
|
||||||
List<AuthStoreUserDTO> result = new ArrayList<>();
|
List<AuthStoreUserDTO> result = new ArrayList<>();
|
||||||
if (CollectionUtils.isEmpty(storeIdList)) {
|
if (CollectionUtils.isEmpty(storeIdList)) {
|
||||||
return result;
|
return result;
|
||||||
|
|||||||
@@ -0,0 +1,39 @@
|
|||||||
|
package com.cool.store.controller.webb;
|
||||||
|
|
||||||
|
import com.cool.store.response.ResponseResult;
|
||||||
|
import com.cool.store.vo.notice.ModuleAndMatterVO;
|
||||||
|
import com.cool.store.vo.shop.ShopStageVO;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author suzhuhong
|
||||||
|
* @Date 2025/7/24 16:19
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/pc/udc")
|
||||||
|
@Api(tags = "PC枚举值")
|
||||||
|
@Slf4j
|
||||||
|
public class CommonEnumController {
|
||||||
|
|
||||||
|
|
||||||
|
@ApiOperation("获取模块与消息类型")
|
||||||
|
@GetMapping("/getModuleAndMatter")
|
||||||
|
public ResponseResult<List<ModuleAndMatterVO>> getShopSubStageStatusEnum() {
|
||||||
|
return ResponseResult.success(ModuleAndMatterVO.getModuleAndMatterList());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,65 @@
|
|||||||
|
package com.cool.store.controller.webb;
|
||||||
|
|
||||||
|
import com.cool.store.context.CurrentUserHolder;
|
||||||
|
import com.cool.store.request.notice.BatchDeletedRequest;
|
||||||
|
import com.cool.store.request.notice.MatterConfigAddRequest;
|
||||||
|
import com.cool.store.request.notice.MatterConfigQueryRequest;
|
||||||
|
import com.cool.store.response.ResponseResult;
|
||||||
|
import com.cool.store.service.MatterConfigService;
|
||||||
|
import com.cool.store.vo.LineInfoVO;
|
||||||
|
import com.cool.store.vo.notice.MatterAndMatterDetailVO;
|
||||||
|
import com.github.pagehelper.PageInfo;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author suzhuhong
|
||||||
|
* @Date 2025/7/24 16:40
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/pc/matter/config")
|
||||||
|
@Api(tags = "PC事项配置")
|
||||||
|
@Slf4j
|
||||||
|
public class MatterConfigController {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
MatterConfigService matterConfigService;
|
||||||
|
|
||||||
|
@PostMapping("/add")
|
||||||
|
@ApiOperation("新增事项配置")
|
||||||
|
public ResponseResult<Integer> addMatterConfig(@RequestBody MatterConfigAddRequest request) {
|
||||||
|
return ResponseResult.success(matterConfigService.addMatterConfig(request, CurrentUserHolder.getUser()));
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("/edit")
|
||||||
|
@ApiOperation("编辑事项配置")
|
||||||
|
public ResponseResult<Integer> editMatterConfig(@RequestBody MatterConfigAddRequest request) {
|
||||||
|
return ResponseResult.success(matterConfigService.editMatterConfig(request, CurrentUserHolder.getUser()));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@PostMapping("/deleteMatterConfig")
|
||||||
|
@ApiOperation("批量删除事项配置")
|
||||||
|
public ResponseResult<Boolean> addMatterConfig(@RequestBody BatchDeletedRequest request) {
|
||||||
|
return ResponseResult.success(matterConfigService.deleteMatterConfig(request.getIds(), CurrentUserHolder.getUser()));
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("/list")
|
||||||
|
@ApiOperation("事项配置列表")
|
||||||
|
public ResponseResult<PageInfo<MatterAndMatterDetailVO>> listByCondition(@RequestBody MatterConfigQueryRequest request) {
|
||||||
|
return ResponseResult.success(matterConfigService.listByCondition(request));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,90 @@
|
|||||||
|
package com.cool.store.controller.webb;
|
||||||
|
|
||||||
|
import com.cool.store.context.CurrentUserHolder;
|
||||||
|
import com.cool.store.dto.notice.NoticeDTO;
|
||||||
|
import com.cool.store.request.notice.*;
|
||||||
|
import com.cool.store.response.ResponseResult;
|
||||||
|
import com.cool.store.service.MessageTemplateService;
|
||||||
|
import com.cool.store.vo.notice.MessageTemplateDetailVO;
|
||||||
|
import com.cool.store.vo.notice.StoreMessageDetailVO;
|
||||||
|
import com.github.pagehelper.PageInfo;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author suzhuhong
|
||||||
|
* @Date 2025/7/25 15:08
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/pc/notice")
|
||||||
|
@Api(tags = "PC事项/通知管理")
|
||||||
|
@Slf4j
|
||||||
|
public class MessageTemplateController {
|
||||||
|
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
MessageTemplateService messageTemplateService;
|
||||||
|
|
||||||
|
|
||||||
|
@PostMapping("/add")
|
||||||
|
@ApiOperation("新增消息通知")
|
||||||
|
public ResponseResult<Boolean> messageTemplateService(@RequestBody MessageTemplateAddRequest request) {
|
||||||
|
return ResponseResult.success(messageTemplateService.addMessageTemplate(request, CurrentUserHolder.getUser()));
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("/edit")
|
||||||
|
@ApiOperation("编辑消息通知")
|
||||||
|
public ResponseResult<Boolean> editMessageTemplate(@RequestBody MessageTemplateAddRequest request) {
|
||||||
|
return ResponseResult.success(messageTemplateService.editMessageTemplate(request, CurrentUserHolder.getUser()));
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("通知详情")
|
||||||
|
@GetMapping("/getMessageTemplateDetail")
|
||||||
|
public ResponseResult<MessageTemplateDetailVO> getMessageTemplateDetail(@RequestParam("id")Long id) {
|
||||||
|
return ResponseResult.success(messageTemplateService.getMessageTemplateDetail(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("/batchDelete")
|
||||||
|
@ApiOperation("批量删除")
|
||||||
|
public ResponseResult<Boolean> editMessageTemplate(@RequestBody BatchDeletedRequest request) {
|
||||||
|
return ResponseResult.success(messageTemplateService.batchDeleteMessageTemplate(request, CurrentUserHolder.getUser()));
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("/batchPublish")
|
||||||
|
@ApiOperation("批量发布")
|
||||||
|
public ResponseResult<Boolean> batchPublishMessageTemplate(@RequestBody BatchPublishRequest request) {
|
||||||
|
return ResponseResult.success(messageTemplateService.batchPublishMessageTemplate(request, CurrentUserHolder.getUser()));
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("/getMessageTemplateList")
|
||||||
|
@ApiOperation("通知管理列表/事项管理列表")
|
||||||
|
public ResponseResult<PageInfo<NoticeDTO>> getMessageTemplateList(@RequestBody MessageTemplateQueryRequest request) {
|
||||||
|
return ResponseResult.success(messageTemplateService.getMessageTemplateList(request));
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("/getStoreMessageListByTemplateId")
|
||||||
|
@ApiOperation("进度管理")
|
||||||
|
public ResponseResult<PageInfo<StoreMessageDetailVO>> getStoreMessageListByTemplateId(@RequestBody StoreMessageRequest request) {
|
||||||
|
return ResponseResult.success(messageTemplateService.getStoreMessageListByTemplateId(request));
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("/batchRevokeNotice")
|
||||||
|
@ApiOperation("批量撤销")
|
||||||
|
public ResponseResult<Boolean> batchRevokeNotice(@RequestBody BatchRevokeRequest request) {
|
||||||
|
return ResponseResult.success(messageTemplateService.batchRevokeNotice(request,CurrentUserHolder.getUser()));
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("撤销单个门店消息")
|
||||||
|
@GetMapping("/revokeById")
|
||||||
|
public ResponseResult<Boolean> revokeById(@RequestParam("id")Long id) {
|
||||||
|
return ResponseResult.success(messageTemplateService.revokeById(id,CurrentUserHolder.getUser()));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,64 @@
|
|||||||
|
package com.cool.store.controller.webc;
|
||||||
|
|
||||||
|
import com.cool.store.context.CurrentUserHolder;
|
||||||
|
import com.cool.store.context.PartnerUserHolder;
|
||||||
|
import com.cool.store.request.notice.StoreMessagePendingRequest;
|
||||||
|
import com.cool.store.response.ResponseResult;
|
||||||
|
import com.cool.store.service.MessageTemplateService;
|
||||||
|
import com.cool.store.vo.notice.MessageDetailVO;
|
||||||
|
import com.cool.store.vo.notice.ModuleAndMatterVO;
|
||||||
|
import com.cool.store.vo.notice.StoreMessageVO;
|
||||||
|
import com.github.pagehelper.PageInfo;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author suzhuhong
|
||||||
|
* @Date 2025/7/27 21:04
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/mini/notice")
|
||||||
|
@Api(tags = "mini事项/通知管理")
|
||||||
|
@Slf4j
|
||||||
|
public class MiniMessageTemplateController {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private MessageTemplateService messageTemplateService;
|
||||||
|
|
||||||
|
@ApiOperation("获取每个门店需要展示的模块")
|
||||||
|
@GetMapping("/getModuleListByStoreId")
|
||||||
|
public ResponseResult<List<ModuleAndMatterVO>> getModuleListByStoreId(@RequestParam("id")String storeId) {
|
||||||
|
return ResponseResult.success(messageTemplateService.getModuleList(storeId, PartnerUserHolder.getUser()));
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("获取消息详情")
|
||||||
|
@GetMapping("/getMessageDetail")
|
||||||
|
public ResponseResult<MessageDetailVO> getMessageDetail(@RequestParam("id")Long id) {
|
||||||
|
return ResponseResult.success(messageTemplateService.getMessageDetail(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("待办列表/模块列表")
|
||||||
|
@PostMapping("/getStorePendingList")
|
||||||
|
public ResponseResult<PageInfo<StoreMessageVO>> getStorePendingList(@RequestBody StoreMessagePendingRequest request) {
|
||||||
|
return ResponseResult.success(messageTemplateService.getStorePendingList(request));
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("确认已读")
|
||||||
|
@GetMapping("/readMessage")
|
||||||
|
public ResponseResult<Boolean> readMessage(@RequestParam("id")Long id) {
|
||||||
|
return ResponseResult.success(messageTemplateService.readMessage(id, PartnerUserHolder.getUser()));
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("确认已处理")
|
||||||
|
@GetMapping("/handleMessage")
|
||||||
|
public ResponseResult<Boolean> handleMessage(@RequestParam("id")Long id) {
|
||||||
|
return ResponseResult.success(messageTemplateService.handleMessage(id, PartnerUserHolder.getUser()));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -5,7 +5,7 @@ default.datasource.username=coolstore
|
|||||||
default.datasource.password=CSCErYcXniNYm7bT
|
default.datasource.password=CSCErYcXniNYm7bT
|
||||||
|
|
||||||
#redis
|
#redis
|
||||||
redis.host.uri=http://userInfo:Cx111111@tstore-coolcollege.redis.rds.aliyuncs.com:6379/0
|
redis.host.uri=http://userInfo:Cx111111@tstore-coolcollege-open.redis.rds.aliyuncs.com:6379/0
|
||||||
|
|
||||||
#pagehelper
|
#pagehelper
|
||||||
pagehelper.helper-dialect=mysql
|
pagehelper.helper-dialect=mysql
|
||||||
|
|||||||
Reference in New Issue
Block a user