|
|
@@ -13,14 +13,18 @@
|
|
|
<result property="orderCode" column="order_code"/>
|
|
|
<result property="goodsId" column="goods_id"/>
|
|
|
<result property="productType" column="product_type"/>
|
|
|
+ <result property="rewardAmount" column="reward_amount"/>
|
|
|
<result property="grantTime" column="grant_time"/>
|
|
|
<result property="createTime" column="create_time"/>
|
|
|
<result property="updateTime" column="update_time"/>
|
|
|
+ <result property="isFirstLogin" column="is_first_login"/>
|
|
|
</resultMap>
|
|
|
|
|
|
+ <!-- 基础字段列表 - 添加 reward_amount 和 is_first_login -->
|
|
|
<sql id="selectFsUserRewardsVo">
|
|
|
select id, fs_user_id, activity_type, reward_type, status,
|
|
|
- order_code, goods_id, product_type, grant_time, create_time, update_time
|
|
|
+ order_code, goods_id, product_type, reward_amount,
|
|
|
+ grant_time, create_time, update_time, is_first_login
|
|
|
from fs_user_rewards
|
|
|
</sql>
|
|
|
|
|
|
@@ -74,9 +78,11 @@
|
|
|
<if test="orderCode != null and orderCode != ''"> and order_code = #{orderCode}</if>
|
|
|
<if test="goodsId != null"> and goods_id = #{goodsId}</if>
|
|
|
<if test="productType != null"> and product_type = #{productType}</if>
|
|
|
+ <if test="rewardAmount != null"> and reward_amount = #{rewardAmount}</if>
|
|
|
<if test="grantTime != null"> and grant_time = #{grantTime}</if>
|
|
|
<if test="createTime != null"> and create_time = #{createTime}</if>
|
|
|
<if test="updateTime != null"> and update_time = #{updateTime}</if>
|
|
|
+ <if test="isFirstLogin != null"> and is_first_login = #{isFirstLogin}</if>
|
|
|
</where>
|
|
|
order by create_time desc
|
|
|
</select>
|
|
|
@@ -92,7 +98,9 @@
|
|
|
<if test="orderCode != null">order_code,</if>
|
|
|
<if test="goodsId != null">goods_id,</if>
|
|
|
<if test="productType != null">product_type,</if>
|
|
|
+ <if test="rewardAmount != null">reward_amount,</if>
|
|
|
<if test="grantTime != null">grant_time,</if>
|
|
|
+ <if test="isFirstLogin != null">is_first_login,</if>
|
|
|
create_time,
|
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
@@ -103,12 +111,14 @@
|
|
|
<if test="orderCode != null">#{orderCode},</if>
|
|
|
<if test="goodsId != null">#{goodsId},</if>
|
|
|
<if test="productType != null">#{productType},</if>
|
|
|
+ <if test="rewardAmount != null">#{rewardAmount},</if>
|
|
|
<if test="grantTime != null">#{grantTime},</if>
|
|
|
+ <if test="isFirstLogin != null">#{isFirstLogin},</if>
|
|
|
sysdate(),
|
|
|
</trim>
|
|
|
</insert>
|
|
|
|
|
|
- <!-- 修改记录 -->
|
|
|
+ <!-- 修改记录-->
|
|
|
<update id="updateFsUserRewards" parameterType="com.fs.his.domain.FsUserRewards">
|
|
|
update fs_user_rewards
|
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
|
@@ -119,7 +129,9 @@
|
|
|
<if test="orderCode != null">order_code = #{orderCode},</if>
|
|
|
<if test="goodsId != null">goods_id = #{goodsId},</if>
|
|
|
<if test="productType != null">product_type = #{productType},</if>
|
|
|
+ <if test="rewardAmount != null">reward_amount = #{rewardAmount},</if>
|
|
|
<if test="grantTime != null">grant_time = #{grantTime},</if>
|
|
|
+ <if test="isFirstLogin != null">is_first_login = #{isFirstLogin},</if>
|
|
|
update_time = sysdate()
|
|
|
</trim>
|
|
|
where id = #{id}
|
|
|
@@ -129,9 +141,9 @@
|
|
|
<update id="updateStatus">
|
|
|
update fs_user_rewards
|
|
|
set status = #{status},
|
|
|
- <if test="orderCode != null">order_code = #{orderCode},</if>
|
|
|
- grant_time = #{grantTime},
|
|
|
- update_time = sysdate()
|
|
|
+ <if test="orderCode != null and orderCode != ''">order_code = #{orderCode},</if>
|
|
|
+ grant_time = #{grantTime},
|
|
|
+ update_time = sysdate()
|
|
|
where id = #{id}
|
|
|
</update>
|
|
|
|