chore(REQ-1465): 解决合并REQ-1465分支的冲突
This commit is contained in:
commit
42c9a7148c
@ -24,4 +24,6 @@ public class MessageSystemConfig {
|
|||||||
*/
|
*/
|
||||||
@Value("${message.common.record.divide-days:-1}")
|
@Value("${message.common.record.divide-days:-1}")
|
||||||
private Integer dataDivideDays;
|
private Integer dataDivideDays;
|
||||||
|
@Value("${message.common.icon.orgIcon:https://axzo-pro.oss-cn-hangzhou.aliyuncs.com/rs_app/ic_org_icon.png}")
|
||||||
|
private String orgIcon;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -10,7 +10,7 @@ import cn.axzo.msg.center.common.utils.PlaceholderResolver;
|
|||||||
import cn.axzo.msg.center.dal.GeneralMessageRecordDao;
|
import cn.axzo.msg.center.dal.GeneralMessageRecordDao;
|
||||||
import cn.axzo.msg.center.domain.entity.GeneralMessageRecord;
|
import cn.axzo.msg.center.domain.entity.GeneralMessageRecord;
|
||||||
import cn.axzo.msg.center.domain.enums.UserTypeEnum;
|
import cn.axzo.msg.center.domain.enums.UserTypeEnum;
|
||||||
import cn.axzo.msg.center.inside.notices.service.MessageRecordService;
|
import cn.axzo.msg.center.inside.notices.config.MessageSystemConfig;
|
||||||
import cn.axzo.msg.center.message.domain.dto.MessageTemplateDTO;
|
import cn.axzo.msg.center.message.domain.dto.MessageTemplateDTO;
|
||||||
import cn.axzo.msg.center.message.domain.dto.RawMessageRouterDTO;
|
import cn.axzo.msg.center.message.domain.dto.RawMessageRouterDTO;
|
||||||
import cn.axzo.msg.center.message.domain.vo.GeneralMessagePushVO;
|
import cn.axzo.msg.center.message.domain.vo.GeneralMessagePushVO;
|
||||||
@ -62,11 +62,8 @@ public class GeneralMessageServiceImpl implements GeneralMessageService {
|
|||||||
PushTerminalEnum.C_WORKER_APP, AppTypeEnum.CM
|
PushTerminalEnum.C_WORKER_APP, AppTypeEnum.CM
|
||||||
);
|
);
|
||||||
|
|
||||||
// TODO:[cold_blade] [P2] 图片icon的最好配置在nacos上
|
|
||||||
private final String orgIcon = "https://axzo-pro.oss-cn-hangzhou.aliyuncs.com/rs_app/ic_org_icon.png";
|
|
||||||
|
|
||||||
private final MessageApi messageApi;
|
private final MessageApi messageApi;
|
||||||
private final MessageRecordService messageRecordService;
|
private final MessageSystemConfig messageSystemConfig;
|
||||||
private final GeneralMessageRecordDao generalMessageRecordDao;
|
private final GeneralMessageRecordDao generalMessageRecordDao;
|
||||||
private final GeneralMessageOldService generalMessageOldService;
|
private final GeneralMessageOldService generalMessageOldService;
|
||||||
private final MessageTemplateNewService messageTemplateNewService;
|
private final MessageTemplateNewService messageTemplateNewService;
|
||||||
@ -185,7 +182,7 @@ public class GeneralMessageServiceImpl implements GeneralMessageService {
|
|||||||
e.setValue(value);
|
e.setValue(value);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
return GeneralMessagePushVO.from(record, template.getIcon(), orgIcon, routerButtons, cardContentItems);
|
return GeneralMessagePushVO.from(record, template.getIcon(), messageSystemConfig.getOrgIcon(), routerButtons, cardContentItems);
|
||||||
}
|
}
|
||||||
|
|
||||||
private String parseString(String string, JSONObject params) {
|
private String parseString(String string, JSONObject params) {
|
||||||
|
|||||||
@ -116,8 +116,6 @@ public class MessageGroupNodeServiceImpl implements MessageGroupNodeService {
|
|||||||
// 删除结点
|
// 删除结点
|
||||||
boolean removeResult = messageGroupNodeDao.lambdaUpdate()
|
boolean removeResult = messageGroupNodeDao.lambdaUpdate()
|
||||||
.eq(MessageGroupNode::getCode, nodeCode)
|
.eq(MessageGroupNode::getCode, nodeCode)
|
||||||
.eq(MessageGroupNode::getIsDelete, TableIsDeleteEnum.NORMAL.value)
|
|
||||||
// TODO: [cold_blade] [P2] 这里需要逻辑删除而非物理删除
|
|
||||||
.remove();
|
.remove();
|
||||||
if (removeResult) {
|
if (removeResult) {
|
||||||
// 刷新缓存
|
// 刷新缓存
|
||||||
|
|||||||
@ -83,8 +83,6 @@ public class MessageTemplateGroupServiceImpl implements MessageTemplateGroupServ
|
|||||||
}
|
}
|
||||||
messageTemplateGroupDao.lambdaUpdate()
|
messageTemplateGroupDao.lambdaUpdate()
|
||||||
.eq(MessageTemplateGroup::getTemplateCode, templateNode)
|
.eq(MessageTemplateGroup::getTemplateCode, templateNode)
|
||||||
.eq(MessageTemplateGroup::getIsDelete, TableIsDeleteEnum.NORMAL.value)
|
|
||||||
// TODO: [cold_blade] [P2] 这里需要逻辑删除而非物理删除
|
|
||||||
.remove();
|
.remove();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -103,7 +101,6 @@ public class MessageTemplateGroupServiceImpl implements MessageTemplateGroupServ
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void remove(String curGroupNodeCode, Collection<String> templateCodes) {
|
public void remove(String curGroupNodeCode, Collection<String> templateCodes) {
|
||||||
// TODO: [cold_blade]
|
|
||||||
// 参数校验
|
// 参数校验
|
||||||
AssertUtil.isTrue(StringUtils.isNotBlank(curGroupNodeCode), "curGroupNodeCode can not be blank");
|
AssertUtil.isTrue(StringUtils.isNotBlank(curGroupNodeCode), "curGroupNodeCode can not be blank");
|
||||||
AssertUtil.notEmpty(templateCodes, "templateCodes can not be empty");
|
AssertUtil.notEmpty(templateCodes, "templateCodes can not be empty");
|
||||||
@ -133,8 +130,6 @@ public class MessageTemplateGroupServiceImpl implements MessageTemplateGroupServ
|
|||||||
messageTemplateGroupDao.lambdaUpdate()
|
messageTemplateGroupDao.lambdaUpdate()
|
||||||
.in(MessageTemplateGroup::getTemplateCode, templateCodes)
|
.in(MessageTemplateGroup::getTemplateCode, templateCodes)
|
||||||
.eq(MessageTemplateGroup::getPath, nodeCodePathMap.get(curGroupNodeCode))
|
.eq(MessageTemplateGroup::getPath, nodeCodePathMap.get(curGroupNodeCode))
|
||||||
.eq(MessageTemplateGroup::getIsDelete, TableIsDeleteEnum.NORMAL.value)
|
|
||||||
// TODO: [cold_blade] [P2] 这里需要逻辑删除而非物理删除
|
|
||||||
.remove();
|
.remove();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,6 +1,5 @@
|
|||||||
package cn.axzo.msg.center.message.service.impl;
|
package cn.axzo.msg.center.message.service.impl;
|
||||||
|
|
||||||
import cn.axzo.msg.center.common.enums.TableIsDeleteEnum;
|
|
||||||
import cn.axzo.msg.center.dal.MessageTemplateRouterDao;
|
import cn.axzo.msg.center.dal.MessageTemplateRouterDao;
|
||||||
import cn.axzo.msg.center.domain.entity.MessageTemplateRouter;
|
import cn.axzo.msg.center.domain.entity.MessageTemplateRouter;
|
||||||
import cn.axzo.msg.center.message.domain.dto.RawMessageRouterDTO;
|
import cn.axzo.msg.center.message.domain.dto.RawMessageRouterDTO;
|
||||||
@ -62,8 +61,6 @@ public class MessageTemplateRouterServiceImpl implements MessageTemplateRouterSe
|
|||||||
// 移除之前的路由信息
|
// 移除之前的路由信息
|
||||||
messageTemplateRouterDao.lambdaUpdate()
|
messageTemplateRouterDao.lambdaUpdate()
|
||||||
.eq(MessageTemplateRouter::getTemplateCode, templateCode)
|
.eq(MessageTemplateRouter::getTemplateCode, templateCode)
|
||||||
.eq(MessageTemplateRouter::getIsDelete, TableIsDeleteEnum.NORMAL.value)
|
|
||||||
// TODO: [cold_blade] [P2] 这里需要逻辑删除而非物理删除
|
|
||||||
.remove();
|
.remove();
|
||||||
// 创建信息的路由信息
|
// 创建信息的路由信息
|
||||||
List<RawMessageRouterDTO> newRouters = routers.stream()
|
List<RawMessageRouterDTO> newRouters = routers.stream()
|
||||||
|
|||||||
@ -15,8 +15,7 @@ import org.springframework.web.bind.annotation.RequestBody;
|
|||||||
import javax.validation.Valid;
|
import javax.validation.Valid;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
//@FeignClient(name = "msg-center", url = "${server.serviceUrl}", fallback = InsideMessageRecordApiFallBack.class)
|
@FeignClient(name = "msg-center", url = "${server.serviceUrl:http://msg-center:8080}", fallback = InsideMessageRecordApiFallBack.class)
|
||||||
@FeignClient(name = "msg-center", url = "${server.serviceUrl}")
|
|
||||||
@Component
|
@Component
|
||||||
public interface InsideMessageRecordApi {
|
public interface InsideMessageRecordApi {
|
||||||
|
|
||||||
|
|||||||
@ -16,7 +16,7 @@ import org.springframework.web.bind.annotation.*;
|
|||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@FeignClient(name = "msg-center", url = "${server.serviceUrl}", fallback = InsideMessageTemplateApiFallBack.class)
|
@FeignClient(name = "msg-center", url = "${server.serviceUrl:http://msg-center:8080}", fallback = InsideMessageTemplateApiFallBack.class)
|
||||||
@Component
|
@Component
|
||||||
public interface InsideMessageTemplateApi {
|
public interface InsideMessageTemplateApi {
|
||||||
|
|
||||||
|
|||||||
@ -16,7 +16,7 @@ import java.util.List;
|
|||||||
/**
|
/**
|
||||||
* 站内消息相关接口
|
* 站内消息相关接口
|
||||||
*/
|
*/
|
||||||
@FeignClient(name = "msg-center", url = "${server.serviceUrl}", fallback = InsideNoticesApiFallBack.class)
|
@FeignClient(name = "msg-center", url = "${server.serviceUrl:http://msg-center:8080}", fallback = InsideNoticesApiFallBack.class)
|
||||||
@Component
|
@Component
|
||||||
public interface InsideNoticesApi {
|
public interface InsideNoticesApi {
|
||||||
|
|
||||||
|
|||||||
@ -12,7 +12,7 @@ import org.springframework.web.bind.annotation.RequestBody;
|
|||||||
/**
|
/**
|
||||||
* 发送app push消息,底层使用友盟
|
* 发送app push消息,底层使用友盟
|
||||||
*/
|
*/
|
||||||
@FeignClient(value = "msg-center", url = "${server.serviceUrl}", fallbackFactory = MessagePushApiFallbackFactory.class)
|
@FeignClient(value = "msg-center", url = "${server.serviceUrl:http://msg-center:8080}", fallbackFactory = MessagePushApiFallbackFactory.class)
|
||||||
@Component
|
@Component
|
||||||
public interface MessagePushApi {
|
public interface MessagePushApi {
|
||||||
|
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
package cn.axzo.msg.center.domain.entity;
|
package cn.axzo.msg.center.domain.entity;
|
||||||
|
|
||||||
import cn.axzo.msg.center.domain.persistence.BaseEntity;
|
import cn.axzo.msg.center.domain.persistence.BaseEntityExt;
|
||||||
import cn.axzo.msg.center.service.enums.MessageGroupNodeCategoryEnum;
|
import cn.axzo.msg.center.service.enums.MessageGroupNodeCategoryEnum;
|
||||||
import cn.axzo.msg.center.service.enums.StatusEnum;
|
import cn.axzo.msg.center.service.enums.StatusEnum;
|
||||||
import com.alibaba.fastjson.JSON;
|
import com.alibaba.fastjson.JSON;
|
||||||
@ -18,7 +18,7 @@ import java.io.Serializable;
|
|||||||
*/
|
*/
|
||||||
@Setter
|
@Setter
|
||||||
@Getter
|
@Getter
|
||||||
public class MessageGroupNode extends BaseEntity<MessageGroupNode> implements Serializable {
|
public class MessageGroupNode extends BaseEntityExt<MessageGroupNode> implements Serializable {
|
||||||
|
|
||||||
private static final long serialVersionUID = -4536503805143925884L;
|
private static final long serialVersionUID = -4536503805143925884L;
|
||||||
|
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
package cn.axzo.msg.center.domain.entity;
|
package cn.axzo.msg.center.domain.entity;
|
||||||
|
|
||||||
import cn.axzo.msg.center.domain.persistence.BaseEntity;
|
import cn.axzo.msg.center.domain.persistence.BaseEntityExt;
|
||||||
import com.alibaba.fastjson.JSON;
|
import com.alibaba.fastjson.JSON;
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
@ -19,7 +19,7 @@ import java.io.Serializable;
|
|||||||
@Setter
|
@Setter
|
||||||
@Getter
|
@Getter
|
||||||
@TableName("message_template_group")
|
@TableName("message_template_group")
|
||||||
public class MessageTemplateGroup extends BaseEntity<MessageTemplateGroup> implements Serializable {
|
public class MessageTemplateGroup extends BaseEntityExt<MessageTemplateGroup> implements Serializable {
|
||||||
|
|
||||||
private static final long serialVersionUID = 3902204750978588588L;
|
private static final long serialVersionUID = 3902204750978588588L;
|
||||||
|
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
package cn.axzo.msg.center.domain.entity;
|
package cn.axzo.msg.center.domain.entity;
|
||||||
|
|
||||||
import cn.axzo.msg.center.domain.persistence.BaseEntity;
|
import cn.axzo.msg.center.domain.persistence.BaseEntityExt;
|
||||||
import cn.axzo.msg.center.service.enums.RouterCategoryEnum;
|
import cn.axzo.msg.center.service.enums.RouterCategoryEnum;
|
||||||
import cn.axzo.msg.center.service.enums.TerminalTypeEnum;
|
import cn.axzo.msg.center.service.enums.TerminalTypeEnum;
|
||||||
import com.alibaba.fastjson.JSON;
|
import com.alibaba.fastjson.JSON;
|
||||||
@ -20,7 +20,7 @@ import java.io.Serializable;
|
|||||||
@Setter
|
@Setter
|
||||||
@Getter
|
@Getter
|
||||||
@TableName("message_template_router")
|
@TableName("message_template_router")
|
||||||
public class MessageTemplateRouter extends BaseEntity<MessageTemplateRouter> implements Serializable {
|
public class MessageTemplateRouter extends BaseEntityExt<MessageTemplateRouter> implements Serializable {
|
||||||
|
|
||||||
private static final long serialVersionUID = 6549664208396593182L;
|
private static final long serialVersionUID = 6549664208396593182L;
|
||||||
|
|
||||||
|
|||||||
@ -0,0 +1,45 @@
|
|||||||
|
package cn.axzo.msg.center.domain.persistence;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||||
|
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.Setter;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author cold_blade
|
||||||
|
* @date 2023/10/24
|
||||||
|
* @version 1.0
|
||||||
|
*/
|
||||||
|
@Setter
|
||||||
|
@Getter
|
||||||
|
public abstract class BaseEntityExt<T extends Model<T>> extends Model<T> implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = -420591992046546211L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* id
|
||||||
|
*/
|
||||||
|
@TableId(type = IdType.AUTO)
|
||||||
|
protected Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
protected Date createAt;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改时间
|
||||||
|
*/
|
||||||
|
protected Date updateAt;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否删除 0正常,1删除
|
||||||
|
*/
|
||||||
|
@TableLogic(delval = "id", value = "0")
|
||||||
|
protected Long isDelete = 0L;
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue
Block a user