增加消息推送,修复钉钉部门同步bug
This commit is contained in:
parent
9e4df93647
commit
06a715e157
52
src/main/java/com/lz/common/emun/WorkMsgTypeEnum.java
Normal file
52
src/main/java/com/lz/common/emun/WorkMsgTypeEnum.java
Normal file
@ -0,0 +1,52 @@
|
||||
package com.lz.common.emun;
|
||||
|
||||
import javax.security.auth.message.AuthStatus;
|
||||
|
||||
/**
|
||||
* 业绩通知相关type
|
||||
*/
|
||||
public enum WorkMsgTypeEnum {
|
||||
//业绩提交审核的通知(自己提交给领导,自己提交给人事,人事提交给老板)
|
||||
SUBMIT(0, "业绩提交", "去审核", "# 业绩提交\n ## @的业绩已经提交"),
|
||||
//业绩打回审核的通知
|
||||
REJECT(1, "业绩驳回", "去修改", "# 业绩驳回\n ## 你的业绩已经驳回"),
|
||||
//业绩通过领导审核的通知,这一步提交到HR,提交的type
|
||||
LEADER_PASS(2, "业绩已打分", "去提交给人事", "# 业绩已打分\n ## 你的业绩已经打分"),
|
||||
//业绩通过人事,老板审核的最终审核通知
|
||||
PASS(3, "业绩通过", "去查看", "# 业绩通过\n ## 你的业绩已经通过"),;
|
||||
int type;
|
||||
String title;
|
||||
String btnText;
|
||||
String content;
|
||||
WorkMsgTypeEnum(int type, String title, String btnText, String content){
|
||||
this.type = type;
|
||||
this.title = title;
|
||||
this.btnText = btnText;
|
||||
this.content = content;
|
||||
}
|
||||
|
||||
public static WorkMsgTypeEnum findRoleTypeByCode(int code) {
|
||||
for (WorkMsgTypeEnum workMsgTypeEnum : WorkMsgTypeEnum.values()) {
|
||||
if (workMsgTypeEnum.getType() == code) {
|
||||
return workMsgTypeEnum;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public int getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public String getTitle() {
|
||||
return title;
|
||||
}
|
||||
|
||||
public String getBtnText() {
|
||||
return btnText;
|
||||
}
|
||||
|
||||
public String getContent() {
|
||||
return content;
|
||||
}
|
||||
}
|
||||
@ -7,10 +7,13 @@ import com.dingtalk.api.DefaultDingTalkClient;
|
||||
import com.dingtalk.api.DingTalkClient;
|
||||
import com.dingtalk.api.request.*;
|
||||
import com.dingtalk.api.response.*;
|
||||
import com.lz.modules.app.entity.StaffEntity;
|
||||
import com.lz.modules.job.model.responseBo.DepartmentInfosBo;
|
||||
import com.lz.modules.job.model.responseBo.DepartmentStaffBo;
|
||||
import com.lz.modules.third.entity.ThirdAppConfig;
|
||||
import com.lz.modules.third.entity.ThirdMsgSendRecord;
|
||||
import com.lz.modules.third.service.ThirdAppConfigService;
|
||||
import com.lz.modules.third.service.ThirdMsgSendRecordService;
|
||||
import com.lz.modules.third.service.impl.ThirdAppConfigServiceImpl;
|
||||
import com.taobao.api.ApiException;
|
||||
import org.apache.http.HttpEntity;
|
||||
@ -56,6 +59,9 @@ public class DingTalkUtil {
|
||||
@Autowired
|
||||
ThirdAppConfigService thirdAppConfigService;
|
||||
|
||||
@Autowired
|
||||
ThirdMsgSendRecordService thirdMsgSendRecordService;
|
||||
|
||||
|
||||
|
||||
CloseableHttpClient getHttpClient(){
|
||||
@ -179,13 +185,14 @@ public class DingTalkUtil {
|
||||
departmentStaffBo.setEmail(json.getString("email"));//邮箱,钉钉的企业邮箱才可以,需要单独授权手机权限
|
||||
departmentStaffBo.setAvatar(json.getString("avatar"));//头像
|
||||
departmentStaffBo.setPosition(json.getString("position"));
|
||||
if(json.getBoolean("active")){
|
||||
departmentStaffBo.setStatus(0);
|
||||
/*if(json.getBoolean("active")){
|
||||
//在职已激活
|
||||
departmentStaffBo.setStatus(0);
|
||||
}else{
|
||||
//在职未激活
|
||||
departmentStaffBo.setStatus(4);
|
||||
}
|
||||
}*/
|
||||
if(json.getBoolean("isLeader")){
|
||||
departmentStaffBo.setIsLeader(1);
|
||||
|
||||
@ -245,5 +252,53 @@ public class DingTalkUtil {
|
||||
}
|
||||
|
||||
|
||||
public String sendSingleActionCardMSG(String appid, StaffEntity staff, String title, String marDown, String singleTitle, String singleUrl, String token) {
|
||||
String msg = "OK";
|
||||
|
||||
ThirdMsgSendRecord thirdMsgSendRecord = new ThirdMsgSendRecord();
|
||||
thirdMsgSendRecord.setMsgType("action_card");
|
||||
thirdMsgSendRecord.setStaffId(staff.getId());
|
||||
thirdMsgSendRecord.setMsgTitle(singleTitle);
|
||||
thirdMsgSendRecord.setAppId(Long.parseLong(appid));
|
||||
thirdMsgSendRecord.setHeadText(title);
|
||||
thirdMsgSendRecord.setMsgContent(marDown);
|
||||
thirdMsgSendRecord.setMsgUrl(singleUrl);
|
||||
thirdMsgSendRecord.setStatus(0);
|
||||
try{
|
||||
DingTalkClient client = new DefaultDingTalkClient("https://oapi.dingtalk.com/topapi/message/corpconversation/asyncsend_v2");
|
||||
OapiMessageCorpconversationAsyncsendV2Request req = new OapiMessageCorpconversationAsyncsendV2Request();
|
||||
req.setAgentId(thirdMsgSendRecord.getAppId());
|
||||
req.setUseridList(staff.getEmployeeId());
|
||||
OapiMessageCorpconversationAsyncsendV2Request.Msg obj1 = new OapiMessageCorpconversationAsyncsendV2Request.Msg();
|
||||
obj1.setMsgtype(thirdMsgSendRecord.getMsgType());
|
||||
OapiMessageCorpconversationAsyncsendV2Request.ActionCard obj2 = new OapiMessageCorpconversationAsyncsendV2Request.ActionCard();
|
||||
obj2.setSingleUrl(thirdMsgSendRecord.getMsgUrl());
|
||||
obj2.setSingleTitle(thirdMsgSendRecord.getMsgTitle());
|
||||
obj2.setMarkdown(thirdMsgSendRecord.getMsgContent());
|
||||
obj2.setTitle(thirdMsgSendRecord.getHeadText());
|
||||
obj1.setActionCard(obj2);
|
||||
req.setMsg(obj1);
|
||||
OapiMessageCorpconversationAsyncsendV2Response rsp = client.execute(req, token);
|
||||
//插入数据库
|
||||
JSONObject json = JSONObject.parseObject(rsp.getBody());
|
||||
if(json.getIntValue("errcode") == 0){
|
||||
thirdMsgSendRecord.setTaskId(json.getLong("task_id"));
|
||||
thirdMsgSendRecord.setStatus(1);
|
||||
}else{
|
||||
thirdMsgSendRecord.setTaskId(0L);
|
||||
thirdMsgSendRecord.setStatus(6);
|
||||
thirdMsgSendRecord.setRemark(json.getString("errmsg"));
|
||||
msg = thirdMsgSendRecord.getRemark();
|
||||
}
|
||||
|
||||
}catch (ApiException e) {
|
||||
e.printStackTrace();
|
||||
thirdMsgSendRecord.setStatus(6);
|
||||
thirdMsgSendRecord.setRemark(e.getErrMsg());
|
||||
msg = thirdMsgSendRecord.getRemark();
|
||||
|
||||
}
|
||||
thirdMsgSendRecordService.insert(thirdMsgSendRecord);
|
||||
return msg;
|
||||
}
|
||||
}
|
||||
|
||||
@ -109,6 +109,10 @@ public class StaffEntity implements Serializable {
|
||||
* 工号
|
||||
*/
|
||||
private String jobNumber;
|
||||
/**
|
||||
* 是否为领导 不存入staff表中
|
||||
* */
|
||||
private Integer isLeader;
|
||||
|
||||
|
||||
//密码
|
||||
|
||||
@ -45,9 +45,9 @@ public class DepartmentsStaffRelateServiceImpl extends ServiceImpl<DepartmentsSt
|
||||
DepartmentsStaffRelateEntity departmentsStaffRelateBo = new DepartmentsStaffRelateEntity();
|
||||
departmentsStaffRelateBo.setDepartmentId(departmentId);
|
||||
departmentsStaffRelateBo.setStaffId(staffId.getId());
|
||||
departmentsStaffRelateBo.setIsLeader(departmentsStaffRelateBo.getIsLeader());
|
||||
departmentsStaffRelateBo.setIsLeader(staffId.getIsLeader());
|
||||
departStaffRelateList.add(departmentsStaffRelateBo);
|
||||
} else if (!StringUtil.equals(departmentId, departId)) {
|
||||
} else /*if (!StringUtil.equals(departmentId, departId))*/ {
|
||||
departmentsStaffRelateDao.updateByStaffId(departmentId, staffId);
|
||||
}
|
||||
}
|
||||
|
||||
@ -104,8 +104,10 @@ public class StaffServiceImpl extends ServiceImpl<StaffDao, StaffEntity> impleme
|
||||
for (DepartmentStaffBo staffBo : staffs) {
|
||||
StaffEntity staffEntity = staffDao.getStaffInfoByOpenId(staffBo.getOpenId());
|
||||
StaffEntity staff = convertStaffEntity(staffBo);
|
||||
|
||||
if (staffEntity != null) {
|
||||
staff.setId(staffEntity.getId());
|
||||
|
||||
staffDao.updateStaff(staff);
|
||||
} else {
|
||||
staffDao.addStaff(staff);
|
||||
@ -342,6 +344,7 @@ public class StaffServiceImpl extends ServiceImpl<StaffDao, StaffEntity> impleme
|
||||
staffEntity.setUnionId(staffBo.getUnionId());
|
||||
staffEntity.setAvatar(staffBo.getAvatar());
|
||||
staffEntity.setJobNumber(staffBo.getEmployeeNo());
|
||||
staffEntity.setIsLeader(staffBo.getIsLeader());
|
||||
return staffEntity;
|
||||
}
|
||||
|
||||
|
||||
@ -3,11 +3,15 @@ package com.lz.modules.job.business;
|
||||
import com.dingtalk.api.DefaultDingTalkClient;
|
||||
import com.dingtalk.api.DingTalkClient;
|
||||
import com.dingtalk.api.request.OapiGettokenRequest;
|
||||
import com.dingtalk.api.request.OapiMessageCorpconversationAsyncsendV2Request;
|
||||
import com.dingtalk.api.response.OapiGettokenResponse;
|
||||
import com.dingtalk.api.response.OapiMessageCorpconversationAsyncsendV2Response;
|
||||
import com.google.common.collect.Lists;
|
||||
import com.lz.common.emun.WorkMsgTypeEnum;
|
||||
import com.lz.common.utils.DateUtils;
|
||||
import com.lz.common.utils.DingTalkUtil;
|
||||
import com.lz.modules.app.dao.StaffDao;
|
||||
import com.lz.modules.app.dto.StaffBaseInfoDto;
|
||||
import com.lz.modules.app.entity.StaffEntity;
|
||||
import com.lz.modules.app.entity.StaffOccupationEntity;
|
||||
import com.lz.modules.app.service.DepartmentsService;
|
||||
@ -142,6 +146,8 @@ public class DingtalkBusiness {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void enterStaffOccupationInfos(List<DepartmentStaffBo> staffs) {
|
||||
List<StaffOccupationEntity> StaffOccupations = Lists.newArrayList();
|
||||
for (DepartmentStaffBo departmentStaffBo : staffs) {
|
||||
@ -166,4 +172,25 @@ public class DingtalkBusiness {
|
||||
staffOccupationService.saveBatch(StaffOccupations);
|
||||
}
|
||||
}
|
||||
|
||||
public String sendWorkMSG(String appid, Long fromStaffid, long toStaffid, int type) {
|
||||
//获取Token
|
||||
StaffEntity toStaffEntity = staffService.selectStaffById(toStaffid);
|
||||
StaffEntity fromStaffEntity = staffService.selectStaffById(fromStaffid);
|
||||
if(toStaffEntity != null && fromStaffEntity != null){
|
||||
|
||||
WorkMsgTypeEnum workMsgTypeEnum = WorkMsgTypeEnum.findRoleTypeByCode(type);
|
||||
String token = dingTalkUtil.getAccessToken(appid);
|
||||
if(token != null && token.length() > 0){
|
||||
String content = workMsgTypeEnum.getContent().replace("@", fromStaffEntity.getName());
|
||||
return dingTalkUtil.sendSingleActionCardMSG(appid, toStaffEntity, workMsgTypeEnum.getTitle(),
|
||||
content, workMsgTypeEnum.getBtnText(), "https://www.baidu.com?time=" + System.currentTimeMillis(), token);
|
||||
|
||||
}else{
|
||||
return "token无效";
|
||||
}
|
||||
}
|
||||
return "无相关人员信息";
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -42,6 +42,8 @@ public class ThirdAppConfigController {
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@RequestMapping("/getById")
|
||||
public R getById(@RequestBody ThirdAppConfig thirdAppConfig) {
|
||||
thirdAppConfig = thirdAppConfigservice.selectThirdAppConfigById(thirdAppConfig.getId());
|
||||
|
||||
@ -0,0 +1,78 @@
|
||||
package com.lz.modules.third.controller;
|
||||
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.lz.common.utils.PageUtils;
|
||||
import com.lz.common.utils.R;
|
||||
import com.lz.common.utils.StringUtil;
|
||||
import com.lz.modules.job.business.DingtalkBusiness;
|
||||
import com.lz.modules.third.entity.ThirdMsgSendRecord;
|
||||
import com.lz.modules.third.service.ThirdMsgSendRecordService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/thirdMsgSendRecord")
|
||||
public class ThirdMsgSendRecordController {
|
||||
|
||||
|
||||
@Autowired
|
||||
private ThirdMsgSendRecordService thirdMsgSendRecordservice;
|
||||
|
||||
@Autowired
|
||||
private DingtalkBusiness dingtalkBusiness;
|
||||
|
||||
static String appid = "856016278";
|
||||
|
||||
@RequestMapping("/list")
|
||||
public R list(@RequestBody String body) {
|
||||
Map<String,Object> params = new HashMap<>();
|
||||
if(StringUtil.isNotBlank(body)){
|
||||
params = JSONObject.parseObject(body,Map.class);
|
||||
}
|
||||
PageUtils page = thirdMsgSendRecordservice.queryPage(params);
|
||||
return R.ok().put("page", page);
|
||||
}
|
||||
|
||||
@GetMapping("/asyn/send/work/msg")
|
||||
public R asynSendWorkMsg(@RequestParam Long fromstaffid, @RequestParam Long tostaffid, @RequestParam int type) {
|
||||
|
||||
String msg = dingtalkBusiness.sendWorkMSG(appid, fromstaffid, tostaffid, type);
|
||||
if(msg.equals("OK")){
|
||||
return R.ok();
|
||||
}else{
|
||||
return R.error(msg);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@RequestMapping("/getById")
|
||||
public R getById(@RequestBody ThirdMsgSendRecord thirdMsgSendRecord) {
|
||||
thirdMsgSendRecord = thirdMsgSendRecordservice.selectThirdMsgSendRecordById(thirdMsgSendRecord.getId());
|
||||
return R.ok().put("thirdMsgSendRecord",thirdMsgSendRecord);
|
||||
}
|
||||
|
||||
|
||||
@RequestMapping("/update")
|
||||
public R update(@RequestBody ThirdMsgSendRecord thirdMsgSendRecord) {
|
||||
thirdMsgSendRecordservice.updateThirdMsgSendRecordById(thirdMsgSendRecord);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
|
||||
@RequestMapping("/save")
|
||||
public R save(@RequestBody ThirdMsgSendRecord thirdMsgSendRecord) {
|
||||
thirdMsgSendRecordservice.insertThirdMsgSendRecord(thirdMsgSendRecord);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
|
||||
@RequestMapping("/delete")
|
||||
public R list(@RequestBody Long id) {
|
||||
thirdMsgSendRecordservice.deleteThirdMsgSendRecordById(id);
|
||||
return R.ok();
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,33 @@
|
||||
package com.lz.modules.third.dao;
|
||||
/**
|
||||
* <p>
|
||||
* 第三方消息发送记录 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author quyixiao
|
||||
* @since 2020-08-19
|
||||
*/
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.lz.modules.third.entity.ThirdMsgSendRecord;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
@Mapper
|
||||
public interface ThirdMsgSendRecordMapper extends BaseMapper<ThirdMsgSendRecord> {
|
||||
|
||||
|
||||
ThirdMsgSendRecord selectThirdMsgSendRecordById(@Param("id")Long id);
|
||||
|
||||
|
||||
Long insertThirdMsgSendRecord(ThirdMsgSendRecord thirdMsgSendRecord);
|
||||
|
||||
|
||||
int updateThirdMsgSendRecordById(ThirdMsgSendRecord thirdMsgSendRecord);
|
||||
|
||||
|
||||
int updateCoverThirdMsgSendRecordById(ThirdMsgSendRecord thirdMsgSendRecord);
|
||||
|
||||
|
||||
int deleteThirdMsgSendRecordById(@Param("id")Long id);
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,492 @@
|
||||
package com.lz.modules.third.entity;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import java.util.Date;
|
||||
/**
|
||||
* <p>
|
||||
* 菜单权限表
|
||||
* </p>*第三方消息发送记录
|
||||
* @author quyixiao
|
||||
* @since 2020-08-19
|
||||
*/
|
||||
|
||||
@Data
|
||||
@TableName("third_msg_send_record")
|
||||
public class ThirdMsgSendRecord implements java.io.Serializable {
|
||||
//
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Long id;
|
||||
//
|
||||
private Integer isDelete;
|
||||
//
|
||||
private Date createTime;
|
||||
//
|
||||
private Date updateTime;
|
||||
//消息类型:text,image,voice,file,link,oa,markdown,action_card
|
||||
private String msgType;
|
||||
//消息头背景色 oa消息中才有
|
||||
private String headBgcolor;
|
||||
//消息头部标题,最多10个字符 oa消息中,action_card的title
|
||||
private String headText;
|
||||
//消息标题,oa中的消息体的消息头,link,markdown,action_card的single_title
|
||||
private String msgTitle;
|
||||
//消息内容,text,link,oa正文,markdown的markdown内容,action_card的markdown内容
|
||||
private String msgContent;
|
||||
//image,voice,file消息的文件附件id
|
||||
private Long mediaId;
|
||||
//voice消息的时常信息 不超过60秒
|
||||
private String duration;
|
||||
//link、oa的message_url,action_card的single_url
|
||||
private String msgUrl;
|
||||
//link,oa中的图片,如果使用钉钉中的资源ID,请用@资源id的形式
|
||||
private String picUrl;
|
||||
//oa的pc端url
|
||||
private String pcUrl;
|
||||
//oa中的消息体,json,Array串[{"key":"说明A","value":"值A"},{"key":"说明B","value":"值B"}],最多显示6个
|
||||
private String form;
|
||||
//oa中的单文本信息的数目
|
||||
private String richNum;
|
||||
//oa中的单文本信息的单位
|
||||
private String richUnit;
|
||||
//oa中显示的附件数目,不做校验只展示
|
||||
private String fileCount;
|
||||
//oa中的自定义作者
|
||||
private String author;
|
||||
//action_card独立跳转是按钮的排列0是竖向排列 1是横向排列
|
||||
private String actionCardBtnOrientation;
|
||||
//action_card独立跳转的jsonarray [{"tilte":"A按钮","action_url":"A按钮链接"},{"tilte":"B按钮","action_url":"B按钮链接"}]
|
||||
private String actionCardBtnList;
|
||||
//lz_staff id
|
||||
private Long staffId;
|
||||
//发送状态:0新建,1已发送,2处理中,3已送达,4未读,5已读,6发送失败,7撤回
|
||||
private Integer status;
|
||||
//应用ID
|
||||
private Long appId;
|
||||
//钉钉返回的任务id
|
||||
private Long taskId;
|
||||
//备注,一些说明
|
||||
private String remark;
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @param id
|
||||
*/
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public Integer getIsDelete() {
|
||||
return isDelete;
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @param isDelete
|
||||
*/
|
||||
public void setIsDelete(Integer isDelete) {
|
||||
this.isDelete = isDelete;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public Date getCreateTime() {
|
||||
return createTime;
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @param createTime
|
||||
*/
|
||||
public void setCreateTime(Date createTime) {
|
||||
this.createTime = createTime;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public Date getUpdateTime() {
|
||||
return updateTime;
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @param updateTime
|
||||
*/
|
||||
public void setUpdateTime(Date updateTime) {
|
||||
this.updateTime = updateTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* 消息类型:text,image,voice,file,link,oa,markdown,action_card
|
||||
* @return
|
||||
*/
|
||||
public String getMsgType() {
|
||||
return msgType;
|
||||
}
|
||||
/**
|
||||
* 消息类型:text,image,voice,file,link,oa,markdown,action_card
|
||||
* @param msgType
|
||||
*/
|
||||
public void setMsgType(String msgType) {
|
||||
this.msgType = msgType;
|
||||
}
|
||||
|
||||
/**
|
||||
* 消息头背景色 oa消息中才有
|
||||
* @return
|
||||
*/
|
||||
public String getHeadBgcolor() {
|
||||
return headBgcolor;
|
||||
}
|
||||
/**
|
||||
* 消息头背景色 oa消息中才有
|
||||
* @param headBgcolor
|
||||
*/
|
||||
public void setHeadBgcolor(String headBgcolor) {
|
||||
this.headBgcolor = headBgcolor;
|
||||
}
|
||||
|
||||
/**
|
||||
* 消息头部标题,最多10个字符 oa消息中,action_card的title
|
||||
* @return
|
||||
*/
|
||||
public String getHeadText() {
|
||||
return headText;
|
||||
}
|
||||
/**
|
||||
* 消息头部标题,最多10个字符 oa消息中,action_card的title
|
||||
* @param headText
|
||||
*/
|
||||
public void setHeadText(String headText) {
|
||||
this.headText = headText;
|
||||
}
|
||||
|
||||
/**
|
||||
* 消息标题,oa中的消息体的消息头,link,markdown,action_card的single_title
|
||||
* @return
|
||||
*/
|
||||
public String getMsgTitle() {
|
||||
return msgTitle;
|
||||
}
|
||||
/**
|
||||
* 消息标题,oa中的消息体的消息头,link,markdown,action_card的single_title
|
||||
* @param msgTitle
|
||||
*/
|
||||
public void setMsgTitle(String msgTitle) {
|
||||
this.msgTitle = msgTitle;
|
||||
}
|
||||
|
||||
/**
|
||||
* 消息内容,text,link,oa正文,markdown的markdown内容,action_card的markdown内容
|
||||
* @return
|
||||
*/
|
||||
public String getMsgContent() {
|
||||
return msgContent;
|
||||
}
|
||||
/**
|
||||
* 消息内容,text,link,oa正文,markdown的markdown内容,action_card的markdown内容
|
||||
* @param msgContent
|
||||
*/
|
||||
public void setMsgContent(String msgContent) {
|
||||
this.msgContent = msgContent;
|
||||
}
|
||||
|
||||
/**
|
||||
* image,voice,file消息的文件附件id
|
||||
* @return
|
||||
*/
|
||||
public Long getMediaId() {
|
||||
return mediaId;
|
||||
}
|
||||
/**
|
||||
* image,voice,file消息的文件附件id
|
||||
* @param mediaId
|
||||
*/
|
||||
public void setMediaId(Long mediaId) {
|
||||
this.mediaId = mediaId;
|
||||
}
|
||||
|
||||
/**
|
||||
* voice消息的时常信息 不超过60秒
|
||||
* @return
|
||||
*/
|
||||
public String getDuration() {
|
||||
return duration;
|
||||
}
|
||||
/**
|
||||
* voice消息的时常信息 不超过60秒
|
||||
* @param duration
|
||||
*/
|
||||
public void setDuration(String duration) {
|
||||
this.duration = duration;
|
||||
}
|
||||
|
||||
/**
|
||||
* link、oa的message_url,action_card的single_url
|
||||
* @return
|
||||
*/
|
||||
public String getMsgUrl() {
|
||||
return msgUrl;
|
||||
}
|
||||
/**
|
||||
* link、oa的message_url,action_card的single_url
|
||||
* @param msgUrl
|
||||
*/
|
||||
public void setMsgUrl(String msgUrl) {
|
||||
this.msgUrl = msgUrl;
|
||||
}
|
||||
|
||||
/**
|
||||
* link,oa中的图片,如果使用钉钉中的资源ID,请用@资源id的形式
|
||||
* @return
|
||||
*/
|
||||
public String getPicUrl() {
|
||||
return picUrl;
|
||||
}
|
||||
/**
|
||||
* link,oa中的图片,如果使用钉钉中的资源ID,请用@资源id的形式
|
||||
* @param picUrl
|
||||
*/
|
||||
public void setPicUrl(String picUrl) {
|
||||
this.picUrl = picUrl;
|
||||
}
|
||||
|
||||
/**
|
||||
* oa的pc端url
|
||||
* @return
|
||||
*/
|
||||
public String getPcUrl() {
|
||||
return pcUrl;
|
||||
}
|
||||
/**
|
||||
* oa的pc端url
|
||||
* @param pcUrl
|
||||
*/
|
||||
public void setPcUrl(String pcUrl) {
|
||||
this.pcUrl = pcUrl;
|
||||
}
|
||||
|
||||
/**
|
||||
* oa中的消息体,json,Array串[{"key":"说明A","value":"值A"},{"key":"说明B","value":"值B"}],最多显示6个
|
||||
* @return
|
||||
*/
|
||||
public String getForm() {
|
||||
return form;
|
||||
}
|
||||
/**
|
||||
* oa中的消息体,json,Array串[{"key":"说明A","value":"值A"},{"key":"说明B","value":"值B"}],最多显示6个
|
||||
* @param form
|
||||
*/
|
||||
public void setForm(String form) {
|
||||
this.form = form;
|
||||
}
|
||||
|
||||
/**
|
||||
* oa中的单文本信息的数目
|
||||
* @return
|
||||
*/
|
||||
public String getRichNum() {
|
||||
return richNum;
|
||||
}
|
||||
/**
|
||||
* oa中的单文本信息的数目
|
||||
* @param richNum
|
||||
*/
|
||||
public void setRichNum(String richNum) {
|
||||
this.richNum = richNum;
|
||||
}
|
||||
|
||||
/**
|
||||
* oa中的单文本信息的单位
|
||||
* @return
|
||||
*/
|
||||
public String getRichUnit() {
|
||||
return richUnit;
|
||||
}
|
||||
/**
|
||||
* oa中的单文本信息的单位
|
||||
* @param richUnit
|
||||
*/
|
||||
public void setRichUnit(String richUnit) {
|
||||
this.richUnit = richUnit;
|
||||
}
|
||||
|
||||
/**
|
||||
* oa中显示的附件数目,不做校验只展示
|
||||
* @return
|
||||
*/
|
||||
public String getFileCount() {
|
||||
return fileCount;
|
||||
}
|
||||
/**
|
||||
* oa中显示的附件数目,不做校验只展示
|
||||
* @param fileCount
|
||||
*/
|
||||
public void setFileCount(String fileCount) {
|
||||
this.fileCount = fileCount;
|
||||
}
|
||||
|
||||
/**
|
||||
* oa中的自定义作者
|
||||
* @return
|
||||
*/
|
||||
public String getAuthor() {
|
||||
return author;
|
||||
}
|
||||
/**
|
||||
* oa中的自定义作者
|
||||
* @param author
|
||||
*/
|
||||
public void setAuthor(String author) {
|
||||
this.author = author;
|
||||
}
|
||||
|
||||
/**
|
||||
* action_card独立跳转是按钮的排列0是竖向排列 1是横向排列
|
||||
* @return
|
||||
*/
|
||||
public String getActionCardBtnOrientation() {
|
||||
return actionCardBtnOrientation;
|
||||
}
|
||||
/**
|
||||
* action_card独立跳转是按钮的排列0是竖向排列 1是横向排列
|
||||
* @param actionCardBtnOrientation
|
||||
*/
|
||||
public void setActionCardBtnOrientation(String actionCardBtnOrientation) {
|
||||
this.actionCardBtnOrientation = actionCardBtnOrientation;
|
||||
}
|
||||
|
||||
/**
|
||||
* action_card独立跳转的jsonarray [{"tilte":"A按钮","action_url":"A按钮链接"},{"tilte":"B按钮","action_url":"B按钮链接"}]
|
||||
* @return
|
||||
*/
|
||||
public String getActionCardBtnList() {
|
||||
return actionCardBtnList;
|
||||
}
|
||||
/**
|
||||
* action_card独立跳转的jsonarray [{"tilte":"A按钮","action_url":"A按钮链接"},{"tilte":"B按钮","action_url":"B按钮链接"}]
|
||||
* @param actionCardBtnList
|
||||
*/
|
||||
public void setActionCardBtnList(String actionCardBtnList) {
|
||||
this.actionCardBtnList = actionCardBtnList;
|
||||
}
|
||||
|
||||
/**
|
||||
* lz_staff id
|
||||
* @return
|
||||
*/
|
||||
public Long getStaffId() {
|
||||
return staffId;
|
||||
}
|
||||
/**
|
||||
* lz_staff id
|
||||
* @param staffId
|
||||
*/
|
||||
public void setStaffId(Long staffId) {
|
||||
this.staffId = staffId;
|
||||
}
|
||||
|
||||
/**
|
||||
* 发送状态:0新建,1已发送,2处理中,3已送达,4未读,5已读,6发送失败,7撤回
|
||||
* @return
|
||||
*/
|
||||
public Integer getStatus() {
|
||||
return status;
|
||||
}
|
||||
/**
|
||||
* 发送状态:0新建,1已发送,2处理中,3已送达,4未读,5已读,6发送失败,7撤回
|
||||
* @param status
|
||||
*/
|
||||
public void setStatus(Integer status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
/**
|
||||
* 应用ID
|
||||
* @return
|
||||
*/
|
||||
public Long getAppId() {
|
||||
return appId;
|
||||
}
|
||||
/**
|
||||
* 应用ID
|
||||
* @param appId
|
||||
*/
|
||||
public void setAppId(Long appId) {
|
||||
this.appId = appId;
|
||||
}
|
||||
|
||||
/**
|
||||
* 钉钉返回的任务id
|
||||
* @return
|
||||
*/
|
||||
public Long getTaskId() {
|
||||
return taskId;
|
||||
}
|
||||
/**
|
||||
* 钉钉返回的任务id
|
||||
* @param taskId
|
||||
*/
|
||||
public void setTaskId(Long taskId) {
|
||||
this.taskId = taskId;
|
||||
}
|
||||
|
||||
/**
|
||||
* 备注,一些说明
|
||||
* @return
|
||||
*/
|
||||
public String getRemark() {
|
||||
return remark;
|
||||
}
|
||||
/**
|
||||
* 备注,一些说明
|
||||
* @param remark
|
||||
*/
|
||||
public void setRemark(String remark) {
|
||||
this.remark = remark;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "ThirdMsgSendRecord{" +
|
||||
",id=" + id +
|
||||
",isDelete=" + isDelete +
|
||||
",createTime=" + createTime +
|
||||
",updateTime=" + updateTime +
|
||||
",msgType=" + msgType +
|
||||
",headBgcolor=" + headBgcolor +
|
||||
",headText=" + headText +
|
||||
",msgTitle=" + msgTitle +
|
||||
",msgContent=" + msgContent +
|
||||
",mediaId=" + mediaId +
|
||||
",duration=" + duration +
|
||||
",msgUrl=" + msgUrl +
|
||||
",picUrl=" + picUrl +
|
||||
",pcUrl=" + pcUrl +
|
||||
",form=" + form +
|
||||
",richNum=" + richNum +
|
||||
",richUnit=" + richUnit +
|
||||
",fileCount=" + fileCount +
|
||||
",author=" + author +
|
||||
",actionCardBtnOrientation=" + actionCardBtnOrientation +
|
||||
",actionCardBtnList=" + actionCardBtnList +
|
||||
",staffId=" + staffId +
|
||||
",status=" + status +
|
||||
",appId=" + appId +
|
||||
",taskId=" + taskId +
|
||||
",remark=" + remark +
|
||||
"}";
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,493 @@
|
||||
package com.lz.modules.third.entity;
|
||||
import lombok.Data;
|
||||
import java.util.Date;
|
||||
/**
|
||||
* <p>
|
||||
* 菜单权限表
|
||||
* </p>*第三方消息发送记录
|
||||
* @author quyixiao
|
||||
* @since 2020-08-19
|
||||
*/
|
||||
|
||||
|
||||
@Data
|
||||
public class ThirdMsgSendRecordReq implements java.io.Serializable {
|
||||
|
||||
private int page = 1;
|
||||
private int rows = 10;
|
||||
private String sort;
|
||||
private String order;
|
||||
//
|
||||
private Long id;
|
||||
//
|
||||
private Integer isDelete;
|
||||
//
|
||||
private Date createTime;
|
||||
//
|
||||
private Date updateTime;
|
||||
//消息类型:text,image,voice,file,link,oa,markdown,action_card
|
||||
private String msgType;
|
||||
//消息头背景色 oa消息中才有
|
||||
private String headBgcolor;
|
||||
//消息头部标题,最多10个字符 oa消息中,action_card的title
|
||||
private String headText;
|
||||
//消息标题,oa中的消息体的消息头,link,markdown,action_card的single_title
|
||||
private String msgTitle;
|
||||
//消息内容,text,link,oa正文,markdown的markdown内容,action_card的markdown内容
|
||||
private String msgContent;
|
||||
//image,voice,file消息的文件附件id
|
||||
private Long mediaId;
|
||||
//voice消息的时常信息 不超过60秒
|
||||
private String duration;
|
||||
//link、oa的message_url,action_card的single_url
|
||||
private String msgUrl;
|
||||
//link,oa中的图片,如果使用钉钉中的资源ID,请用@资源id的形式
|
||||
private String picUrl;
|
||||
//oa的pc端url
|
||||
private String pcUrl;
|
||||
//oa中的消息体,json,Array串[{"key":"说明A","value":"值A"},{"key":"说明B","value":"值B"}],最多显示6个
|
||||
private String form;
|
||||
//oa中的单文本信息的数目
|
||||
private String richNum;
|
||||
//oa中的单文本信息的单位
|
||||
private String richUnit;
|
||||
//oa中显示的附件数目,不做校验只展示
|
||||
private String fileCount;
|
||||
//oa中的自定义作者
|
||||
private String author;
|
||||
//action_card独立跳转是按钮的排列0是竖向排列 1是横向排列
|
||||
private String actionCardBtnOrientation;
|
||||
//action_card独立跳转的jsonarray [{"tilte":"A按钮","action_url":"A按钮链接"},{"tilte":"B按钮","action_url":"B按钮链接"}]
|
||||
private String actionCardBtnList;
|
||||
//lz_staff id
|
||||
private Long staffId;
|
||||
//发送状态:0新建,1已发送,2处理中,3已送达,4未读,5已读,6发送失败,7撤回
|
||||
private Integer status;
|
||||
//应用ID
|
||||
private Long appId;
|
||||
//钉钉返回的任务id
|
||||
private Long taskId;
|
||||
//备注,一些说明
|
||||
private String remark;
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @param id
|
||||
*/
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public Integer getIsDelete() {
|
||||
return isDelete;
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @param isDelete
|
||||
*/
|
||||
public void setIsDelete(Integer isDelete) {
|
||||
this.isDelete = isDelete;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public Date getCreateTime() {
|
||||
return createTime;
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @param createTime
|
||||
*/
|
||||
public void setCreateTime(Date createTime) {
|
||||
this.createTime = createTime;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public Date getUpdateTime() {
|
||||
return updateTime;
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @param updateTime
|
||||
*/
|
||||
public void setUpdateTime(Date updateTime) {
|
||||
this.updateTime = updateTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* 消息类型:text,image,voice,file,link,oa,markdown,action_card
|
||||
* @return
|
||||
*/
|
||||
public String getMsgType() {
|
||||
return msgType;
|
||||
}
|
||||
/**
|
||||
* 消息类型:text,image,voice,file,link,oa,markdown,action_card
|
||||
* @param msgType
|
||||
*/
|
||||
public void setMsgType(String msgType) {
|
||||
this.msgType = msgType;
|
||||
}
|
||||
|
||||
/**
|
||||
* 消息头背景色 oa消息中才有
|
||||
* @return
|
||||
*/
|
||||
public String getHeadBgcolor() {
|
||||
return headBgcolor;
|
||||
}
|
||||
/**
|
||||
* 消息头背景色 oa消息中才有
|
||||
* @param headBgcolor
|
||||
*/
|
||||
public void setHeadBgcolor(String headBgcolor) {
|
||||
this.headBgcolor = headBgcolor;
|
||||
}
|
||||
|
||||
/**
|
||||
* 消息头部标题,最多10个字符 oa消息中,action_card的title
|
||||
* @return
|
||||
*/
|
||||
public String getHeadText() {
|
||||
return headText;
|
||||
}
|
||||
/**
|
||||
* 消息头部标题,最多10个字符 oa消息中,action_card的title
|
||||
* @param headText
|
||||
*/
|
||||
public void setHeadText(String headText) {
|
||||
this.headText = headText;
|
||||
}
|
||||
|
||||
/**
|
||||
* 消息标题,oa中的消息体的消息头,link,markdown,action_card的single_title
|
||||
* @return
|
||||
*/
|
||||
public String getMsgTitle() {
|
||||
return msgTitle;
|
||||
}
|
||||
/**
|
||||
* 消息标题,oa中的消息体的消息头,link,markdown,action_card的single_title
|
||||
* @param msgTitle
|
||||
*/
|
||||
public void setMsgTitle(String msgTitle) {
|
||||
this.msgTitle = msgTitle;
|
||||
}
|
||||
|
||||
/**
|
||||
* 消息内容,text,link,oa正文,markdown的markdown内容,action_card的markdown内容
|
||||
* @return
|
||||
*/
|
||||
public String getMsgContent() {
|
||||
return msgContent;
|
||||
}
|
||||
/**
|
||||
* 消息内容,text,link,oa正文,markdown的markdown内容,action_card的markdown内容
|
||||
* @param msgContent
|
||||
*/
|
||||
public void setMsgContent(String msgContent) {
|
||||
this.msgContent = msgContent;
|
||||
}
|
||||
|
||||
/**
|
||||
* image,voice,file消息的文件附件id
|
||||
* @return
|
||||
*/
|
||||
public Long getMediaId() {
|
||||
return mediaId;
|
||||
}
|
||||
/**
|
||||
* image,voice,file消息的文件附件id
|
||||
* @param mediaId
|
||||
*/
|
||||
public void setMediaId(Long mediaId) {
|
||||
this.mediaId = mediaId;
|
||||
}
|
||||
|
||||
/**
|
||||
* voice消息的时常信息 不超过60秒
|
||||
* @return
|
||||
*/
|
||||
public String getDuration() {
|
||||
return duration;
|
||||
}
|
||||
/**
|
||||
* voice消息的时常信息 不超过60秒
|
||||
* @param duration
|
||||
*/
|
||||
public void setDuration(String duration) {
|
||||
this.duration = duration;
|
||||
}
|
||||
|
||||
/**
|
||||
* link、oa的message_url,action_card的single_url
|
||||
* @return
|
||||
*/
|
||||
public String getMsgUrl() {
|
||||
return msgUrl;
|
||||
}
|
||||
/**
|
||||
* link、oa的message_url,action_card的single_url
|
||||
* @param msgUrl
|
||||
*/
|
||||
public void setMsgUrl(String msgUrl) {
|
||||
this.msgUrl = msgUrl;
|
||||
}
|
||||
|
||||
/**
|
||||
* link,oa中的图片,如果使用钉钉中的资源ID,请用@资源id的形式
|
||||
* @return
|
||||
*/
|
||||
public String getPicUrl() {
|
||||
return picUrl;
|
||||
}
|
||||
/**
|
||||
* link,oa中的图片,如果使用钉钉中的资源ID,请用@资源id的形式
|
||||
* @param picUrl
|
||||
*/
|
||||
public void setPicUrl(String picUrl) {
|
||||
this.picUrl = picUrl;
|
||||
}
|
||||
|
||||
/**
|
||||
* oa的pc端url
|
||||
* @return
|
||||
*/
|
||||
public String getPcUrl() {
|
||||
return pcUrl;
|
||||
}
|
||||
/**
|
||||
* oa的pc端url
|
||||
* @param pcUrl
|
||||
*/
|
||||
public void setPcUrl(String pcUrl) {
|
||||
this.pcUrl = pcUrl;
|
||||
}
|
||||
|
||||
/**
|
||||
* oa中的消息体,json,Array串[{"key":"说明A","value":"值A"},{"key":"说明B","value":"值B"}],最多显示6个
|
||||
* @return
|
||||
*/
|
||||
public String getForm() {
|
||||
return form;
|
||||
}
|
||||
/**
|
||||
* oa中的消息体,json,Array串[{"key":"说明A","value":"值A"},{"key":"说明B","value":"值B"}],最多显示6个
|
||||
* @param form
|
||||
*/
|
||||
public void setForm(String form) {
|
||||
this.form = form;
|
||||
}
|
||||
|
||||
/**
|
||||
* oa中的单文本信息的数目
|
||||
* @return
|
||||
*/
|
||||
public String getRichNum() {
|
||||
return richNum;
|
||||
}
|
||||
/**
|
||||
* oa中的单文本信息的数目
|
||||
* @param richNum
|
||||
*/
|
||||
public void setRichNum(String richNum) {
|
||||
this.richNum = richNum;
|
||||
}
|
||||
|
||||
/**
|
||||
* oa中的单文本信息的单位
|
||||
* @return
|
||||
*/
|
||||
public String getRichUnit() {
|
||||
return richUnit;
|
||||
}
|
||||
/**
|
||||
* oa中的单文本信息的单位
|
||||
* @param richUnit
|
||||
*/
|
||||
public void setRichUnit(String richUnit) {
|
||||
this.richUnit = richUnit;
|
||||
}
|
||||
|
||||
/**
|
||||
* oa中显示的附件数目,不做校验只展示
|
||||
* @return
|
||||
*/
|
||||
public String getFileCount() {
|
||||
return fileCount;
|
||||
}
|
||||
/**
|
||||
* oa中显示的附件数目,不做校验只展示
|
||||
* @param fileCount
|
||||
*/
|
||||
public void setFileCount(String fileCount) {
|
||||
this.fileCount = fileCount;
|
||||
}
|
||||
|
||||
/**
|
||||
* oa中的自定义作者
|
||||
* @return
|
||||
*/
|
||||
public String getAuthor() {
|
||||
return author;
|
||||
}
|
||||
/**
|
||||
* oa中的自定义作者
|
||||
* @param author
|
||||
*/
|
||||
public void setAuthor(String author) {
|
||||
this.author = author;
|
||||
}
|
||||
|
||||
/**
|
||||
* action_card独立跳转是按钮的排列0是竖向排列 1是横向排列
|
||||
* @return
|
||||
*/
|
||||
public String getActionCardBtnOrientation() {
|
||||
return actionCardBtnOrientation;
|
||||
}
|
||||
/**
|
||||
* action_card独立跳转是按钮的排列0是竖向排列 1是横向排列
|
||||
* @param actionCardBtnOrientation
|
||||
*/
|
||||
public void setActionCardBtnOrientation(String actionCardBtnOrientation) {
|
||||
this.actionCardBtnOrientation = actionCardBtnOrientation;
|
||||
}
|
||||
|
||||
/**
|
||||
* action_card独立跳转的jsonarray [{"tilte":"A按钮","action_url":"A按钮链接"},{"tilte":"B按钮","action_url":"B按钮链接"}]
|
||||
* @return
|
||||
*/
|
||||
public String getActionCardBtnList() {
|
||||
return actionCardBtnList;
|
||||
}
|
||||
/**
|
||||
* action_card独立跳转的jsonarray [{"tilte":"A按钮","action_url":"A按钮链接"},{"tilte":"B按钮","action_url":"B按钮链接"}]
|
||||
* @param actionCardBtnList
|
||||
*/
|
||||
public void setActionCardBtnList(String actionCardBtnList) {
|
||||
this.actionCardBtnList = actionCardBtnList;
|
||||
}
|
||||
|
||||
/**
|
||||
* lz_staff id
|
||||
* @return
|
||||
*/
|
||||
public Long getStaffId() {
|
||||
return staffId;
|
||||
}
|
||||
/**
|
||||
* lz_staff id
|
||||
* @param staffId
|
||||
*/
|
||||
public void setStaffId(Long staffId) {
|
||||
this.staffId = staffId;
|
||||
}
|
||||
|
||||
/**
|
||||
* 发送状态:0新建,1已发送,2处理中,3已送达,4未读,5已读,6发送失败,7撤回
|
||||
* @return
|
||||
*/
|
||||
public Integer getStatus() {
|
||||
return status;
|
||||
}
|
||||
/**
|
||||
* 发送状态:0新建,1已发送,2处理中,3已送达,4未读,5已读,6发送失败,7撤回
|
||||
* @param status
|
||||
*/
|
||||
public void setStatus(Integer status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
/**
|
||||
* 应用ID
|
||||
* @return
|
||||
*/
|
||||
public Long getAppId() {
|
||||
return appId;
|
||||
}
|
||||
/**
|
||||
* 应用ID
|
||||
* @param appId
|
||||
*/
|
||||
public void setAppId(Long appId) {
|
||||
this.appId = appId;
|
||||
}
|
||||
|
||||
/**
|
||||
* 钉钉返回的任务id
|
||||
* @return
|
||||
*/
|
||||
public Long getTaskId() {
|
||||
return taskId;
|
||||
}
|
||||
/**
|
||||
* 钉钉返回的任务id
|
||||
* @param taskId
|
||||
*/
|
||||
public void setTaskId(Long taskId) {
|
||||
this.taskId = taskId;
|
||||
}
|
||||
|
||||
/**
|
||||
* 备注,一些说明
|
||||
* @return
|
||||
*/
|
||||
public String getRemark() {
|
||||
return remark;
|
||||
}
|
||||
/**
|
||||
* 备注,一些说明
|
||||
* @param remark
|
||||
*/
|
||||
public void setRemark(String remark) {
|
||||
this.remark = remark;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "ThirdMsgSendRecord{" +
|
||||
",id=" + id +
|
||||
",isDelete=" + isDelete +
|
||||
",createTime=" + createTime +
|
||||
",updateTime=" + updateTime +
|
||||
",msgType=" + msgType +
|
||||
",headBgcolor=" + headBgcolor +
|
||||
",headText=" + headText +
|
||||
",msgTitle=" + msgTitle +
|
||||
",msgContent=" + msgContent +
|
||||
",mediaId=" + mediaId +
|
||||
",duration=" + duration +
|
||||
",msgUrl=" + msgUrl +
|
||||
",picUrl=" + picUrl +
|
||||
",pcUrl=" + pcUrl +
|
||||
",form=" + form +
|
||||
",richNum=" + richNum +
|
||||
",richUnit=" + richUnit +
|
||||
",fileCount=" + fileCount +
|
||||
",author=" + author +
|
||||
",actionCardBtnOrientation=" + actionCardBtnOrientation +
|
||||
",actionCardBtnList=" + actionCardBtnList +
|
||||
",staffId=" + staffId +
|
||||
",status=" + status +
|
||||
",appId=" + appId +
|
||||
",taskId=" + taskId +
|
||||
",remark=" + remark +
|
||||
"}";
|
||||
}
|
||||
}
|
||||
@ -3,6 +3,7 @@ package com.lz.modules.third.service;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.lz.common.utils.PageUtils;
|
||||
import com.lz.modules.third.entity.ThirdAppConfig;
|
||||
import com.lz.modules.third.entity.ThirdMsgSendRecord;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
@ -36,4 +37,5 @@ public interface ThirdAppConfigService extends IService<ThirdAppConfig> {
|
||||
PageUtils queryPage(Map<String, Object> params);
|
||||
|
||||
ThirdAppConfig getByAppId(String appid);
|
||||
|
||||
}
|
||||
@ -0,0 +1,39 @@
|
||||
package com.lz.modules.third.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.lz.common.utils.PageUtils;
|
||||
import com.lz.modules.third.entity.ThirdMsgSendRecord;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 第三方消息发送记录 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author quyixiao
|
||||
* @since 2020-08-19
|
||||
*/
|
||||
public interface ThirdMsgSendRecordService extends IService<ThirdMsgSendRecord> {
|
||||
|
||||
|
||||
|
||||
ThirdMsgSendRecord selectThirdMsgSendRecordById(Long id);
|
||||
|
||||
|
||||
Long insertThirdMsgSendRecord(ThirdMsgSendRecord thirdMsgSendRecord);
|
||||
|
||||
|
||||
int updateThirdMsgSendRecordById(ThirdMsgSendRecord thirdMsgSendRecord);
|
||||
|
||||
|
||||
int updateCoverThirdMsgSendRecordById(ThirdMsgSendRecord thirdMsgSendRecord);
|
||||
|
||||
|
||||
int deleteThirdMsgSendRecordById(Long id);
|
||||
|
||||
|
||||
PageUtils queryPage(Map<String, Object> params);
|
||||
|
||||
void insert(ThirdMsgSendRecord thirdMsgSendRecord);
|
||||
}
|
||||
@ -8,6 +8,8 @@ import com.lz.common.utils.Query;
|
||||
import com.lz.modules.sys.entity.SysRoleEntity;
|
||||
import com.lz.modules.third.dao.ThirdAppConfigMapper;
|
||||
import com.lz.modules.third.entity.ThirdAppConfig;
|
||||
import com.lz.modules.third.entity.ThirdMsgSendRecord;
|
||||
import com.lz.modules.third.service.ThirdAppConfigService;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
@ -24,7 +26,7 @@ import java.util.Map;
|
||||
*/
|
||||
|
||||
@Service
|
||||
public class ThirdAppConfigServiceImpl extends ServiceImpl<ThirdAppConfigMapper, ThirdAppConfig> implements com.lz.modules.third.service.ThirdAppConfigService {
|
||||
public class ThirdAppConfigServiceImpl extends ServiceImpl<ThirdAppConfigMapper, ThirdAppConfig> implements ThirdAppConfigService {
|
||||
|
||||
|
||||
@Autowired
|
||||
|
||||
@ -0,0 +1,91 @@
|
||||
package com.lz.modules.third.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.lz.common.utils.PageUtils;
|
||||
import com.lz.common.utils.Query;
|
||||
import com.lz.modules.third.dao.ThirdMsgSendRecordMapper;
|
||||
import com.lz.modules.third.entity.ThirdAppConfig;
|
||||
import com.lz.modules.third.entity.ThirdMsgSendRecord;
|
||||
import com.lz.modules.third.service.ThirdMsgSendRecordService;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.Collection;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 第三方消息发送记录 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author quyixiao
|
||||
* @since 2020-08-19
|
||||
*/
|
||||
|
||||
@Service
|
||||
public class ThirdMsgSendRecordServiceImpl extends ServiceImpl<ThirdMsgSendRecordMapper, ThirdMsgSendRecord> implements ThirdMsgSendRecordService {
|
||||
|
||||
|
||||
@Resource
|
||||
private ThirdMsgSendRecordMapper thirdMsgSendRecordMapper;
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public ThirdMsgSendRecord selectThirdMsgSendRecordById(Long id){
|
||||
return thirdMsgSendRecordMapper.selectThirdMsgSendRecordById(id);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public Long insertThirdMsgSendRecord(ThirdMsgSendRecord thirdMsgSendRecord){
|
||||
return thirdMsgSendRecordMapper.insertThirdMsgSendRecord(thirdMsgSendRecord);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public int updateThirdMsgSendRecordById(ThirdMsgSendRecord thirdMsgSendRecord){
|
||||
return thirdMsgSendRecordMapper.updateThirdMsgSendRecordById(thirdMsgSendRecord);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public int updateCoverThirdMsgSendRecordById(ThirdMsgSendRecord thirdMsgSendRecord){
|
||||
return thirdMsgSendRecordMapper.updateCoverThirdMsgSendRecordById(thirdMsgSendRecord);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public int deleteThirdMsgSendRecordById(Long id){
|
||||
return thirdMsgSendRecordMapper.deleteThirdMsgSendRecordById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageUtils queryPage(Map<String, Object> params){
|
||||
String roleName = (String)params.get("app_name");
|
||||
Long createUserId = (Long)params.get("app_key");
|
||||
|
||||
IPage<ThirdMsgSendRecord> page = this.page(
|
||||
new Query<ThirdMsgSendRecord>().getPage(params),
|
||||
new QueryWrapper<ThirdMsgSendRecord>()
|
||||
.like(StringUtils.isNotBlank(roleName),"app_name", roleName)
|
||||
.eq(createUserId != null,"app_key", createUserId)
|
||||
);
|
||||
|
||||
return new PageUtils(page);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void insert(ThirdMsgSendRecord thirdMsgSendRecord){
|
||||
thirdMsgSendRecordMapper.insert(thirdMsgSendRecord);
|
||||
}
|
||||
|
||||
}
|
||||
@ -250,7 +250,7 @@
|
||||
<select id="getStaffInfos" resultType="com.lz.modules.app.dto.StaffDto">
|
||||
select ls.id staffId,if(lso.employee_no='', lso.staff_no,lso.employee_no) staff_no,ls.name,lso.position,
|
||||
case lso.staff_status when 0 then '在职' else '离职' end staff_status,
|
||||
if(ls.employee_id in (select leader_employee_id from lz_departments where is_delete=0
|
||||
if(ls.id in (select staff_id from lz_departments_staff_relate where is_delete=0 and is_leader=1
|
||||
<if test="departmentId != null and departmentId != ''">
|
||||
and department_id=#{departmentId}
|
||||
</if>
|
||||
|
||||
@ -56,7 +56,7 @@
|
||||
</insert>
|
||||
|
||||
<update id="updateStatusByStaff">
|
||||
update lz_staff_occupation set staff_status=1,resignation_time=null, position=#{departmentStaffBo.position}, staff_no=#{departmentStaffBo.employeeNo} where is_delete=0 and staff_id = #{staffId}
|
||||
update lz_staff_occupation set staff_status=#{departmentStaffBo.status},resignation_time=null, position=#{departmentStaffBo.position}, staff_no=#{departmentStaffBo.employeeNo} where is_delete=0 and staff_id = #{staffId}
|
||||
</update>
|
||||
|
||||
</mapper>
|
||||
|
||||
184
src/main/resources/mapper/third/ThirdMsgSendRecordMapper.xml
Normal file
184
src/main/resources/mapper/third/ThirdMsgSendRecordMapper.xml
Normal file
@ -0,0 +1,184 @@
|
||||
<?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.lz.modules.third.dao.ThirdMsgSendRecordMapper">
|
||||
|
||||
<!-- 通用查询映射结果 -->
|
||||
<resultMap id="BaseResultMap" type="com.lz.modules.third.entity.ThirdMsgSendRecord">
|
||||
<id column="id" property="id"/>
|
||||
<result column="is_delete" property="isDelete"/>
|
||||
<result column="create_time" property="createTime"/>
|
||||
<result column="update_time" property="updateTime"/>
|
||||
<result column="msg_type" property="msgType"/>
|
||||
<result column="head_bgcolor" property="headBgcolor"/>
|
||||
<result column="head_text" property="headText"/>
|
||||
<result column="msg_title" property="msgTitle"/>
|
||||
<result column="msg_content" property="msgContent"/>
|
||||
<result column="media_id" property="mediaId"/>
|
||||
<result column="duration" property="duration"/>
|
||||
<result column="msg_url" property="msgUrl"/>
|
||||
<result column="pic_url" property="picUrl"/>
|
||||
<result column="pc_url" property="pcUrl"/>
|
||||
<result column="form" property="form"/>
|
||||
<result column="rich_num" property="richNum"/>
|
||||
<result column="rich_unit" property="richUnit"/>
|
||||
<result column="file_count" property="fileCount"/>
|
||||
<result column="author" property="author"/>
|
||||
<result column="action_card_btn_orientation" property="actionCardBtnOrientation"/>
|
||||
<result column="action_card_btn_list" property="actionCardBtnList"/>
|
||||
<result column="staff_id" property="staffId"/>
|
||||
<result column="status" property="status"/>
|
||||
<result column="app_id" property="appId"/>
|
||||
<result column="task_id" property="taskId"/>
|
||||
<result column="remark" property="remark"/>
|
||||
</resultMap>
|
||||
|
||||
|
||||
<!-- 通用查询结果列 -->
|
||||
<sql id="Base_Column_List">
|
||||
id AS id, is_delete AS isDelete, create_time AS createTime, update_time AS updateTime, msg_type AS msgType, head_bgcolor AS headBgcolor, head_text AS headText, msg_title AS msgTitle, msg_content AS msgContent, media_id AS mediaId, duration AS duration, msg_url AS msgUrl, pic_url AS picUrl, pc_url AS pcUrl, form AS form, rich_num AS richNum, rich_unit AS richUnit, file_count AS fileCount, author AS author, action_card_btn_orientation AS actionCardBtnOrientation, action_card_btn_list AS actionCardBtnList, staff_id AS staffId, status AS status, app_id AS appId, task_id AS taskId, remark AS remark
|
||||
</sql>
|
||||
|
||||
|
||||
|
||||
|
||||
<select id="selectThirdMsgSendRecordById" resultType="ThirdMsgSendRecord" >
|
||||
select * from third_msg_send_record where id=#{id} and is_delete = 0 limit 1
|
||||
</select>
|
||||
|
||||
|
||||
<insert id="insertThirdMsgSendRecord" parameterType="ThirdMsgSendRecord" useGeneratedKeys="true" keyProperty="id" >
|
||||
insert into third_msg_send_record(
|
||||
<if test="createTime != null">create_time, </if>
|
||||
<if test="updateTime != null">update_time, </if>
|
||||
<if test="msgType != null">msg_type, </if>
|
||||
<if test="headBgcolor != null">head_bgcolor, </if>
|
||||
<if test="headText != null">head_text, </if>
|
||||
<if test="msgTitle != null">msg_title, </if>
|
||||
<if test="msgContent != null">msg_content, </if>
|
||||
<if test="mediaId != null">media_id, </if>
|
||||
<if test="duration != null">duration, </if>
|
||||
<if test="msgUrl != null">msg_url, </if>
|
||||
<if test="picUrl != null">pic_url, </if>
|
||||
<if test="pcUrl != null">pc_url, </if>
|
||||
<if test="form != null">form, </if>
|
||||
<if test="richNum != null">rich_num, </if>
|
||||
<if test="richUnit != null">rich_unit, </if>
|
||||
<if test="fileCount != null">file_count, </if>
|
||||
<if test="author != null">author, </if>
|
||||
<if test="actionCardBtnOrientation != null">action_card_btn_orientation, </if>
|
||||
<if test="actionCardBtnList != null">action_card_btn_list, </if>
|
||||
<if test="staffId != null">staff_id, </if>
|
||||
<if test="status != null">status, </if>
|
||||
<if test="appId != null">app_id, </if>
|
||||
<if test="taskId != null">task_id, </if>
|
||||
<if test="remark != null">remark, </if>
|
||||
is_delete,
|
||||
gmt_create,
|
||||
gmt_modified
|
||||
)values(
|
||||
<if test="createTime != null">#{ createTime}, </if>
|
||||
<if test="updateTime != null">#{ updateTime}, </if>
|
||||
<if test="msgType != null">#{ msgType}, </if>
|
||||
<if test="headBgcolor != null">#{ headBgcolor}, </if>
|
||||
<if test="headText != null">#{ headText}, </if>
|
||||
<if test="msgTitle != null">#{ msgTitle}, </if>
|
||||
<if test="msgContent != null">#{ msgContent}, </if>
|
||||
<if test="mediaId != null">#{ mediaId}, </if>
|
||||
<if test="duration != null">#{ duration}, </if>
|
||||
<if test="msgUrl != null">#{ msgUrl}, </if>
|
||||
<if test="picUrl != null">#{ picUrl}, </if>
|
||||
<if test="pcUrl != null">#{ pcUrl}, </if>
|
||||
<if test="form != null">#{ form}, </if>
|
||||
<if test="richNum != null">#{ richNum}, </if>
|
||||
<if test="richUnit != null">#{ richUnit}, </if>
|
||||
<if test="fileCount != null">#{ fileCount}, </if>
|
||||
<if test="author != null">#{ author}, </if>
|
||||
<if test="actionCardBtnOrientation != null">#{ actionCardBtnOrientation}, </if>
|
||||
<if test="actionCardBtnList != null">#{ actionCardBtnList}, </if>
|
||||
<if test="staffId != null">#{ staffId}, </if>
|
||||
<if test="status != null">#{ status}, </if>
|
||||
<if test="appId != null">#{ appId}, </if>
|
||||
<if test="taskId != null">#{ taskId}, </if>
|
||||
<if test="remark != null">#{ remark}, </if>
|
||||
0,
|
||||
now(),
|
||||
now()
|
||||
)
|
||||
</insert>
|
||||
|
||||
|
||||
<update id="updateThirdMsgSendRecordById" parameterType="ThirdMsgSendRecord" >
|
||||
update
|
||||
third_msg_send_record
|
||||
<trim prefix="set" suffixOverrides=",">
|
||||
<if test="isDelete != null">is_delete = #{isDelete},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="msgType != null">msg_type = #{msgType},</if>
|
||||
<if test="headBgcolor != null">head_bgcolor = #{headBgcolor},</if>
|
||||
<if test="headText != null">head_text = #{headText},</if>
|
||||
<if test="msgTitle != null">msg_title = #{msgTitle},</if>
|
||||
<if test="msgContent != null">msg_content = #{msgContent},</if>
|
||||
<if test="mediaId != null">media_id = #{mediaId},</if>
|
||||
<if test="duration != null">duration = #{duration},</if>
|
||||
<if test="msgUrl != null">msg_url = #{msgUrl},</if>
|
||||
<if test="picUrl != null">pic_url = #{picUrl},</if>
|
||||
<if test="pcUrl != null">pc_url = #{pcUrl},</if>
|
||||
<if test="form != null">form = #{form},</if>
|
||||
<if test="richNum != null">rich_num = #{richNum},</if>
|
||||
<if test="richUnit != null">rich_unit = #{richUnit},</if>
|
||||
<if test="fileCount != null">file_count = #{fileCount},</if>
|
||||
<if test="author != null">author = #{author},</if>
|
||||
<if test="actionCardBtnOrientation != null">action_card_btn_orientation = #{actionCardBtnOrientation},</if>
|
||||
<if test="actionCardBtnList != null">action_card_btn_list = #{actionCardBtnList},</if>
|
||||
<if test="staffId != null">staff_id = #{staffId},</if>
|
||||
<if test="status != null">status = #{status},</if>
|
||||
<if test="appId != null">app_id = #{appId},</if>
|
||||
<if test="taskId != null">task_id = #{taskId},</if>
|
||||
<if test="remark != null">remark = #{remark}</if>
|
||||
</trim>
|
||||
,gmt_modified = now()
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
|
||||
<update id="updateCoverThirdMsgSendRecordById" parameterType="ThirdMsgSendRecord" >
|
||||
update
|
||||
third_msg_send_record
|
||||
set
|
||||
is_delete = #{isDelete},
|
||||
create_time = #{createTime},
|
||||
update_time = #{updateTime},
|
||||
msg_type = #{msgType},
|
||||
head_bgcolor = #{headBgcolor},
|
||||
head_text = #{headText},
|
||||
msg_title = #{msgTitle},
|
||||
msg_content = #{msgContent},
|
||||
media_id = #{mediaId},
|
||||
duration = #{duration},
|
||||
msg_url = #{msgUrl},
|
||||
pic_url = #{picUrl},
|
||||
pc_url = #{pcUrl},
|
||||
form = #{form},
|
||||
rich_num = #{richNum},
|
||||
rich_unit = #{richUnit},
|
||||
file_count = #{fileCount},
|
||||
author = #{author},
|
||||
action_card_btn_orientation = #{actionCardBtnOrientation},
|
||||
action_card_btn_list = #{actionCardBtnList},
|
||||
staff_id = #{staffId},
|
||||
status = #{status},
|
||||
app_id = #{appId},
|
||||
task_id = #{taskId},
|
||||
remark = #{remark}
|
||||
,gmt_modified = now()
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
|
||||
<update id="deleteThirdMsgSendRecordById" parameterType="java.lang.Long">
|
||||
update third_msg_send_record set is_delete = 1 where id=#{id} limit 1
|
||||
</update>
|
||||
|
||||
</mapper>
|
||||
|
||||
@ -61,7 +61,7 @@ public class MysqlMain {
|
||||
}
|
||||
List<TablesBean> list = new ArrayList<TablesBean>();
|
||||
|
||||
list.add(new TablesBean("sys_user_token"));
|
||||
list.add(new TablesBean("third_msg_send_record"));
|
||||
|
||||
List<TablesBean> list2 = new ArrayList<TablesBean>();
|
||||
Map<String, String> map = MysqlUtil2ShowCreateTable.getComments();
|
||||
|
||||
@ -37,7 +37,7 @@ public class MysqlUtilTable2Contoller {
|
||||
content.append("\n");
|
||||
content.append("\n");
|
||||
content.append(" @Autowired\n");
|
||||
content.append(" private " + tableBean.getSpaceName() + "service " + tableBean.getJavaName() + "service;\n");
|
||||
content.append(" private " + tableBean.getSpaceName() + "Service " + tableBean.getJavaName() + "Service;\n");
|
||||
content.append("\n");
|
||||
content.append("\n");
|
||||
content.append(" @RequestMapping(\"/list\")\n");
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user