73 lines
2.5 KiB
XML
73 lines
2.5 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.chaozhanggui.system.cashierservice.dao.TbShopExtendMapper">
|
|
|
|
<resultMap type="com.chaozhanggui.system.cashierservice.entity.TbShopExtend" id="TbShopExtendMap">
|
|
<result property="id" column="id" jdbcType="INTEGER"/>
|
|
<result property="shopId" column="shop_id" jdbcType="INTEGER"/>
|
|
<result property="type" column="type" jdbcType="VARCHAR"/>
|
|
<result property="name" column="name" jdbcType="VARCHAR"/>
|
|
<result property="autokey" column="autoKey" jdbcType="VARCHAR"/>
|
|
<result property="value" column="value" jdbcType="VARCHAR"/>
|
|
<result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/>
|
|
<result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
|
|
</resultMap>
|
|
|
|
<sql id="Base_Column_List">
|
|
id
|
|
, shop_id, type, name, autoKey, value, update_time, create_time </sql>
|
|
|
|
<!--查询单个-->
|
|
<select id="queryById" resultMap="TbShopExtendMap">
|
|
select
|
|
<include refid="Base_Column_List"/>
|
|
|
|
from tb_shop_extend
|
|
where id = #{id}
|
|
</select>
|
|
|
|
<select id="queryByShopIdAndAutoKey" resultMap="TbShopExtendMap">
|
|
select
|
|
<include refid="Base_Column_List"/>
|
|
|
|
from tb_shop_extend
|
|
where shop_id = #{shopId} and autoKey = #{autokey}
|
|
</select>
|
|
|
|
<!--查询指定行数据-->
|
|
<select id="queryAll" resultMap="TbShopExtendMap">
|
|
select
|
|
<include refid="Base_Column_List"/>
|
|
|
|
from tb_shop_extend
|
|
<where>
|
|
<if test="id != null">
|
|
and id = #{id}
|
|
</if>
|
|
<if test="shopId != null">
|
|
and shop_id = #{shopId}
|
|
</if>
|
|
<if test="type != null and type != ''">
|
|
and type = #{type}
|
|
</if>
|
|
<if test="name != null and name != ''">
|
|
and name = #{name}
|
|
</if>
|
|
<if test="autokey != null and autokey != ''">
|
|
and autoKey = #{autokey}
|
|
</if>
|
|
<if test="value != null and value != ''">
|
|
and value = #{value}
|
|
</if>
|
|
<if test="updateTime != null">
|
|
and update_time = #{updateTime}
|
|
</if>
|
|
<if test="createTime != null">
|
|
and create_time = #{createTime}
|
|
</if>
|
|
</where>
|
|
</select>
|
|
|
|
</mapper>
|
|
|