提交 0edd5af3 作者: zhenjie

商城订单优化

上级 8aa668f9
......@@ -53,7 +53,7 @@ public interface UserAppApi {
* @param userAccountId
* @return
*/
@RequestMapping(value = "/userapp/user-account/feignGetUserSimpleInfo", method = RequestMethod.GET)
@RequestMapping(value = "/user-account/feignGetUserSimpleInfo", method = RequestMethod.GET)
public UserAccountSimpleDTO feignGetUserSimpleInfo(@RequestParam Integer userAccountId, @RequestHeader("token") String token);
}
......@@ -125,8 +125,10 @@ public class UavOrderServiceImpl implements UavOrderService {
// 校验云享金、钱包余额是否足够抵扣
BigDecimal shareAmount = BigDecimal.ZERO;
BigDecimal salaryAmount = BigDecimal.ZERO;
Integer statusCode = null;
// 正常订单可以抵扣云享金和余额、意向订单不能扣
if (param.getOrderType().equals(UavOrderType.PAY.getCode())){
ResultBody<PayWalletDTO> payResInfo = userAppApi.getCurrentUserPayWalletInfo(currentAccount.getToken());
if (!payResInfo.getCode().equals(ResultEnum.SUCCESS.getResultCode()) || payResInfo.getResult() == null){
return payResInfo;
}
......@@ -141,7 +143,6 @@ public class UavOrderServiceImpl implements UavOrderService {
}
}
otherAmount = otherAmount.subtract(shareAmount);
Integer statusCode = null;
// 支付完成
if (otherAmount.compareTo(BigDecimal.ZERO) == 0 ){
statusCode = UavOrderStatus.WAITING_DELIVER_GOODS.getCode();
......@@ -169,6 +170,7 @@ public class UavOrderServiceImpl implements UavOrderService {
if (!resultBody.getCode().equals(ResultEnum.SUCCESS.getResultCode())){
return resultBody;
}
}
// 添加总订单表
UavOrderDO uavOrderDO = new UavOrderDO();
uavOrderDO.setOrderNo(orderNo);
......
......@@ -177,7 +177,7 @@
select count(*) from uav_order
where 1 = 1
<if test="keyword != null">
and order_no = #{orderNo}
and order_no = #{keyword}
</if>
<if test="uid != null">
and user_account_id = #{uid}
......@@ -205,7 +205,7 @@
uav_order uo
where 1 = 1
<if test="keyword != null">
and uo.order_no = #{orderNo}
and uo.order_no = #{keyword}
</if>
<if test="uid != null">
and uo.user_account_id = #{uid}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论