param change
This commit is contained in:
@@ -19,7 +19,6 @@ import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.validation.Valid;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@@ -16,7 +16,7 @@ public class EditReferralDTO {
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty("修改佣金金额")
|
||||
private BigDecimal amount;
|
||||
private BigDecimal commission;
|
||||
|
||||
@ApiModelProperty("referral状态 取值:Paid/Unpaid/Accept/Rejected")
|
||||
@Pattern(regexp = "Paid|Unpaid|Accept|Rejected", message = "状态必须是Paid/Unpaid/Accept/Rejected")
|
||||
|
||||
@@ -69,9 +69,9 @@ public class ReferralServiceImpl extends ServiceImpl<ReferralMapper, Referral> i
|
||||
throw new BusinessException("unknown referral id");
|
||||
}
|
||||
|
||||
if (Objects.nonNull(editReferralDTO.getAmount()) && editReferralDTO.getAmount().compareTo(referral.getCommission()) != 0){
|
||||
log.info("设置referral id为{} 原佣金 {} 设置为 {}", referral.getId(), referral.getAffiliateId(), editReferralDTO.getAmount());
|
||||
referral.setCommission(editReferralDTO.getAmount());
|
||||
if (Objects.nonNull(editReferralDTO.getCommission()) && editReferralDTO.getCommission().compareTo(referral.getCommission()) != 0){
|
||||
log.info("设置referral id为{} 原佣金 {} 设置为 {}", referral.getId(), referral.getAffiliateId(), editReferralDTO.getCommission());
|
||||
referral.setCommission(editReferralDTO.getCommission());
|
||||
referral.setUpdateTime(LocalDateTime.now());
|
||||
}
|
||||
if (!StringUtil.isNullOrEmpty(editReferralDTO.getStatus()) && !editReferralDTO.getStatus().equals(referral.getStatus())){
|
||||
|
||||
Reference in New Issue
Block a user