Commit 96b5ee18 by fudahua

待办-今日待办

parent d5274175
package com.gic.haoban.manage.api.dto.notify.dto;
import java.io.Serializable;
import java.util.Date;
/**
* Created By MBG-GUI-EXTENSION https://github.com/spawpaw/mybatis-generator-gui-extension
* Description:
* 待办表
*
* @author fdh
*/
public class PendingTaskDetailDTO implements Serializable {
/**
* 企业id
*/
private String enterpriseId;
/**
* 关联id 对应task_type
*/
private String relationId;
/**
* 0-不良评价回访 1-ecm话务任务 ,3群发任务 4活动
*/
private Integer taskType;
/**
*
*/
private String title;
/**
* 描述
*/
private String description;
/**
* 逾期时间
*/
private Date overdueTime;
/**
* 门店id
*/
private String storeId;
/**
* 执行人id
*/
private String clerkId;
/**
* 完成类型 0 未完成 1已完成
*/
private Integer statusFlag;
/**
* 创建时间
*/
private Date createTime;
/**
*/
private static final long serialVersionUID = 1L;
public String getEnterpriseId() {
return enterpriseId;
}
public void setEnterpriseId(String enterpriseId) {
this.enterpriseId = enterpriseId;
}
public String getRelationId() {
return relationId;
}
public void setRelationId(String relationId) {
this.relationId = relationId;
}
public Integer getTaskType() {
return taskType;
}
public void setTaskType(Integer taskType) {
this.taskType = taskType;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public Date getOverdueTime() {
return overdueTime;
}
public void setOverdueTime(Date overdueTime) {
this.overdueTime = overdueTime;
}
public String getStoreId() {
return storeId;
}
public void setStoreId(String storeId) {
this.storeId = storeId;
}
public String getClerkId() {
return clerkId;
}
public void setClerkId(String clerkId) {
this.clerkId = clerkId;
}
public Integer getStatusFlag() {
return statusFlag;
}
public void setStatusFlag(Integer statusFlag) {
this.statusFlag = statusFlag;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
}
\ No newline at end of file
package com.gic.haoban.manage.api.dto.notify.qdto;
import java.io.Serializable;
import java.util.Date;
/**
* Created By MBG-GUI-EXTENSION https://github.com/spawpaw/mybatis-generator-gui-extension
* Description:
* 待办表
*
* @author fdh
*/
public class PendingListQDTO implements Serializable {
/**
* 企业id
*/
private String enterpriseId;
/**
* 0-不良评价回访 1-ecm话务任务 ,3群发任务 4活动
*/
private Integer taskType;
/**
* 是否完成 0否 1是
*/
private Integer finishFlag;
/**
* 是否逾期 1是 0否
*/
private Integer overdueFlag;
/**
* 门店id
*/
private String storeId;
/**
* 执行人id
*/
private String clerkId;
/**
*/
private static final long serialVersionUID = 1L;
public String getEnterpriseId() {
return enterpriseId;
}
public void setEnterpriseId(String enterpriseId) {
this.enterpriseId = enterpriseId;
}
public Integer getTaskType() {
return taskType;
}
public void setTaskType(Integer taskType) {
this.taskType = taskType;
}
public Integer getFinishFlag() {
return finishFlag;
}
public void setFinishFlag(Integer finishFlag) {
this.finishFlag = finishFlag;
}
public Integer getOverdueFlag() {
return overdueFlag;
}
public void setOverdueFlag(Integer overdueFlag) {
this.overdueFlag = overdueFlag;
}
public String getStoreId() {
return storeId;
}
public void setStoreId(String storeId) {
this.storeId = storeId;
}
public String getClerkId() {
return clerkId;
}
public void setClerkId(String clerkId) {
this.clerkId = clerkId;
}
}
\ No newline at end of file
package com.gic.haoban.manage.api.dto.notify.qdto;
import java.io.Serializable;
import java.util.Date;
/**
* Created By MBG-GUI-EXTENSION https://github.com/spawpaw/mybatis-generator-gui-extension
* Description:
* 待办表
*
* @author fdh
*/
public class PendingTaskQDTO implements Serializable {
/**
* 企业id
*/
private String enterpriseId;
/**
* 关联id 对应task_type
*/
private String relationId;
/**
* 0-不良评价回访 1-ecm话务任务 ,3群发任务 4活动
*/
private Integer taskType;
/**
*
*/
private String title;
/**
* 描述
*/
private String description;
/**
* 逾期时间
*/
private Date overdueTime;
/**
* 失效时间
*/
private Date invalidTime;
/**
* 门店id
*/
private String storeId;
/**
* 执行人id
*/
private String clerkId;
/**
*/
private static final long serialVersionUID = 1L;
public String getEnterpriseId() {
return enterpriseId;
}
public void setEnterpriseId(String enterpriseId) {
this.enterpriseId = enterpriseId;
}
public String getRelationId() {
return relationId;
}
public void setRelationId(String relationId) {
this.relationId = relationId;
}
public Integer getTaskType() {
return taskType;
}
public void setTaskType(Integer taskType) {
this.taskType = taskType;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public Date getOverdueTime() {
return overdueTime;
}
public void setOverdueTime(Date overdueTime) {
this.overdueTime = overdueTime;
}
public Date getInvalidTime() {
return invalidTime;
}
public void setInvalidTime(Date invalidTime) {
this.invalidTime = invalidTime;
}
public String getStoreId() {
return storeId;
}
public void setStoreId(String storeId) {
this.storeId = storeId;
}
public String getClerkId() {
return clerkId;
}
public void setClerkId(String clerkId) {
this.clerkId = clerkId;
}
public static long getSerialVersionUID() {
return serialVersionUID;
}
}
\ No newline at end of file
package com.gic.haoban.manage.api.enums;
/**
* Created by hua on 2021/12/16.
*/
public enum PendingTaskTypeEnum {
PERFORMANCE(0, "月指标", "请完善{}月份指标"),
TEL_TASK(1, "话务任务", "您收到了新的话务任务【{}】,赶紧去执行吧~"),
GROUP_TASK(2, "群发任务", "您收到了新的企微群发任务【{}】,赶紧到企业微信-消息-客户联系中执行吧~"),
ACTIVITY(3, "活动", "您报名的{}活动已经开始啦,快去转发赚佣金吧~"),;
private int type;
private String name;
private String description;
PendingTaskTypeEnum(int type, String name, String description) {
this.type = type;
this.name = name;
this.description = description;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public int getType() {
return type;
}
public void setType(int type) {
this.type = type;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public static PendingTaskTypeEnum getByType(int type) {
for (PendingTaskTypeEnum taskTypeEnum : values()) {
if (taskTypeEnum.getType() == type) {
return taskTypeEnum;
}
}
return null;
}
}
package com.gic.haoban.manage.api.service.notify;
import com.gic.api.base.commons.BasePageInfo;
import com.gic.api.base.commons.Page;
import com.gic.api.base.commons.ServiceResponse;
import com.gic.haoban.manage.api.dto.notify.dto.PendingTaskDetailDTO;
import com.gic.haoban.manage.api.dto.notify.qdto.PendingListQDTO;
import com.gic.haoban.manage.api.dto.notify.qdto.PendingTaskQDTO;
import java.util.List;
/**
* Created 2021/12/15.
*
* @author hua
*/
public interface PendingTaskApiService {
/**
* 新增待办
*
* @param qdto
*/
public void addPendingTask(PendingTaskQDTO qdto);
/**
* 待办列表查询分页
*
* @return
*/
public ServiceResponse<Page<PendingTaskDetailDTO>> pagePendingTask(PendingListQDTO listQDTO, BasePageInfo pageInfo);
/**
* 今天的待办列表
*
* @param enterpriseId
* @param storeId
* @param clerkId
* @param seeSelf
* @return
*/
public ServiceResponse<List<PendingTaskDetailDTO>> listPendingTaskToday(String enterpriseId, String storeId, String clerkId, boolean seeSelf);
}
package com.gic.haoban.manage.service.dao.mapper;
import com.gic.haoban.manage.service.entity.TabNoticeMessage;
import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface NoticeMessageMapper {
/**
*/
int deleteByPrimaryKey(Long noticeMessageId);
/**
*/
int insert(TabNoticeMessage record);
/**
*/
int insertSelective(TabNoticeMessage record);
/**
*/
TabNoticeMessage selectByPrimaryKey(Long noticeMessageId);
/**
*/
int updateByPrimaryKeySelective(TabNoticeMessage record);
/**
*/
int updateByPrimaryKey(TabNoticeMessage record);
}
\ No newline at end of file
package com.gic.haoban.manage.service.dao.mapper;
import com.gic.api.base.commons.BasePageInfo;
import com.gic.api.base.commons.Page;
import com.gic.haoban.manage.service.entity.TabPendingTask;
import com.gic.haoban.manage.service.pojo.BO.PendingTaskBO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
@Mapper
public interface PendingTaskMapper {
/**
*/
int deleteByPrimaryKey(Integer id);
/**
*/
int insert(TabPendingTask record);
/**
*/
int insertSelective(TabPendingTask record);
/**
*/
TabPendingTask selectByPrimaryKey(Integer id);
/**
*/
int updateByPrimaryKeySelective(TabPendingTask record);
/**
*/
int updateByPrimaryKey(TabPendingTask record);
/**
* 根据关联id 查询单条
*/
TabPendingTask getByRelationId(String relationId);
/**
* 分页查询待办任务表
*
* @param enterpriseId 企业id
* @param storeId 门店id
* @param clerkId 导购id
* @param finishFlag 完成状态
* @param overdueFlag 逾期状态
* @return
*/
public List<TabPendingTask> listPendingTask(@Param("enterpriseId") String enterpriseId, @Param("storeId") String storeId, @Param("clerkId") String clerkId,
@Param("finishFlag") int finishFlag, @Param("overdueFlag") int overdueFlag);
/**
* 分页查询待办任务表
*
* @param enterpriseId 企业id
* @param storeId 门店id
* @param clerkId 导购id
* @param startDate
* @param endDate
* @return
*/
public List<TabPendingTask> listPendingTaskByCreateTime(@Param("enterpriseId") String enterpriseId, @Param("storeId") String storeId, @Param("clerkId") String clerkId,
@Param("startDate") String startDate, @Param("endDate") String endDate);
}
\ No newline at end of file
package com.gic.haoban.manage.service.entity;
import java.io.Serializable;
import java.util.Date;
/**
* Created By MBG-GUI-EXTENSION https://github.com/spawpaw/mybatis-generator-gui-extension
* Description:
* 好办消息通知
*
* @author fdh
*/
public class TabNoticeMessage implements Serializable {
/**
*
*/
private Long noticeMessageId;
/**
* 企业id
*/
private String enterpriseId;
/**
* 门店id
*/
private String storeId;
/**
* 导购id
*/
private String clerkId;
/**
* 类别 0客户相关、1任务相关、2活动相关、3其他
*/
private Integer categoryType;
/**
* 消息类型
*/
private Integer messageType;
/**
* 标题
*/
private String title;
/**
* 描述
*/
private String description;
/**
* 关联的具体业务消息id
*/
private String relationId;
/**
* 消息带的参数信息
*/
private String messageContent;
/**
* 0 未读 1已读
*/
private Integer readFlag;
/**
* 状态 0删除 1正常
*/
private Integer deleteFlag;
/**
* 创建时间
*/
private Date createTime;
/**
* 更新时间
*/
private Date updateTime;
/**
*/
private static final long serialVersionUID = 1L;
/**
* This method returns the value of the database column tab_haoban_notice_message.notice_message_id
*
* @return the value of tab_haoban_notice_message.notice_message_id
*/
public Long getNoticeMessageId() {
return noticeMessageId;
}
/**
* This method sets the value of the database column tab_haoban_notice_message.notice_message_id
*
* @param noticeMessageId the value for tab_haoban_notice_message.notice_message_id
*/
public void setNoticeMessageId(Long noticeMessageId) {
this.noticeMessageId = noticeMessageId;
}
/**
* This method returns the value of the database column tab_haoban_notice_message.enterprise_id
*
* @return the value of tab_haoban_notice_message.enterprise_id
*/
public String getEnterpriseId() {
return enterpriseId;
}
/**
* This method sets the value of the database column tab_haoban_notice_message.enterprise_id
*
* @param enterpriseId the value for tab_haoban_notice_message.enterprise_id
*/
public void setEnterpriseId(String enterpriseId) {
this.enterpriseId = enterpriseId;
}
/**
* This method returns the value of the database column tab_haoban_notice_message.store_id
*
* @return the value of tab_haoban_notice_message.store_id
*/
public String getStoreId() {
return storeId;
}
/**
* This method sets the value of the database column tab_haoban_notice_message.store_id
*
* @param storeId the value for tab_haoban_notice_message.store_id
*/
public void setStoreId(String storeId) {
this.storeId = storeId;
}
/**
* This method returns the value of the database column tab_haoban_notice_message.clerk_id
*
* @return the value of tab_haoban_notice_message.clerk_id
*/
public String getClerkId() {
return clerkId;
}
/**
* This method sets the value of the database column tab_haoban_notice_message.clerk_id
*
* @param clerkId the value for tab_haoban_notice_message.clerk_id
*/
public void setClerkId(String clerkId) {
this.clerkId = clerkId;
}
/**
* This method returns the value of the database column tab_haoban_notice_message.category_type
*
* @return the value of tab_haoban_notice_message.category_type
*/
public Integer getCategoryType() {
return categoryType;
}
/**
* This method sets the value of the database column tab_haoban_notice_message.category_type
*
* @param categoryType the value for tab_haoban_notice_message.category_type
*/
public void setCategoryType(Integer categoryType) {
this.categoryType = categoryType;
}
/**
* This method returns the value of the database column tab_haoban_notice_message.message_type
*
* @return the value of tab_haoban_notice_message.message_type
*/
public Integer getMessageType() {
return messageType;
}
/**
* This method sets the value of the database column tab_haoban_notice_message.message_type
*
* @param messageType the value for tab_haoban_notice_message.message_type
*/
public void setMessageType(Integer messageType) {
this.messageType = messageType;
}
/**
* This method returns the value of the database column tab_haoban_notice_message.title
*
* @return the value of tab_haoban_notice_message.title
*/
public String getTitle() {
return title;
}
/**
* This method sets the value of the database column tab_haoban_notice_message.title
*
* @param title the value for tab_haoban_notice_message.title
*/
public void setTitle(String title) {
this.title = title;
}
/**
* This method returns the value of the database column tab_haoban_notice_message.description
*
* @return the value of tab_haoban_notice_message.description
*/
public String getDescription() {
return description;
}
/**
* This method sets the value of the database column tab_haoban_notice_message.description
*
* @param description the value for tab_haoban_notice_message.description
*/
public void setDescription(String description) {
this.description = description;
}
/**
* This method returns the value of the database column tab_haoban_notice_message.relation_id
*
* @return the value of tab_haoban_notice_message.relation_id
*/
public String getRelationId() {
return relationId;
}
/**
* This method sets the value of the database column tab_haoban_notice_message.relation_id
*
* @param relationId the value for tab_haoban_notice_message.relation_id
*/
public void setRelationId(String relationId) {
this.relationId = relationId;
}
/**
* This method returns the value of the database column tab_haoban_notice_message.message_content
*
* @return the value of tab_haoban_notice_message.message_content
*/
public String getMessageContent() {
return messageContent;
}
/**
* This method sets the value of the database column tab_haoban_notice_message.message_content
*
* @param messageContent the value for tab_haoban_notice_message.message_content
*/
public void setMessageContent(String messageContent) {
this.messageContent = messageContent;
}
/**
* This method returns the value of the database column tab_haoban_notice_message.read_flag
*
* @return the value of tab_haoban_notice_message.read_flag
*/
public Integer getReadFlag() {
return readFlag;
}
/**
* This method sets the value of the database column tab_haoban_notice_message.read_flag
*
* @param readFlag the value for tab_haoban_notice_message.read_flag
*/
public void setReadFlag(Integer readFlag) {
this.readFlag = readFlag;
}
/**
* This method returns the value of the database column tab_haoban_notice_message.delete_flag
*
* @return the value of tab_haoban_notice_message.delete_flag
*/
public Integer getDeleteFlag() {
return deleteFlag;
}
/**
* This method sets the value of the database column tab_haoban_notice_message.delete_flag
*
* @param deleteFlag the value for tab_haoban_notice_message.delete_flag
*/
public void setDeleteFlag(Integer deleteFlag) {
this.deleteFlag = deleteFlag;
}
/**
* This method returns the value of the database column tab_haoban_notice_message.create_time
*
* @return the value of tab_haoban_notice_message.create_time
*/
public Date getCreateTime() {
return createTime;
}
/**
* This method sets the value of the database column tab_haoban_notice_message.create_time
*
* @param createTime the value for tab_haoban_notice_message.create_time
*/
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
/**
* This method returns the value of the database column tab_haoban_notice_message.update_time
*
* @return the value of tab_haoban_notice_message.update_time
*/
public Date getUpdateTime() {
return updateTime;
}
/**
* This method sets the value of the database column tab_haoban_notice_message.update_time
*
* @param updateTime the value for tab_haoban_notice_message.update_time
*/
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
}
\ No newline at end of file
package com.gic.haoban.manage.service.pojo.BO;
import java.io.Serializable;
import java.util.Date;
/**
* Created By MBG-GUI-EXTENSION https://github.com/spawpaw/mybatis-generator-gui-extension
* Description:
* 好办消息通知
*
* @author fdh
*/
public class NoticeMessageBO implements Serializable {
/**
*
*/
private Long noticeMessageId;
/**
* 企业id
*/
private String enterpriseId;
/**
* 门店id
*/
private String storeId;
/**
* 导购id
*/
private String clerkId;
/**
* 类别 0客户相关、1任务相关、2活动相关、3其他
*/
private Integer categoryType;
/**
* 消息类型
*/
private Integer messageType;
/**
* 标题
*/
private String title;
/**
* 描述
*/
private String description;
/**
* 关联的具体业务消息id
*/
private String relationId;
/**
* 消息带的参数信息
*/
private String messageContent;
/**
* 0 未读 1已读
*/
private Integer readFlag;
/**
* 状态 0删除 1正常
*/
private Integer deleteFlag;
/**
* 创建时间
*/
private Date createTime;
/**
* 更新时间
*/
private Date updateTime;
/**
*/
private static final long serialVersionUID = 1L;
/**
* This method returns the value of the database column tab_haoban_notice_message.notice_message_id
*
* @return the value of tab_haoban_notice_message.notice_message_id
*/
public Long getNoticeMessageId() {
return noticeMessageId;
}
/**
* This method sets the value of the database column tab_haoban_notice_message.notice_message_id
*
* @param noticeMessageId the value for tab_haoban_notice_message.notice_message_id
*/
public void setNoticeMessageId(Long noticeMessageId) {
this.noticeMessageId = noticeMessageId;
}
/**
* This method returns the value of the database column tab_haoban_notice_message.enterprise_id
*
* @return the value of tab_haoban_notice_message.enterprise_id
*/
public String getEnterpriseId() {
return enterpriseId;
}
/**
* This method sets the value of the database column tab_haoban_notice_message.enterprise_id
*
* @param enterpriseId the value for tab_haoban_notice_message.enterprise_id
*/
public void setEnterpriseId(String enterpriseId) {
this.enterpriseId = enterpriseId;
}
/**
* This method returns the value of the database column tab_haoban_notice_message.store_id
*
* @return the value of tab_haoban_notice_message.store_id
*/
public String getStoreId() {
return storeId;
}
/**
* This method sets the value of the database column tab_haoban_notice_message.store_id
*
* @param storeId the value for tab_haoban_notice_message.store_id
*/
public void setStoreId(String storeId) {
this.storeId = storeId;
}
/**
* This method returns the value of the database column tab_haoban_notice_message.clerk_id
*
* @return the value of tab_haoban_notice_message.clerk_id
*/
public String getClerkId() {
return clerkId;
}
/**
* This method sets the value of the database column tab_haoban_notice_message.clerk_id
*
* @param clerkId the value for tab_haoban_notice_message.clerk_id
*/
public void setClerkId(String clerkId) {
this.clerkId = clerkId;
}
/**
* This method returns the value of the database column tab_haoban_notice_message.category_type
*
* @return the value of tab_haoban_notice_message.category_type
*/
public Integer getCategoryType() {
return categoryType;
}
/**
* This method sets the value of the database column tab_haoban_notice_message.category_type
*
* @param categoryType the value for tab_haoban_notice_message.category_type
*/
public void setCategoryType(Integer categoryType) {
this.categoryType = categoryType;
}
/**
* This method returns the value of the database column tab_haoban_notice_message.message_type
*
* @return the value of tab_haoban_notice_message.message_type
*/
public Integer getMessageType() {
return messageType;
}
/**
* This method sets the value of the database column tab_haoban_notice_message.message_type
*
* @param messageType the value for tab_haoban_notice_message.message_type
*/
public void setMessageType(Integer messageType) {
this.messageType = messageType;
}
/**
* This method returns the value of the database column tab_haoban_notice_message.title
*
* @return the value of tab_haoban_notice_message.title
*/
public String getTitle() {
return title;
}
/**
* This method sets the value of the database column tab_haoban_notice_message.title
*
* @param title the value for tab_haoban_notice_message.title
*/
public void setTitle(String title) {
this.title = title;
}
/**
* This method returns the value of the database column tab_haoban_notice_message.description
*
* @return the value of tab_haoban_notice_message.description
*/
public String getDescription() {
return description;
}
/**
* This method sets the value of the database column tab_haoban_notice_message.description
*
* @param description the value for tab_haoban_notice_message.description
*/
public void setDescription(String description) {
this.description = description;
}
/**
* This method returns the value of the database column tab_haoban_notice_message.relation_id
*
* @return the value of tab_haoban_notice_message.relation_id
*/
public String getRelationId() {
return relationId;
}
/**
* This method sets the value of the database column tab_haoban_notice_message.relation_id
*
* @param relationId the value for tab_haoban_notice_message.relation_id
*/
public void setRelationId(String relationId) {
this.relationId = relationId;
}
/**
* This method returns the value of the database column tab_haoban_notice_message.message_content
*
* @return the value of tab_haoban_notice_message.message_content
*/
public String getMessageContent() {
return messageContent;
}
/**
* This method sets the value of the database column tab_haoban_notice_message.message_content
*
* @param messageContent the value for tab_haoban_notice_message.message_content
*/
public void setMessageContent(String messageContent) {
this.messageContent = messageContent;
}
/**
* This method returns the value of the database column tab_haoban_notice_message.read_flag
*
* @return the value of tab_haoban_notice_message.read_flag
*/
public Integer getReadFlag() {
return readFlag;
}
/**
* This method sets the value of the database column tab_haoban_notice_message.read_flag
*
* @param readFlag the value for tab_haoban_notice_message.read_flag
*/
public void setReadFlag(Integer readFlag) {
this.readFlag = readFlag;
}
/**
* This method returns the value of the database column tab_haoban_notice_message.delete_flag
*
* @return the value of tab_haoban_notice_message.delete_flag
*/
public Integer getDeleteFlag() {
return deleteFlag;
}
/**
* This method sets the value of the database column tab_haoban_notice_message.delete_flag
*
* @param deleteFlag the value for tab_haoban_notice_message.delete_flag
*/
public void setDeleteFlag(Integer deleteFlag) {
this.deleteFlag = deleteFlag;
}
/**
* This method returns the value of the database column tab_haoban_notice_message.create_time
*
* @return the value of tab_haoban_notice_message.create_time
*/
public Date getCreateTime() {
return createTime;
}
/**
* This method sets the value of the database column tab_haoban_notice_message.create_time
*
* @param createTime the value for tab_haoban_notice_message.create_time
*/
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
/**
* This method returns the value of the database column tab_haoban_notice_message.update_time
*
* @return the value of tab_haoban_notice_message.update_time
*/
public Date getUpdateTime() {
return updateTime;
}
/**
* This method sets the value of the database column tab_haoban_notice_message.update_time
*
* @param updateTime the value for tab_haoban_notice_message.update_time
*/
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
}
\ No newline at end of file
package com.gic.haoban.manage.service.pojo.DO;
import java.io.Serializable;
import java.util.Date;
/**
* Created By MBG-GUI-EXTENSION https://github.com/spawpaw/mybatis-generator-gui-extension
* Description:
* 好办消息通知
*
* @author fdh
*/
public class NoticeMessageDO implements Serializable {
/**
*
*/
private Long noticeMessageId;
/**
* 企业id
*/
private String enterpriseId;
/**
* 门店id
*/
private String storeId;
/**
* 导购id
*/
private String clerkId;
/**
* 类别 0客户相关、1任务相关、2活动相关、3其他
*/
private Integer categoryType;
/**
* 消息类型
*/
private Integer messageType;
/**
* 标题
*/
private String title;
/**
* 描述
*/
private String description;
/**
* 关联的具体业务消息id
*/
private String relationId;
/**
* 消息带的参数信息
*/
private String messageContent;
/**
* 0 未读 1已读
*/
private Integer readFlag;
/**
* 状态 0删除 1正常
*/
private Integer deleteFlag;
/**
* 创建时间
*/
private Date createTime;
/**
* 更新时间
*/
private Date updateTime;
/**
*/
private static final long serialVersionUID = 1L;
/**
* This method returns the value of the database column tab_haoban_notice_message.notice_message_id
*
* @return the value of tab_haoban_notice_message.notice_message_id
*/
public Long getNoticeMessageId() {
return noticeMessageId;
}
/**
* This method sets the value of the database column tab_haoban_notice_message.notice_message_id
*
* @param noticeMessageId the value for tab_haoban_notice_message.notice_message_id
*/
public void setNoticeMessageId(Long noticeMessageId) {
this.noticeMessageId = noticeMessageId;
}
/**
* This method returns the value of the database column tab_haoban_notice_message.enterprise_id
*
* @return the value of tab_haoban_notice_message.enterprise_id
*/
public String getEnterpriseId() {
return enterpriseId;
}
/**
* This method sets the value of the database column tab_haoban_notice_message.enterprise_id
*
* @param enterpriseId the value for tab_haoban_notice_message.enterprise_id
*/
public void setEnterpriseId(String enterpriseId) {
this.enterpriseId = enterpriseId;
}
/**
* This method returns the value of the database column tab_haoban_notice_message.store_id
*
* @return the value of tab_haoban_notice_message.store_id
*/
public String getStoreId() {
return storeId;
}
/**
* This method sets the value of the database column tab_haoban_notice_message.store_id
*
* @param storeId the value for tab_haoban_notice_message.store_id
*/
public void setStoreId(String storeId) {
this.storeId = storeId;
}
/**
* This method returns the value of the database column tab_haoban_notice_message.clerk_id
*
* @return the value of tab_haoban_notice_message.clerk_id
*/
public String getClerkId() {
return clerkId;
}
/**
* This method sets the value of the database column tab_haoban_notice_message.clerk_id
*
* @param clerkId the value for tab_haoban_notice_message.clerk_id
*/
public void setClerkId(String clerkId) {
this.clerkId = clerkId;
}
/**
* This method returns the value of the database column tab_haoban_notice_message.category_type
*
* @return the value of tab_haoban_notice_message.category_type
*/
public Integer getCategoryType() {
return categoryType;
}
/**
* This method sets the value of the database column tab_haoban_notice_message.category_type
*
* @param categoryType the value for tab_haoban_notice_message.category_type
*/
public void setCategoryType(Integer categoryType) {
this.categoryType = categoryType;
}
/**
* This method returns the value of the database column tab_haoban_notice_message.message_type
*
* @return the value of tab_haoban_notice_message.message_type
*/
public Integer getMessageType() {
return messageType;
}
/**
* This method sets the value of the database column tab_haoban_notice_message.message_type
*
* @param messageType the value for tab_haoban_notice_message.message_type
*/
public void setMessageType(Integer messageType) {
this.messageType = messageType;
}
/**
* This method returns the value of the database column tab_haoban_notice_message.title
*
* @return the value of tab_haoban_notice_message.title
*/
public String getTitle() {
return title;
}
/**
* This method sets the value of the database column tab_haoban_notice_message.title
*
* @param title the value for tab_haoban_notice_message.title
*/
public void setTitle(String title) {
this.title = title;
}
/**
* This method returns the value of the database column tab_haoban_notice_message.description
*
* @return the value of tab_haoban_notice_message.description
*/
public String getDescription() {
return description;
}
/**
* This method sets the value of the database column tab_haoban_notice_message.description
*
* @param description the value for tab_haoban_notice_message.description
*/
public void setDescription(String description) {
this.description = description;
}
/**
* This method returns the value of the database column tab_haoban_notice_message.relation_id
*
* @return the value of tab_haoban_notice_message.relation_id
*/
public String getRelationId() {
return relationId;
}
/**
* This method sets the value of the database column tab_haoban_notice_message.relation_id
*
* @param relationId the value for tab_haoban_notice_message.relation_id
*/
public void setRelationId(String relationId) {
this.relationId = relationId;
}
/**
* This method returns the value of the database column tab_haoban_notice_message.message_content
*
* @return the value of tab_haoban_notice_message.message_content
*/
public String getMessageContent() {
return messageContent;
}
/**
* This method sets the value of the database column tab_haoban_notice_message.message_content
*
* @param messageContent the value for tab_haoban_notice_message.message_content
*/
public void setMessageContent(String messageContent) {
this.messageContent = messageContent;
}
/**
* This method returns the value of the database column tab_haoban_notice_message.read_flag
*
* @return the value of tab_haoban_notice_message.read_flag
*/
public Integer getReadFlag() {
return readFlag;
}
/**
* This method sets the value of the database column tab_haoban_notice_message.read_flag
*
* @param readFlag the value for tab_haoban_notice_message.read_flag
*/
public void setReadFlag(Integer readFlag) {
this.readFlag = readFlag;
}
/**
* This method returns the value of the database column tab_haoban_notice_message.delete_flag
*
* @return the value of tab_haoban_notice_message.delete_flag
*/
public Integer getDeleteFlag() {
return deleteFlag;
}
/**
* This method sets the value of the database column tab_haoban_notice_message.delete_flag
*
* @param deleteFlag the value for tab_haoban_notice_message.delete_flag
*/
public void setDeleteFlag(Integer deleteFlag) {
this.deleteFlag = deleteFlag;
}
/**
* This method returns the value of the database column tab_haoban_notice_message.create_time
*
* @return the value of tab_haoban_notice_message.create_time
*/
public Date getCreateTime() {
return createTime;
}
/**
* This method sets the value of the database column tab_haoban_notice_message.create_time
*
* @param createTime the value for tab_haoban_notice_message.create_time
*/
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
/**
* This method returns the value of the database column tab_haoban_notice_message.update_time
*
* @return the value of tab_haoban_notice_message.update_time
*/
public Date getUpdateTime() {
return updateTime;
}
/**
* This method sets the value of the database column tab_haoban_notice_message.update_time
*
* @param updateTime the value for tab_haoban_notice_message.update_time
*/
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
}
\ No newline at end of file
package com.gic.haoban.manage.service.service.notify;
import com.gic.haoban.manage.service.pojo.BO.PendingTaskBO;
/**
* Created 2021/12/15.
*
* @author hua
*/
public interface NoticeMessageService {
/**
* 新增或创建消息
*
* @param pendingTask
* @return
*/
public boolean addOrCreateNoticeMessage(PendingTaskBO pendingTask);
}
package com.gic.haoban.manage.service.service.notify;
import com.gic.api.base.commons.BasePageInfo;
import com.gic.api.base.commons.Page;
import com.gic.haoban.manage.service.pojo.BO.PendingTaskBO;
import java.util.List;
/**
* Created 2021/12/15.
*
* @author hua
*/
public interface PendingTaskService {
/**
* 新增或更新
*
* @param task
* @return
*/
public boolean addOrUpdatePendingTask(PendingTaskBO task);
/**
* 分页查询待办任务表
*
* @param enterpriseId 企业id
* @param storeId 门店id
* @param clerkId 导购id
* @param finishFlag 完成状态
* @param overdueFlag 逾期状态
* @param pageInfo 分页参数
* @return
*/
public Page<PendingTaskBO> pagePendingTask(String enterpriseId, String storeId, String clerkId,
int finishFlag, int overdueFlag, BasePageInfo pageInfo);
/**
* 列表
*
* @param enterpriseId
* @param storeId
* @param clerkId
* @param startDate
* @param endDate
* @return
*/
public List<PendingTaskBO> listPendingTaskByCreateTime(String enterpriseId, String storeId, String clerkId, String startDate, String endDate);
}
package com.gic.haoban.manage.service.service.notify.impl;
import com.gic.api.base.commons.BasePageInfo;
import com.gic.api.base.commons.Page;
import com.gic.commons.util.PageHelperUtils;
import com.gic.haoban.common.utils.EntityUtil;
import com.gic.haoban.manage.service.dao.mapper.PendingTaskMapper;
import com.gic.haoban.manage.service.entity.TabPendingTask;
import com.gic.haoban.manage.service.pojo.BO.PendingTaskBO;
import com.gic.haoban.manage.service.service.notify.PendingTaskService;
import com.github.pagehelper.PageHelper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.Date;
import java.util.List;
/**
* Created 2021/12/15.
*
* @author hua
*/
@Service
public class PendingTaskServiceImpl implements PendingTaskService {
@Autowired
private PendingTaskMapper pendingTaskMapper;
@Override
public boolean addOrUpdatePendingTask(PendingTaskBO task) {
TabPendingTask tabPendingTask = EntityUtil.changeEntityByOrika(TabPendingTask.class, task);
TabPendingTask pendingTask = pendingTaskMapper.getByRelationId(tabPendingTask.getRelationId());
task.setUpdateTime(new Date());
if (pendingTask != null) {
tabPendingTask.setId(pendingTask.getId());
pendingTaskMapper.updateByPrimaryKey(tabPendingTask);
} else {
pendingTaskMapper.insert(tabPendingTask);
}
return true;
}
@Override
public Page<PendingTaskBO> pagePendingTask(String enterpriseId, String storeId, String clerkId, int finishFlag, int overdueFlag, BasePageInfo pageInfo) {
PageHelper.startPage(pageInfo);
List<TabPendingTask> tabPendingTasks = pendingTaskMapper.listPendingTask(enterpriseId, storeId, clerkId, finishFlag, overdueFlag);
Page<PendingTaskBO> retPage = PageHelperUtils.changePageHelperToCurrentPage(tabPendingTasks, PendingTaskBO.class);
return retPage;
}
@Override
public List<PendingTaskBO> listPendingTaskByCreateTime(String enterpriseId, String storeId, String clerkId, String startDate, String endDate) {
List<TabPendingTask> tabPendingTasks = pendingTaskMapper.listPendingTaskByCreateTime(enterpriseId, storeId, clerkId, startDate, endDate);
return EntityUtil.changeEntityListByJSON(PendingTaskBO.class, tabPendingTasks);
}
}
package com.gic.haoban.manage.service.service.notify.out;
import com.gic.api.base.commons.BasePageInfo;
import com.gic.api.base.commons.Page;
import com.gic.api.base.commons.ServiceResponse;
import com.gic.commons.util.PageHelperUtils;
import com.gic.haoban.common.utils.EntityUtil;
import com.gic.haoban.manage.api.dto.notify.dto.PendingTaskDTO;
import com.gic.haoban.manage.api.dto.notify.dto.PendingTaskDetailDTO;
import com.gic.haoban.manage.api.dto.notify.qdto.PendingListQDTO;
import com.gic.haoban.manage.api.dto.notify.qdto.PendingTaskQDTO;
import com.gic.haoban.manage.api.enums.PendingTaskTypeEnum;
import com.gic.haoban.manage.api.service.notify.PendingTaskApiService;
import com.gic.haoban.manage.service.pojo.BO.PendingTaskBO;
import com.gic.haoban.manage.service.service.notify.PendingTaskService;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang3.time.DateFormatUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.Date;
import java.util.List;
/**
* Created 2021/12/16.
*
* @author hua
*/
@Service
public class PendingTaskApiServiceImpl implements PendingTaskApiService {
@Autowired
private PendingTaskService pendingTaskService;
@Override
public void addPendingTask(PendingTaskQDTO qdto) {
//新增待办
pendingTaskService.addOrUpdatePendingTask(EntityUtil.changeEntityByOrika(PendingTaskBO.class, qdto));
}
@Override
public ServiceResponse<Page<PendingTaskDetailDTO>> pagePendingTask(PendingListQDTO listQDTO, BasePageInfo pageInfo) {
Page<PendingTaskBO> pendingTask = pendingTaskService.pagePendingTask(listQDTO.getEnterpriseId(), listQDTO.getStoreId(), listQDTO.getClerkId(), listQDTO.getFinishFlag()
, listQDTO.getOverdueFlag(), pageInfo);
//转化
Page<PendingTaskDetailDTO> retPage = PageHelperUtils.changePageToCurrentPage(pendingTask, PendingTaskDetailDTO.class);
if (CollectionUtils.isEmpty(retPage.getResult())) {
return ServiceResponse.success(retPage);
}
retPage.getResult().forEach(dto -> {
String title = dto.getTitle();
PendingTaskTypeEnum taskTypeEnum = PendingTaskTypeEnum.getByType(dto.getTaskType());
dto.setDescription(taskTypeEnum.getDescription().replace("{}", title));
dto.setTitle(taskTypeEnum.getName());
});
return ServiceResponse.success(retPage);
}
@Override
public ServiceResponse<List<PendingTaskDetailDTO>> listPendingTaskToday(String enterpriseId, String storeId, String clerkId, boolean seeSelf) {
String yyyyMMdd = DateFormatUtils.format(new Date(), "yyyy-MM-dd");
String startDate = yyyyMMdd + " 00:00:00";
String endDate = yyyyMMdd + " 23:59:59";
List<PendingTaskBO> todayPending = pendingTaskService.listPendingTaskByCreateTime(enterpriseId, storeId, clerkId, startDate, endDate);
List<PendingTaskDetailDTO> retList = EntityUtil.changeEntityListByJSON(PendingTaskDetailDTO.class, todayPending);
return ServiceResponse.success(retList);
}
}
......@@ -59,6 +59,10 @@
<dubbo:service interface="com.gic.haoban.manage.api.service.OperationSettingApiService" ref="operationSettingApiServiceImpl"
timeout="10000"/>
<dubbo:service interface="com.gic.haoban.manage.api.service.notify.PendingTaskApiService"
ref="PendingTaskApiServiceImpl"
timeout="10000"/>
<dubbo:reference interface="com.gic.enterprise.api.service.DepartmentService" id="gicDepartmentService"/>
<dubbo:reference interface="com.gic.wechat.api.service.qywx.QywxDepartmentApiService" id="qywxDepartmentApiService"/>
<dubbo:reference interface="com.gic.wechat.api.service.qywx.QywxSuiteApiService" id="qywxSuiteApiService"/>
......
<?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.gic.haoban.manage.service.dao.mapper.NoticeMessageMapper">
<resultMap id="BaseResultMap" type="com.gic.haoban.manage.service.entity.TabNoticeMessage">
<id column="notice_message_id" jdbcType="BIGINT" property="noticeMessageId"/>
<result column="enterprise_id" jdbcType="VARCHAR" property="enterpriseId"/>
<result column="store_id" jdbcType="VARCHAR" property="storeId"/>
<result column="clerk_id" jdbcType="VARCHAR" property="clerkId"/>
<result column="category_type" jdbcType="INTEGER" property="categoryType"/>
<result column="message_type" jdbcType="INTEGER" property="messageType"/>
<result column="title" jdbcType="VARCHAR" property="title"/>
<result column="description" jdbcType="VARCHAR" property="description"/>
<result column="relation_id" jdbcType="VARCHAR" property="relationId"/>
<result column="message_content" jdbcType="VARCHAR" property="messageContent"/>
<result column="read_flag" jdbcType="INTEGER" property="readFlag"/>
<result column="delete_flag" jdbcType="INTEGER" property="deleteFlag"/>
<result column="create_time" jdbcType="TIMESTAMP" property="createTime"/>
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime"/>
</resultMap>
<sql id="Base_Column_List">
notice_message_id, enterprise_id, store_id, clerk_id, category_type, message_type,
title, description, relation_id, message_content, read_flag, delete_flag, create_time,
update_time
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from tab_haoban_notice_message
where notice_message_id = #{noticeMessageId,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from tab_haoban_notice_message
where notice_message_id = #{noticeMessageId,jdbcType=BIGINT}
</delete>
<insert id="insert" parameterType="com.gic.haoban.manage.service.entity.TabNoticeMessage">
insert into tab_haoban_notice_message (notice_message_id, enterprise_id, store_id,
clerk_id, category_type, message_type,
title, description, relation_id,
message_content, read_flag, delete_flag,
create_time, update_time)
values (#{noticeMessageId,jdbcType=BIGINT}, #{enterpriseId,jdbcType=VARCHAR}, #{storeId,jdbcType=VARCHAR},
#{clerkId,jdbcType=VARCHAR}, #{categoryType,jdbcType=INTEGER}, #{messageType,jdbcType=INTEGER},
#{title,jdbcType=VARCHAR}, #{description,jdbcType=VARCHAR}, #{relationId,jdbcType=VARCHAR},
#{messageContent,jdbcType=VARCHAR}, #{readFlag,jdbcType=INTEGER}, #{deleteFlag,jdbcType=INTEGER},
#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP})
</insert>
<insert id="insertSelective" parameterType="com.gic.haoban.manage.service.entity.TabNoticeMessage">
insert into tab_haoban_notice_message
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="noticeMessageId != null">
notice_message_id,
</if>
<if test="enterpriseId != null">
enterprise_id,
</if>
<if test="storeId != null">
store_id,
</if>
<if test="clerkId != null">
clerk_id,
</if>
<if test="categoryType != null">
category_type,
</if>
<if test="messageType != null">
message_type,
</if>
<if test="title != null">
title,
</if>
<if test="description != null">
description,
</if>
<if test="relationId != null">
relation_id,
</if>
<if test="messageContent != null">
message_content,
</if>
<if test="readFlag != null">
read_flag,
</if>
<if test="deleteFlag != null">
delete_flag,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="updateTime != null">
update_time,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="noticeMessageId != null">
#{noticeMessageId,jdbcType=BIGINT},
</if>
<if test="enterpriseId != null">
#{enterpriseId,jdbcType=VARCHAR},
</if>
<if test="storeId != null">
#{storeId,jdbcType=VARCHAR},
</if>
<if test="clerkId != null">
#{clerkId,jdbcType=VARCHAR},
</if>
<if test="categoryType != null">
#{categoryType,jdbcType=INTEGER},
</if>
<if test="messageType != null">
#{messageType,jdbcType=INTEGER},
</if>
<if test="title != null">
#{title,jdbcType=VARCHAR},
</if>
<if test="description != null">
#{description,jdbcType=VARCHAR},
</if>
<if test="relationId != null">
#{relationId,jdbcType=VARCHAR},
</if>
<if test="messageContent != null">
#{messageContent,jdbcType=VARCHAR},
</if>
<if test="readFlag != null">
#{readFlag,jdbcType=INTEGER},
</if>
<if test="deleteFlag != null">
#{deleteFlag,jdbcType=INTEGER},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.gic.haoban.manage.service.entity.TabNoticeMessage">
update tab_haoban_notice_message
<set>
<if test="enterpriseId != null">
enterprise_id = #{enterpriseId,jdbcType=VARCHAR},
</if>
<if test="storeId != null">
store_id = #{storeId,jdbcType=VARCHAR},
</if>
<if test="clerkId != null">
clerk_id = #{clerkId,jdbcType=VARCHAR},
</if>
<if test="categoryType != null">
category_type = #{categoryType,jdbcType=INTEGER},
</if>
<if test="messageType != null">
message_type = #{messageType,jdbcType=INTEGER},
</if>
<if test="title != null">
title = #{title,jdbcType=VARCHAR},
</if>
<if test="description != null">
description = #{description,jdbcType=VARCHAR},
</if>
<if test="relationId != null">
relation_id = #{relationId,jdbcType=VARCHAR},
</if>
<if test="messageContent != null">
message_content = #{messageContent,jdbcType=VARCHAR},
</if>
<if test="readFlag != null">
read_flag = #{readFlag,jdbcType=INTEGER},
</if>
<if test="deleteFlag != null">
delete_flag = #{deleteFlag,jdbcType=INTEGER},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
</set>
where notice_message_id = #{noticeMessageId,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.gic.haoban.manage.service.entity.TabNoticeMessage">
update tab_haoban_notice_message
set enterprise_id = #{enterpriseId,jdbcType=VARCHAR},
store_id = #{storeId,jdbcType=VARCHAR},
clerk_id = #{clerkId,jdbcType=VARCHAR},
category_type = #{categoryType,jdbcType=INTEGER},
message_type = #{messageType,jdbcType=INTEGER},
title = #{title,jdbcType=VARCHAR},
description = #{description,jdbcType=VARCHAR},
relation_id = #{relationId,jdbcType=VARCHAR},
message_content = #{messageContent,jdbcType=VARCHAR},
read_flag = #{readFlag,jdbcType=INTEGER},
delete_flag = #{deleteFlag,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where notice_message_id = #{noticeMessageId,jdbcType=BIGINT}
</update>
</mapper>
\ No newline at end of file
package com.gic.haoban.manage.web.controller;
import com.gic.api.base.commons.Page;
import com.gic.api.base.commons.ServiceResponse;
import com.gic.clerk.api.dto.ClerkDTO;
import com.gic.commons.webapi.reponse.RestResponse;
import com.gic.haoban.common.utils.EntityUtil;
import com.gic.haoban.common.utils.HaobanResponse;
import com.gic.haoban.manage.api.dto.StaffClerkRelationDTO;
import com.gic.haoban.manage.api.dto.StaffDTO;
import com.gic.haoban.manage.api.dto.notify.dto.PendingTaskDetailDTO;
import com.gic.haoban.manage.api.dto.notify.qdto.PendingListQDTO;
import com.gic.haoban.manage.api.service.notify.PendingTaskApiService;
import com.gic.haoban.manage.web.errCode.HaoBanErrCode;
import com.gic.haoban.manage.web.qo.CommonQO;
import com.gic.haoban.manage.web.qo.PendingListQO;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.validation.Valid;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
/**
* Created 2021/12/16.
*
* @author hua
*/
@RestController
public class NotifyController extends WebBaseController {
@Autowired
private PendingTaskApiService pendingTaskApiService;
/**
* 待办列表
*
* @return
*/
@RequestMapping("/commission/list")
public RestResponse pendingList(@RequestBody @Valid PendingListQO qo) {
PendingListQDTO pendingListQDTO = EntityUtil.changeEntityByOrika(PendingListQDTO.class, qo);
ServiceResponse<Page<PendingTaskDetailDTO>> retPage = pendingTaskApiService.pagePendingTask(pendingListQDTO, qo.getBasePageInfo());
return RestResponse.success(retPage.getResult());
}
/**
* 今日待办列表 最多20条
*
* @return
*/
@RequestMapping("/commission/today-list")
public RestResponse pendingToday(@RequestBody @Valid CommonQO qo) {
ServiceResponse<List<PendingTaskDetailDTO>> response = pendingTaskApiService
.listPendingTaskToday(qo.getEnterpriseId(), qo.getStoreId(), qo.getClerkId(), false);
return RestResponse.success(response.getResult());
}
}
package com.gic.haoban.manage.web.qo;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
/**
* Created 2021/12/16.
*
* @author hua
*/
public class CommonQO implements Serializable {
@NotNull(message = "企业id不为空")
private String wxEnterpriseId;
@NotNull(message = "成员id不为空")
private String staffId;
@NotNull(message = "手机号id不为空")
private String phoneNumber;
@NotNull(message = "商户id不为空")
private String enterpriseId;
@NotNull(message = "门店id不为空")
private String storeId;
@NotNull(message = "导购id不为空")
private String clerkId;
public String getWxEnterpriseId() {
return wxEnterpriseId;
}
public void setWxEnterpriseId(String wxEnterpriseId) {
this.wxEnterpriseId = wxEnterpriseId;
}
public String getStaffId() {
return staffId;
}
public void setStaffId(String staffId) {
this.staffId = staffId;
}
public String getPhoneNumber() {
return phoneNumber;
}
public void setPhoneNumber(String phoneNumber) {
this.phoneNumber = phoneNumber;
}
public String getEnterpriseId() {
return enterpriseId;
}
public void setEnterpriseId(String enterpriseId) {
this.enterpriseId = enterpriseId;
}
public String getStoreId() {
return storeId;
}
public void setStoreId(String storeId) {
this.storeId = storeId;
}
public String getClerkId() {
return clerkId;
}
public void setClerkId(String clerkId) {
this.clerkId = clerkId;
}
}
package com.gic.haoban.manage.web.qo;
import com.gic.commons.web.qo.PageQo;
import javax.validation.constraints.NotNull;
/**
* Created 2021/12/16.
*
* @author hua
*/
public class PendingListQO extends PageQo {
/**
* 企业id
*/
@NotNull(message = "企业id不为空")
private String enterpriseId;
/**
* 门店id
*/
@NotNull(message = "门店id不为空")
private String storeId;
/**
* 导购id
*/
@NotNull(message = "导购id不为空")
private String clerkId;
/**
* 过滤状态 0未完成 1已逾期
*/
private Integer filterStatus = 0;
/**
* 任务类型 0-月指标 1-ecm话务任务 ,3群发任务 4活动
*/
private Integer taskType = -1;
/**
* 是否只看自己的 0否 1是
*/
private Integer showSelf = 1;
public String getEnterpriseId() {
return enterpriseId;
}
public void setEnterpriseId(String enterpriseId) {
this.enterpriseId = enterpriseId;
}
public String getStoreId() {
return storeId;
}
public void setStoreId(String storeId) {
this.storeId = storeId;
}
public String getClerkId() {
return clerkId;
}
public void setClerkId(String clerkId) {
this.clerkId = clerkId;
}
public Integer getFilterStatus() {
return filterStatus;
}
public void setFilterStatus(Integer filterStatus) {
this.filterStatus = filterStatus;
}
public Integer getTaskType() {
return taskType;
}
public void setTaskType(Integer taskType) {
this.taskType = taskType;
}
public Integer getShowSelf() {
return showSelf;
}
public void setShowSelf(Integer showSelf) {
this.showSelf = showSelf;
}
}
......@@ -74,4 +74,8 @@
<dubbo:reference id="operationSettingApiServiceImpl" interface="com.gic.haoban.manage.api.service.OperationSettingApiService" timeout="10000"
retries="0" check="false"/>
<dubbo:reference id="pendingTaskApiService"
interface="com.gic.haoban.manage.api.service.notify.PendingTaskApiService" timeout="10000"
retries="0" check="false"/>
</beans>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment