Merge branch 'master' of https://codeup.aliyun.com/64d9c5feeceb191898f636d7/honor-dd-light-ds-java
commit
8f8d557b5c
@ -0,0 +1,10 @@
|
||||
package com.ms.api.dto.dsapi.response;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
@Data
|
||||
public class BatchAddDsPurchaseConfirmLogResponseDTO extends CommonResponseDTO {
|
||||
HashMap<String, Long> platformOrderIdAndPurchaseConfirmLogIdMap;
|
||||
}
|
@ -0,0 +1,27 @@
|
||||
package com.ms.api.consts;
|
||||
public class QueueConst {
|
||||
|
||||
public static final String orderCareRsyncQueue = "order_care_rsync_queue";
|
||||
public static final String orderFullRsyncQueue = "order_full_rsync_queue";
|
||||
public static final String orderQuickRsyncQueue = "order_quick_rsync_queue";
|
||||
|
||||
public static final String wareQuickRsyncQueue = "ware_quick_rsync_queue";
|
||||
public static final String wareFullRsyncQueue = "ware_full_rsync_queue";
|
||||
|
||||
public static final String crmMemberFullRsyncQueue = "crm_member_full_rsync_queue";
|
||||
public static final String crmMemberQuickRsyncQueue = "crm_member_quick_rsync_queue";
|
||||
|
||||
public static final String titleKeywordRsyncQueue = "title_keyword_rsync_queue";
|
||||
|
||||
public static final String statusProcessing = "processing";
|
||||
public static final String statusWait = "wait";
|
||||
public static final String statusFinish = "finish";
|
||||
|
||||
public static final Integer maxMoveImportTaskQueueCount = 1000;
|
||||
public static final Integer maxMoveImportTaskQueueCountSelf = 50;
|
||||
|
||||
public static String getQueueIdColumnName(String queueName) {
|
||||
return queueName.concat("_id");
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,21 @@
|
||||
package com.ms.api.service;
|
||||
|
||||
import com.ms.dal.entity.PurchaseOrderCustom;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public interface PurchaseOrderCustomService {
|
||||
|
||||
int deleteByPrimaryKey(Long id);
|
||||
|
||||
int insert(PurchaseOrderCustom record);
|
||||
|
||||
int insertSelective(PurchaseOrderCustom record);
|
||||
|
||||
PurchaseOrderCustom selectByPrimaryKey(Long id);
|
||||
|
||||
int updateByPrimaryKeySelective(PurchaseOrderCustom record);
|
||||
|
||||
int updateByPrimaryKey(PurchaseOrderCustom record);
|
||||
}
|
@ -0,0 +1,21 @@
|
||||
package com.ms.api.service;
|
||||
|
||||
import com.ms.dal.entity.PurchaseOrderDsEncrypt;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public interface PurchaseOrderDsEncryptService {
|
||||
|
||||
int deleteByPrimaryKey(Long id);
|
||||
|
||||
int insert(PurchaseOrderDsEncrypt record);
|
||||
|
||||
int insertSelective(PurchaseOrderDsEncrypt record);
|
||||
|
||||
PurchaseOrderDsEncrypt selectByPrimaryKey(Long id);
|
||||
|
||||
int updateByPrimaryKeySelective(PurchaseOrderDsEncrypt record);
|
||||
|
||||
int updateByPrimaryKey(PurchaseOrderDsEncrypt record);
|
||||
}
|
@ -0,0 +1,4 @@
|
||||
package com.ms.api.service;
|
||||
|
||||
public interface QueueService {
|
||||
}
|
@ -0,0 +1,53 @@
|
||||
package com.ms.api.service.impl;
|
||||
|
||||
import com.ms.dal.entity.PurchaseOrderCustom;
|
||||
import com.ms.api.service.PurchaseOrderCustomService;
|
||||
import com.ms.dal.mapper.PurchaseOrderCustomMapper;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@Service
|
||||
public class PurchaseOrderCustomServiceImpl implements PurchaseOrderCustomService{
|
||||
|
||||
@Autowired
|
||||
private PurchaseOrderCustomMapper purchaseOrderCustomMapper;
|
||||
|
||||
@Override
|
||||
public int deleteByPrimaryKey(Long id) {
|
||||
return purchaseOrderCustomMapper.deleteByPrimaryKey(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int insert(PurchaseOrderCustom record) {
|
||||
return purchaseOrderCustomMapper.insert(record);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int insertSelective(PurchaseOrderCustom record) {
|
||||
return purchaseOrderCustomMapper.insertSelective(record);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PurchaseOrderCustom selectByPrimaryKey(Long id) {
|
||||
return purchaseOrderCustomMapper.selectByPrimaryKey(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updateByPrimaryKeySelective(PurchaseOrderCustom record) {
|
||||
return purchaseOrderCustomMapper.updateByPrimaryKeySelective(record);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updateByPrimaryKey(PurchaseOrderCustom record) {
|
||||
return purchaseOrderCustomMapper.updateByPrimaryKey(record);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
@ -0,0 +1,53 @@
|
||||
package com.ms.api.service.impl;
|
||||
|
||||
import com.ms.dal.entity.PurchaseOrderDsEncrypt;
|
||||
import com.ms.api.service.PurchaseOrderDsEncryptService;
|
||||
import com.ms.dal.mapper.PurchaseOrderDsEncryptMapper;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@Service
|
||||
public class PurchaseOrderDsEncryptServiceImpl implements PurchaseOrderDsEncryptService{
|
||||
|
||||
@Autowired
|
||||
private PurchaseOrderDsEncryptMapper purchaseOrderDsEncryptMapper;
|
||||
|
||||
@Override
|
||||
public int deleteByPrimaryKey(Long id) {
|
||||
return purchaseOrderDsEncryptMapper.deleteByPrimaryKey(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int insert(PurchaseOrderDsEncrypt record) {
|
||||
return purchaseOrderDsEncryptMapper.insert(record);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int insertSelective(PurchaseOrderDsEncrypt record) {
|
||||
return purchaseOrderDsEncryptMapper.insertSelective(record);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PurchaseOrderDsEncrypt selectByPrimaryKey(Long id) {
|
||||
return purchaseOrderDsEncryptMapper.selectByPrimaryKey(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updateByPrimaryKeySelective(PurchaseOrderDsEncrypt record) {
|
||||
return purchaseOrderDsEncryptMapper.updateByPrimaryKeySelective(record);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updateByPrimaryKey(PurchaseOrderDsEncrypt record) {
|
||||
return purchaseOrderDsEncryptMapper.updateByPrimaryKey(record);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
@ -0,0 +1,30 @@
|
||||
package com.ms.api.service.impl;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.ms.api.consts.QueueConst;
|
||||
import com.ms.api.consts.RedisKeyConst;
|
||||
import com.ms.api.service.QueueService;
|
||||
import com.ms.dal.mapper.QueueMapper;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.data.redis.core.RedisTemplate;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Service
|
||||
@AllArgsConstructor
|
||||
public class QueueServiceImpl implements QueueService {
|
||||
|
||||
private final RedisTemplate<String, String> redisTemplate;
|
||||
|
||||
private final QueueMapper queueMapper;
|
||||
|
||||
// public void lockSolidRedisQueue(Integer timerLockId, String queueName, boolean isAdminSelf) {
|
||||
// String queueRedisKey = RedisKeyConst.getQueueRedisKey(queueName, isAdminSelf);
|
||||
// String queueId = redisTemplate.opsForList().rightPop(queueRedisKey);
|
||||
// if (StrUtil.isBlank(queueId)) {
|
||||
// return;
|
||||
// }
|
||||
// String primaryColumn = QueueConst.getQueueIdColumnName(queueName);
|
||||
// queueMapper.queryFirstRow("select * from %b where `locked` = 0 and %b = %i");
|
||||
//
|
||||
// }
|
||||
}
|
@ -0,0 +1,126 @@
|
||||
package com.ms.api.task;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.concurrent.Executor;
|
||||
import java.util.stream.Collectors;
|
||||
import javax.annotation.Resource;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.ms.api.common.StrObjMap;
|
||||
import com.ms.api.common.TaskBaseService;
|
||||
import com.ms.api.consts.RedisKeyConst;
|
||||
import com.ms.api.service.MoveProductPublishQueueService;
|
||||
import com.ms.api.service.OpOrderRsyncQueueService;
|
||||
import com.ms.api.tool.CommonTool;
|
||||
import com.ms.dal.entity.MoveProductPublishBuffer;
|
||||
import com.ms.dal.entity.MoveProductPublishQueue;
|
||||
import com.ms.dal.entity.MoveShopConfig;
|
||||
import com.ms.dal.entity.OpOrderRsyncQueue;
|
||||
import com.ms.dal.mapper.OpOrderRsyncQueueMapper;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
* 将move_product_publish_buffer中的数据
|
||||
* 移到move_product_publish_queue中的操作
|
||||
*/
|
||||
@Configuration
|
||||
@Component
|
||||
@Slf4j
|
||||
public class RsyncOpTaskService extends TaskBaseService {
|
||||
|
||||
private static final String TASK_NAME = "RsyncOp";
|
||||
|
||||
@Autowired
|
||||
private OpOrderRsyncQueueService opOrderRsyncQueueService;
|
||||
|
||||
|
||||
/**
|
||||
* 同时开启任务处理数量
|
||||
*/
|
||||
@Override
|
||||
public int getCorePoolSiz() {
|
||||
return 3;
|
||||
}
|
||||
|
||||
/**
|
||||
* 任务管理器名称
|
||||
*/
|
||||
@Override
|
||||
public String getTaskExecutorName() {
|
||||
return "rsyncOpTaskPool";
|
||||
}
|
||||
|
||||
@Bean(name = "rsyncOpTaskPool")
|
||||
@Override
|
||||
public Executor getAsyncExecutor() {
|
||||
return super.getAsyncExecutor();
|
||||
}
|
||||
|
||||
@Resource(name = "rsyncOpTaskPool")
|
||||
protected Executor taskPool;
|
||||
|
||||
@Override
|
||||
protected Executor getTaskPool() {
|
||||
return taskPool;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void runTask() {
|
||||
super.runTask();
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取任务
|
||||
*/
|
||||
@Override
|
||||
public Object getTask() {
|
||||
return getBuffer(500);
|
||||
}
|
||||
|
||||
/**
|
||||
* 处理任务
|
||||
*
|
||||
* @param params
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public Object processTask(Object params) {
|
||||
Map<Long, Integer> selectMap = (Map<Long, Integer>) params;
|
||||
log.info("start moveProductPublishBufferToQueue");
|
||||
Map<Long, Integer> bufferCountMap = bufferToQueue(selectMap);
|
||||
log.info("end moveProductPublishBufferToQueue ret: " + bufferCountMap.toString());
|
||||
return bufferCountMap;
|
||||
}
|
||||
|
||||
private Map<Long, Integer> bufferToQueue(Map<Long, Integer> selectMap) {
|
||||
return new HashMap();
|
||||
}
|
||||
|
||||
/**
|
||||
* 清理任务
|
||||
*
|
||||
* @param params
|
||||
*/
|
||||
@Override
|
||||
public void clearTask(Object params) {
|
||||
}
|
||||
private Map<Long, Integer> getBuffer(int maxQueueCount) {
|
||||
log.info("handle {}",TASK_NAME);
|
||||
return new HashMap<>();
|
||||
}
|
||||
|
||||
private void lockRsyncOpQueue(Long timerLockId){
|
||||
opOrderRsyncQueueService.lockSolidRedisQueue(timerLockId,false);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,70 @@
|
||||
package com.ms.dal.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
*
|
||||
* @TableName purchase_order_custom
|
||||
*/
|
||||
@Data
|
||||
public class PurchaseOrderCustom implements Serializable {
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private Long purchaseOrderCustomId;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private Long purchaseOrderId;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private Long shopId;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private BigDecimal customPurchaseOrderPayment;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private String customPurchaseOrderBuyer;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private String customPurchaseOrderSeller;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private Long operateShopId;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private String operateIp;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private String lastPayFailReason;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private Date gmtCreate;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private Date gmtModified;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
}
|
@ -0,0 +1,64 @@
|
||||
package com.ms.dal.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
*
|
||||
* @TableName purchase_order_ds_encrypt
|
||||
*/
|
||||
@Data
|
||||
public class PurchaseOrderDsEncrypt implements Serializable {
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private Long purchaseOrderDsEncryptId;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private Long shopId;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private String orderId;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private String purchaseOrderSn;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private Boolean isSupportEncryptOrder;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private Byte isEncryptOrder;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private String result;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private String reason;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private Date gmtCreate;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private Date gmtModified;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
}
|
@ -0,0 +1,26 @@
|
||||
package com.ms.dal.mapper;
|
||||
|
||||
import com.ms.dal.entity.PurchaseOrderCustom;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* @Entity com.ms.dal.entity.PurchaseOrderCustom
|
||||
*/
|
||||
@Mapper
|
||||
public interface PurchaseOrderCustomMapper {
|
||||
|
||||
int deleteByPrimaryKey(Long id);
|
||||
|
||||
int insert(PurchaseOrderCustom record);
|
||||
|
||||
int insertOrUpdate(PurchaseOrderCustom record);
|
||||
|
||||
int insertSelective(PurchaseOrderCustom record);
|
||||
|
||||
PurchaseOrderCustom selectByPrimaryKey(Long id);
|
||||
|
||||
int updateByPrimaryKeySelective(PurchaseOrderCustom record);
|
||||
|
||||
int updateByPrimaryKey(PurchaseOrderCustom record);
|
||||
|
||||
}
|
@ -0,0 +1,26 @@
|
||||
package com.ms.dal.mapper;
|
||||
|
||||
import com.ms.dal.entity.PurchaseOrderDsEncrypt;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* @Entity com.ms.dal.entity.PurchaseOrderDsEncrypt
|
||||
*/
|
||||
@Mapper
|
||||
public interface PurchaseOrderDsEncryptMapper {
|
||||
|
||||
int deleteByPrimaryKey(Long id);
|
||||
|
||||
int insert(PurchaseOrderDsEncrypt record);
|
||||
|
||||
int insertOrUpdate(PurchaseOrderDsEncrypt record);
|
||||
|
||||
int insertSelective(PurchaseOrderDsEncrypt record);
|
||||
|
||||
PurchaseOrderDsEncrypt selectByPrimaryKey(Long id);
|
||||
|
||||
int updateByPrimaryKeySelective(PurchaseOrderDsEncrypt record);
|
||||
|
||||
int updateByPrimaryKey(PurchaseOrderDsEncrypt record);
|
||||
|
||||
}
|
@ -0,0 +1,8 @@
|
||||
package com.ms.dal.mapper;
|
||||
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
@Mapper
|
||||
public interface QueueMapper {
|
||||
|
||||
}
|
@ -0,0 +1,144 @@
|
||||
<?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.PurchaseOrderCustomMapper">
|
||||
|
||||
<resultMap id="BaseResultMap" type="com.ms.dal.entity.PurchaseOrderCustom">
|
||||
<id property="purchaseOrderCustomId" column="purchase_order_custom_id" jdbcType="BIGINT"/>
|
||||
<result property="purchaseOrderId" column="purchase_order_id" jdbcType="BIGINT"/>
|
||||
<result property="shopId" column="shop_id" jdbcType="BIGINT"/>
|
||||
<result property="customPurchaseOrderPayment" column="custom_purchase_order_payment" jdbcType="DECIMAL"/>
|
||||
<result property="customPurchaseOrderBuyer" column="custom_purchase_order_buyer" jdbcType="VARCHAR"/>
|
||||
<result property="customPurchaseOrderSeller" column="custom_purchase_order_seller" jdbcType="VARCHAR"/>
|
||||
<result property="operateShopId" column="operate_shop_id" jdbcType="BIGINT"/>
|
||||
<result property="operateIp" column="operate_ip" jdbcType="VARCHAR"/>
|
||||
<result property="lastPayFailReason" column="last_pay_fail_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">
|
||||
purchase_order_custom_id,purchase_order_id,shop_id,
|
||||
custom_purchase_order_payment,custom_purchase_order_buyer,custom_purchase_order_seller,
|
||||
operate_shop_id,operate_ip,last_pay_fail_reason,
|
||||
gmt_create,gmt_modified
|
||||
</sql>
|
||||
|
||||
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from purchase_order_custom
|
||||
where purchase_order_custom_id = #{purchaseOrderCustomId,jdbcType=BIGINT}
|
||||
</select>
|
||||
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||||
delete from purchase_order_custom
|
||||
where purchase_order_custom_id = #{purchaseOrderCustomId,jdbcType=BIGINT}
|
||||
</delete>
|
||||
<insert id="insert" keyColumn="purchase_order_custom_id" keyProperty="purchaseOrderCustomId" parameterType="com.ms.dal.entity.PurchaseOrderCustom" useGeneratedKeys="true">
|
||||
insert into purchase_order_custom
|
||||
( purchase_order_custom_id,purchase_order_id,shop_id
|
||||
,custom_purchase_order_payment,custom_purchase_order_buyer,custom_purchase_order_seller
|
||||
,operate_shop_id,operate_ip,last_pay_fail_reason
|
||||
,gmt_create,gmt_modified)
|
||||
values (#{purchaseOrderCustomId,jdbcType=BIGINT},#{purchaseOrderId,jdbcType=BIGINT},#{shopId,jdbcType=BIGINT}
|
||||
,#{customPurchaseOrderPayment,jdbcType=DECIMAL},#{customPurchaseOrderBuyer,jdbcType=VARCHAR},#{customPurchaseOrderSeller,jdbcType=VARCHAR}
|
||||
,#{operateShopId,jdbcType=BIGINT},#{operateIp,jdbcType=VARCHAR},#{lastPayFailReason,jdbcType=VARCHAR}
|
||||
,#{gmtCreate,jdbcType=TIMESTAMP},#{gmtModified,jdbcType=TIMESTAMP})
|
||||
</insert>
|
||||
<update id="insertOrUpdate" keyColumn="purchase_order_custom_id" keyProperty="purchaseOrderCustomId" parameterType="com.ms.dal.entity.PurchaseOrderCustom"
|
||||
useGeneratedKeys="true">
|
||||
insert into purchase_order_custom
|
||||
( purchase_order_custom_id,purchase_order_id,shop_id
|
||||
,custom_purchase_order_payment,custom_purchase_order_buyer,custom_purchase_order_seller
|
||||
,operate_shop_id,operate_ip,last_pay_fail_reason
|
||||
,gmt_create,gmt_modified)
|
||||
values (#{purchaseOrderCustomId,jdbcType=BIGINT},#{purchaseOrderId,jdbcType=BIGINT},#{shopId,jdbcType=BIGINT}
|
||||
,#{customPurchaseOrderPayment,jdbcType=DECIMAL},#{customPurchaseOrderBuyer,jdbcType=VARCHAR},#{customPurchaseOrderSeller,jdbcType=VARCHAR}
|
||||
,#{operateShopId,jdbcType=BIGINT},#{operateIp,jdbcType=VARCHAR},#{lastPayFailReason,jdbcType=VARCHAR}
|
||||
,#{gmtCreate,jdbcType=TIMESTAMP},#{gmtModified,jdbcType=TIMESTAMP})
|
||||
ON DUPLICATE KEY UPDATE
|
||||
purchase_order_id = #{purchaseOrderId,jdbcType=BIGINT}, shop_id = #{shopId,jdbcType=BIGINT}, custom_purchase_order_payment = #{customPurchaseOrderPayment,jdbcType=DECIMAL}, custom_purchase_order_buyer = #{customPurchaseOrderBuyer,jdbcType=VARCHAR}, custom_purchase_order_seller = #{customPurchaseOrderSeller,jdbcType=VARCHAR}, operate_shop_id = #{operateShopId,jdbcType=BIGINT}, operate_ip = #{operateIp,jdbcType=VARCHAR}, last_pay_fail_reason = #{lastPayFailReason,jdbcType=VARCHAR}, gmt_create = #{gmtCreate,jdbcType=TIMESTAMP}, gmt_modified = #{gmtModified,jdbcType=TIMESTAMP}
|
||||
</update>
|
||||
<insert id="insertSelective" keyColumn="purchase_order_custom_id" keyProperty="purchaseOrderCustomId" parameterType="com.ms.dal.entity.PurchaseOrderCustom" useGeneratedKeys="true">
|
||||
insert into purchase_order_custom
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="purchaseOrderCustomId != null">purchase_order_custom_id,</if>
|
||||
<if test="purchaseOrderId != null">purchase_order_id,</if>
|
||||
<if test="shopId != null">shop_id,</if>
|
||||
<if test="customPurchaseOrderPayment != null">custom_purchase_order_payment,</if>
|
||||
<if test="customPurchaseOrderBuyer != null">custom_purchase_order_buyer,</if>
|
||||
<if test="customPurchaseOrderSeller != null">custom_purchase_order_seller,</if>
|
||||
<if test="operateShopId != null">operate_shop_id,</if>
|
||||
<if test="operateIp != null">operate_ip,</if>
|
||||
<if test="lastPayFailReason != null">last_pay_fail_reason,</if>
|
||||
<if test="gmtCreate != null">gmt_create,</if>
|
||||
<if test="gmtModified != null">gmt_modified,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="purchaseOrderCustomId != null">#{purchaseOrderCustomId,jdbcType=BIGINT},</if>
|
||||
<if test="purchaseOrderId != null">#{purchaseOrderId,jdbcType=BIGINT},</if>
|
||||
<if test="shopId != null">#{shopId,jdbcType=BIGINT},</if>
|
||||
<if test="customPurchaseOrderPayment != null">#{customPurchaseOrderPayment,jdbcType=DECIMAL},</if>
|
||||
<if test="customPurchaseOrderBuyer != null">#{customPurchaseOrderBuyer,jdbcType=VARCHAR},</if>
|
||||
<if test="customPurchaseOrderSeller != null">#{customPurchaseOrderSeller,jdbcType=VARCHAR},</if>
|
||||
<if test="operateShopId != null">#{operateShopId,jdbcType=BIGINT},</if>
|
||||
<if test="operateIp != null">#{operateIp,jdbcType=VARCHAR},</if>
|
||||
<if test="lastPayFailReason != null">#{lastPayFailReason,jdbcType=VARCHAR},</if>
|
||||
<if test="gmtCreate != null">#{gmtCreate,jdbcType=TIMESTAMP},</if>
|
||||
<if test="gmtModified != null">#{gmtModified,jdbcType=TIMESTAMP},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.ms.dal.entity.PurchaseOrderCustom">
|
||||
update purchase_order_custom
|
||||
<set>
|
||||
<if test="purchaseOrderId != null">
|
||||
purchase_order_id = #{purchaseOrderId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="shopId != null">
|
||||
shop_id = #{shopId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="customPurchaseOrderPayment != null">
|
||||
custom_purchase_order_payment = #{customPurchaseOrderPayment,jdbcType=DECIMAL},
|
||||
</if>
|
||||
<if test="customPurchaseOrderBuyer != null">
|
||||
custom_purchase_order_buyer = #{customPurchaseOrderBuyer,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="customPurchaseOrderSeller != null">
|
||||
custom_purchase_order_seller = #{customPurchaseOrderSeller,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="operateShopId != null">
|
||||
operate_shop_id = #{operateShopId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="operateIp != null">
|
||||
operate_ip = #{operateIp,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="lastPayFailReason != null">
|
||||
last_pay_fail_reason = #{lastPayFailReason,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 purchase_order_custom_id = #{purchaseOrderCustomId,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.ms.dal.entity.PurchaseOrderCustom">
|
||||
update purchase_order_custom
|
||||
set
|
||||
purchase_order_id = #{purchaseOrderId,jdbcType=BIGINT},
|
||||
shop_id = #{shopId,jdbcType=BIGINT},
|
||||
custom_purchase_order_payment = #{customPurchaseOrderPayment,jdbcType=DECIMAL},
|
||||
custom_purchase_order_buyer = #{customPurchaseOrderBuyer,jdbcType=VARCHAR},
|
||||
custom_purchase_order_seller = #{customPurchaseOrderSeller,jdbcType=VARCHAR},
|
||||
operate_shop_id = #{operateShopId,jdbcType=BIGINT},
|
||||
operate_ip = #{operateIp,jdbcType=VARCHAR},
|
||||
last_pay_fail_reason = #{lastPayFailReason,jdbcType=VARCHAR},
|
||||
gmt_create = #{gmtCreate,jdbcType=TIMESTAMP},
|
||||
gmt_modified = #{gmtModified,jdbcType=TIMESTAMP}
|
||||
where purchase_order_custom_id = #{purchaseOrderCustomId,jdbcType=BIGINT}
|
||||
</update>
|
||||
</mapper>
|
@ -0,0 +1,137 @@
|
||||
<?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.PurchaseOrderDsEncryptMapper">
|
||||
|
||||
<resultMap id="BaseResultMap" type="com.ms.dal.entity.PurchaseOrderDsEncrypt">
|
||||
<id property="purchaseOrderDsEncryptId" column="purchase_order_ds_encrypt_id" jdbcType="BIGINT"/>
|
||||
<result property="shopId" column="shop_id" jdbcType="BIGINT"/>
|
||||
<result property="orderId" column="order_id" jdbcType="VARCHAR"/>
|
||||
<result property="purchaseOrderSn" column="purchase_order_sn" jdbcType="VARCHAR"/>
|
||||
<result property="isSupportEncryptOrder" column="is_support_encrypt_order" jdbcType="BOOLEAN"/>
|
||||
<result property="isEncryptOrder" column="is_encrypt_order" jdbcType="TINYINT"/>
|
||||
<result property="result" column="result" 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">
|
||||
purchase_order_ds_encrypt_id,shop_id,order_id,
|
||||
purchase_order_sn,is_support_encrypt_order,is_encrypt_order,
|
||||
result,reason,gmt_create,
|
||||
gmt_modified
|
||||
</sql>
|
||||
|
||||
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from purchase_order_ds_encrypt
|
||||
where purchase_order_ds_encrypt_id = #{purchaseOrderDsEncryptId,jdbcType=BIGINT}
|
||||
</select>
|
||||
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||||
delete from purchase_order_ds_encrypt
|
||||
where purchase_order_ds_encrypt_id = #{purchaseOrderDsEncryptId,jdbcType=BIGINT}
|
||||
</delete>
|
||||
<insert id="insert" keyColumn="purchase_order_ds_encrypt_id" keyProperty="purchaseOrderDsEncryptId" parameterType="com.ms.dal.entity.PurchaseOrderDsEncrypt" useGeneratedKeys="true">
|
||||
insert into purchase_order_ds_encrypt
|
||||
( purchase_order_ds_encrypt_id,shop_id,order_id
|
||||
,purchase_order_sn,is_support_encrypt_order,is_encrypt_order
|
||||
,result,reason,gmt_create
|
||||
,gmt_modified)
|
||||
values (#{purchaseOrderDsEncryptId,jdbcType=BIGINT},#{shopId,jdbcType=BIGINT},#{orderId,jdbcType=VARCHAR}
|
||||
,#{purchaseOrderSn,jdbcType=VARCHAR},#{isSupportEncryptOrder,jdbcType=BOOLEAN},#{isEncryptOrder,jdbcType=TINYINT}
|
||||
,#{result,jdbcType=VARCHAR},#{reason,jdbcType=VARCHAR},#{gmtCreate,jdbcType=TIMESTAMP}
|
||||
,#{gmtModified,jdbcType=TIMESTAMP})
|
||||
</insert>
|
||||
<update id="insertOrUpdate" keyColumn="purchase_order_ds_encrypt_id" keyProperty="purchaseOrderDsEncryptId" parameterType="com.ms.dal.entity.PurchaseOrderDsEncrypt"
|
||||
useGeneratedKeys="true">
|
||||
insert into purchase_order_ds_encrypt
|
||||
( purchase_order_ds_encrypt_id,shop_id,order_id
|
||||
,purchase_order_sn,is_support_encrypt_order,is_encrypt_order
|
||||
,result,reason,gmt_create
|
||||
,gmt_modified)
|
||||
values (#{purchaseOrderDsEncryptId,jdbcType=BIGINT},#{shopId,jdbcType=BIGINT},#{orderId,jdbcType=VARCHAR}
|
||||
,#{purchaseOrderSn,jdbcType=VARCHAR},#{isSupportEncryptOrder,jdbcType=BOOLEAN},#{isEncryptOrder,jdbcType=TINYINT}
|
||||
,#{result,jdbcType=VARCHAR},#{reason,jdbcType=VARCHAR},#{gmtCreate,jdbcType=TIMESTAMP}
|
||||
,#{gmtModified,jdbcType=TIMESTAMP})
|
||||
ON DUPLICATE KEY UPDATE
|
||||
shop_id = #{shopId,jdbcType=BIGINT}, order_id = #{orderId,jdbcType=VARCHAR}, purchase_order_sn = #{purchaseOrderSn,jdbcType=VARCHAR}, is_support_encrypt_order = #{isSupportEncryptOrder,jdbcType=BOOLEAN}, is_encrypt_order = #{isEncryptOrder,jdbcType=TINYINT}, result = #{result,jdbcType=VARCHAR}, reason = #{reason,jdbcType=VARCHAR}, gmt_create = #{gmtCreate,jdbcType=TIMESTAMP}, gmt_modified = #{gmtModified,jdbcType=TIMESTAMP}
|
||||
</update>
|
||||
<insert id="insertSelective" keyColumn="purchase_order_ds_encrypt_id" keyProperty="purchaseOrderDsEncryptId" parameterType="com.ms.dal.entity.PurchaseOrderDsEncrypt" useGeneratedKeys="true">
|
||||
insert into purchase_order_ds_encrypt
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="purchaseOrderDsEncryptId != null">purchase_order_ds_encrypt_id,</if>
|
||||
<if test="shopId != null">shop_id,</if>
|
||||
<if test="orderId != null">order_id,</if>
|
||||
<if test="purchaseOrderSn != null">purchase_order_sn,</if>
|
||||
<if test="isSupportEncryptOrder != null">is_support_encrypt_order,</if>
|
||||
<if test="isEncryptOrder != null">is_encrypt_order,</if>
|
||||
<if test="result != null">result,</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="purchaseOrderDsEncryptId != null">#{purchaseOrderDsEncryptId,jdbcType=BIGINT},</if>
|
||||
<if test="shopId != null">#{shopId,jdbcType=BIGINT},</if>
|
||||
<if test="orderId != null">#{orderId,jdbcType=VARCHAR},</if>
|
||||
<if test="purchaseOrderSn != null">#{purchaseOrderSn,jdbcType=VARCHAR},</if>
|
||||
<if test="isSupportEncryptOrder != null">#{isSupportEncryptOrder,jdbcType=BOOLEAN},</if>
|
||||
<if test="isEncryptOrder != null">#{isEncryptOrder,jdbcType=TINYINT},</if>
|
||||
<if test="result != null">#{result,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>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.ms.dal.entity.PurchaseOrderDsEncrypt">
|
||||
update purchase_order_ds_encrypt
|
||||
<set>
|
||||
<if test="shopId != null">
|
||||
shop_id = #{shopId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="orderId != null">
|
||||
order_id = #{orderId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="purchaseOrderSn != null">
|
||||
purchase_order_sn = #{purchaseOrderSn,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="isSupportEncryptOrder != null">
|
||||
is_support_encrypt_order = #{isSupportEncryptOrder,jdbcType=BOOLEAN},
|
||||
</if>
|
||||
<if test="isEncryptOrder != null">
|
||||
is_encrypt_order = #{isEncryptOrder,jdbcType=TINYINT},
|
||||
</if>
|
||||
<if test="result != null">
|
||||
result = #{result,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 purchase_order_ds_encrypt_id = #{purchaseOrderDsEncryptId,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.ms.dal.entity.PurchaseOrderDsEncrypt">
|
||||
update purchase_order_ds_encrypt
|
||||
set
|
||||
shop_id = #{shopId,jdbcType=BIGINT},
|
||||
order_id = #{orderId,jdbcType=VARCHAR},
|
||||
purchase_order_sn = #{purchaseOrderSn,jdbcType=VARCHAR},
|
||||
is_support_encrypt_order = #{isSupportEncryptOrder,jdbcType=BOOLEAN},
|
||||
is_encrypt_order = #{isEncryptOrder,jdbcType=TINYINT},
|
||||
result = #{result,jdbcType=VARCHAR},
|
||||
reason = #{reason,jdbcType=VARCHAR},
|
||||
gmt_create = #{gmtCreate,jdbcType=TIMESTAMP},
|
||||
gmt_modified = #{gmtModified,jdbcType=TIMESTAMP}
|
||||
where purchase_order_ds_encrypt_id = #{purchaseOrderDsEncryptId,jdbcType=BIGINT}
|
||||
</update>
|
||||
</mapper>
|
@ -0,0 +1,8 @@
|
||||
<?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.QueueMapper">
|
||||
|
||||
|
||||
</mapper>
|
Loading…
Reference in New Issue