mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-20 02:55:04 +08:00
判断余额的值
This commit is contained in:
@@ -208,13 +208,13 @@ public class MemberBasicInfoServiceImpl implements MemberBasicInfoService {
|
||||
@Override
|
||||
public int updateMemberBalance(UpdateMemberBalanceDTO dto) {
|
||||
String memberId = dto.getMemberId(); // 会员id
|
||||
BigDecimal updateGiftBalance = dto.getUpdateGiftBalance(); // 更新赠送金额
|
||||
BigDecimal updatePrincipalBalance = dto.getUpdatePrincipalBalance(); // 更新本金金额
|
||||
BigDecimal updateGiftBalance = dto.getUpdateGiftBalance() != null ? dto.getUpdateGiftBalance() : BigDecimal.ZERO; // 更新赠送金额
|
||||
BigDecimal updatePrincipalBalance = dto.getUpdatePrincipalBalance() != null ? dto.getUpdatePrincipalBalance() : BigDecimal.ZERO; // 更新本金金额
|
||||
|
||||
if (updateGiftBalance == null && updatePrincipalBalance == null) {
|
||||
log.info("修改用户余额-金额为空, 直接返回:{}", JSON.toJSONString(dto));
|
||||
return 0;
|
||||
}
|
||||
// if (updateGiftBalance == null && updatePrincipalBalance == null) {
|
||||
// log.info("修改用户余额-金额为空, 直接返回:{}", JSON.toJSONString(dto));
|
||||
// return 0;
|
||||
// }
|
||||
|
||||
// 为0也返回
|
||||
if (BigDecimal.ZERO.compareTo(updateGiftBalance) == 0 && BigDecimal.ZERO.compareTo(updatePrincipalBalance) == 0) {
|
||||
|
||||
Reference in New Issue
Block a user