45 lines
1.9 KiB
XML
45 lines
1.9 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="cn.iocoder.yudao.module.tickets.mapper.DlTwItemMapper">
|
|
|
|
<resultMap id="BaseResultMap" type="cn.iocoder.yudao.module.tickets.entity.DlTwItem">
|
|
<id property="id" column="id" jdbcType="VARCHAR"/>
|
|
<result property="twId" column="tw_id" jdbcType="VARCHAR"/>
|
|
<result property="waresId" column="wares_id" jdbcType="VARCHAR"/>
|
|
<result property="waresName" column="wares_name" jdbcType="VARCHAR"/>
|
|
<result property="waresCount" column="wares_count" jdbcType="INTEGER"/>
|
|
<result property="waresStatus" column="wares_status" jdbcType="VARCHAR"/>
|
|
<result property="remark" column="remark" jdbcType="VARCHAR"/>
|
|
<result property="isShow" column="is_show" />
|
|
<result property="waresCouldCount" column="wares_could_count" />
|
|
<result property="waresAlreadyCount" column="wares_already_count" />
|
|
<result property="waresBackCount" column="wares_back_count" />
|
|
</resultMap>
|
|
|
|
<sql id="Base_SQL">
|
|
select
|
|
id,tw_id,wares_id,
|
|
wares_name,wares_count,wares_status,remark,
|
|
is_show,wares_could_count, wares_already_count, wares_back_count
|
|
from dl_tw_item dti
|
|
where dti.deleted = '0'
|
|
</sql>
|
|
|
|
<select id="listTwItem" resultMap="BaseResultMap">
|
|
<include refid="Base_SQL" />
|
|
<if test="map.twId != null and map.twId != ''">
|
|
and dti.tw_id = #{map.twId}
|
|
</if>
|
|
<if test="map.query != null and map.query != ''">
|
|
and (
|
|
dti.wares_name like concat('%', #{map.query}, '%')
|
|
)
|
|
</if>
|
|
<if test="map.waresStatus != null and map.waresStatus != ''">
|
|
and dti.wares_status = #{map.waresStatus}
|
|
</if>
|
|
</select>
|
|
</mapper>
|