| @@ -52,7 +52,7 @@ public class WxCreditHistory implements Serializable { | |||||
| @io.swagger.annotations.ApiModelProperty(value="每笔积分明细",name="creditNum") | @io.swagger.annotations.ApiModelProperty(value="每笔积分明细",name="creditNum") | ||||
| private Integer creditNum; | private Integer creditNum; | ||||
| /**积分类型*/ | /**积分类型*/ | ||||
| @io.swagger.annotations.ApiModelProperty(value="积分类型 1每日登录,2消费,3绑车牌,4连接WIFI,5微信用户昵称授权,6微信用户手机授权,7完善个人信息,8积分导入,10增加积分,11积分兑换",name="creditType") | |||||
| @io.swagger.annotations.ApiModelProperty(value="积分类型 1每日登录,2消费,3绑车牌,4连接WIFI,5微信用户昵称授权,6微信用户手机授权,7完善个人信息,8积分导入,10增加积分,11积分兑换,12减少积分",name="creditType") | |||||
| private Integer creditType; | private Integer creditType; | ||||
| /**创建日期*/ | /**创建日期*/ | ||||
| @io.swagger.annotations.ApiModelProperty(value="创建日期",name="createDate") | @io.swagger.annotations.ApiModelProperty(value="创建日期",name="createDate") | ||||
| @@ -82,6 +82,10 @@ public class WxCouponChannelVo extends WxCouponChannel implements Serializable { | |||||
| @io.swagger.annotations.ApiModelProperty(value="自领取之日几日有效,(停车券当天有效)",name="validDays") | @io.swagger.annotations.ApiModelProperty(value="自领取之日几日有效,(停车券当天有效)",name="validDays") | ||||
| private Integer validDays; | private Integer validDays; | ||||
| /**积分售价(适用于类型10,11)**/ | |||||
| @io.swagger.annotations.ApiModelProperty(value="积分售价(适用于类型10,11)",name="creditPrice") | |||||
| private Integer creditPrice; | |||||
| @Transient | @Transient | ||||
| private String salePriceStr; | private String salePriceStr; | ||||
| @@ -301,4 +305,12 @@ public class WxCouponChannelVo extends WxCouponChannel implements Serializable { | |||||
| public void setValidDays(Integer validDays) { | public void setValidDays(Integer validDays) { | ||||
| this.validDays = validDays; | this.validDays = validDays; | ||||
| } | } | ||||
| public Integer getCreditPrice() { | |||||
| return creditPrice; | |||||
| } | |||||
| public void setCreditPrice(Integer creditPrice) { | |||||
| this.creditPrice = creditPrice; | |||||
| } | |||||
| } | } | ||||
| @@ -15,6 +15,7 @@ public enum EnumScoreType { | |||||
| MEM_IMPORT(8, "会员导入"), | MEM_IMPORT(8, "会员导入"), | ||||
| MEM_REDUCE(9, "会员成长值扣减"), | MEM_REDUCE(9, "会员成长值扣减"), | ||||
| SPEND_CREDIT(10, "增加积分"), | SPEND_CREDIT(10, "增加积分"), | ||||
| REDUCE_CREDIT(12, "减少积分"), | |||||
| CHANGE_CREDIT(11, "积分兑换"); | CHANGE_CREDIT(11, "积分兑换"); | ||||
| public static EnumScoreType getEnum(Integer code) { | public static EnumScoreType getEnum(Integer code) { | ||||
| @@ -240,11 +240,18 @@ public class WxCreditHistoryServiceImpl implements WxCreditHistoryService { | |||||
| if (record.getCreditType() == EnumScoreType.CONSUMPTION.getCode()) { | if (record.getCreditType() == EnumScoreType.CONSUMPTION.getCode()) { | ||||
| return payAddCredit(record); | return payAddCredit(record); | ||||
| } | } | ||||
| if (record.getCreditType() == EnumScoreType.REDUCE_CREDIT.getCode()) { | |||||
| return reduceCredit(record); | |||||
| } | |||||
| return 0; | return 0; | ||||
| } | } | ||||
| private int reduceCredit(WxCreditHistory record) { | |||||
| int reduceCredit = record.getCreditNum(); | |||||
| return -reduceCredit; | |||||
| } | |||||
| private int loginAddCredit(WxCreditHistory record) { | private int loginAddCredit(WxCreditHistory record) { | ||||
| //如果当天已经登录过则跳过 | //如果当天已经登录过则跳过 | ||||
| if (wxCreditHistoryMapper.loginCount(record) > 0) { | if (wxCreditHistoryMapper.loginCount(record) > 0) { | ||||