| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118 |
- <?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.fs.his.mapper.FsGuCoinGoodsMapper">
- <resultMap type="FsGuCoinGoods" id="FsGuCoinGoodsResult">
- <result property="goodsId" column="goods_id" />
- <result property="imgUrl" column="img_url" />
- <result property="images" column="images" />
- <result property="goodsName" column="goods_name" />
- <result property="otPrice" column="ot_price" />
- <result property="goodsType" column="goods_type" />
- <result property="status" column="status" />
- <result property="guCoin" column="gu_coin" />
- <result property="cash" column="cash" />
- <result property="sort" column="sort" />
- <result property="stock" column="stock" />
- <result property="descs" column="descs" />
- <result property="barCode" column="bar_code" />
- <result property="tempId" column="temp_id" />
- <result property="createBy" column="create_by" />
- <result property="createTime" column="create_time" />
- <result property="updateBy" column="update_by" />
- <result property="updateTime" column="update_time" />
- </resultMap>
- <sql id="selectFsGuCoinGoodsVo">
- select * from fs_gu_coin_goods
- </sql>
- <select id="selectFsGuCoinGoodsByGoodsId" parameterType="Long" resultMap="FsGuCoinGoodsResult">
- <include refid="selectFsGuCoinGoodsVo"/>
- where goods_id = #{goodsId}
- </select>
- <select id="selectFsGuCoinGoodsList" parameterType="com.fs.his.param.FsGuCoinGoodsParam" resultMap="FsGuCoinGoodsResult">
- <include refid="selectFsGuCoinGoodsVo"/>
- <where>
- <if test="goodsName != null and goodsName != ''"> and goods_name like concat('%', #{goodsName}, '%')</if>
- <if test="goodsType != null"> and goods_type = #{goodsType}</if>
- <if test="status != null"> and status = #{status}</if>
- <if test="goodsId != null"> and goods_id = #{goodsId}</if>
- </where>
- order by sort asc, goods_id desc
- </select>
- <insert id="insertFsGuCoinGoods" parameterType="FsGuCoinGoods" useGeneratedKeys="true" keyProperty="goodsId">
- insert into fs_gu_coin_goods
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="imgUrl != null and imgUrl != ''">img_url,</if>
- <if test="images != null">images,</if>
- <if test="goodsName != null and goodsName != ''">goods_name,</if>
- <if test="otPrice != null">ot_price,</if>
- <if test="goodsType != null">goods_type,</if>
- <if test="status != null">status,</if>
- <if test="guCoin != null">gu_coin,</if>
- <if test="cash != null">cash,</if>
- <if test="sort != null">sort,</if>
- <if test="stock != null">stock,</if>
- <if test="descs != null">descs,</if>
- <if test="barCode != null">bar_code,</if>
- <if test="tempId != null">temp_id,</if>
- <if test="createBy != null">create_by,</if>
- <if test="createTime != null">create_time,</if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="imgUrl != null and imgUrl != ''">#{imgUrl},</if>
- <if test="images != null">#{images},</if>
- <if test="goodsName != null and goodsName != ''">#{goodsName},</if>
- <if test="otPrice != null">#{otPrice},</if>
- <if test="goodsType != null">#{goodsType},</if>
- <if test="status != null">#{status},</if>
- <if test="guCoin != null">#{guCoin},</if>
- <if test="cash != null">#{cash},</if>
- <if test="sort != null">#{sort},</if>
- <if test="stock != null">#{stock},</if>
- <if test="descs != null">#{descs},</if>
- <if test="barCode != null">#{barCode},</if>
- <if test="tempId != null">#{tempId},</if>
- <if test="createBy != null">#{createBy},</if>
- <if test="createTime != null">#{createTime},</if>
- </trim>
- </insert>
- <update id="updateFsGuCoinGoods" parameterType="FsGuCoinGoods">
- update fs_gu_coin_goods
- <trim prefix="SET" suffixOverrides=",">
- <if test="imgUrl != null and imgUrl != ''">img_url = #{imgUrl},</if>
- <if test="images != null">images = #{images},</if>
- <if test="goodsName != null and goodsName != ''">goods_name = #{goodsName},</if>
- <if test="otPrice != null">ot_price = #{otPrice},</if>
- <if test="goodsType != null">goods_type = #{goodsType},</if>
- <if test="status != null">status = #{status},</if>
- <if test="guCoin != null">gu_coin = #{guCoin},</if>
- <if test="cash != null">cash = #{cash},</if>
- <if test="sort != null">sort = #{sort},</if>
- <if test="stock != null">stock = #{stock},</if>
- <if test="descs != null">descs = #{descs},</if>
- <if test="barCode != null">bar_code = #{barCode},</if>
- <if test="tempId != null">temp_id = #{tempId},</if>
- <if test="updateBy != null">update_by = #{updateBy},</if>
- <if test="updateTime != null">update_time = #{updateTime},</if>
- </trim>
- where goods_id = #{goodsId}
- </update>
- <delete id="deleteFsGuCoinGoodsByGoodsId" parameterType="Long">
- delete from fs_gu_coin_goods where goods_id = #{goodsId}
- </delete>
- <delete id="deleteFsGuCoinGoodsByGoodsIds" parameterType="String">
- delete from fs_gu_coin_goods where goods_id in
- <foreach item="goodsId" collection="array" open="(" separator="," close=")">
- #{goodsId}
- </foreach>
- </delete>
- </mapper>
|