20240115-ljl-multiPay
parent
b08e4b553b
commit
6439039923
@ -0,0 +1,21 @@
|
||||
package com.ms.biz.service;
|
||||
|
||||
import com.ms.dal.entity.DoudianMessage;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public interface DoudianMessageService {
|
||||
|
||||
int deleteByPrimaryKey(Long id);
|
||||
|
||||
int insert(DoudianMessage record);
|
||||
|
||||
int insertSelective(DoudianMessage record);
|
||||
|
||||
DoudianMessage selectByPrimaryKey(Long id);
|
||||
|
||||
int updateByPrimaryKeySelective(DoudianMessage record);
|
||||
|
||||
int updateByPrimaryKey(DoudianMessage record);
|
||||
}
|
@ -0,0 +1,53 @@
|
||||
package com.ms.biz.service.impl;
|
||||
|
||||
import com.ms.dal.entity.DoudianMessage;
|
||||
import com.ms.biz.service.DoudianMessageService;
|
||||
import com.ms.dal.mapper.DoudianMessageMapper;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@Service
|
||||
public class DoudianMessageServiceImpl implements DoudianMessageService{
|
||||
|
||||
@Autowired
|
||||
private DoudianMessageMapper doudianMessageMapper;
|
||||
|
||||
@Override
|
||||
public int deleteByPrimaryKey(Long id) {
|
||||
return doudianMessageMapper.deleteByPrimaryKey(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int insert(DoudianMessage record) {
|
||||
return doudianMessageMapper.insert(record);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int insertSelective(DoudianMessage record) {
|
||||
return doudianMessageMapper.insertSelective(record);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DoudianMessage selectByPrimaryKey(Long id) {
|
||||
return doudianMessageMapper.selectByPrimaryKey(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updateByPrimaryKeySelective(DoudianMessage record) {
|
||||
return doudianMessageMapper.updateByPrimaryKeySelective(record);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updateByPrimaryKey(DoudianMessage record) {
|
||||
return doudianMessageMapper.updateByPrimaryKey(record);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
@ -0,0 +1,60 @@
|
||||
package com.ms.dal.entity;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 抖店订单消息
|
||||
* @TableName doudian_message
|
||||
*/
|
||||
@Data
|
||||
public class DoudianMessage implements Serializable {
|
||||
/**
|
||||
* 自增id
|
||||
*/
|
||||
private Long doudianMessageId;
|
||||
|
||||
/**
|
||||
* 官方的消息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,30 @@
|
||||
package com.ms.dal.mapper;
|
||||
|
||||
import com.ms.dal.entity.DoudianMessage;
|
||||
import com.ms.dal.entity.PlatformPurchaseOrderSku;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Entity com.ms.dal.entity.DoudianMessage
|
||||
*/
|
||||
@Mapper
|
||||
public interface DoudianMessageMapper {
|
||||
|
||||
int deleteByPrimaryKey(Long id);
|
||||
|
||||
int insert(DoudianMessage record);
|
||||
|
||||
int insertOrUpdate(DoudianMessage record);
|
||||
|
||||
int insertSelective(DoudianMessage record);
|
||||
|
||||
DoudianMessage selectByPrimaryKey(Long id);
|
||||
|
||||
int updateByPrimaryKeySelective(DoudianMessage record);
|
||||
|
||||
int updateByPrimaryKey(DoudianMessage record);
|
||||
|
||||
int insertBatch(List<DoudianMessage> list);
|
||||
}
|
@ -0,0 +1,181 @@
|
||||
<?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.DoudianMessageMapper">
|
||||
|
||||
<resultMap id="BaseResultMap" type="com.ms.dal.entity.DoudianMessage">
|
||||
<id property="doudianMessageId" column="doudian_message_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">
|
||||
doudian_message_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 doudian_message
|
||||
where doudian_message_id = #{doudianMessageId,jdbcType=BIGINT}
|
||||
</select>
|
||||
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||||
delete from doudian_message
|
||||
where doudian_message_id = #{doudianMessageId,jdbcType=BIGINT}
|
||||
</delete>
|
||||
<insert id="insert" keyColumn="doudian_message_id" keyProperty="doudianMessageId" parameterType="com.ms.dal.entity.DoudianMessage" useGeneratedKeys="true">
|
||||
insert into doudian_message
|
||||
( doudian_message_id,msg_id,shop_id
|
||||
,tag,data,status
|
||||
,reason,gmt_create,gmt_modified
|
||||
)
|
||||
values (#{doudianMessageId,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="doudian_message_id" keyProperty="doudianMessageId" parameterType="com.ms.dal.entity.DoudianMessage"
|
||||
useGeneratedKeys="true">
|
||||
insert into doudian_message
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="doudianMessageId != null">doudian_message_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="doudianMessageId != null">#{doudianMessageId,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="doudian_message_id" keyProperty="doudianMessageId" parameterType="com.ms.dal.entity.DoudianMessage" useGeneratedKeys="true">
|
||||
insert into doudian_message
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="doudianMessageId != null">doudian_message_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="doudianMessageId != null">#{doudianMessageId,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>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.ms.dal.entity.DoudianMessage">
|
||||
update doudian_message
|
||||
<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 doudian_message_id = #{doudianMessageId,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.ms.dal.entity.DoudianMessage">
|
||||
update doudian_message
|
||||
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 doudian_message_id = #{doudianMessageId,jdbcType=BIGINT}
|
||||
</update>
|
||||
<insert id="insertBatch" keyColumn="doudian_message_id" keyProperty="doudianMessageId" useGeneratedKeys="true">
|
||||
insert into doudian_message
|
||||
(doudian_message_id,msg_id,shop_id
|
||||
,tag,data,status
|
||||
,reason,gmt_create,gmt_modified)
|
||||
values
|
||||
<foreach item="item" collection="list" separator="," >
|
||||
(#{item.doudianMessageId,jdbcType=BIGINT},#{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>
|
||||
</mapper>
|
Loading…
Reference in New Issue