Compare commits
19 Commits
20240115-l
...
master
Author | SHA1 | Date |
---|---|---|
ljl | 11873ae979 | 6 months ago |
ljl | bbe54f88d0 | 6 months ago |
ljl | 863dc8a84f | 7 months ago |
ljl | 902a34f36e | 7 months ago |
ljl | 460ee57c46 | 7 months ago |
ljl | a51a588961 | 7 months ago |
ljl | 1fa0154147 | 8 months ago |
ljl | 5354f9175a | 9 months ago |
ljl | b89c918999 | 9 months ago |
ljl | 4ba3e2bec9 | 9 months ago |
ljl | cf24159a9b | 9 months ago |
ljl | 7e6cfe4e0a | 9 months ago |
ljl | d4c36f1fc0 | 9 months ago |
ljl | 1ccf00955f | 9 months ago |
ljl | a18396e831 | 9 months ago |
ljl | 2323b23ebd | 9 months ago |
ljl | 01ed6e46ff | 10 months ago |
ljl | 2a7efea444 | 10 months ago |
ljl | b448c5606a | 10 months ago |
@ -0,0 +1,8 @@
|
||||
package com.ms.api.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class DsMessageDao {
|
||||
Long messageId;
|
||||
}
|
@ -0,0 +1,8 @@
|
||||
package com.ms.api.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class ShopInfoDao {
|
||||
private String shopId;
|
||||
}
|
@ -0,0 +1,10 @@
|
||||
package com.ms.api.dto.dfapi.request;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class SupplyCenterMessage {
|
||||
private String tag;
|
||||
private String msgId;
|
||||
private String data;
|
||||
}
|
@ -0,0 +1,10 @@
|
||||
package com.ms.api.dto.dfapi.request;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class SupplyCenterMessageRequestDao {
|
||||
private List<SupplyCenterMessage> messages;
|
||||
}
|
@ -0,0 +1,24 @@
|
||||
package com.ms.api.dto.dfapi.response;
|
||||
|
||||
import com.alibaba.fastjson.annotation.JSONField;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class CommonResponseDTO {
|
||||
@JSONField(name = "code")
|
||||
protected String code;
|
||||
|
||||
@JSONField(name = "message")
|
||||
protected String message;
|
||||
|
||||
@JSONField(name = "result")
|
||||
protected String result;
|
||||
|
||||
@JSONField(name = "reason")
|
||||
protected String reason;
|
||||
|
||||
public boolean isSuccess() {
|
||||
return "success".equals(result);
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,13 @@
|
||||
package com.ms.biz.dto.openspi.request;
|
||||
|
||||
import com.doudian.open.gson.annotations.SerializedName;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class QuerySupplyPlatformBindNameParam {
|
||||
@SerializedName("shop_id")
|
||||
private Long shopId;
|
||||
|
||||
@SerializedName("supply_platform_type")
|
||||
private Long supplyPlatformType;
|
||||
}
|
@ -0,0 +1,12 @@
|
||||
package com.ms.biz.dto.openspi.request;
|
||||
|
||||
import com.doudian.open.core.DoudianOpSpiRequest;
|
||||
import com.doudian.open.core.DoudianOpSpiResponse;
|
||||
import com.ms.biz.dto.openspi.response.QuerySupplyPlatformAuthResponse;
|
||||
|
||||
public class QuerySupplyPlatformBindNameRequest extends DoudianOpSpiRequest<QuerySupplyPlatformBindNameParam> {
|
||||
@Override
|
||||
public Class<? extends DoudianOpSpiResponse<?>> getResponseClass() {
|
||||
return QuerySupplyPlatformAuthResponse.class;
|
||||
}
|
||||
}
|
@ -0,0 +1,13 @@
|
||||
package com.ms.biz.dto.openspi.request;
|
||||
|
||||
import com.doudian.open.gson.annotations.SerializedName;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class UnbindParam {
|
||||
@SerializedName("shop_id")
|
||||
private Long shopId;
|
||||
|
||||
@SerializedName("supply_platform_type")
|
||||
private Long supplyPlatformType;
|
||||
}
|
@ -0,0 +1,13 @@
|
||||
package com.ms.biz.dto.openspi.request;
|
||||
|
||||
import com.doudian.open.core.DoudianOpSpiRequest;
|
||||
import com.doudian.open.core.DoudianOpSpiResponse;
|
||||
import com.ms.biz.dto.openspi.response.UnbindResponse;
|
||||
|
||||
public class UnbindRequest extends DoudianOpSpiRequest<UnbindParam> {
|
||||
@Override
|
||||
public Class<? extends DoudianOpSpiResponse<?>> getResponseClass() {
|
||||
return UnbindResponse.class;
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,12 @@
|
||||
package com.ms.biz.dto.openspi.response;
|
||||
|
||||
import com.alibaba.fastjson.annotation.JSONField;
|
||||
import com.doudian.open.gson.annotations.SerializedName;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class QuerySupplyPlatformBindNameData {
|
||||
@JSONField(name = "bind_name")
|
||||
@SerializedName("bind_name")
|
||||
private String bindName;
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
package com.ms.biz.dto.openspi.response;
|
||||
|
||||
import com.doudian.open.core.DoudianOpSpiResponse;
|
||||
|
||||
public class QuerySupplyPlatformBindNameResponse extends DoudianOpSpiResponse<QuerySupplyPlatformBindNameData> {
|
||||
}
|
@ -0,0 +1,7 @@
|
||||
package com.ms.biz.dto.openspi.response;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class UnbindData {
|
||||
}
|
@ -0,0 +1,7 @@
|
||||
package com.ms.biz.dto.openspi.response;
|
||||
|
||||
import com.doudian.open.core.DoudianOpSpiResponse;
|
||||
|
||||
public class UnbindResponse extends DoudianOpSpiResponse<UnbindData> {
|
||||
}
|
||||
|
@ -0,0 +1,17 @@
|
||||
package com.ms.biz.exception;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
abstract public class BaseRuntimeException extends RuntimeException {
|
||||
protected String code;
|
||||
public BaseRuntimeException() {
|
||||
super();
|
||||
}
|
||||
|
||||
public BaseRuntimeException(String message) {
|
||||
super(message);
|
||||
}
|
||||
}
|
@ -0,0 +1,18 @@
|
||||
package com.ms.biz.exception;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
public class BindMemberNotExistsException extends BaseRuntimeException {
|
||||
protected String code = "100501";
|
||||
|
||||
public BindMemberNotExistsException() {
|
||||
super("当前没有绑定的账号信息,请重试");
|
||||
}
|
||||
|
||||
public BindMemberNotExistsException(String message) {
|
||||
super(message);
|
||||
}
|
||||
}
|
@ -0,0 +1,19 @@
|
||||
package com.ms.biz.exception;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
public class BusinessException extends BaseRuntimeException {
|
||||
protected String code = "100004";
|
||||
|
||||
public BusinessException(String message, String code) {
|
||||
super(message);
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public BusinessException(String message) {
|
||||
super(message);
|
||||
}
|
||||
}
|
@ -0,0 +1,18 @@
|
||||
package com.ms.biz.exception;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
public class MemberAlreadyUnbindException extends BaseRuntimeException {
|
||||
protected String code = "100401";
|
||||
|
||||
public MemberAlreadyUnbindException() {
|
||||
super("当前已解绑,无需再次解绑");
|
||||
}
|
||||
|
||||
public MemberAlreadyUnbindException(String message) {
|
||||
super(message);
|
||||
}
|
||||
}
|
@ -0,0 +1,42 @@
|
||||
package com.ms.biz.quque.consumer;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.jinritemai.cloud.base.core.util.LogUtils;
|
||||
import com.ms.biz.quque.ConsumerListener;
|
||||
import com.ms.biz.quque.Group;
|
||||
import com.ms.biz.quque.Topic;
|
||||
import com.ms.biz.quque.message.SupplyCenterMessage;
|
||||
import com.ms.biz.service.SupplyCenterService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.rocketmq.client.consumer.listener.ConsumeConcurrentlyContext;
|
||||
import org.apache.rocketmq.client.consumer.listener.ConsumeConcurrentlyStatus;
|
||||
import org.apache.rocketmq.common.message.MessageExt;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Slf4j
|
||||
@ConsumerListener(consumerGroup = Group.GROUP_SUPPLY_CENTER_MESSAGE, topic = Topic.TOPIC_SUPPLY_CENTER_MESSAGE)
|
||||
@Component
|
||||
public class SupplyCenterMessageConsumer extends BaseConsumer {
|
||||
@Autowired
|
||||
private SupplyCenterService supplyCenterService;
|
||||
|
||||
@Override
|
||||
public ConsumeConcurrentlyStatus consumeMessage(List<MessageExt> list, ConsumeConcurrentlyContext consumeConcurrentlyContext) {
|
||||
LogUtils.setLogId(LogUtils.generateLogId());
|
||||
log.info("SupplyCenterMessageConsumer Receive New Messages: {}", JSON.toJSONString(list));
|
||||
for (MessageExt message: list) {
|
||||
try {
|
||||
log.info("consume message: {}", new String(message.getBody()));
|
||||
SupplyCenterMessage supplyCenterMessage = JSON.parseObject(new String(message.getBody()), SupplyCenterMessage.class);
|
||||
supplyCenterService.processMessage(supplyCenterMessage.getMsgId());
|
||||
} catch (Throwable e) {
|
||||
log.error("SupplyCenterMessageConsumerError", e);
|
||||
}
|
||||
}
|
||||
log.info("SupplyCenterMessageConsumer consumeMessage success");
|
||||
return ConsumeConcurrentlyStatus.CONSUME_SUCCESS;
|
||||
}
|
||||
}
|
@ -0,0 +1,11 @@
|
||||
package com.ms.biz.quque.message;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
public class SupplyCenterMessage extends BaseMessage {
|
||||
private String msgId;
|
||||
private Long shopId;
|
||||
}
|
@ -0,0 +1,21 @@
|
||||
package com.ms.biz.service;
|
||||
|
||||
import com.ms.dal.entity.DdSupplyCenterMsg;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public interface DdSupplyCenterMsgService {
|
||||
|
||||
int deleteByPrimaryKey(Long id);
|
||||
|
||||
int insert(DdSupplyCenterMsg record);
|
||||
|
||||
int insertSelective(DdSupplyCenterMsg record);
|
||||
|
||||
DdSupplyCenterMsg selectByPrimaryKey(Long id);
|
||||
|
||||
int updateByPrimaryKeySelective(DdSupplyCenterMsg record);
|
||||
|
||||
int updateByPrimaryKey(DdSupplyCenterMsg record);
|
||||
}
|
@ -0,0 +1,9 @@
|
||||
package com.ms.biz.service;
|
||||
|
||||
|
||||
import com.ms.api.dto.dfapi.request.SupplyCenterMessageRequestDao;
|
||||
import com.ms.api.dto.dfapi.response.CommonResponseDTO;
|
||||
|
||||
public interface DfApiService {
|
||||
CommonResponseDTO receiverDdSupplyCenterMsg(SupplyCenterMessageRequestDao request);
|
||||
}
|
@ -0,0 +1,5 @@
|
||||
package com.ms.biz.service;
|
||||
|
||||
public interface SupplyCenterService {
|
||||
void processMessage(String msgId);
|
||||
}
|
@ -0,0 +1,53 @@
|
||||
package com.ms.biz.service.impl;
|
||||
|
||||
import com.ms.dal.entity.DdSupplyCenterMsg;
|
||||
import com.ms.dal.mapper.DdSupplyCenterMsgMapper;
|
||||
import com.ms.biz.service.DdSupplyCenterMsgService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@Service
|
||||
public class DdSupplyCenterMsgServiceImpl implements DdSupplyCenterMsgService{
|
||||
|
||||
@Autowired
|
||||
private DdSupplyCenterMsgMapper ddSupplyCenterMsgMapper;
|
||||
|
||||
@Override
|
||||
public int deleteByPrimaryKey(Long id) {
|
||||
return ddSupplyCenterMsgMapper.deleteByPrimaryKey(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int insert(DdSupplyCenterMsg record) {
|
||||
return ddSupplyCenterMsgMapper.insert(record);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int insertSelective(DdSupplyCenterMsg record) {
|
||||
return ddSupplyCenterMsgMapper.insertSelective(record);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DdSupplyCenterMsg selectByPrimaryKey(Long id) {
|
||||
return ddSupplyCenterMsgMapper.selectByPrimaryKey(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updateByPrimaryKeySelective(DdSupplyCenterMsg record) {
|
||||
return ddSupplyCenterMsgMapper.updateByPrimaryKeySelective(record);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updateByPrimaryKey(DdSupplyCenterMsg record) {
|
||||
return ddSupplyCenterMsgMapper.updateByPrimaryKey(record);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
@ -0,0 +1,64 @@
|
||||
package com.ms.biz.service.impl;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.ms.api.dto.dfapi.request.SupplyCenterMessageRequestDao;
|
||||
import com.ms.api.dto.dfapi.response.CommonResponseDTO;
|
||||
import com.ms.api.dto.dsapi.request.OperateInfoDTO;
|
||||
import com.ms.biz.consts.CommonConst;
|
||||
import com.ms.biz.service.DfApiService;
|
||||
import com.ms.biz.tool.DfJsonRequestTemplate;
|
||||
import com.ms.biz.tool.SecurityTool;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
@Service
|
||||
@Slf4j
|
||||
@AllArgsConstructor
|
||||
public class DfApiServiceImpl implements DfApiService {
|
||||
private DfJsonRequestTemplate dfJsonRequestTemplate;
|
||||
|
||||
@Override
|
||||
public CommonResponseDTO receiverDdSupplyCenterMsg(SupplyCenterMessageRequestDao request) {
|
||||
String resp = execute("/open/supply_center/message/receiver_dd_supply_center_msg", objectToMap(request));
|
||||
return JSON.parseObject(resp, CommonResponseDTO.class);
|
||||
}
|
||||
|
||||
private Map<String, Object> objectToMap(Object obj) {
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
Class<?> clazz = obj.getClass();
|
||||
System.out.println(clazz);
|
||||
try {
|
||||
for (Field field : clazz.getDeclaredFields()) {
|
||||
field.setAccessible(true);
|
||||
String fieldName = field.getName();
|
||||
Object value = field.get(obj);
|
||||
map.put(fieldName, value);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException("参数解析错误");
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
private String execute(String url, Map<String, Object> params) {
|
||||
log.info("DsApiURL:" + url);
|
||||
log.info("DsApiRequest:" + params);
|
||||
try {
|
||||
String response = dfJsonRequestTemplate.execute(url, params);
|
||||
log.info("DsApiResponse:" + response);
|
||||
return response;
|
||||
} catch (Exception e) {
|
||||
log.error("DsApiException", e);
|
||||
throw new RuntimeException("请求异常" + e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
private OperateInfoDTO createOperateInfo(Long shopId) {
|
||||
return new OperateInfoDTO(SecurityTool.encodeByAES(String.valueOf(shopId)));
|
||||
}
|
||||
}
|
@ -0,0 +1,46 @@
|
||||
package com.ms.biz.service.impl;
|
||||
|
||||
import com.ms.api.dto.dfapi.request.SupplyCenterMessage;
|
||||
import com.ms.api.dto.dfapi.request.SupplyCenterMessageRequestDao;
|
||||
import com.ms.api.dto.dfapi.response.CommonResponseDTO;
|
||||
import com.ms.biz.consts.StatusConst;
|
||||
import com.ms.biz.service.DfApiService;
|
||||
import com.ms.biz.service.SupplyCenterService;
|
||||
import com.ms.dal.entity.DdSupplyCenterMsg;
|
||||
import com.ms.dal.mapper.DdSupplyCenterMsgMapper;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
public class SupplyCenterServiceImpl implements SupplyCenterService {
|
||||
|
||||
@Autowired
|
||||
private DfApiService dfApiService;
|
||||
|
||||
@Autowired
|
||||
private DdSupplyCenterMsgMapper ddSupplyCenterMsgMapper;
|
||||
|
||||
@Override
|
||||
public void processMessage(String msgId) {
|
||||
DdSupplyCenterMsg msg = ddSupplyCenterMsgMapper.selectByMsgId(msgId);
|
||||
List<SupplyCenterMessage> messages = new ArrayList<>();
|
||||
SupplyCenterMessage message = new SupplyCenterMessage();
|
||||
message.setTag(msg.getTag().toString());
|
||||
message.setMsgId(msg.getMsgId());
|
||||
message.setData(msg.getData());
|
||||
messages.add(message);
|
||||
SupplyCenterMessageRequestDao request = new SupplyCenterMessageRequestDao();
|
||||
request.setMessages(messages);
|
||||
CommonResponseDTO response = dfApiService.receiverDdSupplyCenterMsg(request);
|
||||
if (response.isSuccess()) {
|
||||
msg.setStatus(StatusConst.success);
|
||||
} else {
|
||||
msg.setStatus(StatusConst.fail);
|
||||
msg.setReason(response.getReason());
|
||||
}
|
||||
ddSupplyCenterMsgMapper.updateByMsgIdSelective(msg);
|
||||
}
|
||||
}
|
@ -0,0 +1,39 @@
|
||||
package com.ms.biz.spi.callback;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.jinritemai.cloud.base.api.BaseRequest;
|
||||
import com.jinritemai.cloud.base.api.BaseResponse;
|
||||
import com.jinritemai.cloud.base.api.ExtensionService;
|
||||
import com.jinritemai.cloud.base.api.ExtensionServiceHandler;
|
||||
import com.ms.biz.common.SPIBaseService;
|
||||
import com.ms.biz.dto.openspi.request.QuerySupplyPlatformBindNameParam;
|
||||
import com.ms.biz.dto.openspi.response.QuerySupplyPlatformBindNameData;
|
||||
import com.ms.biz.exception.BaseRuntimeException;
|
||||
import com.ms.biz.service.ShopService;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
@ExtensionService("querySupplyPlatformBindName")
|
||||
@Slf4j
|
||||
@AllArgsConstructor
|
||||
public class QuerySupplyPlatformBindNameService extends SPIBaseService implements ExtensionServiceHandler<QuerySupplyPlatformBindNameParam, JSONObject> {
|
||||
private ShopService shopService;
|
||||
|
||||
@Override
|
||||
public BaseResponse<JSONObject> handle(BaseRequest<QuerySupplyPlatformBindNameParam> req) {
|
||||
try {
|
||||
QuerySupplyPlatformBindNameParam param = req.getData();
|
||||
QuerySupplyPlatformBindNameData data = new QuerySupplyPlatformBindNameData();
|
||||
shopService.querySupplyPlatformBindName(param, data);
|
||||
return BaseResponse.<JSONObject>builder().success(true).message("success").code("0").data(JSON.parseObject(JSON.toJSONString(data))).build();
|
||||
} catch (BaseRuntimeException e) {
|
||||
return BaseResponse.<JSONObject>builder().success(true).message(e.getMessage()).code(e.getCode()).build();
|
||||
} catch (RuntimeException e) {
|
||||
return BaseResponse.<JSONObject>builder().success(true).message(e.getMessage()).code("100003").build();
|
||||
} catch (Throwable e) {
|
||||
log.error("querySupplyPlatformBindName error", e);
|
||||
return BaseResponse.<JSONObject>builder().success(true).message("系统异常").code("100003").build();
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,39 @@
|
||||
package com.ms.biz.spi.callback;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.jinritemai.cloud.base.api.BaseRequest;
|
||||
import com.jinritemai.cloud.base.api.BaseResponse;
|
||||
import com.jinritemai.cloud.base.api.ExtensionService;
|
||||
import com.jinritemai.cloud.base.api.ExtensionServiceHandler;
|
||||
import com.ms.biz.common.SPIBaseService;
|
||||
import com.ms.biz.dto.openspi.request.UnbindParam;
|
||||
import com.ms.biz.dto.openspi.response.UnbindData;
|
||||
import com.ms.biz.exception.BaseRuntimeException;
|
||||
import com.ms.biz.service.ShopService;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
@ExtensionService("unbind")
|
||||
@Slf4j
|
||||
@AllArgsConstructor
|
||||
public class UnbindService extends SPIBaseService implements ExtensionServiceHandler<UnbindParam, JSONObject> {
|
||||
private ShopService shopService;
|
||||
|
||||
@Override
|
||||
public BaseResponse<JSONObject> handle(BaseRequest<UnbindParam> req) {
|
||||
try {
|
||||
UnbindParam param = req.getData();
|
||||
UnbindData data = new UnbindData();
|
||||
shopService.unbind(param);
|
||||
return BaseResponse.<JSONObject>builder().success(true).message("success").code("0").data(JSON.parseObject(JSON.toJSONString(data))).build();
|
||||
} catch (BaseRuntimeException e) {
|
||||
return BaseResponse.<JSONObject>builder().success(true).message(e.getMessage()).code(e.getCode()).build();
|
||||
} catch (RuntimeException e) {
|
||||
return BaseResponse.<JSONObject>builder().success(true).message(e.getMessage()).code("100003").build();
|
||||
} catch (Throwable e) {
|
||||
log.error("querySupplyPlatformBindName error", e);
|
||||
return BaseResponse.<JSONObject>builder().success(true).message("系统异常").code("100003").build();
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,28 @@
|
||||
package com.ms.biz.spi.timer;
|
||||
|
||||
import com.jinritemai.cloud.base.api.BaseRequest;
|
||||
import com.jinritemai.cloud.base.api.BaseResponse;
|
||||
import com.jinritemai.cloud.base.api.ExtensionService;
|
||||
import com.jinritemai.cloud.base.api.ExtensionServiceHandler;
|
||||
import com.ms.api.dto.DsMessageDao;
|
||||
import com.ms.biz.common.R;
|
||||
import com.ms.biz.common.Ret;
|
||||
import com.ms.biz.common.TimerBaseService;
|
||||
import com.ms.biz.service.DsMessageService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
@ExtensionService("processDsMessage")
|
||||
@Slf4j
|
||||
public class ProcessDsMessageService extends TimerBaseService implements ExtensionServiceHandler<DsMessageDao, Ret> {
|
||||
@Autowired
|
||||
private DsMessageService dsMessageService;
|
||||
|
||||
@Override
|
||||
public BaseResponse<Ret> handle(BaseRequest<DsMessageDao> req) {
|
||||
Long messageId = req.getData().getMessageId();
|
||||
dsMessageService.processDsMessage(messageId);
|
||||
return R.ok(Ret.success());
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,39 @@
|
||||
package com.ms.biz.spi.timer;
|
||||
|
||||
import com.doudian.open.utils.StringUtil;
|
||||
import com.jinritemai.cloud.base.api.BaseRequest;
|
||||
import com.jinritemai.cloud.base.api.BaseResponse;
|
||||
import com.jinritemai.cloud.base.api.ExtensionService;
|
||||
import com.jinritemai.cloud.base.api.ExtensionServiceHandler;
|
||||
import com.jinritemai.cloud.base.core.util.AuthThreadLocalUtil;
|
||||
import com.ms.api.dto.ShopInfoDao;
|
||||
import com.ms.biz.common.R;
|
||||
import com.ms.biz.common.Ret;
|
||||
import com.ms.biz.common.TimerBaseService;
|
||||
import com.ms.biz.service.DoudianMsgService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@ExtensionService("testSendMsg")
|
||||
@Slf4j
|
||||
public class TestSendMsgService extends TimerBaseService implements ExtensionServiceHandler<ShopInfoDao, Ret> {
|
||||
@Autowired
|
||||
private DoudianMsgService doudianMsgService;
|
||||
|
||||
@Override
|
||||
public BaseResponse<Ret> handle(BaseRequest<ShopInfoDao> req) {
|
||||
String shopId = req.getData().getShopId();
|
||||
if (StringUtil.isEmpty(shopId)) {
|
||||
shopId = "4463798";
|
||||
}
|
||||
AuthThreadLocalUtil.set(shopId);
|
||||
|
||||
List<String> msgList = new ArrayList<>();
|
||||
msgList.add("{\"tag\":\"16000\",\"msg_id\":\"57088508275362107630:037250343:16000:1709036986:1925842976:7290512081592305208\",\"data\":\"{\\\"cargo_id\\\":3658552585478095162,\\\"event_time\\\":1709036986,\\\"product_id\\\":3670126357280588075,\\\"shop_id\\\":37250343}\"}");
|
||||
doudianMsgService.receiveMessages(msgList);
|
||||
return R.ok(Ret.success());
|
||||
}
|
||||
}
|
@ -0,0 +1,80 @@
|
||||
package com.ms.biz.tool;
|
||||
|
||||
import cn.hutool.crypto.SecureUtil;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.serializer.SerializerFeature;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.http.HttpHeaders;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
@Slf4j
|
||||
@Component
|
||||
public class DfJsonRequestTemplate {
|
||||
@Autowired
|
||||
private CloudRequestTemplate cloudRequestTemplate;
|
||||
|
||||
@Value("${jx.df.host-prod}")
|
||||
private String dfHostProd;
|
||||
|
||||
@Value("${jx.df.host-test}")
|
||||
private String dfHostTest;
|
||||
|
||||
@Value("${jx.df.token-prod}")
|
||||
private String dfTokenProd;
|
||||
|
||||
@Value("${jx.df.token-test}")
|
||||
private String dfTokenTest;
|
||||
|
||||
private String dfHost;
|
||||
private String dfToken;
|
||||
|
||||
public String execute(String url, Map<String, Object> body) throws Exception {
|
||||
// 选择环境
|
||||
if (StringUtils.isEmpty(dfHost)) {
|
||||
if (SystemTool.isProdEnv()) {
|
||||
// 当前为生产环境
|
||||
dfHost = dfHostProd;
|
||||
dfToken = dfTokenProd;
|
||||
} else {
|
||||
dfHost = dfHostProd;
|
||||
dfToken = dfTokenProd;
|
||||
}
|
||||
}
|
||||
System.out.println(dfHost + url);
|
||||
|
||||
// 构建头部
|
||||
HttpHeaders headers = new HttpHeaders();
|
||||
// 微应用固定传msddMicro
|
||||
headers.set("x-app-name", "msddMicro");
|
||||
// 使用json方式更符合外部服务管理
|
||||
headers.setContentType(MediaType.APPLICATION_JSON_UTF8);
|
||||
HashMap<String,Object> params = (HashMap<String,Object>)body;
|
||||
// 构建签名
|
||||
Set<String> keySet = params.keySet();
|
||||
String[] keyArray = keySet.toArray(new String[0]);
|
||||
Arrays.sort(keyArray);
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append(dfToken);
|
||||
for (String s : keyArray) {
|
||||
if (!Objects.isNull(params.get(s))) {
|
||||
String value = JSON.toJSONString(params.get(s), SerializerFeature.MapSortField);
|
||||
value = CommonTool.removeQuotes(value);
|
||||
sb.append(s).append(value);
|
||||
}
|
||||
}
|
||||
log.info("req url:" + dfHost + url);
|
||||
sb.append(dfToken);
|
||||
log.info("row str:" + sb);
|
||||
String sign = SecureUtil.md5(sb.toString());
|
||||
log.info("sign str:" + sign);
|
||||
headers.set("x-dd-micro-app-sign", sign);
|
||||
log.info("body str:" + JSON.toJSONString(params, SerializerFeature.MapSortField));
|
||||
return cloudRequestTemplate.executePost(dfHost + url, JSON.toJSONString(params, SerializerFeature.MapSortField), headers);
|
||||
}
|
||||
}
|
@ -0,0 +1,60 @@
|
||||
package com.ms.dal.entity;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 抖店订单消息
|
||||
* @TableName dd_supply_center_msg
|
||||
*/
|
||||
@Data
|
||||
public class DdSupplyCenterMsg implements Serializable {
|
||||
/**
|
||||
* 自增id
|
||||
*/
|
||||
private Long ddSupplyCenterMsgId;
|
||||
|
||||
/**
|
||||
* 官方的消息id
|
||||
*/
|
||||
private String msgId;
|
||||
|
||||
/**
|
||||
* 店铺id
|
||||
*/
|
||||
private Long shopId;
|
||||
|
||||
/**
|
||||
* 消息类型
|
||||
*/
|
||||
private Integer tag;
|
||||
|
||||
/**
|
||||
* 消息内容 json
|
||||
*/
|
||||
private String data;
|
||||
|
||||
/**
|
||||
* 消息处理状态
|
||||
*/
|
||||
private String status;
|
||||
|
||||
/**
|
||||
* 消息处理失败原因
|
||||
*/
|
||||
private String reason;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private Date gmtCreate;
|
||||
|
||||
/**
|
||||
* 修改时间
|
||||
*/
|
||||
private Date gmtModified;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
}
|
@ -0,0 +1,37 @@
|
||||
package com.ms.dal.mapper;
|
||||
|
||||
import com.ms.dal.entity.DdSupplyCenterMsg;
|
||||
import com.ms.dal.entity.DdTradeMsg;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Entity com.ms.dal.entity.DdSupplyCenterMsg
|
||||
*/
|
||||
@Mapper
|
||||
public interface DdSupplyCenterMsgMapper {
|
||||
|
||||
int deleteByPrimaryKey(Long id);
|
||||
|
||||
int insert(DdSupplyCenterMsg record);
|
||||
|
||||
int insertOrUpdate(DdSupplyCenterMsg record);
|
||||
|
||||
int insertSelective(DdSupplyCenterMsg record);
|
||||
|
||||
DdSupplyCenterMsg selectByPrimaryKey(Long id);
|
||||
|
||||
int updateByPrimaryKeySelective(DdSupplyCenterMsg record);
|
||||
|
||||
int updateByPrimaryKey(DdSupplyCenterMsg record);
|
||||
|
||||
int insertBatch(List<DdSupplyCenterMsg> list);
|
||||
|
||||
List<DdSupplyCenterMsg> selectByMsgIds(@Param("msgIds") List<String> msgIds);
|
||||
|
||||
DdSupplyCenterMsg selectByMsgId(String msgId);
|
||||
|
||||
int updateByMsgIdSelective(DdSupplyCenterMsg record);
|
||||
}
|
@ -0,0 +1,226 @@
|
||||
<?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.ms.dal.mapper.DdSupplyCenterMsgMapper">
|
||||
|
||||
<resultMap id="BaseResultMap" type="com.ms.dal.entity.DdSupplyCenterMsg">
|
||||
<id property="ddSupplyCenterMsgId" column="dd_supply_center_msg_id" jdbcType="BIGINT"/>
|
||||
<result property="msgId" column="msg_id" jdbcType="VARCHAR"/>
|
||||
<result property="shopId" column="shop_id" jdbcType="BIGINT"/>
|
||||
<result property="tag" column="tag" jdbcType="SMALLINT"/>
|
||||
<result property="data" column="data" jdbcType="VARCHAR"/>
|
||||
<result property="status" column="status" jdbcType="VARCHAR"/>
|
||||
<result property="reason" column="reason" jdbcType="VARCHAR"/>
|
||||
<result property="gmtCreate" column="gmt_create" jdbcType="TIMESTAMP"/>
|
||||
<result property="gmtModified" column="gmt_modified" jdbcType="TIMESTAMP"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="Base_Column_List">
|
||||
dd_supply_center_msg_id,msg_id,shop_id,
|
||||
tag,data,status,
|
||||
reason,gmt_create,gmt_modified
|
||||
</sql>
|
||||
|
||||
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from dd_supply_center_msg
|
||||
where dd_supply_center_msg_id = #{ddSupplyCenterMsgId,jdbcType=BIGINT}
|
||||
</select>
|
||||
|
||||
<select id="selectByMsgIds" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from dd_supply_center_msg
|
||||
where msg_id in
|
||||
<foreach collection="msgIds" index="index" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</select>
|
||||
<select id="selectByMsgId" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from dd_supply_center_msg
|
||||
where msg_id = #{msgId,jdbcType=VARCHAR}
|
||||
limit 1
|
||||
</select>
|
||||
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||||
delete from dd_supply_center_msg
|
||||
where dd_supply_center_msg_id = #{ddSupplyCenterMsgId,jdbcType=BIGINT}
|
||||
</delete>
|
||||
<insert id="insert" keyColumn="dd_supply_center_msg_id" keyProperty="ddSupplyCenterMsgId" parameterType="com.ms.dal.entity.DdSupplyCenterMsg" useGeneratedKeys="true">
|
||||
insert into dd_supply_center_msg
|
||||
( dd_supply_center_msg_id,msg_id,shop_id
|
||||
,tag,data,status
|
||||
,reason,gmt_create,gmt_modified
|
||||
)
|
||||
values (#{ddSupplyCenterMsgId,jdbcType=BIGINT},#{msgId,jdbcType=VARCHAR},#{shopId,jdbcType=BIGINT}
|
||||
,#{tag,jdbcType=SMALLINT},#{data,jdbcType=VARCHAR},#{status,jdbcType=VARCHAR}
|
||||
,#{reason,jdbcType=VARCHAR},#{gmtCreate,jdbcType=TIMESTAMP},#{gmtModified,jdbcType=TIMESTAMP}
|
||||
)
|
||||
</insert>
|
||||
<update id="insertOrUpdate" keyColumn="dd_supply_center_msg_id" keyProperty="ddSupplyCenterMsgId" parameterType="com.ms.dal.entity.DdSupplyCenterMsg"
|
||||
useGeneratedKeys="true">
|
||||
insert into dd_supply_center_msg
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="ddSupplyCenterMsgId != null">dd_supply_center_msg_id,</if>
|
||||
<if test="msgId != null">msg_id,</if>
|
||||
<if test="shopId != null">shop_id,</if>
|
||||
<if test="tag != null">tag,</if>
|
||||
<if test="data != null">data,</if>
|
||||
<if test="status != null">status,</if>
|
||||
<if test="reason != null">reason,</if>
|
||||
<if test="gmtCreate != null">gmt_create,</if>
|
||||
<if test="gmtModified != null">gmt_modified,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="ddSupplyCenterMsgId != null">#{ddSupplyCenterMsgId,jdbcType=BIGINT},</if>
|
||||
<if test="msgId != null">#{msgId,jdbcType=VARCHAR},</if>
|
||||
<if test="shopId != null">#{shopId,jdbcType=BIGINT},</if>
|
||||
<if test="tag != null">#{tag,jdbcType=SMALLINT},</if>
|
||||
<if test="data != null">#{data,jdbcType=VARCHAR},</if>
|
||||
<if test="status != null">#{status,jdbcType=VARCHAR},</if>
|
||||
<if test="reason != null">#{reason,jdbcType=VARCHAR},</if>
|
||||
<if test="gmtCreate != null">#{gmtCreate,jdbcType=TIMESTAMP},</if>
|
||||
<if test="gmtModified != null">#{gmtModified,jdbcType=TIMESTAMP},</if>
|
||||
</trim>
|
||||
ON DUPLICATE KEY UPDATE
|
||||
<trim suffixOverrides=",">
|
||||
<if test="msgId != null">
|
||||
msg_id = #{msgId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="shopId != null">
|
||||
shop_id = #{shopId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="tag != null">
|
||||
tag = #{tag,jdbcType=SMALLINT},
|
||||
</if>
|
||||
<if test="data != null">
|
||||
data = #{data,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="status != null">
|
||||
status = #{status,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="reason != null">
|
||||
reason = #{reason,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="gmtCreate != null">
|
||||
gmt_create = #{gmtCreate,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="gmtModified != null">
|
||||
gmt_modified = #{gmtModified,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
</trim>
|
||||
</update>
|
||||
<insert id="insertSelective" keyColumn="dd_supply_center_msg_id" keyProperty="ddSupplyCenterMsgId" parameterType="com.ms.dal.entity.DdSupplyCenterMsg" useGeneratedKeys="true">
|
||||
insert into dd_supply_center_msg
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="ddSupplyCenterMsgId != null">dd_supply_center_msg_id,</if>
|
||||
<if test="msgId != null">msg_id,</if>
|
||||
<if test="shopId != null">shop_id,</if>
|
||||
<if test="tag != null">tag,</if>
|
||||
<if test="data != null">data,</if>
|
||||
<if test="status != null">status,</if>
|
||||
<if test="reason != null">reason,</if>
|
||||
<if test="gmtCreate != null">gmt_create,</if>
|
||||
<if test="gmtModified != null">gmt_modified,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="ddSupplyCenterMsgId != null">#{ddSupplyCenterMsgId,jdbcType=BIGINT},</if>
|
||||
<if test="msgId != null">#{msgId,jdbcType=VARCHAR},</if>
|
||||
<if test="shopId != null">#{shopId,jdbcType=BIGINT},</if>
|
||||
<if test="tag != null">#{tag,jdbcType=SMALLINT},</if>
|
||||
<if test="data != null">#{data,jdbcType=VARCHAR},</if>
|
||||
<if test="status != null">#{status,jdbcType=VARCHAR},</if>
|
||||
<if test="reason != null">#{reason,jdbcType=VARCHAR},</if>
|
||||
<if test="gmtCreate != null">#{gmtCreate,jdbcType=TIMESTAMP},</if>
|
||||
<if test="gmtModified != null">#{gmtModified,jdbcType=TIMESTAMP},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<insert id="insertBatch" useGeneratedKeys="true" keyColumn="dd_supply_center_msg_id" keyProperty="list.ddSupplyCenterMsgId" parameterType="java.util.List">
|
||||
insert into dd_supply_center_msg
|
||||
(dd_supply_center_msg_id,msg_id,shop_id
|
||||
,tag,data,status
|
||||
,reason,gmt_create,gmt_modified
|
||||
)
|
||||
values
|
||||
<foreach collection="list" item="item" index="index" separator=",">
|
||||
(#{item.ddSupplyCenterMsgId,jdbcType=BIGINT},#{item.msgId,jdbcType=VARCHAR},#{item.shopId,jdbcType=BIGINT}
|
||||
,#{item.tag,jdbcType=SMALLINT},#{item.data,jdbcType=VARCHAR},#{item.status,jdbcType=VARCHAR}
|
||||
,#{item.reason,jdbcType=VARCHAR},#{item.gmtCreate,jdbcType=TIMESTAMP},#{item.gmtModified,jdbcType=TIMESTAMP}
|
||||
)
|
||||
</foreach>
|
||||
</insert>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.ms.dal.entity.DdSupplyCenterMsg">
|
||||
update dd_supply_center_msg
|
||||
<set>
|
||||
<if test="msgId != null">
|
||||
msg_id = #{msgId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="shopId != null">
|
||||
shop_id = #{shopId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="tag != null">
|
||||
tag = #{tag,jdbcType=SMALLINT},
|
||||
</if>
|
||||
<if test="data != null">
|
||||
data = #{data,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="status != null">
|
||||
status = #{status,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="reason != null">
|
||||
reason = #{reason,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="gmtCreate != null">
|
||||
gmt_create = #{gmtCreate,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="gmtModified != null">
|
||||
gmt_modified = #{gmtModified,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
</set>
|
||||
where dd_supply_center_msg_id = #{ddSupplyCenterMsgId,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.ms.dal.entity.DdSupplyCenterMsg">
|
||||
update dd_supply_center_msg
|
||||
set
|
||||
msg_id = #{msgId,jdbcType=VARCHAR},
|
||||
shop_id = #{shopId,jdbcType=BIGINT},
|
||||
tag = #{tag,jdbcType=SMALLINT},
|
||||
data = #{data,jdbcType=VARCHAR},
|
||||
status = #{status,jdbcType=VARCHAR},
|
||||
reason = #{reason,jdbcType=VARCHAR},
|
||||
gmt_create = #{gmtCreate,jdbcType=TIMESTAMP},
|
||||
gmt_modified = #{gmtModified,jdbcType=TIMESTAMP}
|
||||
where dd_supply_center_msg_id = #{ddSupplyCenterMsgId,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByMsgIdSelective" parameterType="com.ms.dal.entity.DdSupplyCenterMsg">
|
||||
update dd_supply_center_msg
|
||||
<set>
|
||||
<if test="shopId != null">
|
||||
shop_id = #{shopId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="tag != null">
|
||||
tag = #{tag,jdbcType=SMALLINT},
|
||||
</if>
|
||||
<if test="data != null">
|
||||
data = #{data,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="status != null">
|
||||
status = #{status,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="reason != null">
|
||||
reason = #{reason,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="gmtCreate != null">
|
||||
gmt_create = #{gmtCreate,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="gmtModified != null">
|
||||
gmt_modified = #{gmtModified,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
</set>
|
||||
where msg_id = #{msgId,jdbcType=VARCHAR}
|
||||
</update>
|
||||
</mapper>
|
Loading…
Reference in New Issue