提交 facd493f authored 作者: huyufan's avatar huyufan

增加报价详情查询账户信息

上级 15377170
......@@ -6,6 +6,7 @@ import com.clx.performance.param.pc.owner.FrozenAccountParam;
import com.clx.performance.param.pc.owner.ThawAccountParam;
import com.clx.performance.param.pc.owner.UpdateStatusParam;
import com.clx.performance.vo.feign.OrderGoodsFeignVO;
import com.clx.performance.vo.pc.OwnerAccountAllVO;
import com.msl.common.result.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
......@@ -84,4 +85,7 @@ public interface PerformanceFeign {
@GetMapping(value = {"clx-performance/feign/orderChild/selectInTransitOrderChild"})
Result<Boolean> selectInTransitOrderChild(@RequestParam("orderNo") String orderNo);
@GetMapping(value = {"clx-performance/feign/owner/accountInfo"})
Result<OwnerAccountAllVO> accountInfo(@RequestParam Long userNo);
}
package com.clx.performance.vo.pc;
import lombok.Data;
@Data
public class OwnerAccountAllVO {
private OwnerAccountVO marginAccount;
private OwnerAccountVO prepaidFreightAccount;
}
......@@ -19,6 +19,7 @@ import com.msl.common.result.Result;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;
import java.math.BigDecimal;
import java.util.HashMap;
......@@ -158,6 +159,7 @@ public class OrderCancelComponent {
}
}
@Transactional(rollbackFor = Exception.class)
public void backFillTonnage(OrderGoods orderGoods, BigDecimal weight) {
if (orderGoods.getOrderGoodsStatus().equals(OrderGoodsStatusEnum.Status.CANCEL.getCode())
|| orderGoods.getOrderGoodsStatus().equals(OrderGoodsStatusEnum.Status.COMPLETED.getCode())
......
......@@ -4,16 +4,14 @@ import cn.hutool.json.JSONUtil;
import com.clx.performance.param.pc.owner.FrozenAccountParam;
import com.clx.performance.param.pc.owner.ThawAccountParam;
import com.clx.performance.service.OwnerAccountService;
import com.clx.performance.vo.pc.OwnerAccountAllVO;
import com.msl.common.result.Result;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
@Slf4j
@RestController
......@@ -40,4 +38,10 @@ public class OwnerAccountFeignController {
ownerAccountService.ownerAccountThaw(param);
return Result.ok();
}
@ApiOperation(value = "查询用户预付运费和保证金账户", notes = "<br>By:胡宇帆")
@GetMapping("/accountInfo")
public Result<OwnerAccountAllVO> accountInfo(@RequestParam Long userNo) {
return Result.ok(ownerAccountService.accountInfo(userNo));
}
}
......@@ -56,9 +56,9 @@ public class OwnerAccountController {
@ApiOperation(value = "账户信息", notes = "<br>By:胡宇帆")
@GetMapping("/accountInfo")
@UnitCovert(param = false)
public Result<Map> accountInfo() {
public Result<OwnerAccountAllVO> accountInfo() {
UserSessionData loginUserInfo = TokenUtil.getLoginUserInfo();
Map<String,OwnerAccountVO> result = ownerAccountService.accountInfo(loginUserInfo.getUserNo());
OwnerAccountAllVO result = ownerAccountService.accountInfo(loginUserInfo.getUserNo());
return Result.ok(result);
}
......
......@@ -9,6 +9,7 @@ import com.clx.performance.param.pc.*;
import com.clx.performance.param.pc.owner.CreteAccountParam;
import com.clx.performance.param.pc.owner.FrozenAccountParam;
import com.clx.performance.param.pc.owner.ThawAccountParam;
import com.clx.performance.vo.pc.OwnerAccountAllVO;
import com.clx.performance.vo.pc.OwnerAccountRunningWaterRecordVO;
import com.clx.performance.vo.pc.OwnerAccountVO;
import com.clx.user.param.pc.owner.UpdateOwnerBindCardFeignParam;
......@@ -25,7 +26,7 @@ public interface OwnerAccountService {
IPage<OwnerAccountRunningWaterRecordVO> prepaidFreightAccountPageList(PagePlatformPrepaidFreightAccountParam param);
Map<String,OwnerAccountVO> accountInfo(Long ownerUserNo);
OwnerAccountAllVO accountInfo(Long ownerUserNo);
Long accountTopUp(OwnerTopUpParam param);
......
......@@ -23,6 +23,7 @@ import com.clx.performance.utils.excel.ExcelData;
import com.clx.performance.utils.excel.ExcelField;
import com.clx.performance.utils.excel.ExcelSheet;
import com.clx.performance.utils.excel.ExcelUtil;
import com.clx.performance.vo.pc.OwnerAccountAllVO;
import com.clx.performance.vo.pc.OwnerAccountRunningWaterRecordVO;
import com.clx.performance.vo.pc.OwnerAccountVO;
import com.clx.user.enums.driver.DriverTruckEnum;
......@@ -85,14 +86,14 @@ public class OwnerAccountServiceImpl implements OwnerAccountService {
}
@Override
public Map<String, OwnerAccountVO> accountInfo(Long ownerUserNo) {
Map<String, OwnerAccountVO> result = new HashMap<>(2);
public OwnerAccountAllVO accountInfo(Long ownerUserNo) {
OwnerAccountAllVO result = new OwnerAccountAllVO();
List<OwnerAccountVO> list = ownerAccountStruct.convertList(ownerAccountDao.accountInfo(ownerUserNo));
for (OwnerAccountVO ownerAccountVO : list) {
if (OwnerAccountEnum.AccountTypeStatus.MARGIN_ACCOUNT.getCode().equals(ownerAccountVO.getAccountType())) {
result.put("marginAccount", ownerAccountVO);
result.setMarginAccount(ownerAccountVO);
} else {
result.put("prepaidFreightAccount", ownerAccountVO);
result.setPrepaidFreightAccount(ownerAccountVO);
}
}
return result;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论