计量中心项目
This commit is contained in:
16
jlzx-single/yxt-single-messagecenter/pom.xml
Normal file
16
jlzx-single/yxt-single-messagecenter/pom.xml
Normal file
@@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
||||
<artifactId>yxt-single-messagecenter</artifactId>
|
||||
<groupId>com.yxt.messagecenter</groupId>
|
||||
<version>0.0.1</version>
|
||||
<packaging>pom</packaging>
|
||||
|
||||
<modules>
|
||||
<module>yxt-single-messagecenter-api</module>
|
||||
<module>yxt-single-messagecenter-biz</module>
|
||||
</modules>
|
||||
|
||||
</project>
|
||||
@@ -0,0 +1,67 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>com.yxt</groupId>
|
||||
<artifactId>yxt-parent</artifactId>
|
||||
<version>0.0.1</version>
|
||||
<relativePath/>
|
||||
</parent>
|
||||
|
||||
<groupId>com.yxt.messagecenter</groupId>
|
||||
<artifactId>yxt-single-messagecenter-api</artifactId>
|
||||
<version>0.0.1</version>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.yxt</groupId>
|
||||
<artifactId>yxt-common-core</artifactId>
|
||||
<version>0.0.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.yxt</groupId>
|
||||
<artifactId>yxt-common-base</artifactId>
|
||||
<version>0.0.1</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-openfeign</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.alibaba</groupId>
|
||||
<artifactId>fastjson</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.hibernate.validator</groupId>
|
||||
<artifactId>hibernate-validator</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.baomidou</groupId>
|
||||
<artifactId>mybatis-plus-annotation</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.baomidou</groupId>
|
||||
<artifactId>mybatis-plus-boot-starter</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>javax.servlet</groupId>
|
||||
<artifactId>javax.servlet-api</artifactId>
|
||||
<version>4.0.1</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.github.xiaoymin</groupId>
|
||||
<artifactId>knife4j-annotations</artifactId>
|
||||
<version>2.0.4</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
|
||||
|
||||
</dependencies>
|
||||
</project>
|
||||
@@ -0,0 +1,56 @@
|
||||
package com.yxt.messagecenter.api.message;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import javax.validation.Valid;
|
||||
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
|
||||
import com.yxt.common.core.query.PagerQuery;
|
||||
import com.yxt.common.core.result.ResultBean;
|
||||
import com.yxt.common.core.vo.PagerVo;
|
||||
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiImplicitParams;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
|
||||
/**
|
||||
* @author dimengzhe
|
||||
* @date 2020/11/2 16:59
|
||||
* @description App我的工作接口
|
||||
*/
|
||||
@FeignClient(
|
||||
contextId = "yxt-messagecenter-AppWork",
|
||||
name = "yxt-messagecenter",
|
||||
path = "v1/appwork",
|
||||
fallback = AppMwssageApiFallBack.class)
|
||||
public interface AppMessageApi {
|
||||
/**
|
||||
* 待阅工作列表
|
||||
*
|
||||
* @return 分页列表
|
||||
*/
|
||||
@PostMapping("/doingworks")
|
||||
@ResponseBody
|
||||
@ApiOperation(value = "待阅工作分页列表")
|
||||
ResultBean<PagerVo<WorkDoAppVo>> doingReads(@Valid @RequestBody PagerQuery<MessageQuery> query);
|
||||
|
||||
/**
|
||||
* 已办工作列表
|
||||
*
|
||||
* @return 分页列表
|
||||
*/
|
||||
@PostMapping("/didworks")
|
||||
@ResponseBody
|
||||
@ApiOperation(value = "已阅工作分页列表")
|
||||
ResultBean<PagerVo<WorkDidAppVo>> didReads(@Valid @RequestBody PagerQuery<MessageQuery> query);
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
package com.yxt.messagecenter.api.message;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import javax.validation.Valid;
|
||||
|
||||
import com.yxt.common.core.query.PagerQuery;
|
||||
import com.yxt.common.core.result.ResultBean;
|
||||
import com.yxt.common.core.vo.PagerVo;
|
||||
|
||||
public class AppMwssageApiFallBack implements AppMessageApi {
|
||||
|
||||
@Override
|
||||
public ResultBean<PagerVo<WorkDoAppVo>> doingReads(@Valid PagerQuery<MessageQuery> query) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultBean<PagerVo<WorkDidAppVo>> didReads(@Valid PagerQuery<MessageQuery> query) {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
package com.yxt.messagecenter.api.message;
|
||||
|
||||
import com.yxt.common.core.domain.BaseEntity;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author dimengzhe
|
||||
* @date 2020/10/13 14:01
|
||||
* @description 印章管理
|
||||
*/
|
||||
@Data
|
||||
public class Message extends BaseEntity {
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 1936791263654163882L;
|
||||
|
||||
private String msgTitle;//消息标题
|
||||
private String msgContent;//消息内容
|
||||
private String msgSource;//来源(资源名称)
|
||||
private String createrName;//创建人/发送人
|
||||
private String createDeptSid;//发送人部门Id
|
||||
private String createDeptName;//发起人部门名称
|
||||
private String businessSid;//业务Id(扩展字段,与工作相关)
|
||||
private String url;//目标网页地址
|
||||
private String msgType;//消息类别(公文中的发文、收文等、文件传送、工作提醒、超期提醒等)
|
||||
private String remarks;//备注
|
||||
}
|
||||
@@ -0,0 +1,92 @@
|
||||
package com.yxt.messagecenter.api.message;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import javax.validation.Valid;
|
||||
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
|
||||
import com.yxt.common.core.api.BaseApi;
|
||||
import com.yxt.common.core.query.PagerQuery;
|
||||
import com.yxt.common.core.result.ResultBean;
|
||||
import com.yxt.common.core.vo.PagerVo;
|
||||
import com.yxt.messagecenter.api.messagelist.MessagelistQuery;
|
||||
import com.yxt.messagecenter.api.messagelist.MessagelistVo;
|
||||
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
|
||||
/**
|
||||
* @author hanweijia
|
||||
* @date 2020/10/13 14:07
|
||||
* @description
|
||||
*/
|
||||
@FeignClient(
|
||||
contextId = "yxt-messagecenter-Message",
|
||||
name = "yxt-messagecenter",
|
||||
path = "v1/messages",
|
||||
fallback = MessageApiFallBack.class)
|
||||
public interface MessageApi extends BaseApi<MessageVo, MessageDto, MessageQuery> {
|
||||
|
||||
|
||||
|
||||
|
||||
@GetMapping("/delSend/{sid}")
|
||||
@ResponseBody
|
||||
@ApiOperation(value = "发送消息列表删除")
|
||||
public ResultBean delSend(@ApiParam(value = "发送列表sid", required = true) @PathVariable("sid") String sid);
|
||||
|
||||
@GetMapping("/delReceive/{sid}")
|
||||
@ResponseBody
|
||||
@ApiOperation(value = "接收消息列表删除")
|
||||
public ResultBean delReceive(@ApiParam(value = "接收列表sid", required = true) @PathVariable("sid") String sid);
|
||||
|
||||
|
||||
|
||||
@PostMapping("/reveicepageList")
|
||||
@ResponseBody
|
||||
@ApiOperation(value = "接收消息分页列表")
|
||||
ResultBean<PagerVo<MessagelistVo>> reveicepageList(@Valid @RequestBody PagerQuery<MessagelistQuery> pagerQuery);
|
||||
|
||||
|
||||
@GetMapping("/selectByMsgSid/{msgSid}")
|
||||
@ResponseBody
|
||||
@ApiOperation(value = "查看发送消息列表")
|
||||
ResultBean<List<MessagelistVo>> selectByMsgSid(@ApiParam(value = "msgSid", required = true) @PathVariable("msgSid") String msgSid);
|
||||
|
||||
|
||||
|
||||
@GetMapping("/msgListDtail/{sid}")
|
||||
@ResponseBody
|
||||
@ApiOperation(value = "接收消息详情")
|
||||
ResultBean<MessagelistVo> msgListDtail(String sid);
|
||||
|
||||
|
||||
|
||||
//待阅工作
|
||||
@PostMapping("/doingreads")
|
||||
@ResponseBody
|
||||
@ApiOperation(value = "待阅工作分页列表")
|
||||
ResultBean<PagerVo<MessageOneVo>> doingreads(@Valid @RequestBody PagerQuery<MessagelistQuery> query);
|
||||
|
||||
//已阅工作
|
||||
@PostMapping("/didreads")
|
||||
@ResponseBody
|
||||
@ApiOperation(value = "已阅工作分页列表")
|
||||
ResultBean<PagerVo<MessageOneVo>> didreads(@Valid @RequestBody PagerQuery<MessagelistQuery> query);
|
||||
//企业消息
|
||||
@PostMapping("/cxjlSave")
|
||||
@ResponseBody
|
||||
@ApiOperation(value = "企业消息")
|
||||
ResultBean cxjlSave(@Valid @RequestBody MessageDtoOne dtoOne);
|
||||
//企业消息查询
|
||||
@GetMapping("/cxjlSelect/{orgSid}")
|
||||
@ResponseBody
|
||||
@ApiOperation(value = "企业消息查询")
|
||||
ResultBean cxjlSelect(@ApiParam(value = "orgSid", required = true) @PathVariable("orgSid") String orgSid);
|
||||
}
|
||||
@@ -0,0 +1,106 @@
|
||||
package com.yxt.messagecenter.api.message;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import javax.validation.Valid;
|
||||
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import com.yxt.common.core.query.PagerQuery;
|
||||
import com.yxt.common.core.result.ResultBean;
|
||||
import com.yxt.common.core.vo.PagerVo;
|
||||
import com.yxt.messagecenter.api.messagelist.MessagelistQuery;
|
||||
import com.yxt.messagecenter.api.messagelist.MessagelistVo;
|
||||
|
||||
/**
|
||||
* @author dimengzhe
|
||||
* @date 2020/10/13 14:08
|
||||
* @description 印章接口容错处理
|
||||
*/
|
||||
@Component
|
||||
public class MessageApiFallBack implements MessageApi {
|
||||
|
||||
@Override
|
||||
public ResultBean<List<MessageVo>> list(@Valid MessageQuery query) {
|
||||
return new ResultBean().fail().setMsg("网站维护,请稍后再试");
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultBean<PagerVo<MessageVo>> pageList(@Valid PagerQuery<MessageQuery> pagerQuery) {
|
||||
return new ResultBean().fail().setMsg("网站维护,请稍后再试");
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultBean save(@Valid MessageDto dto) {
|
||||
return new ResultBean().fail().setMsg("网站维护,请稍后再试");
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultBean update(@Valid MessageDto dto, String sid) throws Exception {
|
||||
return new ResultBean().fail().setMsg("网站维护,请稍后再试");
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultBean delete(String sid) {
|
||||
return new ResultBean().fail().setMsg("网站维护,请稍后再试");
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultBean<MessageVo> getVo(String sid) {
|
||||
return new ResultBean().fail().setMsg("网站维护,请稍后再试");
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultBean delSend(String sid) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultBean delReceive(String sid) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultBean<PagerVo<MessagelistVo>> reveicepageList(@Valid PagerQuery<MessagelistQuery> pagerQuery) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultBean<List<MessagelistVo>> selectByMsgSid(String msgSid) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultBean<MessagelistVo> msgListDtail(String sid) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultBean<PagerVo<MessageOneVo>> doingreads(@Valid PagerQuery<MessagelistQuery> query) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultBean<PagerVo<MessageOneVo>> didreads(@Valid PagerQuery<MessagelistQuery> query) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultBean cxjlSave(MessageDtoOne dtoOne) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultBean cxjlSelect(String orgSid) {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,81 @@
|
||||
package com.yxt.messagecenter.api.message;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
|
||||
import com.yxt.common.core.dto.Dto;
|
||||
import com.yxt.messagecenter.api.message.user.userVo;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author dimengzhe
|
||||
* @date 2020/10/13 14:10
|
||||
* @description 新建申请dto参数
|
||||
*/
|
||||
@Data
|
||||
public class MessageDto implements Dto {
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 3190218647366096747L;
|
||||
|
||||
|
||||
@ApiModelProperty(value = "接收人sid", required = true)
|
||||
@NotEmpty(message = "接收人sid不能为空")
|
||||
private List<userVo> receiveSids;
|
||||
/**
|
||||
* 消息标题
|
||||
*/
|
||||
|
||||
@ApiModelProperty(value = "消息标题", required = true)
|
||||
@NotBlank(message = "消息标题不能为空")
|
||||
private String msgTitle;
|
||||
/**
|
||||
* 消息内容
|
||||
*/
|
||||
@ApiModelProperty(value = "消息内容", required = true)
|
||||
@NotBlank(message = "消息内容不能为空")
|
||||
private String msgContent;
|
||||
|
||||
@ApiModelProperty(value = "来源(资源名称)", required = true)
|
||||
@NotBlank(message = "来源(资源名称)不能为空")
|
||||
private String msgSource;//来源(资源名称)
|
||||
|
||||
@ApiModelProperty(value = "发送人", required = true)
|
||||
@NotBlank(message = "发送人不能为空")
|
||||
private String createrName;//创建人/发送人
|
||||
|
||||
@ApiModelProperty(value = "发送人sid", required = true)
|
||||
@NotBlank(message = "发送人sid不能为空")
|
||||
private String createBySid;//创建人/发送人
|
||||
|
||||
@ApiModelProperty(value = "发送人部门Sid", required = true)
|
||||
@NotBlank(message = "发送人部门Sid不能为空")
|
||||
private String createDeptSid;//发送人部门Sid
|
||||
|
||||
@ApiModelProperty(value = "发起人部门名称", required = true)
|
||||
@NotBlank(message = "发起人部门名称不能为空")
|
||||
private String createDeptName;//发起人部门名称
|
||||
|
||||
@ApiModelProperty(value = "消息内容", required = true)
|
||||
@NotBlank(message = "消息内容不能为空")
|
||||
private String businessSid;//业务Id(扩展字段,与工作相关)
|
||||
|
||||
@ApiModelProperty(value = "目标网页地址", required = true)
|
||||
@NotBlank(message = "目标网页地址不能为空")
|
||||
private String url;//目标网页地址
|
||||
|
||||
@ApiModelProperty(value = "消息类别", required = true)
|
||||
@NotBlank(message = "消息类别不能为空")
|
||||
private String msgType;//消息类别(公文中的发文、收文等、文件传送、工作提醒、超期提醒等)
|
||||
|
||||
private String remarks;//备注
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,74 @@
|
||||
package com.yxt.messagecenter.api.message;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
|
||||
import com.yxt.common.core.dto.Dto;
|
||||
import com.yxt.messagecenter.api.message.user.userVo;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author dimengzhe
|
||||
* @date 2020/10/13 14:10
|
||||
* @description 新建申请dto参数
|
||||
*/
|
||||
@Data
|
||||
public class MessageDtoOne implements Dto {
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 3190218647366096747L;
|
||||
/**
|
||||
* 消息标题
|
||||
*/
|
||||
@ApiModelProperty(value = "消息标题", required = true)
|
||||
private String msgTitle;
|
||||
/**
|
||||
* 消息内容
|
||||
*/
|
||||
@ApiModelProperty(value = "消息内容", required = true)
|
||||
private String msgContent;
|
||||
|
||||
@ApiModelProperty(value = "来源(资源名称)", required = true)
|
||||
private String msgSource;//来源(资源名称)
|
||||
|
||||
@ApiModelProperty(value = "发送人", required = true)
|
||||
private String createrName;//创建人/发送人
|
||||
|
||||
@ApiModelProperty(value = "发送人sid", required = true)
|
||||
private String createBySid;//创建人/发送人
|
||||
|
||||
@ApiModelProperty(value = "发送人部门Sid", required = true)
|
||||
private String createDeptSid;//发送人部门Sid
|
||||
|
||||
@ApiModelProperty(value = "发起人部门名称", required = true)
|
||||
private String createDeptName;//发起人部门名称
|
||||
|
||||
@ApiModelProperty(value = "消息内容", required = true)
|
||||
private String businessSid;//业务Id(扩展字段,与工作相关)
|
||||
|
||||
@ApiModelProperty(value = "目标网页地址", required = true)
|
||||
private String url;//目标网页地址
|
||||
|
||||
@ApiModelProperty(value = "消息类别", required = true)
|
||||
private String msgType;//消息类别(公文中的发文、收文等、文件传送、工作提醒、超期提醒等)
|
||||
|
||||
private String remarks;//备注
|
||||
|
||||
@ApiModelProperty(value = "接收人sid", required = true)
|
||||
private String receiverId;//接收人sid
|
||||
|
||||
@ApiModelProperty(value = "接收人姓名", required = true)
|
||||
private String receiverName;//接收人姓名
|
||||
@ApiModelProperty(value = "接收人删除状态", required = true)
|
||||
private int rDelStatus;//接收人删除状态
|
||||
@ApiModelProperty(value = "发送人删除状态", required = true)
|
||||
private int sDelStatus;//发送人删除状态
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
package com.yxt.messagecenter.api.message;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
|
||||
import com.yxt.common.core.vo.Vo;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author dimengzhe
|
||||
* @date 2020/10/13 14:23
|
||||
* @description 用印审批新建申请初始化返回数据
|
||||
*/
|
||||
@Data
|
||||
public class MessageOneVo implements Vo {
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 消息标题
|
||||
*/
|
||||
|
||||
@ApiModelProperty(value = "消息标题")
|
||||
private String msgTitle;
|
||||
|
||||
|
||||
@ApiModelProperty(value = "来源(资源名称)")
|
||||
private String msgSource;//来源(资源名称)
|
||||
|
||||
@ApiModelProperty(value = "发送人")
|
||||
private String createrName;//创建人/发送人
|
||||
|
||||
|
||||
|
||||
@ApiModelProperty(value = "发起人部门名称")
|
||||
private String createDeptName;//发起人部门名称
|
||||
|
||||
|
||||
@ApiModelProperty(value = "目标网页地址")
|
||||
private String url;//目标网页地址
|
||||
|
||||
@ApiModelProperty(value = "消息类别")
|
||||
private String msgType;//消息类别(公文中的发文、收文等、文件传送、工作提醒、超期提醒等)
|
||||
|
||||
|
||||
@ApiModelProperty(value = "消息sid")
|
||||
private String sid;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
package com.yxt.messagecenter.api.message;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
|
||||
import com.yxt.common.core.query.Query;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author dimengzhe
|
||||
* @date 2020/10/13 14:10
|
||||
* @description 印章待办工作和已办工作的查询条件
|
||||
*/
|
||||
@Data
|
||||
public class MessageQuery implements Query {
|
||||
@ApiModelProperty(value = "文件标题", required =false)
|
||||
private String msgTitle;//文件标题
|
||||
|
||||
@ApiModelProperty(value = "消息类别", required =false)
|
||||
private String msgType;//消息类别
|
||||
|
||||
@ApiModelProperty(value = "发送人姓名", required =false)
|
||||
private String createBySid;//发送人姓名
|
||||
|
||||
@ApiModelProperty(value = "接收开始时间", required =false)
|
||||
private String startDate;//接收开始时间
|
||||
|
||||
@ApiModelProperty(value = "接受结束日期", required =false)
|
||||
private String endDate;//接受结束日期
|
||||
|
||||
@ApiModelProperty(value = "来源(资源名称)")
|
||||
private String msgSource;//来源(资源名称)
|
||||
|
||||
@ApiModelProperty(value = "用户sid", required =true)
|
||||
private String userSid;
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
package com.yxt.messagecenter.api.message;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
|
||||
import com.yxt.common.core.vo.Vo;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author dimengzhe
|
||||
* @date 2020/10/13 14:23
|
||||
* @description 用印审批新建申请初始化返回数据
|
||||
*/
|
||||
@Data
|
||||
public class MessageVo implements Vo {
|
||||
|
||||
|
||||
/**
|
||||
* 消息标题
|
||||
*/
|
||||
|
||||
@ApiModelProperty(value = "消息标题")
|
||||
private String msgTitle;
|
||||
/**
|
||||
* 消息内容
|
||||
*/
|
||||
@ApiModelProperty(value = "消息内容")
|
||||
private String msgContent;
|
||||
|
||||
@ApiModelProperty(value = "来源(资源名称)")
|
||||
private String msgSource;//来源(资源名称)
|
||||
|
||||
@ApiModelProperty(value = "发送人")
|
||||
private String createrName;//创建人/发送人
|
||||
|
||||
@ApiModelProperty(value = "发送人部门Sid")
|
||||
private String createDeptSid;//发送人部门Sid
|
||||
|
||||
@ApiModelProperty(value = "发起人部门名称")
|
||||
private String createDeptName;//发起人部门名称
|
||||
|
||||
@ApiModelProperty(value = "消息内容")
|
||||
private String businessSid;//业务Id(扩展字段,与工作相关)
|
||||
|
||||
@ApiModelProperty(value = "目标网页地址")
|
||||
private String url;//目标网页地址
|
||||
|
||||
@ApiModelProperty(value = "消息类别")
|
||||
private String msgType;//消息类别(公文中的发文、收文等、文件传送、工作提醒、超期提醒等)
|
||||
|
||||
@ApiModelProperty(value = "备注")
|
||||
private String remarks;//备注
|
||||
|
||||
@ApiModelProperty(value = "消息sid")
|
||||
private String sid;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
package com.yxt.messagecenter.api.message;
|
||||
|
||||
import com.yxt.common.core.vo.Vo;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class MessageVoOne implements Vo {
|
||||
/**
|
||||
* 消息标题
|
||||
*/
|
||||
@ApiModelProperty(value = "消息标题", required = true)
|
||||
private String msgTitle;
|
||||
/**
|
||||
* 消息内容
|
||||
*/
|
||||
@ApiModelProperty(value = "消息内容", required = true)
|
||||
private String msgContent;
|
||||
|
||||
@ApiModelProperty(value = "来源(资源名称)", required = true)
|
||||
private String msgSource;//来源(资源名称)
|
||||
|
||||
@ApiModelProperty(value = "发送人", required = true)
|
||||
private String createrName;//创建人/发送人
|
||||
|
||||
@ApiModelProperty(value = "发送人sid", required = true)
|
||||
private String createBySid;//创建人/发送人
|
||||
|
||||
@ApiModelProperty(value = "发送人部门Sid", required = true)
|
||||
private String createDeptSid;//发送人部门Sid
|
||||
|
||||
@ApiModelProperty(value = "发起人部门名称", required = true)
|
||||
private String createDeptName;//发起人部门名称
|
||||
|
||||
@ApiModelProperty(value = "消息内容", required = true)
|
||||
private String businessSid;//业务Id(扩展字段,与工作相关)
|
||||
|
||||
@ApiModelProperty(value = "目标网页地址", required = true)
|
||||
private String url;//目标网页地址
|
||||
|
||||
@ApiModelProperty(value = "消息类别", required = true)
|
||||
private String msgType;//消息类别(公文中的发文、收文等、文件传送、工作提醒、超期提醒等)
|
||||
|
||||
private String remarks;//备注
|
||||
|
||||
@ApiModelProperty(value = "接收人sid", required = true)
|
||||
private String receiverId;//接收人sid
|
||||
|
||||
@ApiModelProperty(value = "接收人姓名", required = true)
|
||||
private String receiverName;//接收人姓名
|
||||
@ApiModelProperty(value = "接收人删除状态", required = true)
|
||||
private int rDelStatus;//接收人删除状态
|
||||
@ApiModelProperty(value = "发送人删除状态", required = true)
|
||||
private int sDelStatus;//发送人删除状态
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
package com.yxt.messagecenter.api.message;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.yxt.common.core.vo.Vo;
|
||||
|
||||
@Data
|
||||
@Component
|
||||
public class WorkDidAppVo implements Vo {
|
||||
/**
|
||||
* 任务sid
|
||||
*/
|
||||
@ApiModelProperty(value = "taskSid")
|
||||
private String taskSid;
|
||||
/**
|
||||
* 流程名称
|
||||
*/
|
||||
@ApiModelProperty(value = "流程名称")
|
||||
private String processName;
|
||||
/**
|
||||
* 流程实例sid
|
||||
*/
|
||||
@ApiModelProperty(value = "流程实例sid")
|
||||
private String orderSid;
|
||||
/**
|
||||
* 文件标题
|
||||
*/
|
||||
@ApiModelProperty(value = "文件标题")
|
||||
private String title;
|
||||
|
||||
/**
|
||||
* 任务创建时间
|
||||
*/
|
||||
@ApiModelProperty(value = "任务创建时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
|
||||
private Date createTime;
|
||||
|
||||
|
||||
/**
|
||||
* 发起部门名称
|
||||
*/
|
||||
@ApiModelProperty(value = "发起部门名称")
|
||||
private String createDeptName;
|
||||
/**
|
||||
* 表单sid
|
||||
*/
|
||||
@ApiModelProperty(value = "表单sid")
|
||||
private String formSid;
|
||||
|
||||
@ApiModelProperty(value = "流程sid")
|
||||
private String processSid;
|
||||
/**
|
||||
* 是否可以撤回
|
||||
*/
|
||||
@ApiModelProperty(value = "是否可以撤回(1可以,0不可以)")
|
||||
private int isRecall;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,67 @@
|
||||
package com.yxt.messagecenter.api.message;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.yxt.common.core.vo.Vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author yxt_mtl
|
||||
* @date 2020/10/21 10:37
|
||||
* @description 任务
|
||||
*/
|
||||
@Data
|
||||
@Component
|
||||
public class WorkDoAppVo implements Vo {
|
||||
|
||||
/**
|
||||
* 任务sid
|
||||
*/
|
||||
@ApiModelProperty(value = "taskSid")
|
||||
private String taskSid;
|
||||
/**
|
||||
* 流程名称
|
||||
*/
|
||||
@ApiModelProperty(value = "流程名称")
|
||||
private String processName;
|
||||
/**
|
||||
* 流程实例sid
|
||||
*/
|
||||
@ApiModelProperty(value = "流程实例sid")
|
||||
private String orderSid;
|
||||
/**
|
||||
* 文件标题
|
||||
*/
|
||||
@ApiModelProperty(value = "文件标题")
|
||||
private String title;
|
||||
|
||||
/**
|
||||
* 任务创建时间
|
||||
*/
|
||||
@ApiModelProperty(value = "任务创建时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
|
||||
private Date createTime;
|
||||
|
||||
|
||||
/**
|
||||
* 发起部门名称
|
||||
*/
|
||||
@ApiModelProperty(value = "发起部门名称")
|
||||
private String createDeptName;
|
||||
/**
|
||||
* 表单sid
|
||||
*/
|
||||
@ApiModelProperty(value = "表单sid")
|
||||
private String formSid;
|
||||
|
||||
@ApiModelProperty(value = "流程sid")
|
||||
private String processSid;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
package com.yxt.messagecenter.api.message.user;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
|
||||
import com.yxt.common.core.vo.Vo;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author dimengzhe
|
||||
* @date 2020/10/13 14:23
|
||||
* @description 用印审批新建申请初始化返回数据
|
||||
*/
|
||||
@Data
|
||||
public class userVo implements Vo {
|
||||
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = -4193445652829771684L;
|
||||
@ApiModelProperty(value = "用户sid")
|
||||
private String userSid;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
package com.yxt.messagecenter.api.messagelist;
|
||||
|
||||
import java.sql.Timestamp;
|
||||
import java.util.Date;
|
||||
|
||||
import com.yxt.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
|
||||
|
||||
/**
|
||||
* @author hanweijia
|
||||
* @date 2020/10/13 14:01
|
||||
* @description 印章管理
|
||||
*/
|
||||
@Data
|
||||
public class Messagelist extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 2882078320822565063L;
|
||||
|
||||
private String msgSid;//消息sid
|
||||
private String receiverId;//接收人sid
|
||||
private String receiverName;//接收人姓名
|
||||
private String receiverDeptSid;//接收人部门sid
|
||||
private String receiverDeptName;//接收人部门名称
|
||||
private int rDelStatus;//接收人删除状态
|
||||
private int sDelStatus;//发送人删除状态
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
package com.yxt.messagecenter.api.messagelist;
|
||||
|
||||
import com.yxt.common.core.dto.Dto;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
import java.sql.Timestamp;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @author dimengzhe
|
||||
* @date 2020/10/13 14:10
|
||||
* @description 新建申请dto参数
|
||||
*/
|
||||
@Data
|
||||
public class MessagelistDto implements Dto {
|
||||
private static final long serialVersionUID = -6966619113217517483L;
|
||||
|
||||
@ApiModelProperty(value = "消息sid", required = true)
|
||||
@NotBlank(message = "消息sid不能为空")
|
||||
private String msgSid;//消息sid
|
||||
|
||||
@ApiModelProperty(value = "接收人sid", required = true)
|
||||
@NotBlank(message = "文接收人sid不能为空")
|
||||
private String receiverId;//接收人sid
|
||||
|
||||
@ApiModelProperty(value = "接收人姓名", required = true)
|
||||
@NotBlank(message = "接收人姓名不能为空")
|
||||
private String receiverName;//接收人姓名
|
||||
|
||||
@ApiModelProperty(value = "接收人部门sid", required = true)
|
||||
@NotBlank(message = "接收人部门sid不能为空")
|
||||
private String receiverDeptSid;//接收人部门sid
|
||||
|
||||
@ApiModelProperty(value = "接收人部门名称", required = true)
|
||||
@NotBlank(message = "文件sid不能为空")
|
||||
private String 接收人部门名称;//接收人部门名称
|
||||
|
||||
@ApiModelProperty(value = "接收人删除状态", required = true)
|
||||
@NotBlank(message = "接收人删除状态不能为空")
|
||||
private int rDelStatus;//接收人删除状态
|
||||
|
||||
@ApiModelProperty(value = "发送人删除状态", required = true)
|
||||
@NotBlank(message = "发送人删除状态不能为空")
|
||||
private int sDelStatus;//发送人删除状态
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
package com.yxt.messagecenter.api.messagelist;
|
||||
|
||||
import java.sql.Timestamp;
|
||||
import java.util.Date;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import com.yxt.common.core.vo.Vo;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author dimengzhe
|
||||
* @date 2020/10/13 14:23
|
||||
* @description 用印审批新建申请初始化返回数据
|
||||
*/
|
||||
@Data
|
||||
public class MessagelistOneVo implements Vo {
|
||||
|
||||
private static final long serialVersionUID = 1009503014720454645L;
|
||||
|
||||
@ApiModelProperty(value = "消息sid")
|
||||
private String msgSid;//消息sid
|
||||
|
||||
@ApiModelProperty(value = "接收人sid")
|
||||
private String receiverId;//接收人sid
|
||||
|
||||
@ApiModelProperty(value = "接收人姓名")
|
||||
private String receiverName;//接收人姓名
|
||||
|
||||
@ApiModelProperty(value = "接收人部门sid")
|
||||
private String receiverDeptSid;//接收人部门sid
|
||||
|
||||
@ApiModelProperty(value = "接收人部门名称")
|
||||
private String receiverDeptName;//接收人部门名称
|
||||
|
||||
@ApiModelProperty(value = "接收人删除状态")
|
||||
private int rDelStatus;//接收人删除状态
|
||||
|
||||
@ApiModelProperty(value = "发送人删除状态")
|
||||
private int sDelStatus;//发送人删除状态
|
||||
|
||||
@ApiModelProperty(value = "消息标题")
|
||||
private String msgTitle;//消息标题
|
||||
|
||||
@ApiModelProperty(value = "消息来源")
|
||||
private String msgSource;//消息标题
|
||||
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
package com.yxt.messagecenter.api.messagelist;
|
||||
|
||||
import com.yxt.common.core.query.Query;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author yxt_hwj
|
||||
* @date 2020/10/13 14:10
|
||||
* @description 印章待办工作和已办工作的查询条件
|
||||
*/
|
||||
@Data
|
||||
public class MessagelistQuery implements Query {
|
||||
|
||||
@ApiModelProperty(value = "接收人sid", required =true)
|
||||
private String receiverSid;//接收人姓名
|
||||
|
||||
@ApiModelProperty(value = "文件标题")
|
||||
private String msgTitle;//文件标题
|
||||
|
||||
@ApiModelProperty(value = "消息类别")
|
||||
private String msgType;//消息类别
|
||||
|
||||
@ApiModelProperty(value = "阅读状态")
|
||||
private int state;
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
package com.yxt.messagecenter.api.messagelist;
|
||||
|
||||
import java.sql.Timestamp;
|
||||
import java.util.Date;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import com.yxt.common.core.vo.Vo;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author dimengzhe
|
||||
* @date 2020/10/13 14:23
|
||||
* @description 用印审批新建申请初始化返回数据
|
||||
*/
|
||||
@Data
|
||||
public class MessagelistVo implements Vo {
|
||||
|
||||
|
||||
@ApiModelProperty(value = "消息sid")
|
||||
private String msgSid;//消息sid
|
||||
|
||||
@ApiModelProperty(value = "接收人sid")
|
||||
private String receiverId;//接收人sid
|
||||
|
||||
@ApiModelProperty(value = "接收人姓名")
|
||||
private String receiverName;//接收人姓名
|
||||
|
||||
@ApiModelProperty(value = "接收人部门sid")
|
||||
private String receiverDeptSid;//接收人部门sid
|
||||
|
||||
@ApiModelProperty(value = "接收人部门名称")
|
||||
private String receiverDeptName;//接收人部门名称
|
||||
|
||||
@ApiModelProperty(value = "接收人删除状态")
|
||||
private int rDelStatus;//接收人删除状态
|
||||
|
||||
@ApiModelProperty(value = "发送人删除状态")
|
||||
private int sDelStatus;//发送人删除状态
|
||||
|
||||
@ApiModelProperty(value = "消息标题")
|
||||
private String msgTitle;//消息标题
|
||||
|
||||
@ApiModelProperty(value = "消息来源")
|
||||
private String msgSource;//消息标题
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,100 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>com.yxt</groupId>
|
||||
<artifactId>yxt-parent</artifactId>
|
||||
<version>0.0.1</version>
|
||||
<relativePath/>
|
||||
</parent>
|
||||
|
||||
<groupId>com.yxt.messagecenter</groupId>
|
||||
<artifactId>yxt-single-messagecenter-biz</artifactId>
|
||||
<version>0.0.1</version>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.yxt.messagecenter</groupId>
|
||||
<artifactId>yxt-single-messagecenter-api</artifactId>
|
||||
<version>0.0.1</version>
|
||||
</dependency>
|
||||
|
||||
|
||||
<dependency>
|
||||
<groupId>com.yxt.jlzx</groupId>
|
||||
<artifactId>jlzx-single-oa-api</artifactId>
|
||||
<version>0.0.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.yxt.jlzx</groupId>
|
||||
<artifactId>jlzx-single-jlcyry-api</artifactId>
|
||||
<version>0.0.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.yxt.jlzx</groupId>
|
||||
<artifactId>jlzx-single-system-api</artifactId>
|
||||
<version>0.0.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.yxt.workflow</groupId>
|
||||
<artifactId>yxt-single-workflow-api</artifactId>
|
||||
<version>0.0.1</version>
|
||||
</dependency>
|
||||
|
||||
|
||||
|
||||
|
||||
<dependency>
|
||||
<groupId>com.yxt</groupId>
|
||||
<artifactId>yxt-common-base</artifactId>
|
||||
<version>0.0.1</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>mysql</groupId>
|
||||
<artifactId>mysql-connector-java</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.github.xiaoymin</groupId>
|
||||
<artifactId>knife4j-spring-boot-starter</artifactId>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>repackage</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
<resources>
|
||||
<resource>
|
||||
<directory>src/main/java</directory>
|
||||
<includes>
|
||||
<include>**/*Mapper.xml</include>
|
||||
</includes>
|
||||
</resource>
|
||||
<resource>
|
||||
<directory>src/main/resources</directory>
|
||||
<includes>
|
||||
<include>**/*.yml</include>
|
||||
</includes>
|
||||
<filtering>false</filtering>
|
||||
</resource>
|
||||
</resources>
|
||||
</build>
|
||||
</project>
|
||||
@@ -0,0 +1,28 @@
|
||||
package com.yxt.messagecenter;
|
||||
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
|
||||
import org.springframework.cloud.openfeign.EnableFeignClients;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @author yxt_mtl
|
||||
* @date 2020/10/09 17:54
|
||||
* @description
|
||||
*/
|
||||
@EnableDiscoveryClient
|
||||
@SpringBootApplication(scanBasePackages = {
|
||||
"com.yxt.common.base.config",
|
||||
"com.yxt.messagecenter"
|
||||
})
|
||||
|
||||
@EnableFeignClients(basePackages = {"com.yxt.jlzx.jlcyry","com.yxt.jlzx.system","com.yxt.oa","com.yxt.workflow"})
|
||||
public class MessageCenterApplication
|
||||
{
|
||||
public static void main( String[] args )
|
||||
{
|
||||
SpringApplication.run(MessageCenterApplication.class, args);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,283 @@
|
||||
package com.yxt.messagecenter.biz.message;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import javax.validation.Valid;
|
||||
|
||||
import com.yxt.jlzx.system.api.user.UserInfoVo;
|
||||
import com.yxt.messagecenter.api.message.*;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.yxt.common.base.utils.PagerUtil;
|
||||
import com.yxt.common.core.query.PagerQuery;
|
||||
import com.yxt.common.core.result.ResultBean;
|
||||
import com.yxt.common.core.vo.PagerVo;
|
||||
import com.yxt.jlzx.jlcyry.api.staffinfo.StaffBasicDetailsVo;
|
||||
import com.yxt.jlzx.jlcyry.api.staffinfo.StaffInfoApi;
|
||||
import com.yxt.jlzx.system.api.department.DepartmentApi;
|
||||
import com.yxt.jlzx.system.api.department.QrCodeVo;
|
||||
import com.yxt.jlzx.system.api.user.UserApi;
|
||||
import com.yxt.messagecenter.api.messagelist.Messagelist;
|
||||
import com.yxt.messagecenter.api.messagelist.MessagelistQuery;
|
||||
import com.yxt.messagecenter.api.messagelist.MessagelistVo;
|
||||
import com.yxt.messagecenter.biz.messagelist.MessagelistService;
|
||||
|
||||
import io.swagger.annotations.Api;
|
||||
|
||||
/**
|
||||
* @author hanweijia
|
||||
* @date 2020/9/29 13:30
|
||||
* @description 角色信息
|
||||
*/
|
||||
@Controller
|
||||
@RequestMapping("v1/messages")
|
||||
@Api(tags = "消息列表")
|
||||
public class MessageApiImpl implements MessageApi{
|
||||
@Autowired
|
||||
private MessageService messageService;
|
||||
|
||||
@Autowired
|
||||
private MessagelistService messagelistService;
|
||||
@Autowired
|
||||
private UserApi userApi;
|
||||
|
||||
@Autowired
|
||||
private StaffInfoApi staffInofApi;
|
||||
|
||||
@Autowired
|
||||
private DepartmentApi departmentApi;
|
||||
|
||||
@Override
|
||||
public ResultBean<List<MessageVo>> list(@Valid MessageQuery query) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultBean<PagerVo<MessageVo>> pageList(@Valid PagerQuery<MessageQuery> pagerQuery) {
|
||||
ResultBean<PagerVo<MessageVo>> rb = ResultBean.fireFail();
|
||||
|
||||
IPage<MessageVo> page = messageService.pageList(pagerQuery);
|
||||
|
||||
//把Ipage转换为PageVo
|
||||
PagerVo<MessageVo> pv_result = PagerUtil.pageToVo(page, null);
|
||||
|
||||
return rb.success().setData(pv_result);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public ResultBean<List<MessagelistVo>> selectByMsgSid(String msgSid) {
|
||||
ResultBean<List<MessagelistVo>> rb = ResultBean.fireFail();
|
||||
|
||||
List<MessagelistVo> listVo= messagelistService.selectByMsgSid(msgSid);
|
||||
|
||||
|
||||
return rb.success().setData(listVo);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultBean<PagerVo<MessagelistVo>> reveicepageList(@Valid PagerQuery<MessagelistQuery> pagerQuery) {
|
||||
ResultBean<PagerVo<MessagelistVo>> rb = ResultBean.fireFail();
|
||||
|
||||
IPage<MessagelistVo> page = messagelistService.pageList(pagerQuery);
|
||||
|
||||
//把Ipage转换为PageVo
|
||||
PagerVo<MessagelistVo> pv_result = PagerUtil.pageToVo(page, null);
|
||||
|
||||
return rb.success().setData(pv_result);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultBean save(@Valid MessageDto dto) {
|
||||
Message message=new Message();
|
||||
dto.fillEntity(message);
|
||||
if(dto.getCreateBySid()!=null) {
|
||||
ResultBean<UserInfoVo> bean=userApi.selectBysid(dto.getCreateBySid());
|
||||
UserInfoVo user=null;
|
||||
if(bean.getSuccess()) {
|
||||
user=bean.getData();
|
||||
}
|
||||
if(user!=null&&StringUtils.isNoneBlank(user.getStaffSid())) {
|
||||
StaffBasicDetailsVo staffinfo= staffInofApi.staffBasicDetails(user.getStaffSid()).getData();
|
||||
if(staffinfo!=null){
|
||||
message.setCreaterName(staffinfo.getName());
|
||||
}
|
||||
QrCodeVo qrCodeVo=departmentApi.queryByStaffSid(user.getStaffSid()).getData();
|
||||
if(qrCodeVo!=null) {
|
||||
message.setCreateDeptName(qrCodeVo.getDepartmentName());
|
||||
message.setCreateDeptSid(qrCodeVo.getSid());
|
||||
}
|
||||
}
|
||||
}
|
||||
if(dto.getReceiveSids()!=null&&dto.getReceiveSids().size()>0) {
|
||||
for(int i=0;dto.getReceiveSids().size()>i;i++) {
|
||||
Messagelist messagelist=new Messagelist();
|
||||
ResultBean<UserInfoVo> bean=userApi.selectBysid(dto.getReceiveSids().get(i).getUserSid());
|
||||
UserInfoVo user=null;
|
||||
if(bean.getSuccess()) {
|
||||
user=bean.getData();
|
||||
}
|
||||
if(user!=null&&StringUtils.isNoneBlank(user.getStaffSid())) {
|
||||
StaffBasicDetailsVo staffinfo= staffInofApi.staffBasicDetails(user.getStaffSid()).getData();
|
||||
if(staffinfo!=null){
|
||||
messagelist.setReceiverName(staffinfo.getName());
|
||||
}
|
||||
QrCodeVo qrCodeVo=departmentApi.queryByStaffSid(user.getStaffSid()).getData();
|
||||
if(qrCodeVo!=null) {
|
||||
messagelist. setReceiverDeptSid(qrCodeVo.getSid());
|
||||
messagelist.setReceiverDeptName(qrCodeVo.getDepartmentName());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
messagelist.setReceiverId(dto.getReceiveSids().get(i).getUserSid());
|
||||
messagelist.setState(0);//未读状态
|
||||
messagelist.setCreateTime(message.getCreateTime());
|
||||
messagelist.setMsgSid(message.getSid());
|
||||
messagelistService.save(messagelist);
|
||||
}
|
||||
}else {
|
||||
return ResultBean.fireSuccess().setMsg("保存失败,请选择人员");
|
||||
}
|
||||
|
||||
if(!messageService.save(message)){
|
||||
return ResultBean.fireFail();
|
||||
}
|
||||
return ResultBean.fireSuccess().setData(message.getSid());
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultBean update(@Valid MessageDto dto, String sid) throws Exception {
|
||||
return new ResultBean().setMsg("接口暂未使用");
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultBean delete(String sid) {
|
||||
Message t = messageService.fetchBySid(sid);
|
||||
if (null == t){
|
||||
return ResultBean.fireFail().setMsg("该记录不存在");
|
||||
}
|
||||
t.setIsDelete(1);
|
||||
Boolean b= messageService.updateById(t);
|
||||
if(b) {
|
||||
List<Messagelist> list=messagelistService.fetchByMsgSid(sid);
|
||||
for (int i = 0; i < list.size(); i++) {
|
||||
Messagelist Message=list.get(i);
|
||||
Message.setSDelStatus(1);
|
||||
messagelistService.updateById(Message);
|
||||
}
|
||||
}else {
|
||||
return ResultBean.fireSuccess().setSuccess(b).setMsg("删除失败");
|
||||
}
|
||||
|
||||
return ResultBean.fireSuccess().setSuccess(b).setData(t.getSid()).setMsg("删除成功");
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultBean delSend(String sid) {
|
||||
Messagelist t=messagelistService.fetchBySid(sid);
|
||||
if (null == t){
|
||||
return ResultBean.fireFail().setMsg("该记录不存在");
|
||||
}
|
||||
t.setSDelStatus(1);
|
||||
Boolean b= messagelistService.updateById(t);
|
||||
|
||||
if (!b){
|
||||
return ResultBean.fireSuccess().setSuccess(b).setMsg("删除失败");
|
||||
}
|
||||
return ResultBean.fireSuccess().setSuccess(b).setData(t.getSid()).setMsg("删除成功");
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultBean delReceive(String sid) {
|
||||
Messagelist t=messagelistService.fetchBySid(sid);
|
||||
if (null == t){
|
||||
return ResultBean.fireFail().setMsg("该记录不存在");
|
||||
}
|
||||
t.setRDelStatus(1);
|
||||
Boolean b= messagelistService.updateById(t);
|
||||
|
||||
if (!b){
|
||||
return ResultBean.fireSuccess().setSuccess(b).setMsg("删除失败");
|
||||
}
|
||||
return ResultBean.fireSuccess().setSuccess(b).setData(t.getSid()).setMsg("删除成功");
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultBean<MessageVo> getVo(String sid) {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public ResultBean<MessagelistVo> msgListDtail(String sid) {
|
||||
Messagelist t=messagelistService.fetchBySid(sid);
|
||||
MessagelistVo messagelistVo=messagelistService.selectBySid(sid);
|
||||
if(t.getState()!=1) {
|
||||
t.setModifyTime(new Date());//修改已阅时间
|
||||
t.setState(1);//点击详情 为已阅
|
||||
messagelistService.updateById(t);
|
||||
}
|
||||
return new ResultBean<MessagelistVo>().success().setData(messagelistVo);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultBean<PagerVo<MessageOneVo>> doingreads(@Valid PagerQuery<MessagelistQuery> query) {
|
||||
ResultBean<PagerVo<MessageOneVo>> rb = ResultBean.fireFail();
|
||||
|
||||
|
||||
IPage<MessageOneVo> page = messagelistService.doingreadspageList(query);
|
||||
|
||||
//把Ipage转换为PageVo
|
||||
PagerVo<MessageOneVo> pv_result = PagerUtil.pageToVo(page, null);
|
||||
|
||||
return rb.success().setData(pv_result);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultBean<PagerVo<MessageOneVo>> didreads(@Valid PagerQuery<MessagelistQuery> query) {
|
||||
ResultBean<PagerVo<MessageOneVo>> rb = ResultBean.fireFail();
|
||||
|
||||
|
||||
IPage<MessageOneVo> page = messagelistService.doingreadspageList(query);
|
||||
|
||||
//把Ipage转换为PageVo
|
||||
PagerVo<MessageOneVo> pv_result = PagerUtil.pageToVo(page, null);
|
||||
|
||||
return rb.success().setData(pv_result);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultBean cxjlSave(MessageDtoOne dtoOne) {
|
||||
try {
|
||||
System.out.println("djaskdjklas");
|
||||
Messagelist messagelist = new Messagelist();
|
||||
messagelist.setReceiverId(dtoOne.getReceiverId());
|
||||
messagelist.setReceiverName(dtoOne.getReceiverName());
|
||||
messagelist.setCreateTime(new Date());
|
||||
Message message = new Message();
|
||||
message.setMsgTitle("诚信计量,企业消息");
|
||||
message.setMsgContent(dtoOne.getMsgContent());
|
||||
messageService.save(message);
|
||||
messagelist.setMsgSid(message.getSid());
|
||||
messagelistService.save(messagelist);
|
||||
} catch (Exception e ){
|
||||
return ResultBean.fireSuccess().setMsg("添加失败");
|
||||
}
|
||||
return ResultBean.fireFail().setMsg("添加成功");
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultBean cxjlSelect(String orgSid) {
|
||||
List<MessageVoOne> messageVoOneList = messagelistService.cxjlSelect(orgSid);
|
||||
return new ResultBean().setData(messageVoOneList).success();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
package com.yxt.messagecenter.biz.message;
|
||||
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.Wrapper;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Constants;
|
||||
import com.yxt.messagecenter.api.message.Message;
|
||||
import com.yxt.messagecenter.api.message.MessageQuery;
|
||||
import com.yxt.messagecenter.api.message.MessageVo;
|
||||
|
||||
/**
|
||||
* @author hwj
|
||||
* @date 2020/10/14 14:29
|
||||
* @description
|
||||
*/
|
||||
@Mapper
|
||||
public interface MessageMaper extends BaseMapper<Message> {
|
||||
|
||||
IPage<MessageVo> pageList(IPage<MessageQuery> page, @Param(Constants.WRAPPER) Wrapper<MessageVo> qw);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
<?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.yxt.messagecenter.biz.message.MessageMapper">
|
||||
|
||||
<select id="pageList" resultType="com.yxt.messagecenter.api.message.MessageVo">
|
||||
select * from message
|
||||
${ew.customSqlSegment}
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -0,0 +1,52 @@
|
||||
package com.yxt.messagecenter.biz.message;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.yxt.common.base.service.MybatisBaseService;
|
||||
import com.yxt.common.base.utils.PagerUtil;
|
||||
import com.yxt.common.core.query.PagerQuery;
|
||||
import com.yxt.messagecenter.api.message.Message;
|
||||
import com.yxt.messagecenter.api.message.MessageQuery;
|
||||
import com.yxt.messagecenter.api.message.MessageVo;
|
||||
|
||||
/**
|
||||
* @author dimengzhe
|
||||
* @date 2020/10/14 14:29
|
||||
* @description
|
||||
*/
|
||||
@Service
|
||||
public class MessageService extends MybatisBaseService<MessageMaper, Message> {
|
||||
|
||||
// 分页列表
|
||||
public IPage<MessageVo> pageList(PagerQuery<MessageQuery> pagerQuery) {
|
||||
IPage<MessageQuery> page = PagerUtil.queryToPage(pagerQuery);
|
||||
QueryWrapper<MessageVo> qw = buildQueryWrapper(pagerQuery.getParams());
|
||||
return baseMapper.pageList(page, qw);
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 解析和组装查询条件,封装在qw中,虚方法,需要在子类中定义具体实现
|
||||
* @param pagerQuery
|
||||
* @return
|
||||
*/
|
||||
|
||||
private QueryWrapper<MessageVo> buildQueryWrapper(MessageQuery pagerQuery){
|
||||
QueryWrapper<MessageVo> qw = new QueryWrapper<MessageVo>();
|
||||
if (pagerQuery != null) {
|
||||
if( StringUtils.isNoneBlank(pagerQuery.getCreateBySid())) {
|
||||
qw.eq("createBySid", pagerQuery.getCreateBySid()) ;
|
||||
}
|
||||
qw.eq("isDelete","0");
|
||||
qw.orderByDesc("createTime");
|
||||
}
|
||||
|
||||
return qw;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
package com.yxt.messagecenter.biz.messagelist;
|
||||
import java.util.List;
|
||||
|
||||
import com.yxt.messagecenter.api.message.MessageVoOne;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.Wrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Constants;
|
||||
import com.yxt.messagecenter.api.message.MessageOneVo;
|
||||
import com.yxt.messagecenter.api.messagelist.Messagelist;
|
||||
import com.yxt.messagecenter.api.messagelist.MessagelistQuery;
|
||||
import com.yxt.messagecenter.api.messagelist.MessagelistVo;
|
||||
|
||||
|
||||
/**
|
||||
* @author yxt_mtl
|
||||
* @date 2020/10/12 11:14
|
||||
* @description
|
||||
*/
|
||||
@Mapper
|
||||
public interface MessagelistMapper extends BaseMapper<Messagelist>{
|
||||
//分页列表
|
||||
IPage<MessagelistVo> pageList(IPage<MessagelistQuery> page,@Param(Constants.WRAPPER) Wrapper<MessagelistVo> qw);
|
||||
|
||||
MessagelistVo selectBySid(String msgSid);
|
||||
|
||||
|
||||
List<MessagelistVo> selectByMsgSid(String msgSid);
|
||||
|
||||
List<Messagelist> fetchByMsgSid(String msgSid);
|
||||
|
||||
IPage<MessageOneVo> doingreadspageList(IPage<MessagelistQuery> page,@Param(Constants.WRAPPER) Wrapper<MessageOneVo> qw );
|
||||
IPage<MessageOneVo> didreadspageList(IPage<MessagelistQuery> page, @Param(Constants.WRAPPER) Wrapper<MessageOneVo> qw);
|
||||
|
||||
List<MessageVoOne> cxjlSelect(@Param("orgSid") String orgSid);
|
||||
}
|
||||
@@ -0,0 +1,56 @@
|
||||
<?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.yxt.messagecenter.biz.messagelist.MessagelistMapper">
|
||||
<select id="pageList" resultType="com.yxt.messagecenter.api.messagelist.MessagelistVo">
|
||||
select (select msgTitle from message where sid=r.msgSid)msgTitle,
|
||||
(select createrName from message where sid=r.msgSid) sendName,r.receiverId,r.receiverName,
|
||||
r.receiverDeptSid,r.receiverDeptName,
|
||||
DATE_FORMAT(r.modifyTime, '%Y-%m-%d %H:%m:%s') AS modifyTime ,r.sid, case when r.state=1 then "已阅" else "未阅" end from messagelist r
|
||||
${ew.customSqlSegment}
|
||||
</select>
|
||||
|
||||
<select id="doingreadspageList" resultType="com.yxt.messagecenter.api.message.MessageOneVo">
|
||||
select (select msgTitle from message where sid=r.msgSid)msgTitle,
|
||||
(select createrName from message where sid=r.msgSid) sendName,r.receiverId,r.receiverName,
|
||||
r.receiverDeptSid,r.receiverDeptName,
|
||||
DATE_FORMAT(r.modifyTime, '%Y-%m-%d %H:%m:%s') AS modifyTime from messagelist r
|
||||
${ew.customSqlSegment}
|
||||
</select>
|
||||
|
||||
<select id="didreadspageList" resultType="com.yxt.messagecenter.api.message.MessageOneVo">
|
||||
select (select msgTitle from message where sid=r.msgSid)msgTitle,
|
||||
(select createrName from message where sid=r.msgSid) sendName,r.receiverId,r.receiverName,
|
||||
r.receiverDeptSid,r.receiverDeptName,
|
||||
DATE_FORMAT(r.modifyTime, '%Y-%m-%d %H:%m:%s') AS modifyTime from messagelist r
|
||||
${ew.customSqlSegment}
|
||||
</select>
|
||||
|
||||
|
||||
<select id="selectBySid" resultType="com.yxt.messagecenter.api.messagelist.MessagelistVo">
|
||||
select (select msgTitle from message where sid=r.msgSid)msgTitle,
|
||||
(select createrName from message where sid=r.msgSid) sendName,r.receiverId,r.receiverName,
|
||||
r.receiverDeptSid,r.receiverDeptName,
|
||||
DATE_FORMAT(r.modifyTime, '%Y-%m-%d %H:%m:%s') AS modifyTime ,r.sid, case when r.state=1 then "已阅" else "未阅" end from messagelist r
|
||||
where sid=#{sid}
|
||||
</select>
|
||||
|
||||
|
||||
<select id="fetchByMsgSid" resultType="com.yxt.messagecenter.api.messagelist.Messagelist">
|
||||
select * from messagelist
|
||||
where msgSid=#{msgSid}
|
||||
</select>
|
||||
|
||||
|
||||
<select id="selectByMsgSid" resultType="com.yxt.messagecenter.api.messagelist.MessagelistVo">
|
||||
select (select msgTitle from message where sid=r.msgSid)msgTitle,
|
||||
(select createrName from message where sid=r.msgSid) sendName,r.receiverId,r.receiverName,
|
||||
r.receiverDeptSid,r.receiverDeptName,
|
||||
DATE_FORMAT(r.modifyTime, '%Y-%m-%d %H:%m:%s') AS modifyTime ,r.sid, case when r.state=1 then "已阅" else "未阅" end from messagelist r
|
||||
where msgSid=#{msgSid}
|
||||
</select>
|
||||
<select id="cxjlSelect" resultType="com.yxt.messagecenter.api.message.MessageVoOne">
|
||||
SELECT * from messagelist f INNER JOIN message m on m.sid = f.msgSid WHERE receiverId = #{orgSid}
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,135 @@
|
||||
package com.yxt.messagecenter.biz.messagelist;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import javax.validation.Valid;
|
||||
|
||||
import com.yxt.messagecenter.api.message.MessageVoOne;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.yxt.common.base.service.MybatisBaseService;
|
||||
import com.yxt.common.base.utils.PagerUtil;
|
||||
import com.yxt.common.core.query.PagerQuery;
|
||||
import com.yxt.messagecenter.api.message.MessageOneVo;
|
||||
import com.yxt.messagecenter.api.message.MessageQuery;
|
||||
import com.yxt.messagecenter.api.message.MessageVo;
|
||||
import com.yxt.messagecenter.api.messagelist.Messagelist;
|
||||
import com.yxt.messagecenter.api.messagelist.MessagelistQuery;
|
||||
import com.yxt.messagecenter.api.messagelist.MessagelistVo;
|
||||
|
||||
/**
|
||||
* @author yxt_mtl
|
||||
* @date 2020/10/12 11:12
|
||||
* @description
|
||||
*/
|
||||
@Service
|
||||
public class MessagelistService extends MybatisBaseService<MessagelistMapper, Messagelist> {
|
||||
// 分页列表
|
||||
public IPage<MessagelistVo> pageList(PagerQuery<MessagelistQuery> pagerQuery) {
|
||||
IPage<MessagelistQuery> page = PagerUtil.queryToPage(pagerQuery);
|
||||
QueryWrapper<MessagelistVo> qw = buildQueryWrapper(pagerQuery.getParams());
|
||||
|
||||
return baseMapper.pageList(page, qw);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 解析和组装查询条件,封装在qw中
|
||||
*
|
||||
* @param pagerQuery
|
||||
* @return
|
||||
*/
|
||||
private QueryWrapper<MessagelistVo> buildQueryWrapper(MessagelistQuery pagerQuery) {
|
||||
QueryWrapper<MessagelistVo> qw = new QueryWrapper<>();
|
||||
if (pagerQuery != null) {
|
||||
// if (org.apache.commons.lang3.StringUtils.isNotBlank(pagerQuery.getTitle()))
|
||||
// qw.like("title", pagerQuery.getTitle());
|
||||
//
|
||||
// if (org.apache.commons.lang3.StringUtils.isNotBlank(pagerQuery.getSenderName()))
|
||||
// qw.like("senderName", pagerQuery.getSenderName());
|
||||
//
|
||||
// if (null!=pagerQuery.getStartDate() && org.apache.commons.lang3.StringUtils.isNotBlank(pagerQuery
|
||||
// .getStartDate().toString()))
|
||||
// qw.ge("sendTime", pagerQuery.getStartDate());
|
||||
//
|
||||
// if (null!=pagerQuery.getEndDate() && org.apache.commons.lang3.StringUtils.isNotBlank(pagerQuery
|
||||
// .getEndDate().toString()))
|
||||
// qw.le("sendTime", pagerQuery.getEndDate());
|
||||
if (org.apache.commons.lang3.StringUtils.isNotBlank(pagerQuery.getReceiverSid()))
|
||||
qw.eq("receiverId", pagerQuery.getReceiverSid());
|
||||
|
||||
|
||||
qw.orderByDesc("createTime");
|
||||
}
|
||||
|
||||
return qw;
|
||||
|
||||
}
|
||||
|
||||
|
||||
//待阅
|
||||
public IPage<MessageOneVo> doingreadspageList(@Valid PagerQuery<MessagelistQuery> query) {
|
||||
// TODO Auto-generated method stub
|
||||
query.getParams().setState(0);
|
||||
IPage<MessagelistQuery> page = PagerUtil.queryToPage(query);
|
||||
QueryWrapper<MessageOneVo> qw = buildQueryWrapper1(query.getParams());
|
||||
|
||||
return baseMapper.doingreadspageList(page, qw);
|
||||
}
|
||||
//已阅
|
||||
public IPage<MessageOneVo> didreadspageList(@Valid PagerQuery<MessagelistQuery> query) {
|
||||
// TODO Auto-generated method stub
|
||||
query.getParams().setState(1);
|
||||
IPage<MessagelistQuery> page = PagerUtil.queryToPage(query);
|
||||
QueryWrapper<MessageOneVo> qw = buildQueryWrapper1(query.getParams());
|
||||
|
||||
return baseMapper.didreadspageList(page, qw);
|
||||
}
|
||||
|
||||
|
||||
private QueryWrapper<MessageOneVo> buildQueryWrapper1(MessagelistQuery pagerQuery) {
|
||||
QueryWrapper<MessageOneVo> qw = new QueryWrapper<>();
|
||||
if (pagerQuery != null) {
|
||||
if (org.apache.commons.lang3.StringUtils.isNotBlank(pagerQuery.getReceiverSid()))
|
||||
qw.eq("r.receiverId", pagerQuery.getReceiverSid());
|
||||
|
||||
if (org.apache.commons.lang3.StringUtils.isNotBlank(pagerQuery.getMsgTitle()))
|
||||
qw.like("m.msgTile", pagerQuery.getMsgTitle());
|
||||
|
||||
if (org.apache.commons.lang3.StringUtils.isNotBlank(pagerQuery.getMsgType()))
|
||||
qw.eq("m.msgType", pagerQuery.getMsgType());
|
||||
|
||||
qw.eq("r.state", pagerQuery.getState());
|
||||
qw.eq("rDelStatus","0");
|
||||
|
||||
qw.orderByDesc("createTime");
|
||||
}
|
||||
|
||||
return qw;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
public List<Messagelist> fetchByMsgSid(String msgSid) {
|
||||
// TODO Auto-generated method stub
|
||||
return baseMapper.fetchByMsgSid(msgSid);
|
||||
}
|
||||
|
||||
|
||||
public List<MessagelistVo> selectByMsgSid(String msgSid) {
|
||||
// TODO Auto-generated method stub
|
||||
return baseMapper.selectByMsgSid(msgSid);
|
||||
}
|
||||
|
||||
public MessagelistVo selectBySid(String msgSid) {
|
||||
// TODO Auto-generated method stub
|
||||
return baseMapper.selectBySid(msgSid);
|
||||
}
|
||||
|
||||
public List<MessageVoOne> cxjlSelect(String orgSid) {
|
||||
return baseMapper.cxjlSelect(orgSid);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,70 @@
|
||||
/*********************************************************
|
||||
*********************************************************
|
||||
******************** *******************
|
||||
************* ************
|
||||
******* _oo0oo_ *******
|
||||
*** o8888888o ***
|
||||
* 88" . "88 *
|
||||
* (| -_- |) *
|
||||
* 0\ = /0 *
|
||||
* ___/`---'\___ *
|
||||
* .' \\| |// '. *
|
||||
* / \\||| : |||// \ *
|
||||
* / _||||| -:- |||||- \ *
|
||||
* | | \\\ - /// | | *
|
||||
* | \_| ''\---/'' |_/ | *
|
||||
* \ .-\__ '-' ___/-. / *
|
||||
* ___'. .' /--.--\ `. .'___ *
|
||||
* ."" '< `.___\_<|>_/___.' >' "". *
|
||||
* | | : `- \`.;`\ _ /`;.`/ - ` : | | *
|
||||
* \ \ `_. \_ __\ /__ _/ .-` / / *
|
||||
* =====`-.____`.___ \_____/___.-`___.-'===== *
|
||||
* `=---=' *
|
||||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *
|
||||
*********__佛祖保佑__永无BUG__验收通过__钞票多多__*********
|
||||
*********************************************************/
|
||||
package com.yxt.messagecenter.conf;
|
||||
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
import springfox.documentation.builders.ApiInfoBuilder;
|
||||
import springfox.documentation.builders.PathSelectors;
|
||||
import springfox.documentation.builders.RequestHandlerSelectors;
|
||||
import springfox.documentation.service.ApiInfo;
|
||||
import springfox.documentation.spi.DocumentationType;
|
||||
import springfox.documentation.spring.web.plugins.Docket;
|
||||
import springfox.documentation.swagger2.annotations.EnableSwagger2;
|
||||
|
||||
import com.github.xiaoymin.knife4j.spring.annotations.EnableKnife4j;
|
||||
|
||||
/**
|
||||
* Project: jlcyry <br/>
|
||||
* File: Swagger2Config.java <br/>
|
||||
* Class: com.yxt.jlzx.jlcyry.conf.Swagger2Config <br/>
|
||||
* Description: <描述类的功能>. <br/>
|
||||
* Copyright: Copyright (c) 2011 <br/>
|
||||
* Company: https://gitee.com/liuzp315 <br/>
|
||||
* Makedate: 2020/8/25 23:27 <br/>
|
||||
*
|
||||
* @author liupopo
|
||||
* @version 1.0
|
||||
* @since 1.0
|
||||
*/
|
||||
@Configuration
|
||||
@EnableSwagger2
|
||||
@EnableKnife4j
|
||||
public class Swagger2Config {
|
||||
@Bean
|
||||
public Docket createRestApi() {
|
||||
return new Docket(DocumentationType.SWAGGER_2)
|
||||
.apiInfo(apiInfo()).select()
|
||||
.apis(RequestHandlerSelectors.basePackage("com.yxt"))
|
||||
.paths(PathSelectors.any()).build();
|
||||
}
|
||||
|
||||
private ApiInfo apiInfo() {
|
||||
return new ApiInfoBuilder().title("计量中心/消息中心").description("计量中心消息中心").version("1.0")
|
||||
.build();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
spring:
|
||||
datasource:
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
url: jdbc:mysql://127.0.0.1:3306/jlzx_messagecenter?useUnicode=true&characterEncoding=UTF-8&useSSL=false&autoReconnect=true&serverTimezone=GMT%2B8&failOverReadOnly=false
|
||||
username: root
|
||||
password: root
|
||||
redis:
|
||||
database: 6 # Redis数据库索引(默认为0)
|
||||
host: 127.0.0.1
|
||||
jedis:
|
||||
pool:
|
||||
max-active: -1 #连接池最大连接数(使用负值表示没有限制)
|
||||
max-idle: 8 #连接池中的最大空闲连接
|
||||
max-wait: -1 # 连接池最大阻塞等待时间(使用负值表示没有限制)
|
||||
min-idle: 0 # 连接池中的最小空闲连接
|
||||
password:
|
||||
port: 6379
|
||||
timeout: 0 # 连接超时时间(毫秒)
|
||||
nacos:
|
||||
discovery:
|
||||
server-addr: 127.0.0.1:8848
|
||||
|
||||
# 日志配置
|
||||
logging:
|
||||
level:
|
||||
com.yxt: debug
|
||||
org.mybatis: debug
|
||||
org.springframework: warn
|
||||
|
||||
image:
|
||||
upload:
|
||||
#path: /Users/popo/works/projects/hbuilderx/gg815/gg_admin/target/classes/static/upload/
|
||||
#path: D:\\works\\projects\\hbuilderx\\gg815\\gg_admin\\target\\classes\\static\\upload\\
|
||||
#path: /home/lzh/webapps/hbhx_kzdapi/BOOT-INF/classes/static/img/
|
||||
path: D:\\jlzx\\upload\\
|
||||
url:
|
||||
prefix: http://127.0.0.1:8111/upload/
|
||||
#prefix: http://211.90.39.140:8008/
|
||||
#prefix: http://b92.bwyljy.com/img/
|
||||
#prefix: http://192.168.0.119:8089/lv-qggz-state-ww/img/
|
||||
@@ -0,0 +1,34 @@
|
||||
spring:
|
||||
datasource:
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
url: jdbc:mysql://39.104.142.92:3306/jlzx_messagecenter?useUnicode=true&characterEncoding=UTF-8&useSSL=false&autoReconnect=true&serverTimezone=GMT%2B8&failOverReadOnly=false
|
||||
username: root
|
||||
password: 123456
|
||||
nacos:
|
||||
discovery:
|
||||
server-addr: 39.104.100.138:8848
|
||||
redis:
|
||||
database: 2 # Redis数据库索引(默认为0)
|
||||
host: 39.104.100.138
|
||||
jedis:
|
||||
pool:
|
||||
max-active: -1 #连接池最大连接数(使用负值表示没有限制)
|
||||
max-idle: 8 #连接池中的最大空闲连接
|
||||
max-wait: -1 # 连接池最大阻塞等待时间(使用负值表示没有限制)
|
||||
min-idle: 0 # 连接池中的最小空闲连接
|
||||
password: 123456
|
||||
port: 6379
|
||||
timeout: 0 # 连接超时时间(毫秒)
|
||||
|
||||
# 日志配置
|
||||
logging:
|
||||
level:
|
||||
com.yxt: debug
|
||||
org.mybatis: debug
|
||||
org.springframework: warn
|
||||
|
||||
image:
|
||||
upload:
|
||||
path: D:\\jlzx\\upload\\
|
||||
url:
|
||||
prefix: http://39.104.100.138:8111/upload/
|
||||
@@ -0,0 +1,36 @@
|
||||
spring:
|
||||
datasource:
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
url: jdbc:mysql://192.168.103.6:3306/jlzx_messagecenter?useUnicode=true&characterEncoding=UTF-8&useSSL=false&autoReconnect=true&serverTimezone=GMT%2B8&failOverReadOnly=false
|
||||
username: root
|
||||
password: yxt_@jlzx_root
|
||||
cloud:
|
||||
nacos:
|
||||
discovery:
|
||||
server-addr: 192.168.103.6:8848
|
||||
redis:
|
||||
database: 2 # Redis数据库索引(默认为0)
|
||||
host: 192.168.103.6
|
||||
jedis:
|
||||
pool:
|
||||
max-active: -1 #连接池最大连接数(使用负值表示没有限制)
|
||||
max-idle: 8 #连接池中的最大空闲连接
|
||||
max-wait: -1 # 连接池最大阻塞等待时间(使用负值表示没有限制)
|
||||
min-idle: 0 # 连接池中的最小空闲连接
|
||||
password: 123456
|
||||
port: 6379
|
||||
timeout: 0 # 连接超时时间(毫秒)
|
||||
|
||||
# 日志配置
|
||||
logging:
|
||||
level:
|
||||
com.yxt: debug
|
||||
org.mybatis: debug
|
||||
org.springframework: warn
|
||||
|
||||
image:
|
||||
upload:
|
||||
path: E:\jlzx\upload\
|
||||
url:
|
||||
# prefix: http://192.168.103.6:8111/upload/
|
||||
prefix: http://jlyw1.hebjlzy.com:8111/upload/
|
||||
@@ -0,0 +1,36 @@
|
||||
spring:
|
||||
datasource:
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
url: jdbc:mysql://192.168.103.5:3306/jlzx_messagecenter?useUnicode=true&characterEncoding=UTF-8&useSSL=false&autoReconnect=true&serverTimezone=GMT%2B8&failOverReadOnly=false
|
||||
username: root
|
||||
password: 1LAiGz$t1*Iw
|
||||
cloud:
|
||||
nacos:
|
||||
discovery:
|
||||
server-addr: 127.0.0.1:8848
|
||||
redis:
|
||||
database: 2 # Redis数据库索引(默认为0)
|
||||
host: 127.0.0.1
|
||||
jedis:
|
||||
pool:
|
||||
max-active: -1 #连接池最大连接数(使用负值表示没有限制)
|
||||
max-idle: 8 #连接池中的最大空闲连接
|
||||
max-wait: -1 # 连接池最大阻塞等待时间(使用负值表示没有限制)
|
||||
min-idle: 0 # 连接池中的最小空闲连接
|
||||
password:
|
||||
port: 6379
|
||||
timeout: 0 # 连接超时时间(毫秒)
|
||||
|
||||
# 日志配置
|
||||
logging:
|
||||
level:
|
||||
com.yxt: debug
|
||||
org.mybatis: debug
|
||||
org.springframework: warn
|
||||
|
||||
image:
|
||||
upload:
|
||||
path: D:\jlzx\upload\
|
||||
url:
|
||||
# prefix: http://192.168.103.6:8111/upload/
|
||||
prefix: http://218.11.12.36:8111/upload/
|
||||
@@ -0,0 +1,24 @@
|
||||
spring:
|
||||
datasource:
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
url: jdbc:mysql://127.0.0.1:3306/jlzx_messagecenter?useUnicode=true&characterEncoding=UTF-8&useSSL=false&autoReconnect=true&serverTimezone=GMT%2B8&failOverReadOnly=false
|
||||
username: root
|
||||
password: root
|
||||
|
||||
# 日志配置
|
||||
logging:
|
||||
level:
|
||||
com.yxt: debug
|
||||
org.mybatis: debug
|
||||
org.springframework: warn
|
||||
|
||||
image:
|
||||
upload:
|
||||
#path: /Users/popo/works/projects/hbuilderx/gg815/gg_admin/target/classes/static/upload/
|
||||
path: D:\\works\\projects\\hbuilderx\\gg815\\gg_admin\\target\\classes\\static\\upload\\
|
||||
#path: /home/lzh/webapps/hbhx_kzdapi/BOOT-INF/classes/static/img/
|
||||
url:
|
||||
prefix: http://192.168.56.1:8108/upload/
|
||||
#prefix: http://211.90.39.140:8008/
|
||||
#prefix: http://b92.bwyljy.com/img/
|
||||
#prefix: http://192.168.0.119:8089/lv-qggz-state-ww/img/
|
||||
@@ -0,0 +1,48 @@
|
||||
spring:
|
||||
application:
|
||||
name: yxt-messagecenter
|
||||
profiles:
|
||||
active: dev
|
||||
# 资源信息
|
||||
messages:
|
||||
# 国际化资源文件路径
|
||||
basename: i18n/messages
|
||||
servlet:
|
||||
multipart:
|
||||
max-file-size: 50MB
|
||||
max-request-size: 100MB
|
||||
output:
|
||||
ansi:
|
||||
enabled: ALWAYS
|
||||
|
||||
server:
|
||||
port: 8107
|
||||
|
||||
#mybatis
|
||||
mybatis-plus:
|
||||
mapper-locations: classpath*:**Mapper.xml
|
||||
global-config:
|
||||
refresh: true
|
||||
db-config:
|
||||
id-type: 0
|
||||
db-type: mysql
|
||||
configuration:
|
||||
map-underscore-to-camel-case: false
|
||||
cache-enabled: true
|
||||
call-setters-on-nulls: true
|
||||
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
|
||||
|
||||
#hystrix的超时时间
|
||||
hystrix:
|
||||
command:
|
||||
default:
|
||||
execution:
|
||||
timeout:
|
||||
enabled: true
|
||||
isolation:
|
||||
thread:
|
||||
timeoutInMilliseconds: 30000
|
||||
#ribbon的超时时间
|
||||
ribbon:
|
||||
ReadTimeout: 30000
|
||||
ConnectTimeout: 30000
|
||||
@@ -0,0 +1,49 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<configuration>
|
||||
|
||||
<property name="log.base" value="logs/yxt_messagecenter" />
|
||||
|
||||
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
|
||||
<encoder>
|
||||
<!--格式化输出:%d表示日期,%thread表示线程名,%-5level:级别从左显示5个字符宽度%msg:日志消息,%n是换行符 :
|
||||
|%blue(%thread) 线程 如 :DiscoveryClient-CacheRefreshExecutor-0-->
|
||||
<!--<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>-->
|
||||
<pattern>%yellow(%date{yyyy-MM-dd HH:mm:ss}) |%highlight(%-5level) |%green(%logger:%line) |%black(%msg%n)</pattern>
|
||||
<!--<charset>UTF-8</charset> -->
|
||||
</encoder>
|
||||
</appender>
|
||||
|
||||
<!-- 彩色日志 -->
|
||||
<!-- 彩色日志依赖的渲染类 -->
|
||||
<conversionRule conversionWord="clr" converterClass="org.springframework.boot.logging.logback.ColorConverter" />
|
||||
<conversionRule conversionWord="wex" converterClass="org.springframework.boot.logging.logback.WhitespaceThrowableProxyConverter" />
|
||||
<conversionRule conversionWord="wEx" converterClass="org.springframework.boot.logging.logback.ExtendedWhitespaceThrowableProxyConverter" />
|
||||
<!-- 彩色日志格式 -->
|
||||
<property name="CONSOLE_LOG_PATTERN" value="${CONSOLE_LOG_PATTERN:-%clr(%d{yyyy-MM-dd HH:mm:ss.SSS}){faint} %clr(${LOG_LEVEL_PATTERN:-%5p}) %clr(${PID:- }){magenta} %clr(---){faint} %clr([%15.15t]){faint} %clr(%-40.40logger{39}){cyan} %clr(:){faint} %m%n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx}}"/>
|
||||
|
||||
<appender name="FILEOUT"
|
||||
class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<file>${log.base}.log</file>
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||
<fileNamePattern>${log.base}.%d{yyyyMMdd}.%i.log.zip
|
||||
</fileNamePattern>
|
||||
<!-- 当文件大小超过10MB时触发滚动 -->
|
||||
<timeBasedFileNamingAndTriggeringPolicy
|
||||
class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
|
||||
<maxFileSize>1MB</maxFileSize>
|
||||
</timeBasedFileNamingAndTriggeringPolicy>
|
||||
</rollingPolicy>
|
||||
<encoder>
|
||||
<!--<pattern>%date [%thread] %-5level %logger{35} - %msg%n</pattern>-->
|
||||
<Pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{36}
|
||||
-%msg%n</Pattern>
|
||||
<!--<charset>UTF-8</charset> -->
|
||||
</encoder>
|
||||
</appender>
|
||||
|
||||
<root level="INFO">
|
||||
<appender-ref ref="STDOUT" />
|
||||
<appender-ref ref="FILEOUT" />
|
||||
</root>
|
||||
|
||||
</configuration>
|
||||
Reference in New Issue
Block a user