提交 855987ca authored 作者: huyufan's avatar huyufan

修复BUG

上级 b888f898
......@@ -68,6 +68,6 @@ public class OwnerAccountVO {
private LocalDateTime createTime;
@ApiModelProperty(value = "修改时间")
private LocalDateTime modifyTime;
private LocalDateTime modifiedTime;
}
\ No newline at end of file
......@@ -101,6 +101,6 @@ public class OwnerCaseOutVO {
* 修改时间
*/
@ApiModelProperty(value = "修改时间")
private LocalDateTime modifyTime;
private LocalDateTime modifiedTime;
}
\ No newline at end of file
package com.clx.performance.controller.pc.owner;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.clx.performance.enums.OwnerAccountEnum;
import com.clx.performance.model.OwnerTransferInfo;
import com.clx.performance.param.pc.*;
import com.clx.performance.service.*;
......@@ -26,7 +27,10 @@ import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import javax.validation.constraints.NotNull;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
@Slf4j
@RestController
......@@ -50,10 +54,10 @@ public class OwnerAccountController {
@ApiOperation(value = "账户信息", notes = "<br>By:胡宇帆")
@GetMapping("/accountInfo")
@UnitCovert(param = false)
public Result<List<OwnerAccountVO>> accountInfo() {
public Result<Map> accountInfo() {
UserSessionData loginUserInfo = TokenUtil.getLoginUserInfo();
List<OwnerAccountVO> accountVOList = ownerAccountService.accountInfo(loginUserInfo.getUserNo());
return Result.ok(accountVOList);
return Result.ok(accountVOList.stream().collect(Collectors.groupingBy(OwnerAccountVO::getAccountType)));
}
@ApiOperation(value = "货主充值记录列表", notes = "<br>By:胡宇帆")
......
......@@ -75,8 +75,8 @@ public class OwnerAccount implements HasKey<Integer> {
@TableField("create_time")
private LocalDateTime createTime;
@TableField("modify_time")
private LocalDateTime modifyTime;
@TableField("modified_time")
private LocalDateTime modifiedTime;
@KeyColumn("id")
@Override
......
......@@ -110,8 +110,8 @@ public class OwnerCaseOut implements HasKey<Integer> {
/**
* 修改时间
*/
@TableField("modify_time")
private LocalDateTime modifyTime;
@TableField("modified_time")
private LocalDateTime modifiedTime;
@Override
@KeyColumn("id")
......
......@@ -111,7 +111,7 @@ public class OwnerAccountServiceImpl implements OwnerAccountService {
OwnerAccount update = new OwnerAccount();
update.setUsableBalance(caseOutBalance.negate());
update.setFrozenBalance(caseOutBalance);
update.setModifyTime(account.getModifyTime());
update.setModifiedTime(account.getModifiedTime());
update.setId(account.getId());
int flag = ownerAccountDao.updateAccount(update, now);
if (flag > 0) {
......@@ -172,7 +172,7 @@ public class OwnerAccountServiceImpl implements OwnerAccountService {
update.setAccountBalance(topUpBalance);
update.setUsableBalance(topUpBalance);
update.setId(account.getId());
update.setModifyTime(account.getModifyTime());
update.setModifiedTime(account.getModifiedTime());
int flag = ownerAccountDao.updateAccount(update, now);
if (flag > 0) {
break;
......@@ -462,7 +462,7 @@ public class OwnerAccountServiceImpl implements OwnerAccountService {
OwnerAccount entity = new OwnerAccount();
entity.setAccountType(ownerAccount.getAccountType());
entity.setId(ownerAccount.getId());
entity.setModifyTime(ownerAccount.getModifyTime());
entity.setModifiedTime(ownerAccount.getModifiedTime());
if (ownerAccount.getAccountType().equals(OwnerAccountEnum.AccountTypeStatus.MARGIN_ACCOUNT.getCode())) {
if (ownerAccount.getUsableBalance().compareTo(frozenBalance) < 0) {
throw new ServiceSystemException(PerformanceResultEnum.HTTP_ERROR, "当前货主保证金账户可用余额不够冻结");
......
......@@ -44,8 +44,8 @@ public class OwnerAccountSqlProvider {
account.getUsableBalance() + ",frozen_balance = frozen_balance +"
+ account.getUsableBalance() + ",account_balance = account_balance +"
+ account.getAccountBalance()+
",modify_time=" + now
+ "where id = " + account.getId() + "and modify_time = " + account.getModifyTime()
",modified_time=" + now
+ "where id = " + account.getId() + "and modified_time = " + account.getModifiedTime()
);
return sqlList.toString();
......@@ -56,8 +56,8 @@ public class OwnerAccountSqlProvider {
//
// sqlList.append("update owner_account set usable_balance = usable_balance -" +
// account.getUsableBalance() + ",frozen_balance = frozen_balance -"
// + account.getUsableBalance() + ",modify_time=" + now
// + "where id = " + account.getId() + "and modify_time = " + account.getModifyTime()
// + account.getUsableBalance() + ",modified_time=" + now
// + "where id = " + account.getId() + "and modified_time = " + account.getModifyTime()
// );
//
// return sqlList.toString();
......
......@@ -13,7 +13,7 @@ public class OwnerCaseOutProvider {
String sql = new SQL() {{
SELECT("a.id, a.owner_user_no," +
" a.case_out_no, a.case_out_balance, a.account_type, " +
" a.status,a.case_out_bank,a.case_out_bank_number,a.payment_time,a.create_by,a.platform_payment_bank_number,a.platform_payment_bank,a.payment_by,a.payment_proof,a.create_time,a.modify_time");
" a.status,a.case_out_bank,a.case_out_bank_number,a.payment_time,a.create_by,a.platform_payment_bank_number,a.platform_payment_bank,a.payment_by,a.payment_proof,a.create_time,a.modified_time");
FROM("owner_case_out a");
if (StringUtils.isNotBlank(param.getBeginTime()) && StringUtils.isNotBlank(param.getEndTime())) {
WHERE("a.create_time >= #{param.beginTime} and a.create_time <= #{param.endTime}");
......
......@@ -13,7 +13,7 @@ public class OwnerTopUpProvider {
String sql = new SQL() {{
SELECT("a.id, a.owner_user_no," +
" a.top_up_no, a.top_up_balance, a.account_type, " +
" a.status,a.drawing_bank, a.drawing_bank_number,a.drawing_proof,a.approval_time,a.approval_by,a.approval_turn_down,a.create_by,a.create_time,a.modify_time");
" a.status,a.drawing_bank, a.drawing_bank_number,a.drawing_proof,a.approval_time,a.approval_by,a.approval_turn_down,a.create_by,a.create_time,a.modified_time");
FROM("owner_top_up a");
if (StringUtils.isNotBlank(param.getBeginTime()) && StringUtils.isNotBlank(param.getEndTime())) {
WHERE("a.create_time >= #{param.beginTime} and a.create_time <= #{param.endTime}");
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论