Commit 117891fc by 吕明尚

权益会员配置增加字段,数据统计增加默认值

parent f2385f3e
......@@ -26,6 +26,9 @@ public class EquityMembersOrderConfig extends BaseEntity {
@TableId(type = IdType.AUTO)
private Long id;
@Excel(name = "配置名称")
private String name;
/**
* 默认会员等级
*/
......@@ -50,6 +53,9 @@ public class EquityMembersOrderConfig extends BaseEntity {
@Excel(name = "会员有效期")
private Long validityPeriod;
@Excel(name = "赠送积分")
private BigDecimal giftPoints;
/**
* 是否删除
*/
......
......@@ -2968,6 +2968,7 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
orderVo.setStoreName(sStoreMap.get(order.getStoreId()).getName());
orderVo.setRoomName(sRoomMap.get(order.getRoomId()).getName());
orderVo.setCreateTime(order.getCreateTime());
orderVo.setCouponPayPrice(BigDecimal.ZERO);
if (order.getStatus().equals(OrderStatusEnum.CANCEL.getCode()) && order.getRefundStatus().equals(RefundStatusEnum.REFUNDED.getCode())) {
if (!map.isEmpty()) {
if (ObjectUtil.isNotEmpty(order.getCouponId())) {
......@@ -3143,6 +3144,7 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
orderVo.setStoreName(sStoreMap.get(order.getStoreId()).getName());
orderVo.setRoomName(sRoomMap.get(order.getRoomId()).getName());
orderVo.setCreateTime(order.getCreateTime());
orderVo.setCouponPayPrice(BigDecimal.ZERO);
if (order.getStatus().equals(OrderStatusEnum.CANCEL.getCode()) && order.getRefundStatus().equals(RefundStatusEnum.REFUNDED.getCode())) {
if (!map.isEmpty()) {
if (ObjectUtil.isNotEmpty(order.getCouponId())) {
......
......@@ -6,10 +6,12 @@
<resultMap type="EquityMembersOrderConfig" id="EquityMembersOrderConfigResult">
<result property="id" column="id"/>
<result property="name" column="name"/>
<result property="defaultLevel" column="default_level"/>
<result property="memberConfigId" column="member_config_id"/>
<result property="requiredAmount" column="required_amount"/>
<result property="validityPeriod" column="validity_period"/>
<result property="giftPoints" column="gift_points"/>
<result property="isDelete" column="is_delete"/>
<result property="createBy" column="create_by"/>
<result property="createTime" column="create_time"/>
......@@ -20,10 +22,12 @@
<sql id="selectEquityMembersOrderConfigVo">
select id,
name,
default_level,
member_config_id,
required_amount,
validity_period,
gift_points,
is_delete,
create_by,
create_time,
......@@ -38,9 +42,11 @@
<include refid="selectEquityMembersOrderConfigVo"/>
<where>
<if test="defaultLevel != null ">and default_level = #{defaultLevel}</if>
<if test="name != null">and name = #{name}</if>
<if test="memberConfigId != null ">and member_config_id = #{memberConfigId}</if>
<if test="requiredAmount != null ">and required_amount = #{requiredAmount}</if>
<if test="validityPeriod != null ">and validity_period = #{validityPeriod}</if>
<if test="giftPoints != null ">and gift_points = #{giftPoints}</if>
<if test="isDelete != null ">and is_delete = #{isDelete}</if>
</where>
</select>
......@@ -54,10 +60,12 @@
keyProperty="id">
insert into s_equity_members_order_config
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="name !=null">name,</if>
<if test="defaultLevel != null">default_level,</if>
<if test="memberConfigId != null">member_config_id,</if>
<if test="requiredAmount != null">required_amount,</if>
<if test="validityPeriod != null">validity_period,</if>
<if test="giftPoints != null">gift_points,</if>
<if test="isDelete != null">is_delete,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
......@@ -66,10 +74,12 @@
<if test="remark != null">remark,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="name !=null">#{name},</if>
<if test="defaultLevel != null">#{defaultLevel},</if>
<if test="memberConfigId != null">#{memberConfigId},</if>
<if test="requiredAmount != null">#{requiredAmount},</if>
<if test="validityPeriod != null">#{validityPeriod},</if>
<if test="giftPoints != null">#{giftPoints},</if>
<if test="isDelete != null">#{isDelete},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
......@@ -82,10 +92,12 @@
<update id="updateEquityMembersOrderConfig" parameterType="EquityMembersOrderConfig">
update s_equity_members_order_config
<trim prefix="SET" suffixOverrides=",">
<if test="name !=null">name = #{name},</if>
<if test="defaultLevel != null">default_level = #{defaultLevel},</if>
<if test="memberConfigId != null">member_config_id = #{memberConfigId},</if>
<if test="requiredAmount != null">required_amount = #{requiredAmount},</if>
<if test="validityPeriod != null">validity_period = #{validityPeriod},</if>
<if test="giftPoints != null">gift_points = #{giftPoints},</if>
<if test="isDelete != null">is_delete = #{isDelete},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment