Commit 118361d8 authored by hezhen's avatar hezhen

修改

parent 8855c6e1
......@@ -45,6 +45,11 @@ public class VehiclePublishGoods implements Serializable {
private Integer number;
@Column(name = "receive_number")
@ApiModelProperty(value = "已接数量")
private Integer receiveNumber;
@Column(name = "receive_amount")
@ApiModelProperty(value = "接单者服务费(单个商品)")
private BigDecimal receiveAmount;
......
......@@ -64,6 +64,20 @@ public class VehiclePublishGoodsBiz extends BaseBiz<VehiclePublishGoodsMapper, V
}
public List<VehiclePublishGoods> getListByPublishId(Integer publishId){
return mapper.groupGoodsIdList(publishId);
}
public void updReceiveNumber(Integer publishId){
List<VehiclePublishGoods> list = getListByPublishId(publishId);
if (CollectionUtils.isNotEmpty(list)){
for (VehiclePublishGoods publishGoods : list){
updateSelectiveById(publishGoods);
}
}
}
......
......@@ -214,11 +214,13 @@ public class VehiclePublishReceiveBiz extends BaseBiz<VehiclePublishReceiveMappe
addVehicleUseTime(publishReceiveDTO);
VehicleReceiveRefundDTO receiveRefundDTO = new VehicleReceiveRefundDTO();
receiveRefundDTO.setOrderNoStr(orderNoStr);
publishGoodsBiz.updReceiveNumber(publishId);
sendQueue(receiveRefundDTO);
}else if (type == 1){
if (status.equals( VehiclePublishReceiveDTO.PAY)){
vehiclePublishBiz.updWaitConfirmNumber(number,publishId);
addVehicleUseTime(publishReceiveDTO);
publishGoodsBiz.updReceiveNumber(publishId);
}
}
}
......
......@@ -4,6 +4,8 @@ package com.xxfc.platform.vehicle.mapper;
import com.xxfc.platform.vehicle.entity.VehiclePublishGoods;
import com.xxfc.platform.vehicle.pojo.dto.VehiclePublishFindDTO;
import com.xxfc.platform.vehicle.pojo.vo.VehiclePublishGoodsVo;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import tk.mybatis.mapper.additional.idlist.SelectByIdListMapper;
import tk.mybatis.mapper.common.Mapper;
......@@ -17,4 +19,13 @@ public interface VehiclePublishGoodsMapper extends Mapper<VehiclePublishGoods>,
List<VehiclePublishGoodsVo> selectListByOrderNo(VehiclePublishFindDTO publishFindDTO);
@Select("SELECT r.publish_goods_id as id,IFNULL(COUNT(r.id)) as receiveNumber FROM vehicle_publish_receive r \n" +
"\n" +
"LEFT JOIN vehicle_publish_goods g ON r.publish_goods_id = g.id\n" +
"\n" +
"WHERE g.publish_id=#{publishId} and r.`status` in (1,3) and r.is_del = 0\n" +
"\n" +
"GROUP BY r.publish_goods_id")
List<VehiclePublishGoods> groupGoodsIdList(@Param("publishId") Integer publishId );
}
\ No newline at end of file
......@@ -14,6 +14,9 @@
<if test="companyId != null and companyId > 0">
AND p.`company_id`= #{companyId}
</if>
<if test="publishId != null and publishId > 0">
AND p.`id`= #{publishId}
</if>
<if test="goodsType != null ">
AND p.`goods_type`= #{goodsType}
</if>
......
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