Commit a545a76b authored by wangzb's avatar wangzb

Merge remote-tracking branch 'origin/MVP1.5.4' into MVP1.5.4

parents ddaddd7a 7b9f2e3e
dapr.upms.appUrl=http://127.0.0.1:3500/v1.0/invoke/
dapr.upms.appUrl=http://yifu-upms.qas-mvp.svc.cluster.local:3500/v1.0/invoke/
dapr.upms.appId=yifu-upms
dapr.check.appUrl=http://127.0.0.1:3500/v1.0/invoke/
#\u6D4B\u8BD5\u73AF\u5883
#dapr.check.appUrl=http://yifu-check.qas-mvp.svc.cluster.local:3500/v1.0/invoke/
#\u672C\u5730
dapr.check.appUrl=http://yifu-check.qas-mvp.svc.cluster.local:3500/v1.0/invoke/
dapr.check.appId=yifu-check
#\u751F\u4EA7
dapr.archives.appUrl=http://127.0.0.1:3500/v1.0/invoke/
dapr.archives.appId=yifu-archives
#\u751F\u4EA7
dapr.social.appUrl=http://127.0.0.1:3500/v1.0/invoke/
dapr.social.appId=yifu-social
#\u672C\u5730
dapr.archives.appUrl=http://yifu-archives.qas-mvp.svc.cluster.local:3500/v1.0/invoke/
dapr.archives.appId=yifu-archives
#\u751F\u4EA7
dapr.salary.appUrl=http://127.0.0.1:3500/v1.0/invoke/
dapr.salary.appId=yifu-salary
#\u751F\u4EA7
dapr.insurances.appUrl=http://127.0.0.1:3500/v1.0/invoke/
dapr.insurances.appId=yifu-insurances
dapr.social.appUrl=http://yifu-social.qas-mvp.svc.cluster.local:3500/v1.0/invoke/
dapr.social.appId=yifu-social
#\u6D4B\u8BD5\u73AF\u5883-B\u7AEF\u670D\u52A1
dapr.business.appUrl=http://127.0.0.1:3500/v1.0/invoke/
dapr.business.appUrl=http://yifu-business.qas-mvp.svc.cluster.local:3500/v1.0/invoke/
dapr.business.appId=yifu-business
#\u6D4B\u8BD5\u73AF\u5883-\u6D88\u606F\u63D0\u9192\u670D\u52A1
dapr.msg.appUrl=http://127.0.0.1:3500/v1.0/invoke/
dapr.msg.appUrl=http://yifu-msg.qas-mvp.svc.cluster.local:3500/v1.0/invoke/
dapr.msg.appId=yifu-msg
\ No newline at end of file
......@@ -22,10 +22,8 @@ import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length;
import java.time.LocalDateTime;
......@@ -86,7 +84,7 @@ public class MsgInfo {
@Length(max = 1, message = "0 未阅 1 已阅不能超过1个字符")
@ExcelProperty("0 未阅 1 已阅")
@Schema(description = "0 未阅 1 已阅")
private String read;
private String readStatus;
/**
* 提醒人
*/
......@@ -97,5 +95,13 @@ public class MsgInfo {
private String alertUser;
private LocalDateTime createTime;
/**
* 项目名称
*/
@ExcelAttribute(name = "项目名称", maxLength = 50)
@Length(max = 50, message = "项目名称不能超过1个字符")
@ExcelProperty("项目名称")
@Schema(description = "项目名称")
private String domainName;
}
......@@ -16,7 +16,6 @@
*/
package com.yifu.cloud.plus.v1.msg.service.impl;
import cn.hutool.json.JSONObject;
import com.alibaba.fastjson.JSON;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
......@@ -32,9 +31,14 @@ import com.yifu.cloud.plus.v1.yifu.common.core.util.Common;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import lombok.extern.log4j.Log4j2;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
*
*
......@@ -114,18 +118,41 @@ public class MsgInfoServiceImpl extends ServiceImpl<MsgInfoMapper, MsgInfo> impl
* @Param
* @return
**/
@Transactional
@Override
public void updateOverTimeMsg() {
// 1. 删除未读的超时,如果有继续生成
baseMapper.delete(Wrappers.<MsgInfo>query().lambda()
.eq(MsgInfo::getReadStatus,CommonConstants.ZERO_STRING)
.eq(MsgInfo::getAlertType,CommonConstants.ONE_STRING));
List<MsgInfo> temps = baseMapper.selectList(Wrappers.<MsgInfo>query().lambda()
.eq(MsgInfo::getAlertType,CommonConstants.ONE_STRING)
.eq(MsgInfo::getReadStatus,CommonConstants.ONE_STRING));
Map<String,MsgInfo> tempMap = new HashMap<>();
if (Common.isNotNull(temps)){
for (MsgInfo msg:temps){
tempMap.put(msg.getOrderNo(),msg);
}
}
List<MsgInfo> msgInfos = baseMapper.getMsgByTask();
List<MsgInfo> saves = new ArrayList<>();
if (Common.isNotNull(msgInfos)){
//1.先删除
baseMapper.delete(Wrappers.<MsgInfo>query().lambda().eq(MsgInfo::getAlertType,CommonConstants.ONE_STRING));
//2. 重新生成
MsgInfo temp;
for (MsgInfo ms:msgInfos){
temp = tempMap.get(ms.getOrderNo());
if (Common.isNotNull(temp)){
tempMap.remove(ms.getOrderNo());
continue;
}
ms.setCreateTime(LocalDateTime.now());
ms.setUrl(MesConstants.orderUrl+ms.getOrderId());
saves.add(ms);
}
if (Common.isNotNull(tempMap)){
this.removeByIds(tempMap.values());
}
this.saveBatch(msgInfos);
this.saveBatch(saves);
}
}
}
......@@ -30,8 +30,9 @@
<result property="orderNo" column="ORDER_NO"/>
<result property="alertType" column="ALERT_TYPE"/>
<result property="createTime" column="CREATE_TIME"/>
<result property="read" column="READ"/>
<result property="readStatus" column="READ_STATUS"/>
<result property="alertUser" column="ALERT_USER"/>
<result property="domainName" column="DOMAIN_NAME"/>
</resultMap>
<sql id="Base_Column_List">
a.ID,
......@@ -40,8 +41,9 @@
a.ORDER_NO,
a.ALERT_TYPE,
a.CREATE_TIME,
a.READ,
a.ALERT_USER
a.READ_STATUS,
a.ALERT_USER,
a.DOMAIN_NAME
</sql>
<sql id="msgInfo_where">
<if test="msgInfo != null">
......@@ -63,8 +65,8 @@
<if test="msgInfo.createTime != null">
AND a.CREATE_TIME = #{msgInfo.createTime}
</if>
<if test="msgInfo.read != null and msgInfo.read.trim() != ''">
AND a.READ = #{msgInfo.read}
<if test="msgInfo.readStatus != null and msgInfo.readStatus.trim() != ''">
AND a.READ_STATUS = #{msgInfo.readStatus}
</if>
<if test="msgInfo.alertUser != null and msgInfo.alertUser.trim() != ''">
AND a.ALERT_USER = #{msgInfo.alertUser}
......@@ -93,6 +95,7 @@
<select id="getMsgByOrderId" resultMap="msgInfoMap">
SELECT
a.fd_3ac901ba3b9d3e domain_name,
p.fd_name ALERT_USER,
a.fd_3ac901c5184274 ORDER_NO,
a.fd_id ORDER_ID,
......@@ -107,6 +110,7 @@
<select id="getMsgByTask" resultMap="msgInfoMap">
SELECT * from (
SELECT
b1.fd_3ac901ba3b9d3e domain_name,
o.fd_no ALERT_USER,
b1.fd_3ac901c5184274 ORDER_NO,
b1.fd_id ORDER_ID,
......
......@@ -13,6 +13,7 @@ import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;
import javax.annotation.Resource;
import java.io.IOException;
......
package com.yifu.cloud.plus.v1.yifu.order.service.impl;
import com.alibaba.fastjson.JSON;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
......@@ -683,6 +684,8 @@ public class TOrderServiceImpl extends ServiceImpl<TOrderMapper, TOrder> impleme
*/
@Override
public R receiveOrderNew(OrderAttVo vo) throws IOException{
log.error("ssssssssssssssss"+JSON.toJSONString(vo));
if (Common.isEmpty(vo.getOrderNo())){
return R.failed(OrderConstants.ORDER_NO_IS_EMPTY);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment