Browse Source

[结算对账][修改][添加字段及sql]

release_toaliyun_real
gongbiao 6 years ago
parent
commit
8c2eb6bbbd
6 changed files with 85 additions and 0 deletions
  1. +2
    -0
      mallinkAdmin/src/main/resources/db/migration/V201910171004__G_ALTER_MERCHANT_SUBSIDY.sql
  2. +2
    -0
      mallinkAdmin/src/main/resources/db/migration/V201910171127__G_ALTER_MERCHANT_SUBSIDY.sql
  3. +5
    -0
      mallinkService/src/main/java/com/iformall/domain/po/WxMerchantSubsidy.java
  4. +39
    -0
      mallinkService/src/main/java/com/iformall/enums/EnumMerchantSubsidySource.java
  5. +35
    -0
      mallinkService/src/main/java/com/iformall/enums/EnumMerchantSubsidyType.java
  6. +2
    -0
      mallinkService/src/main/java/com/iformall/service/impl/WxCouponOrderServiceImpl.java

+ 2
- 0
mallinkAdmin/src/main/resources/db/migration/V201910171004__G_ALTER_MERCHANT_SUBSIDY.sql View File

@@ -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收银分账';

+ 2
- 0
mallinkAdmin/src/main/resources/db/migration/V201910171127__G_ALTER_MERCHANT_SUBSIDY.sql View File

@@ -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收银分账';

+ 5
- 0
mallinkService/src/main/java/com/iformall/domain/po/WxMerchantSubsidy.java View File

@@ -127,4 +127,9 @@ public class WxMerchantSubsidy extends BaseEntity {
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;
}

+ 39
- 0
mallinkService/src/main/java/com/iformall/enums/EnumMerchantSubsidySource.java View File

@@ -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;
}
}

+ 35
- 0
mallinkService/src/main/java/com/iformall/enums/EnumMerchantSubsidyType.java View File

@@ -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;
}
}

+ 2
- 0
mallinkService/src/main/java/com/iformall/service/impl/WxCouponOrderServiceImpl.java View File

@@ -533,6 +533,8 @@ public class WxCouponOrderServiceImpl implements WxCouponOrderService {
merchantSubsidy.setStatus(EnumMerchantSubsidyStatus.NOT_SUBSIDY.getCode());
merchantSubsidy.setCreateDate(new Date());
merchantSubsidy.setUpdateDate(new Date());
merchantSubsidy.setType(EnumMerchantSubsidyType.MANUAL.getCode());
merchantSubsidy.setSource(EnumMerchantSubsidySource.SUBSIDY.getCode());
try {
wxMerchantSubsidyMapper.insert(merchantSubsidy);
} catch (Exception e) {


Loading…
Cancel
Save