| @@ -0,0 +1,2 @@ | |||||
| alter table wx_merchant_subsidy modify column type tinyint(2) not null default 1 comment '结算类型1微信结算2自主结算'; | |||||
| alter table wx_merchant_subsidy add column source tinyint(2) not null default 0 comment '结算来源1卡消费2券核销3砍价核销4拼团核销5收银分账'; | |||||
| @@ -0,0 +1,2 @@ | |||||
| alter table wx_merchant_subsidy modify column type tinyint(2) not null default 1 comment '结算类型1自主结算2微信结算'; | |||||
| alter table wx_merchant_subsidy modify column source tinyint(2) not null default 0 comment '结算来源0结账1卡消费2券核销3砍价核销4拼团核销5收银分账'; | |||||
| @@ -127,4 +127,9 @@ public class WxMerchantSubsidy extends BaseEntity { | |||||
| return subsidyStr; | return subsidyStr; | ||||
| } | } | ||||
| @io.swagger.annotations.ApiModelProperty(value = "结算类型1微信结算2自主结算", name = "type") | |||||
| private Integer type; | |||||
| @io.swagger.annotations.ApiModelProperty(value = "结算来源0补贴1卡消费2券核销3砍价核销4拼团核销5收银分账", name = "source") | |||||
| private Integer source; | |||||
| } | } | ||||
| @@ -0,0 +1,39 @@ | |||||
| package com.iformall.enums; | |||||
| /** | |||||
| * Created by Stormeye on 2018/08/09. | |||||
| */ | |||||
| public enum EnumMerchantSubsidySource { | |||||
| SUBSIDY(0, "补贴"), | |||||
| CARD(1, "卡消费"), | |||||
| COUPON(2, "券核销"), | |||||
| PRESS(3, "砍价核销"), | |||||
| GROUP(4, "拼团核销"), | |||||
| CASHIER(5, "收银台"),; | |||||
| public static EnumMerchantSubsidySource getEnum(Integer code) { | |||||
| for (EnumMerchantSubsidySource value : values()) { | |||||
| if (value.getCode().equals(code)) { | |||||
| return value; | |||||
| } | |||||
| } | |||||
| return null; | |||||
| } | |||||
| private Integer code; | |||||
| private String message; | |||||
| EnumMerchantSubsidySource(Integer code, String message) { | |||||
| this.code = code; | |||||
| this.message = message; | |||||
| } | |||||
| public Integer getCode() { | |||||
| return code; | |||||
| } | |||||
| public String getMessage() { | |||||
| return message; | |||||
| } | |||||
| } | |||||
| @@ -0,0 +1,35 @@ | |||||
| package com.iformall.enums; | |||||
| /** | |||||
| * Created by Stormeye on 2018/08/09. | |||||
| */ | |||||
| public enum EnumMerchantSubsidyType { | |||||
| MANUAL(1, "自主结算"), | |||||
| WECHAT(2, "微信结算"),; | |||||
| public static EnumMerchantSubsidyType getEnum(Integer code) { | |||||
| for (EnumMerchantSubsidyType value : values()) { | |||||
| if (value.getCode().equals(code)) { | |||||
| return value; | |||||
| } | |||||
| } | |||||
| return null; | |||||
| } | |||||
| private Integer code; | |||||
| private String message; | |||||
| EnumMerchantSubsidyType(Integer code, String message) { | |||||
| this.code = code; | |||||
| this.message = message; | |||||
| } | |||||
| public Integer getCode() { | |||||
| return code; | |||||
| } | |||||
| public String getMessage() { | |||||
| return message; | |||||
| } | |||||
| } | |||||
| @@ -533,6 +533,8 @@ public class WxCouponOrderServiceImpl implements WxCouponOrderService { | |||||
| merchantSubsidy.setStatus(EnumMerchantSubsidyStatus.NOT_SUBSIDY.getCode()); | merchantSubsidy.setStatus(EnumMerchantSubsidyStatus.NOT_SUBSIDY.getCode()); | ||||
| merchantSubsidy.setCreateDate(new Date()); | merchantSubsidy.setCreateDate(new Date()); | ||||
| merchantSubsidy.setUpdateDate(new Date()); | merchantSubsidy.setUpdateDate(new Date()); | ||||
| merchantSubsidy.setType(EnumMerchantSubsidyType.MANUAL.getCode()); | |||||
| merchantSubsidy.setSource(EnumMerchantSubsidySource.SUBSIDY.getCode()); | |||||
| try { | try { | ||||
| wxMerchantSubsidyMapper.insert(merchantSubsidy); | wxMerchantSubsidyMapper.insert(merchantSubsidy); | ||||
| } catch (Exception e) { | } catch (Exception e) { | ||||