acc soft delete
This commit is contained in:
parent
6eb3311a8c
commit
36758547b1
|
|
@ -275,5 +275,8 @@ public class AccInfo extends BaseEntity {
|
||||||
@ApiModelProperty(value = "预留字段3")
|
@ApiModelProperty(value = "预留字段3")
|
||||||
private String reserved3;
|
private String reserved3;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除标志(0代表存在 2代表删除)
|
||||||
|
*/
|
||||||
|
private String delFlag;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -34,5 +34,8 @@ public class AccInfoVo {
|
||||||
private BigDecimal subFreezeBal;
|
private BigDecimal subFreezeBal;
|
||||||
private BigDecimal accFreezeBalTotal;
|
private BigDecimal accFreezeBalTotal;
|
||||||
private List<AccWalletInfo> walletInfoList;
|
private List<AccWalletInfo> walletInfoList;
|
||||||
|
/**
|
||||||
|
* 删除标志(0代表存在 2代表删除)
|
||||||
|
*/
|
||||||
|
private String delFlag;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -65,5 +65,9 @@ public class AccWalletInfo extends BaseEntity {
|
||||||
@Excel(name = "最后一次补贴日期", width = 30, dateFormat = "yyyy-MM-dd")
|
@Excel(name = "最后一次补贴日期", width = 30, dateFormat = "yyyy-MM-dd")
|
||||||
private Date lastSubsidyTime;
|
private Date lastSubsidyTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除标志(0代表存在 2代表删除)
|
||||||
|
*/
|
||||||
|
private String delFlag;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -15,4 +15,8 @@ public class AccWalletInfoVO {
|
||||||
private BigDecimal frozenBalance;
|
private BigDecimal frozenBalance;
|
||||||
private BigDecimal lastSubsidyAmount;
|
private BigDecimal lastSubsidyAmount;
|
||||||
private LocalDateTime lastSubsidyTime;
|
private LocalDateTime lastSubsidyTime;
|
||||||
|
/**
|
||||||
|
* 删除标志(0代表存在 2代表删除)
|
||||||
|
*/
|
||||||
|
private String delFlag;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -57,6 +57,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<result property="createTime" column="create_time" />
|
<result property="createTime" column="create_time" />
|
||||||
<result property="updateBy" column="update_by" />
|
<result property="updateBy" column="update_by" />
|
||||||
<result property="updateTime" column="update_time" />
|
<result property="updateTime" column="update_time" />
|
||||||
|
<result property="delFlag" column="del_flag"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="selectAccInfoVo">
|
<sql id="selectAccInfoVo">
|
||||||
|
|
@ -68,7 +69,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
same_day_count, same_month_count, curr_cumu_amount, day_cumu_amount, month_sumu_amount,
|
same_day_count, same_month_count, curr_cumu_amount, day_cumu_amount, month_sumu_amount,
|
||||||
min_wallet_bal_limit, min_red_bal_limit, min_sub_bal_limit, month_full_reduce_amount,
|
min_wallet_bal_limit, min_red_bal_limit, min_sub_bal_limit, month_full_reduce_amount,
|
||||||
last_full_reduce_time, last_sub_time, sub_validity_date, last_sub_amount, last_wal_time, last_wal_amount,
|
last_full_reduce_time, last_sub_time, sub_validity_date, last_sub_amount, last_wal_time, last_wal_amount,
|
||||||
revision, reserved1, reserved2, reserved3, create_by, create_time, update_by, update_time
|
revision, reserved1, reserved2, reserved3, create_by, create_time, update_by, update_time, del_flag
|
||||||
from acc_info
|
from acc_info
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
|
|
@ -124,6 +125,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="reserved1 != null and reserved1 != ''"> and reserved1 = #{reserved1}</if>
|
<if test="reserved1 != null and reserved1 != ''"> and reserved1 = #{reserved1}</if>
|
||||||
<if test="reserved2 != null and reserved2 != ''"> and reserved2 = #{reserved2}</if>
|
<if test="reserved2 != null and reserved2 != ''"> and reserved2 = #{reserved2}</if>
|
||||||
<if test="reserved3 != null and reserved3 != ''"> and reserved3 = #{reserved3}</if>
|
<if test="reserved3 != null and reserved3 != ''"> and reserved3 = #{reserved3}</if>
|
||||||
|
<if test="delFlag != null and delFlag != ''"> and del_flag = #{delFlag}</if>
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
@ -179,6 +181,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="reserved1 != null and reserved1 != ''"> and reserved1 = #{reserved1}</if>
|
<if test="reserved1 != null and reserved1 != ''"> and reserved1 = #{reserved1}</if>
|
||||||
<if test="reserved2 != null and reserved2 != ''"> and reserved2 = #{reserved2}</if>
|
<if test="reserved2 != null and reserved2 != ''"> and reserved2 = #{reserved2}</if>
|
||||||
<if test="reserved3 != null and reserved3 != ''"> and reserved3 = #{reserved3}</if>
|
<if test="reserved3 != null and reserved3 != ''"> and reserved3 = #{reserved3}</if>
|
||||||
|
<if test="delFlag != null and delFlag != ''"> and del_flag = #{delFlag}</if>
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
@ -355,16 +358,17 @@ 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="updateBy != null">update_by = #{updateBy},</if>
|
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||||
|
<if test="delFlag != null">del_flag = #{delFlag},</if>
|
||||||
</trim>
|
</trim>
|
||||||
where acc_id = #{accId}
|
where acc_id = #{accId}
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
<delete id="deleteAccInfoByUserId" parameterType="Long">
|
<delete id="deleteAccInfoByUserId" parameterType="Long">
|
||||||
delete from acc_info where user_id = #{userId}
|
update acc_info set del_flag = '2' where user_id = #{userId}
|
||||||
</delete>
|
</delete>
|
||||||
|
|
||||||
<delete id="deleteAccInfoByIds" parameterType="String">
|
<delete id="deleteAccInfoByIds" parameterType="String">
|
||||||
delete from acc_info where acc_id in
|
update acc_info set del_flag = '2' where acc_id in
|
||||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||||
#{accId}
|
#{accId}
|
||||||
</foreach>
|
</foreach>
|
||||||
|
|
|
||||||
|
|
@ -17,10 +17,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<result property="createTime" column="create_time" />
|
<result property="createTime" column="create_time" />
|
||||||
<result property="updateBy" column="update_by" />
|
<result property="updateBy" column="update_by" />
|
||||||
<result property="updateTime" column="update_time" />
|
<result property="updateTime" column="update_time" />
|
||||||
|
<result property="delFlag" column="del_flag"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="selectAccWalletInfoVo">
|
<sql id="selectAccWalletInfoVo">
|
||||||
select user_id, acc_id, wallet_id, wallet_bal, limit_balance, frozen_balance, expired_time, last_subsidy_amount, last_subsidy_time, create_by, create_time, update_by, update_time from acc_wallet_info
|
select user_id, acc_id, wallet_id, wallet_bal, limit_balance, frozen_balance, expired_time, last_subsidy_amount,
|
||||||
|
last_subsidy_time, create_by, create_time, update_by, update_time, del_flag
|
||||||
|
from acc_wallet_info
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="selectAccWalletInfoList" parameterType="com.bonus.canteen.core.account.domain.AccWalletInfo" resultMap="AccWalletInfoResult">
|
<select id="selectAccWalletInfoList" parameterType="com.bonus.canteen.core.account.domain.AccWalletInfo" resultMap="AccWalletInfoResult">
|
||||||
|
|
@ -33,6 +36,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="expiredTime != null "> and expired_time = #{expiredTime}</if>
|
<if test="expiredTime != null "> and expired_time = #{expiredTime}</if>
|
||||||
<if test="lastSubsidyAmount != null "> and last_subsidy_amount = #{lastSubsidyAmount}</if>
|
<if test="lastSubsidyAmount != null "> and last_subsidy_amount = #{lastSubsidyAmount}</if>
|
||||||
<if test="lastSubsidyTime != null "> and last_subsidy_time = #{lastSubsidyTime}</if>
|
<if test="lastSubsidyTime != null "> and last_subsidy_time = #{lastSubsidyTime}</if>
|
||||||
|
<if test="delFlag != null "> and del_flag = #{delFlag}</if>
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
@ -105,11 +109,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
<delete id="deleteAccWalletInfoByUserId" parameterType="Long">
|
<delete id="deleteAccWalletInfoByUserId" parameterType="Long">
|
||||||
delete from acc_wallet_info where user_id = #{userId}
|
update acc_wallet_info set del_flag = '2' where user_id = #{userId}
|
||||||
</delete>
|
</delete>
|
||||||
|
|
||||||
<delete id="deleteAccWalletInfoByUserIds" parameterType="String">
|
<delete id="deleteAccWalletInfoByUserIds" parameterType="String">
|
||||||
delete from acc_wallet_info where user_id in
|
update acc_wallet_info set del_flag = '2' where user_id in
|
||||||
<foreach item="userId" collection="array" open="(" separator="," close=")">
|
<foreach item="userId" collection="array" open="(" separator="," close=")">
|
||||||
#{userId}
|
#{userId}
|
||||||
</foreach>
|
</foreach>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue