|
@@ -3,9 +3,9 @@
|
|
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
<mapper namespace="com.fs.hisStore.mapper.FsUserBillScrmMapper">
|
|
<mapper namespace="com.fs.hisStore.mapper.FsUserBillScrmMapper">
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
<resultMap type="FsUserBillScrm" id="FsUserBillResult">
|
|
<resultMap type="FsUserBillScrm" id="FsUserBillResult">
|
|
|
- <result property="id" column="id" />
|
|
|
|
|
|
|
+ <result property="billId" column="bill_id" />
|
|
|
<result property="userId" column="user_id" />
|
|
<result property="userId" column="user_id" />
|
|
|
<result property="businessId" column="business_id" />
|
|
<result property="businessId" column="business_id" />
|
|
|
<result property="category" column="category" />
|
|
<result property="category" column="category" />
|
|
@@ -13,6 +13,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<result property="type" column="type" />
|
|
<result property="type" column="type" />
|
|
|
<result property="title" column="title" />
|
|
<result property="title" column="title" />
|
|
|
<result property="number" column="number" />
|
|
<result property="number" column="number" />
|
|
|
|
|
+ <result property="money" column="money" />
|
|
|
<result property="balance" column="balance" />
|
|
<result property="balance" column="balance" />
|
|
|
<result property="remark" column="remark" />
|
|
<result property="remark" column="remark" />
|
|
|
<result property="createTime" column="create_time" />
|
|
<result property="createTime" column="create_time" />
|
|
@@ -22,12 +23,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
</resultMap>
|
|
</resultMap>
|
|
|
|
|
|
|
|
<sql id="selectFsUserBillVo">
|
|
<sql id="selectFsUserBillVo">
|
|
|
- select id, user_id, business_id, category, bill_type, type, title, number, balance, remark, create_time, update_time, status,tui_user_id from fs_user_bill
|
|
|
|
|
|
|
+ select bill_id, user_id, business_id, money,category, bill_type, type, title, number, balance, remark, create_time, update_time, status,tui_user_id from fs_user_bill
|
|
|
</sql>
|
|
</sql>
|
|
|
|
|
|
|
|
<select id="selectFsUserBillList" parameterType="FsUserBillScrm" resultMap="FsUserBillResult">
|
|
<select id="selectFsUserBillList" parameterType="FsUserBillScrm" resultMap="FsUserBillResult">
|
|
|
<include refid="selectFsUserBillVo"/>
|
|
<include refid="selectFsUserBillVo"/>
|
|
|
- <where>
|
|
|
|
|
|
|
+ <where>
|
|
|
<if test="userId != null "> and user_id = #{userId}</if>
|
|
<if test="userId != null "> and user_id = #{userId}</if>
|
|
|
<if test="businessId != null and businessId != ''"> and business_id = #{businessId}</if>
|
|
<if test="businessId != null and businessId != ''"> and business_id = #{businessId}</if>
|
|
|
<if test="category != null and category != ''"> and category = #{category}</if>
|
|
<if test="category != null and category != ''"> and category = #{category}</if>
|
|
@@ -36,17 +37,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="title != null and title != ''"> and title = #{title}</if>
|
|
<if test="title != null and title != ''"> and title = #{title}</if>
|
|
|
<if test="number != null "> and number = #{number}</if>
|
|
<if test="number != null "> and number = #{number}</if>
|
|
|
<if test="balance != null "> and balance = #{balance}</if>
|
|
<if test="balance != null "> and balance = #{balance}</if>
|
|
|
|
|
+ <if test="money != null "> and money = #{money}</if>
|
|
|
<if test="status != null "> and status = #{status}</if>
|
|
<if test="status != null "> and status = #{status}</if>
|
|
|
<if test="tuiUserId != null "> and tui_user_id = #{tuiUserId}</if>
|
|
<if test="tuiUserId != null "> and tui_user_id = #{tuiUserId}</if>
|
|
|
</where>
|
|
</where>
|
|
|
</select>
|
|
</select>
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
<select id="selectFsUserBillById" parameterType="Long" resultMap="FsUserBillResult">
|
|
<select id="selectFsUserBillById" parameterType="Long" resultMap="FsUserBillResult">
|
|
|
<include refid="selectFsUserBillVo"/>
|
|
<include refid="selectFsUserBillVo"/>
|
|
|
- where id = #{id}
|
|
|
|
|
|
|
+ where bill_id = #{id}
|
|
|
</select>
|
|
</select>
|
|
|
-
|
|
|
|
|
- <insert id="insertFsUserBill" parameterType="FsUserBillScrm" useGeneratedKeys="true" keyProperty="id">
|
|
|
|
|
|
|
+
|
|
|
|
|
+ <insert id="insertFsUserBill" parameterType="FsUserBillScrm" useGeneratedKeys="true" keyProperty="billId">
|
|
|
insert into fs_user_bill
|
|
insert into fs_user_bill
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
<if test="userId != null">user_id,</if>
|
|
<if test="userId != null">user_id,</if>
|
|
@@ -62,6 +64,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="updateTime != null">update_time,</if>
|
|
<if test="updateTime != null">update_time,</if>
|
|
|
<if test="status != null">status,</if>
|
|
<if test="status != null">status,</if>
|
|
|
<if test="tuiUserId != null">tui_user_id,</if>
|
|
<if test="tuiUserId != null">tui_user_id,</if>
|
|
|
|
|
+ <if test="money != null">money,</if>
|
|
|
</trim>
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
<if test="userId != null">#{userId},</if>
|
|
<if test="userId != null">#{userId},</if>
|
|
@@ -77,6 +80,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="updateTime != null">#{updateTime},</if>
|
|
<if test="updateTime != null">#{updateTime},</if>
|
|
|
<if test="status != null">#{status},</if>
|
|
<if test="status != null">#{status},</if>
|
|
|
<if test="tuiUserId != null">#{tuiUserId},</if>
|
|
<if test="tuiUserId != null">#{tuiUserId},</if>
|
|
|
|
|
+ <if test="money != null">#{money},</if>
|
|
|
</trim>
|
|
</trim>
|
|
|
</insert>
|
|
</insert>
|
|
|
|
|
|
|
@@ -95,20 +99,21 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="createTime != null">create_time = #{createTime},</if>
|
|
<if test="createTime != null">create_time = #{createTime},</if>
|
|
|
<if test="updateTime != null">update_time = #{updateTime},</if>
|
|
<if test="updateTime != null">update_time = #{updateTime},</if>
|
|
|
<if test="status != null">status = #{status},</if>
|
|
<if test="status != null">status = #{status},</if>
|
|
|
|
|
+ <if test="money != null">money = #{money},</if>
|
|
|
<if test="tuiUserId != null">tui_user_id = #{tuiUserId},</if>
|
|
<if test="tuiUserId != null">tui_user_id = #{tuiUserId},</if>
|
|
|
</trim>
|
|
</trim>
|
|
|
- where id = #{id}
|
|
|
|
|
|
|
+ where bill_id = #{id}
|
|
|
</update>
|
|
</update>
|
|
|
|
|
|
|
|
<delete id="deleteFsUserBillById" parameterType="Long">
|
|
<delete id="deleteFsUserBillById" parameterType="Long">
|
|
|
- delete from fs_user_bill where id = #{id}
|
|
|
|
|
|
|
+ delete from fs_user_bill where bill_id = #{id}
|
|
|
</delete>
|
|
</delete>
|
|
|
|
|
|
|
|
<delete id="deleteFsUserBillByIds" parameterType="String">
|
|
<delete id="deleteFsUserBillByIds" parameterType="String">
|
|
|
- delete from fs_user_bill where id in
|
|
|
|
|
|
|
+ delete from fs_user_bill where bill_id in
|
|
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
|
|
#{id}
|
|
#{id}
|
|
|
</foreach>
|
|
</foreach>
|
|
|
</delete>
|
|
</delete>
|
|
|
-
|
|
|
|
|
-</mapper>
|
|
|
|
|
|
|
+
|
|
|
|
|
+</mapper>
|