|
@@ -1,44 +1,47 @@
|
|
<?xml version="1.0" encoding="UTF-8" ?>
|
|
<?xml version="1.0" encoding="UTF-8" ?>
|
|
<!DOCTYPE mapper
|
|
<!DOCTYPE mapper
|
|
-PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
-"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
|
|
|
+ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
+ "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
<mapper namespace="com.huijy.management.mapper.ShopMapper">
|
|
<mapper namespace="com.huijy.management.mapper.ShopMapper">
|
|
|
|
|
|
<resultMap type="Shop" id="ShopResult">
|
|
<resultMap type="Shop" id="ShopResult">
|
|
- <result property="shopId" column="shop_id" />
|
|
|
|
- <result property="name" column="name" />
|
|
|
|
- <result property="addres" column="addres" />
|
|
|
|
- <result property="lat" column="lat" />
|
|
|
|
- <result property="lng" column="lng" />
|
|
|
|
- <result property="bossName" column="boss_name" />
|
|
|
|
- <result property="bossPhone" column="boss_phone" />
|
|
|
|
- <result property="showPictures" column="show_pictures" />
|
|
|
|
- <result property="labelText" column="label_text" />
|
|
|
|
- <result property="businessHours" column="business_hours" />
|
|
|
|
- <result property="briefContent" column="brief_content" />
|
|
|
|
- <result property="content" column="content" />
|
|
|
|
- <result property="enableFlag" column="enable_flag" />
|
|
|
|
- <result property="auditFlag" column="audit_flag" />
|
|
|
|
- <result property="auditAt" column="audit_at" />
|
|
|
|
- <result property="auditTime" column="audit_time" />
|
|
|
|
- <result property="createTime" column="create_time" />
|
|
|
|
- <result property="memberId" column="member_id" />
|
|
|
|
- <result property="shopType" column="shop_type" />
|
|
|
|
|
|
+ <result property="shopId" column="shop_id"/>
|
|
|
|
+ <result property="name" column="name"/>
|
|
|
|
+ <result property="addres" column="addres"/>
|
|
|
|
+ <result property="lat" column="lat"/>
|
|
|
|
+ <result property="lng" column="lng"/>
|
|
|
|
+ <result property="bossName" column="boss_name"/>
|
|
|
|
+ <result property="bossPhone" column="boss_phone"/>
|
|
|
|
+ <result property="showPictures" column="show_pictures"/>
|
|
|
|
+ <result property="labelText" column="label_text"/>
|
|
|
|
+ <result property="businessHours" column="business_hours"/>
|
|
|
|
+ <result property="briefContent" column="brief_content"/>
|
|
|
|
+ <result property="content" column="content"/>
|
|
|
|
+ <result property="pic" column="pic"/>
|
|
|
|
+ <result property="enableFlag" column="enable_flag"/>
|
|
|
|
+ <result property="msg" column="msg"/>
|
|
|
|
+ <result property="auditFlag" column="audit_flag"/>
|
|
|
|
+ <result property="auditAt" column="audit_at"/>
|
|
|
|
+ <result property="auditTime" column="audit_time"/>
|
|
|
|
+ <result property="createTime" column="create_time"/>
|
|
|
|
+ <result property="memberId" column="member_id"/>
|
|
|
|
+ <result property="shopType" column="shop_type"/>
|
|
</resultMap>
|
|
</resultMap>
|
|
|
|
|
|
|
|
+
|
|
<sql id="selectShopVo">
|
|
<sql id="selectShopVo">
|
|
- select shop_id, name, addres, lat, lng, boss_name, boss_phone, show_pictures, label_text, business_hours, brief_content, content, enable_flag, audit_flag, audit_at, audit_time, create_time,
|
|
|
|
|
|
+ select shop_id, name,pic,msg,addres, lat, lng, boss_name, boss_phone, show_pictures, label_text, business_hours, brief_content, content, enable_flag, audit_flag, audit_at, audit_time, create_time,
|
|
member_id,shop_type from t_shop
|
|
member_id,shop_type from t_shop
|
|
</sql>
|
|
</sql>
|
|
|
|
|
|
<select id="selectShopList" parameterType="Shop" resultMap="ShopResult">
|
|
<select id="selectShopList" parameterType="Shop" resultMap="ShopResult">
|
|
<include refid="selectShopVo"/>
|
|
<include refid="selectShopVo"/>
|
|
<where>
|
|
<where>
|
|
- <if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
|
|
|
|
- <if test="bossName != null and bossName != ''"> and boss_name like concat('%', #{bossName}, '%')</if>
|
|
|
|
- <if test="bossPhone != null and bossPhone != ''"> and boss_phone = #{bossPhone}</if>
|
|
|
|
- <if test="enableFlag != null and enableFlag != ''"> and enable_flag = #{enableFlag}</if>
|
|
|
|
- <if test="auditFlag != null and auditFlag != ''"> and audit_flag = #{auditFlag}</if>
|
|
|
|
|
|
+ <if test="name != null and name != ''">and name like concat('%', #{name}, '%')</if>
|
|
|
|
+ <if test="bossName != null and bossName != ''">and boss_name like concat('%', #{bossName}, '%')</if>
|
|
|
|
+ <if test="bossPhone != null and bossPhone != ''">and boss_phone = #{bossPhone}</if>
|
|
|
|
+ <if test="enableFlag != null and enableFlag != ''">and enable_flag = #{enableFlag}</if>
|
|
|
|
+ <if test="auditFlag != null and auditFlag != ''">and audit_flag = #{auditFlag}</if>
|
|
</where>
|
|
</where>
|
|
</select>
|
|
</select>
|
|
|
|
|
|
@@ -61,14 +64,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
<if test="businessHours != null">business_hours,</if>
|
|
<if test="businessHours != null">business_hours,</if>
|
|
<if test="briefContent != null">brief_content,</if>
|
|
<if test="briefContent != null">brief_content,</if>
|
|
<if test="content != null">content,</if>
|
|
<if test="content != null">content,</if>
|
|
|
|
+ <if test="pic != null">pic,</if>
|
|
<if test="enableFlag != null">enable_flag,</if>
|
|
<if test="enableFlag != null">enable_flag,</if>
|
|
|
|
+ <if test="msg != null">msg,</if>
|
|
<if test="auditFlag != null">audit_flag,</if>
|
|
<if test="auditFlag != null">audit_flag,</if>
|
|
<if test="auditAt != null">audit_at,</if>
|
|
<if test="auditAt != null">audit_at,</if>
|
|
<if test="auditTime != null">audit_time,</if>
|
|
<if test="auditTime != null">audit_time,</if>
|
|
<if test="createTime != null">create_time,</if>
|
|
<if test="createTime != null">create_time,</if>
|
|
<if test="memberId != null">member_id,</if>
|
|
<if test="memberId != null">member_id,</if>
|
|
<if test="shopType != null">shop_type,</if>
|
|
<if test="shopType != null">shop_type,</if>
|
|
- </trim>
|
|
|
|
|
|
+ </trim>
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<if test="name != null">#{name},</if>
|
|
<if test="name != null">#{name},</if>
|
|
<if test="addres != null">#{addres},</if>
|
|
<if test="addres != null">#{addres},</if>
|
|
@@ -81,14 +86,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
<if test="businessHours != null">#{businessHours},</if>
|
|
<if test="businessHours != null">#{businessHours},</if>
|
|
<if test="briefContent != null">#{briefContent},</if>
|
|
<if test="briefContent != null">#{briefContent},</if>
|
|
<if test="content != null">#{content},</if>
|
|
<if test="content != null">#{content},</if>
|
|
|
|
+ <if test="pic != null">#{pic},</if>
|
|
<if test="enableFlag != null">#{enableFlag},</if>
|
|
<if test="enableFlag != null">#{enableFlag},</if>
|
|
|
|
+ <if test="msg != null">#{msg},</if>
|
|
<if test="auditFlag != null">#{auditFlag},</if>
|
|
<if test="auditFlag != null">#{auditFlag},</if>
|
|
<if test="auditAt != null">#{auditAt},</if>
|
|
<if test="auditAt != null">#{auditAt},</if>
|
|
<if test="auditTime != null">#{auditTime},</if>
|
|
<if test="auditTime != null">#{auditTime},</if>
|
|
<if test="createTime != null">#{createTime},</if>
|
|
<if test="createTime != null">#{createTime},</if>
|
|
<if test="memberId != null">#{memberId},</if>
|
|
<if test="memberId != null">#{memberId},</if>
|
|
<if test="shopType != null">#{shopType},</if>
|
|
<if test="shopType != null">#{shopType},</if>
|
|
- </trim>
|
|
|
|
|
|
+ </trim>
|
|
</insert>
|
|
</insert>
|
|
|
|
|
|
<update id="updateShop" parameterType="Shop">
|
|
<update id="updateShop" parameterType="Shop">
|
|
@@ -105,7 +112,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
<if test="businessHours != null">business_hours = #{businessHours},</if>
|
|
<if test="businessHours != null">business_hours = #{businessHours},</if>
|
|
<if test="briefContent != null">brief_content = #{briefContent},</if>
|
|
<if test="briefContent != null">brief_content = #{briefContent},</if>
|
|
<if test="content != null">content = #{content},</if>
|
|
<if test="content != null">content = #{content},</if>
|
|
|
|
+ <if test="pic != null">pic = #{pic},</if>
|
|
<if test="enableFlag != null">enable_flag = #{enableFlag},</if>
|
|
<if test="enableFlag != null">enable_flag = #{enableFlag},</if>
|
|
|
|
+ <if test="msg != null">msg = #{msg},</if>
|
|
<if test="auditFlag != null">audit_flag = #{auditFlag},</if>
|
|
<if test="auditFlag != null">audit_flag = #{auditFlag},</if>
|
|
<if test="auditAt != null">audit_at = #{auditAt},</if>
|
|
<if test="auditAt != null">audit_at = #{auditAt},</if>
|
|
<if test="auditTime != null">audit_time = #{auditTime},</if>
|
|
<if test="auditTime != null">audit_time = #{auditTime},</if>
|
|
@@ -130,6 +139,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
<select id="selectListByMemberId" parameterType="Long" resultMap="ShopResult">
|
|
<select id="selectListByMemberId" parameterType="Long" resultMap="ShopResult">
|
|
<include refid="selectShopVo"/>
|
|
<include refid="selectShopVo"/>
|
|
where member_id = #{memberId}
|
|
where member_id = #{memberId}
|
|
-
|
|
|
|
|
|
+ order by create_time desc
|
|
</select>
|
|
</select>
|
|
</mapper>
|
|
</mapper>
|