Browse Source

bug

release_toaliyun_real
xhxu 5 years ago
parent
commit
94f66831a6
2 changed files with 8 additions and 0 deletions
  1. +2
    -0
      mallinkService/src/main/java/com/iformall/common/ErrorCode.java
  2. +6
    -0
      mallinkService/src/main/java/com/iformall/service/impl/WxQuestionOneselfUserServiceImpl.java

+ 2
- 0
mallinkService/src/main/java/com/iformall/common/ErrorCode.java View File

@@ -597,6 +597,8 @@ public enum ErrorCode{

QUESTION_USER_NOT(61006, "答题参数错误!"),
QUESTION_USER_LINE(61007, "已经参与!"),
QUESTION_NOT_START(61008, "问卷未开始"),
QUESTION_END(61009, "问卷已结束"),

/**
* 数衍信息


+ 6
- 0
mallinkService/src/main/java/com/iformall/service/impl/WxQuestionOneselfUserServiceImpl.java View File

@@ -144,6 +144,12 @@ public class WxQuestionOneselfUserServiceImpl implements WxQuestionOneselfUserSe
wxQuestionOneselfMapper.updateCountUser(record.getQuestionId());

WxQuestionOneself wxQuestionOneself = wxQuestionOneselfMapper.selectById(record.getQuestionId());
if(now.before(wxQuestionOneself.getStartDate())){
throw new MallinkException(ErrorCode.QUESTION_NOT_START);
}
if(now.after(wxQuestionOneself.getEndDate())){
throw new MallinkException(ErrorCode.QUESTION_END);
}
if(wxQuestionOneself.getRewardCredit() != null && wxQuestionOneself.getRewardCredit() > 0){
WxCreditHistory wxCreditHistory = new WxCreditHistory();
wxCreditHistory.setTenantId(record.getFinalTenantId());


Loading…
Cancel
Save