gunshi-project-ss/src/main/resources/mapper/StAddvcdDMapper.xml

41 lines
1.7 KiB
XML
Raw Normal View History

2024-01-24 14:27:40 +08:00
<?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.gunshi.project.xyt.mapper.StAddvcdDMapper">
<resultMap id="BaseResultMap" type="com.gunshi.project.xyt.model.StAddvcdD">
<!--@mbg.generated-->
<!--@Table dbo.ST_ADDVCD_D-->
<id column="ADDVCD" jdbcType="VARCHAR" property="addvcd" />
<result column="ADDVNM" jdbcType="VARCHAR" property="addvnm" />
<result column="LGTD" jdbcType="DECIMAL" property="lgtd" />
<result column="LTTD" jdbcType="DECIMAL" property="lttd" />
<result column="CREATE_TM" jdbcType="TIMESTAMP" property="createTm" />
<result column="TM" jdbcType="TIMESTAMP" property="tm" />
2024-01-25 17:54:14 +08:00
<result column="SORT_ON" jdbcType="INTEGER" property="sortOn" />
2024-01-24 14:27:40 +08:00
</resultMap>
<sql id="Base_Column_List">
<!--@mbg.generated-->
2024-01-25 17:54:14 +08:00
ADDVCD, ADDVNM, LGTD, LTTD, CREATE_TM, TM, SORT_ON
2024-01-24 14:27:40 +08:00
</sql>
<insert id="batchInsert" parameterType="map">
<!--@mbg.generated-->
insert into dbo.ST_ADDVCD_D
2024-01-25 17:54:14 +08:00
(ADDVCD, ADDVNM, LGTD, LTTD, CREATE_TM, TM, SORT_ON)
2024-01-24 14:27:40 +08:00
values
<foreach collection="list" item="item" separator=",">
(#{item.addvcd,jdbcType=VARCHAR}, #{item.addvnm,jdbcType=VARCHAR}, #{item.lgtd,jdbcType=DECIMAL},
2024-01-25 17:54:14 +08:00
#{item.lttd,jdbcType=DECIMAL}, #{item.createTm,jdbcType=TIMESTAMP}, #{item.tm,jdbcType=TIMESTAMP},
#{item.sortOn,jdbcType=INTEGER})
2024-01-24 14:27:40 +08:00
</foreach>
</insert>
2024-01-25 17:54:14 +08:00
<select id="queryTree" resultType="com.gunshi.project.xyt.entity.basedata.StAddvcdTreeVo">
select
<include refid="Base_Column_List" />
from ST_ADDVCD_D
<where>
<if test="addvcd != null and addvcd != ''">
ADDVCD like CONCAT(#{addvcd}, '%')
</if>
</where>
</select>
2024-01-24 14:27:40 +08:00
</mapper>