Просмотр исходного кода

[添加enum][新增]:dateAmtype添加

release_toaliyun_real
Stormeye.Wu 7 лет назад
Родитель
Сommit
70057760c2
2 измененных файлов: 40 добавлений и 3 удалений
  1. +3
    -3
      mallinkAdmin/src/main/java/com/simple/schedule/DaliyAmountSchedule.java
  2. +37
    -0
      mallinkService/src/main/java/com/simple/enums/EnumDateAmtType.java

+ 3
- 3
mallinkAdmin/src/main/java/com/simple/schedule/DaliyAmountSchedule.java Просмотреть файл

@@ -5,9 +5,9 @@ import com.simple.domain.po.WxCouponOrder;
import com.simple.domain.po.WxDateAmountRecord;
import com.simple.domain.po.WxMall;
import com.simple.domain.po.WxMerchant;
import com.simple.enums.EnumDateAmtType;
import com.simple.mapper.*;
import com.simple.service.WxDateAmountRecordService;
import com.simple.utils.*;
import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
@@ -108,7 +108,7 @@ public class DaliyAmountSchedule {
dateAmountRecord.setPayPrice(total_price);
dateAmountRecord.setMerchantId(merchant.getId());
dateAmountRecord.setTenantId(merchant.getTenantId());
dateAmountRecord.setType(0);
dateAmountRecord.setType(EnumDateAmtType.PAY_RECORD.getCode());
dateAmountRecord.setDate(now);
dateAmountRecord.setDayOfWeek(cal.get(Calendar.DAY_OF_WEEK));
dateAmountRecord.setMonth(cal.get(Calendar.MONTH));
@@ -129,7 +129,7 @@ public class DaliyAmountSchedule {

dateAmountRecord.setId(IdWorker.get().nextId());
dateAmountRecord.setPayPrice(total_price);
dateAmountRecord.setType(1);
dateAmountRecord.setType(EnumDateAmtType.VERIFY_RECORD.getCode());
wxDateAmountRecordService.saveDaliyAmount(dateAmountRecord);

}


+ 37
- 0
mallinkService/src/main/java/com/simple/enums/EnumDateAmtType.java Просмотреть файл

@@ -0,0 +1,37 @@
package com.simple.enums;

/**
* Created by Stormeye on 2018/08/09.
*/
public enum EnumDateAmtType {

// 0 交易记录 1.核销记录;
PAY_RECORD(0, "交易记录"),
VERIFY_RECORD(1, "核销记录"),
;

public static EnumDateAmtType getEnum(Integer code) {
for (EnumDateAmtType value : values()) {
if (value.getCode().equals(code)) {
return value;
}
}
return null;
}

private Integer code;
private String message;

EnumDateAmtType(Integer code, String message) {
this.code = code;
this.message = message;
}

public Integer getCode() {
return code;
}

public String getMessage() {
return message;
}
}

Загрузка…
Отмена
Сохранить