|
@@ -9,10 +9,7 @@ import com.txz.cif.service.AccountFlowService;
|
|
import com.txz.cif.service.AccountService;
|
|
import com.txz.cif.service.AccountService;
|
|
import com.txz.cif.service.RedEnvelopeService;
|
|
import com.txz.cif.service.RedEnvelopeService;
|
|
import com.txz.cif.service.UserService;
|
|
import com.txz.cif.service.UserService;
|
|
-import com.txz.cif.web.bo.AccountFlowBO;
|
|
|
|
-import com.txz.cif.web.bo.AccountInfoBO;
|
|
|
|
-import com.txz.cif.web.bo.IndexCollectBO;
|
|
|
|
-import com.txz.cif.web.bo.UserInfoBO;
|
|
|
|
|
|
+import com.txz.cif.web.bo.*;
|
|
import com.txz.cif.web.para.AccountFlowParam;
|
|
import com.txz.cif.web.para.AccountFlowParam;
|
|
|
|
|
|
import com.github.pagehelper.PageHelper;
|
|
import com.github.pagehelper.PageHelper;
|
|
@@ -59,7 +56,7 @@ public class AccountApiController extends AbstractApiController {
|
|
@Resource
|
|
@Resource
|
|
private AuthService authService;
|
|
private AuthService authService;
|
|
|
|
|
|
- @ApiOperation(value = "查询账号信息", notes = "",httpMethod = "GET")
|
|
|
|
|
|
+ @ApiOperation(value = "查询收益账号信息", notes = "",httpMethod = "GET")
|
|
@GetMapping("/getAccountInfo")
|
|
@GetMapping("/getAccountInfo")
|
|
public Result<AccountInfoBO> getAccountInfo(HttpServletRequest request) {
|
|
public Result<AccountInfoBO> getAccountInfo(HttpServletRequest request) {
|
|
Long userId = authService.getTokenUserId(request);
|
|
Long userId = authService.getTokenUserId(request);
|
|
@@ -70,10 +67,9 @@ public class AccountApiController extends AbstractApiController {
|
|
if (user == null ){
|
|
if (user == null ){
|
|
ResultGenerator.genFailResult(ResultCode.USER_IS_NULL);
|
|
ResultGenerator.genFailResult(ResultCode.USER_IS_NULL);
|
|
}
|
|
}
|
|
- Account wallet = accountService.getAccount(userId, 1);
|
|
|
|
Account earnings = accountService.getAccount(userId, 2);
|
|
Account earnings = accountService.getAccount(userId, 2);
|
|
AccountInfoBO bo = new AccountInfoBO();
|
|
AccountInfoBO bo = new AccountInfoBO();
|
|
- bo.setBalance(wallet.getBalance().add(earnings.getBalance()));
|
|
|
|
|
|
+ bo.setBalance(earnings.getBalance());
|
|
bo.setSettledAmount(earnings.getTotalInamount());
|
|
bo.setSettledAmount(earnings.getTotalInamount());
|
|
BigDecimal pendingAmount = redEnvelopeService.sumWithDay(null,userId,1);
|
|
BigDecimal pendingAmount = redEnvelopeService.sumWithDay(null,userId,1);
|
|
if (pendingAmount == null){
|
|
if (pendingAmount == null){
|
|
@@ -101,6 +97,24 @@ public class AccountApiController extends AbstractApiController {
|
|
return ResultGenerator.genSuccessResult(bo);
|
|
return ResultGenerator.genSuccessResult(bo);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ @ApiOperation(value = "查询钱包账号信息", notes = "",httpMethod = "GET")
|
|
|
|
+ @GetMapping("/getWalletAccountInfo")
|
|
|
|
+ public Result<AccountWalletInfoBO> getWalletAccountInfo(HttpServletRequest request) {
|
|
|
|
+ Long userId = authService.getTokenUserId(request);
|
|
|
|
+ if (userId == null ){
|
|
|
|
+ ResultGenerator.genFailResult(ResultCode.USERID_IS_NULL);
|
|
|
|
+ }
|
|
|
|
+ User user = userService.findById(userId);
|
|
|
|
+ if (user == null ){
|
|
|
|
+ ResultGenerator.genFailResult(ResultCode.USER_IS_NULL);
|
|
|
|
+ }
|
|
|
|
+ Account wallet = accountService.getAccount(userId, 1);
|
|
|
|
+ AccountWalletInfoBO bo = new AccountWalletInfoBO();
|
|
|
|
+ bo.setBalance(wallet.getBalance());
|
|
|
|
+ bo.setFreezeAmount(wallet.getFreezeAmount());
|
|
|
|
+ return ResultGenerator.genSuccessResult(bo);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
|
|
@PostMapping("/accountFlowList")
|
|
@PostMapping("/accountFlowList")
|
|
@ApiOperation(value = "出入流水",httpMethod = "POST")
|
|
@ApiOperation(value = "出入流水",httpMethod = "POST")
|