Files
zxjp-web/coolstore-partner-dao/src/main/resources/mapper/HyPartnerFraSourceMapper.xml
xiaodong.hu 7a628950ed 1.修改面试通知函通过节点
2.添加ec意向区域同步
3.定时同步800请求来源
2023-09-14 10:41:39 +08:00

190 lines
6.6 KiB
XML

<?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.cool.store.mapper.HyPartnerFraSourceMapper">
<resultMap id="BaseResultMap" type="com.cool.store.entity.HyPartnerFraSourceDO">
<id column="id" jdbcType="BIGINT" property="id" />
<result column="name" jdbcType="VARCHAR" property="name" />
<result column="code" jdbcType="VARCHAR" property="code" />
<result column="dict_id" jdbcType="VARCHAR" property="dictId" />
<result column="source_id" jdbcType="VARCHAR" property="sourceId" />
<result column="enabled" jdbcType="BOOLEAN" property="enabled" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
<result column="remark" jdbcType="VARCHAR" property="remark" />
</resultMap>
<sql id="Base_Column_List">
id, `name`, code, dict_id, source_id, enabled, create_time, update_time, remark
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from hy_partner_fra_source
where id = #{id,jdbcType=BIGINT}
</select>
<select id="selectAllFraSourceList" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from hy_partner_fra_source where enabled=1
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from hy_partner_fra_source
where id = #{id,jdbcType=BIGINT}
</delete>
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.cool.store.entity.HyPartnerFraSourceDO" useGeneratedKeys="true">
insert into hy_partner_fra_source (`name`, code, dict_id,
source_id, enabled, create_time,
update_time, remark)
values (#{name,jdbcType=VARCHAR}, #{code,jdbcType=VARCHAR}, #{dictId,jdbcType=VARCHAR},
#{sourceId,jdbcType=VARCHAR}, #{enabled,jdbcType=BOOLEAN}, #{createTime,jdbcType=TIMESTAMP},
#{updateTime,jdbcType=TIMESTAMP}, #{remark,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.cool.store.entity.HyPartnerFraSourceDO" useGeneratedKeys="true">
insert into hy_partner_fra_source
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="name != null">
`name`,
</if>
<if test="code != null">
code,
</if>
<if test="dictId != null">
dict_id,
</if>
<if test="sourceId != null">
source_id,
</if>
<if test="enabled != null">
enabled,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="updateTime != null">
update_time,
</if>
<if test="remark != null">
remark,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="name != null">
#{name,jdbcType=VARCHAR},
</if>
<if test="code != null">
#{code,jdbcType=VARCHAR},
</if>
<if test="dictId != null">
#{dictId,jdbcType=VARCHAR},
</if>
<if test="sourceId != null">
#{sourceId,jdbcType=VARCHAR},
</if>
<if test="enabled != null">
#{enabled,jdbcType=BOOLEAN},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="remark != null">
#{remark,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<insert id="batchInsertSelective">
<foreach collection="insertList" item="record" separator=";">
insert into hy_partner_fra_source
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="record.name != null">
`name`,
</if>
<if test="record.code != null">
`code`,
</if>
<if test="record.dictId != null">
dict_id,
</if>
<if test="record.sourceId != null">
source_id,
</if>
<if test="record.enabled != null">
enabled,
</if>
<if test="record.createTime != null">
create_time,
</if>
<if test="record.remark != null">
remark,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="record.name != null">
#{record.name,jdbcType=VARCHAR},
</if>
<if test="record.code != null">
#{record.code,jdbcType=VARCHAR},
</if>
<if test="record.dictId != null">
#{record.dictId,jdbcType=VARCHAR},
</if>
<if test="record.sourceId != null">
#{record.sourceId,jdbcType=VARCHAR},
</if>
<if test="record.enabled != null">
#{record.enabled,jdbcType=BOOLEAN},
</if>
<if test="record.createTime != null">
#{record.createTime,jdbcType=TIMESTAMP},
</if>
<if test="record.remark != null">
#{record.remark,jdbcType=VARCHAR},
</if>
</trim>
ON DUPLICATE KEY UPDATE update_time = now(), enabled = values(enabled), `name` = values(`name`), `code` = values(`code`), dict_id = values(dict_id)
</foreach>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.cool.store.entity.HyPartnerFraSourceDO">
update hy_partner_fra_source
<set>
<if test="name != null">
`name` = #{name,jdbcType=VARCHAR},
</if>
<if test="code != null">
code = #{code,jdbcType=VARCHAR},
</if>
<if test="dictId != null">
dict_id = #{dictId,jdbcType=VARCHAR},
</if>
<if test="sourceId != null">
source_id = #{sourceId,jdbcType=VARCHAR},
</if>
<if test="enabled != null">
enabled = #{enabled,jdbcType=BOOLEAN},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="remark != null">
remark = #{remark,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.cool.store.entity.HyPartnerFraSourceDO">
update hy_partner_fra_source
set `name` = #{name,jdbcType=VARCHAR},
code = #{code,jdbcType=VARCHAR},
dict_id = #{dictId,jdbcType=VARCHAR},
source_id = #{sourceId,jdbcType=VARCHAR},
enabled = #{enabled,jdbcType=BOOLEAN},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP},
remark = #{remark,jdbcType=VARCHAR}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>