Commit 54e8ab85 authored by hezhen's avatar hezhen

修改详情

parent 8d9dc214
...@@ -128,6 +128,7 @@ public class AppUserSellingWaterBiz extends BaseBiz<AppUserSellingWaterMapper, A ...@@ -128,6 +128,7 @@ public class AppUserSellingWaterBiz extends BaseBiz<AppUserSellingWaterMapper, A
sellingWater.setExtract(acceptDetailed.getExtract()); sellingWater.setExtract(acceptDetailed.getExtract());
sellingWater.setGoodNumber(goodsNumber); sellingWater.setGoodNumber(goodsNumber);
sellingWater.setCommission(acceptDetailed.getDivisionAmount()); sellingWater.setCommission(acceptDetailed.getDivisionAmount());
sellingWater.setSourceId(acceptId);
insertSelective(sellingWater); insertSelective(sellingWater);
log.info("购买计算用户未入账----payOrderWater--------userId===" + acceptDetailed.getMchId() + "----amount====" + acceptDetailed.getDivisionAmount() + "--orderType===" + orderType); log.info("购买计算用户未入账----payOrderWater--------userId===" + acceptDetailed.getMchId() + "----amount====" + acceptDetailed.getDivisionAmount() + "--orderType===" + orderType);
if (orderType == 3) { if (orderType == 3) {
...@@ -138,7 +139,7 @@ public class AppUserSellingWaterBiz extends BaseBiz<AppUserSellingWaterMapper, A ...@@ -138,7 +139,7 @@ public class AppUserSellingWaterBiz extends BaseBiz<AppUserSellingWaterMapper, A
} }
//订单完成计算用户拥金 //订单完成计算用户拥金
public BigDecimal finishOrderWater(OrderWaterDTO orderWaterDTO) { public void finishOrderWater(OrderWaterDTO orderWaterDTO) {
AppUserSellingWater sellingWater=new AppUserSellingWater(); AppUserSellingWater sellingWater=new AppUserSellingWater();
sellingWater.setAcceptId(orderWaterDTO.getAcceptId()); sellingWater.setAcceptId(orderWaterDTO.getAcceptId());
sellingWater.setWaiting(0); sellingWater.setWaiting(0);
...@@ -146,15 +147,13 @@ public class AppUserSellingWaterBiz extends BaseBiz<AppUserSellingWaterMapper, A ...@@ -146,15 +147,13 @@ public class AppUserSellingWaterBiz extends BaseBiz<AppUserSellingWaterMapper, A
if (sellingWater != null ){ if (sellingWater != null ){
sellingWater.setWaiting(1); sellingWater.setWaiting(1);
updateSelectiveById(sellingWater); updateSelectiveById(sellingWater);
return sellingWater.getCommission();
} }
return BigDecimal.ZERO;
} }
//订单完成计算用户拥金 //订单完成计算用户拥金
public void finishOrderFWater(OrderWaterDTO orderWaterDTO) { public void finishOrderFWater(OrderWaterDTO orderWaterDTO) {
Integer acceptId = orderWaterDTO.getAcceptId() == null ? 0 :orderWaterDTO.getAcceptId(); Integer acceptId = orderWaterDTO.getAcceptId() == null ? 0 :orderWaterDTO.getAcceptId();
Integer zAcceptId = orderWaterDTO.getZAcceptId()== null ? 0 :orderWaterDTO.getZAcceptId(); Integer zAcceptId = orderWaterDTO.getZAcceptId()== null ? 0 :orderWaterDTO.getAcceptId();
BigDecimal orderAmount = orderWaterDTO.getOrderAmount() == null ? BigDecimal.ZERO : orderWaterDTO.getOrderAmount(); BigDecimal orderAmount = orderWaterDTO.getOrderAmount() == null ? BigDecimal.ZERO : orderWaterDTO.getOrderAmount();
log.info("---分账id===="+acceptId+"----zAcceptId=="+zAcceptId+"---orderAmount===="+orderAmount); log.info("---分账id===="+acceptId+"----zAcceptId=="+zAcceptId+"---orderAmount===="+orderAmount);
if (acceptId == 0 || zAcceptId == 0 || orderAmount.compareTo(BigDecimal.ZERO) == 0){ if (acceptId == 0 || zAcceptId == 0 || orderAmount.compareTo(BigDecimal.ZERO) == 0){
...@@ -215,13 +214,9 @@ public class AppUserSellingWaterBiz extends BaseBiz<AppUserSellingWaterMapper, A ...@@ -215,13 +214,9 @@ public class AppUserSellingWaterBiz extends BaseBiz<AppUserSellingWaterMapper, A
myWaterBiz.updMyWalletUnbooked(userId,price,2); myWaterBiz.updMyWalletUnbooked(userId,price,2);
} }
if (commission.compareTo(BigDecimal.ZERO) > 0){ if (commission.compareTo(BigDecimal.ZERO) > 0){
MyWalletDetail detail=new MyWalletDetail(); MyWalletDetail myWalletDetail=new MyWalletDetail();
detail.setUserId(userId); myWalletDetail
detail.setAmount(commission); myWaterBiz.updMyWater(myWalletDetail);
detail.setCono(orderId);
detail.setWithDrawOrderNo(appUserSellingWater.getOrderNo());
detail.setSource(1);
myWaterBiz.updMyWater(detail);
} }
} }
} }
......
package com.xxfc.platform.vehicle.rest; package com.xxfc.platform.vehicle.rest;
import com.github.wxiaoqi.security.common.msg.ObjectRestResponse; import com.github.wxiaoqi.security.common.msg.ObjectRestResponse;
import com.github.wxiaoqi.security.common.util.process.ResultCode;
import com.xxfc.platform.vehicle.biz.VehicleApplyBiz; import com.xxfc.platform.vehicle.biz.VehicleApplyBiz;
import com.xxfc.platform.vehicle.biz.VehicleBiz; import com.xxfc.platform.vehicle.biz.VehicleBiz;
import com.xxfc.platform.vehicle.entity.Vehicle; import com.xxfc.platform.vehicle.entity.Vehicle;
import com.xxfc.platform.vehicle.pojo.dto.VehicleFindDTO; import com.xxfc.platform.vehicle.pojo.dto.VehicleFindDTO;
import com.xxfc.platform.vehicle.pojo.vo.VehicleVO;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
...@@ -55,7 +57,13 @@ public class AppVehicleController extends BaseController<VehicleBiz> { ...@@ -55,7 +57,13 @@ public class AppVehicleController extends BaseController<VehicleBiz> {
@GetMapping("detail/{id}") @GetMapping("detail/{id}")
@ApiModelProperty("商品详情") @ApiModelProperty("商品详情")
public ObjectRestResponse detail(@PathVariable("id") String id ) { public ObjectRestResponse detail(@PathVariable("id") String id ) {
return ObjectRestResponse.succ(baseBiz.selectById(id)); VehicleFindDTO vehicleFindDTO =new VehicleFindDTO();
vehicleFindDTO.setVehicleId(id);
List<VehicleVO> list = baseBiz.getList(vehicleFindDTO);
if (list.size() == 0){
return ObjectRestResponse.createFailedResult(ResultCode.FAILED_CODE,"商品不存在");
}
return ObjectRestResponse.succ(list.get(0));
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment