Commit 54e8ab85 authored by hezhen's avatar hezhen

修改详情

parent 8d9dc214
......@@ -128,6 +128,7 @@ public class AppUserSellingWaterBiz extends BaseBiz<AppUserSellingWaterMapper, A
sellingWater.setExtract(acceptDetailed.getExtract());
sellingWater.setGoodNumber(goodsNumber);
sellingWater.setCommission(acceptDetailed.getDivisionAmount());
sellingWater.setSourceId(acceptId);
insertSelective(sellingWater);
log.info("购买计算用户未入账----payOrderWater--------userId===" + acceptDetailed.getMchId() + "----amount====" + acceptDetailed.getDivisionAmount() + "--orderType===" + orderType);
if (orderType == 3) {
......@@ -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();
sellingWater.setAcceptId(orderWaterDTO.getAcceptId());
sellingWater.setWaiting(0);
......@@ -146,15 +147,13 @@ public class AppUserSellingWaterBiz extends BaseBiz<AppUserSellingWaterMapper, A
if (sellingWater != null ){
sellingWater.setWaiting(1);
updateSelectiveById(sellingWater);
return sellingWater.getCommission();
}
return BigDecimal.ZERO;
}
//订单完成计算用户拥金
public void finishOrderFWater(OrderWaterDTO orderWaterDTO) {
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();
log.info("---分账id===="+acceptId+"----zAcceptId=="+zAcceptId+"---orderAmount===="+orderAmount);
if (acceptId == 0 || zAcceptId == 0 || orderAmount.compareTo(BigDecimal.ZERO) == 0){
......@@ -215,13 +214,9 @@ public class AppUserSellingWaterBiz extends BaseBiz<AppUserSellingWaterMapper, A
myWaterBiz.updMyWalletUnbooked(userId,price,2);
}
if (commission.compareTo(BigDecimal.ZERO) > 0){
MyWalletDetail detail=new MyWalletDetail();
detail.setUserId(userId);
detail.setAmount(commission);
detail.setCono(orderId);
detail.setWithDrawOrderNo(appUserSellingWater.getOrderNo());
detail.setSource(1);
myWaterBiz.updMyWater(detail);
MyWalletDetail myWalletDetail=new MyWalletDetail();
myWalletDetail
myWaterBiz.updMyWater(myWalletDetail);
}
}
}
......
package com.xxfc.platform.vehicle.rest;
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.VehicleBiz;
import com.xxfc.platform.vehicle.entity.Vehicle;
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.ApiModelProperty;
import lombok.extern.slf4j.Slf4j;
......@@ -55,7 +57,13 @@ public class AppVehicleController extends BaseController<VehicleBiz> {
@GetMapping("detail/{id}")
@ApiModelProperty("商品详情")
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