Browse Source

初始化

linxk 3 weeks ago
parent
commit
0b3474651a

+ 4 - 2
cif-service/src/main/java/com/txz/cif/dubbo/impl/AccountDubboServiceImpl.java

@@ -66,13 +66,15 @@ public class AccountDubboServiceImpl implements AccountDubboService {
                 .aliases("202").freezeAmount(BigDecimal.ZERO).balance(BigDecimal.ZERO)
                 .type(1).beforeDayBalance(BigDecimal.ZERO).beforeDayTime(DateUtil.date())
                 .direction("C").bizType(1).subjectType(2).remark("个人钱包账户").name(user.getName())
-                .beforeDayInitBalance(BigDecimal.ZERO).version("1.0.0")
+                .beforeDayInitBalance(BigDecimal.ZERO).version("1.0.0").totalInamount(BigDecimal.ZERO)
+                .totalOutAmount(BigDecimal.ZERO)
                 .build();
         Account yl = Account.builder().userId(userId).createTime(DateUtil.date())
                 .aliases("202").freezeAmount(BigDecimal.ZERO).balance(BigDecimal.ZERO)
                 .type(1).beforeDayBalance(BigDecimal.ZERO).beforeDayTime(DateUtil.date())
                 .direction("C").bizType(2).subjectType(2).remark("个人收益账户").name(user.getName())
-                .beforeDayInitBalance(BigDecimal.ZERO).version("1.0.0")
+                .beforeDayInitBalance(BigDecimal.ZERO).version("1.0.0").totalInamount(BigDecimal.ZERO)
+                .totalOutAmount(BigDecimal.ZERO)
                 .build();
         List<Account> add = new ArrayList<>();
         add.add(qb);

+ 5 - 2
cif-service/src/main/java/com/txz/cif/service/impl/UserServiceImpl.java

@@ -176,7 +176,8 @@ public class UserServiceImpl extends AbstractService<User> implements UserServic
                 .aliases(aliases).subjectType(2).beforeDayInitBalance(BigDecimal.ZERO)
                 .userId(user.getId())
                 .beforeDayTime(today).createTime(today).freezeAmount(BigDecimal.ZERO).name(user.getName())
-                .remark(remark).type(1) .direction("C") .updateTime(today) .build();
+                .remark(remark).type(1) .direction("C") .updateTime(today).totalInamount(BigDecimal.ZERO)
+                .totalOutAmount(BigDecimal.ZERO) .build();
         accountService.saveUseGeneratedKeys(account);
 
        return user.getId();
@@ -192,7 +193,9 @@ public class UserServiceImpl extends AbstractService<User> implements UserServic
                 .aliases(aliases).subjectType(2).beforeDayInitBalance(BigDecimal.ZERO)
                 .userId(user.getId()).bizType(1)
                 .beforeDayTime(today).createTime(today).freezeAmount(BigDecimal.ZERO).name(user.getName())
-                .remark(remark).type(1) .direction("C") .updateTime(today) .build();
+                .remark(remark).type(1) .direction("C") .totalInamount(BigDecimal.ZERO)
+                .totalOutAmount(BigDecimal.ZERO).updateTime(today) .totalInamount(BigDecimal.ZERO)
+                .totalOutAmount(BigDecimal.ZERO).build();
         //钱包账户
         accountService.saveUseGeneratedKeys(account);
         account.setId(null);

+ 1 - 1
cif-service/src/main/java/com/txz/cif/web/mng/UserController.java

@@ -187,7 +187,7 @@ public class UserController extends AbstractApiController {
         bo.setSettledEarnings(earnings.getTotalInamount());
         //充值总金额
         bo.setRechargeAmount(wallet.getTotalInamount());
-        BigDecimal l7DEarnings =  redEnvelopeService.sumWithDay(DateUtil.offsetDay(DateUtil.date(),-7).toDateStr(), u.getId(), 3);
+        BigDecimal l7DEarnings =  redEnvelopeService.sumWithDay(DateUtil.offsetDay(DateUtil.date(),-7).toDateStr(), u.getId(), null);
         bo.setL7DEarnings(l7DEarnings);
         BigDecimal pendingEarnings =  redEnvelopeService.sumWithDay(null, u.getId(), 1);
         bo.setPendingEarnings(pendingEarnings);