|
|
@ -19,6 +19,7 @@ import com.hfkj.service.goods.BsOrderGoodsService; |
|
|
|
import com.hfkj.service.order.BsOrderService; |
|
|
|
import com.hfkj.service.order.BsOrderService; |
|
|
|
import com.hfkj.sysenum.SecUserObjectTypeEnum; |
|
|
|
import com.hfkj.sysenum.SecUserObjectTypeEnum; |
|
|
|
import com.hfkj.sysenum.order.OrderGoodsStatusEnum; |
|
|
|
import com.hfkj.sysenum.order.OrderGoodsStatusEnum; |
|
|
|
|
|
|
|
import com.hfkj.sysenum.order.OrderLogisticsStatusEnum; |
|
|
|
import io.swagger.annotations.Api; |
|
|
|
import io.swagger.annotations.Api; |
|
|
|
import io.swagger.annotations.ApiOperation; |
|
|
|
import io.swagger.annotations.ApiOperation; |
|
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
@ -62,6 +63,7 @@ public class BsOrderGoodsController { |
|
|
|
@RequestParam(value = "userPhone" , required = false) String userPhone, |
|
|
|
@RequestParam(value = "userPhone" , required = false) String userPhone, |
|
|
|
@RequestParam(value = "goodsSpecsName" , required = false) String goodsSpecsName, |
|
|
|
@RequestParam(value = "goodsSpecsName" , required = false) String goodsSpecsName, |
|
|
|
@RequestParam(value = "goodsName" , required = false) String goodsName, |
|
|
|
@RequestParam(value = "goodsName" , required = false) String goodsName, |
|
|
|
|
|
|
|
@RequestParam(value = "logisticsStatus" , required = false) String logisticsStatus, |
|
|
|
@RequestParam(value = "payType" , required = false) Integer payType, |
|
|
|
@RequestParam(value = "payType" , required = false) Integer payType, |
|
|
|
@RequestParam(value = "status" , required = false) Integer status, |
|
|
|
@RequestParam(value = "status" , required = false) Integer status, |
|
|
|
@RequestParam(value = "createTimeS" , required = false) Long createTimeS, |
|
|
|
@RequestParam(value = "createTimeS" , required = false) Long createTimeS, |
|
|
@ -85,12 +87,12 @@ public class BsOrderGoodsController { |
|
|
|
map.put("orderNo", orderNo); |
|
|
|
map.put("orderNo", orderNo); |
|
|
|
map.put("childOrderNo", childOrderNo); |
|
|
|
map.put("childOrderNo", childOrderNo); |
|
|
|
map.put("userPhone", userPhone); |
|
|
|
map.put("userPhone", userPhone); |
|
|
|
|
|
|
|
map.put("logisticsStatus", logisticsStatus); |
|
|
|
map.put("goodsSpecsName", goodsSpecsName); |
|
|
|
map.put("goodsSpecsName", goodsSpecsName); |
|
|
|
map.put("goodsName", goodsName); |
|
|
|
map.put("goodsName", goodsName); |
|
|
|
map.put("payType", payType); |
|
|
|
map.put("payType", payType); |
|
|
|
map.put("createTimeS", createTimeS); |
|
|
|
map.put("createTimeS", createTimeS); |
|
|
|
map.put("createTimeE", createTimeE); |
|
|
|
map.put("createTimeE", createTimeE); |
|
|
|
|
|
|
|
|
|
|
|
map.put("status", status); |
|
|
|
map.put("status", status); |
|
|
|
|
|
|
|
|
|
|
|
PageHelper.startPage(pageNum, pageSize); |
|
|
|
PageHelper.startPage(pageNum, pageSize); |
|
|
@ -126,14 +128,12 @@ public class BsOrderGoodsController { |
|
|
|
|
|
|
|
|
|
|
|
goodsOrder.setLogisticsNo(logisticsNo); |
|
|
|
goodsOrder.setLogisticsNo(logisticsNo); |
|
|
|
goodsOrder.setUpdateTime(new Date()); |
|
|
|
goodsOrder.setUpdateTime(new Date()); |
|
|
|
if (goodsOrder.getStatus() == OrderGoodsStatusEnum.status1.getCode()) { |
|
|
|
|
|
|
|
goodsOrder.setStatus(OrderGoodsStatusEnum.status2.getCode()); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 删除缓存
|
|
|
|
// 删除缓存
|
|
|
|
orderService.cacheDelete(goodsOrder.getOrderNo()); |
|
|
|
orderService.cacheDelete(goodsOrder.getOrderNo()); |
|
|
|
bsOrderGoodsService.cacheDelete(goodsOrder.getLogisticsNo()); |
|
|
|
bsOrderGoodsService.cacheDelete(goodsOrder.getLogisticsNo()); |
|
|
|
bsOrderGoodsService.update(goodsOrder); |
|
|
|
bsOrderGoodsService.update(goodsOrder); |
|
|
|
|
|
|
|
getLogisticsMsg(goodsOrder.getId()); |
|
|
|
return ResponseMsgUtil.success("更新成功!"); |
|
|
|
return ResponseMsgUtil.success("更新成功!"); |
|
|
|
|
|
|
|
|
|
|
|
} catch (Exception e) { |
|
|
|
} catch (Exception e) { |
|
|
@ -156,10 +156,15 @@ public class BsOrderGoodsController { |
|
|
|
|
|
|
|
|
|
|
|
GoodsLogistics logistics = (GoodsLogistics) bsOrderGoodsService.getLogisticsMsg(orderGoods.getLogisticsNo()); |
|
|
|
GoodsLogistics logistics = (GoodsLogistics) bsOrderGoodsService.getLogisticsMsg(orderGoods.getLogisticsNo()); |
|
|
|
|
|
|
|
|
|
|
|
orderGoods.setLogisticsStatus(logistics.getLogisticsStatus()); |
|
|
|
if (logistics.getLogisticsStatus() != null) { |
|
|
|
orderGoods.setLogisticsStatusDesc(logistics.getLogisticsStatusDesc()); |
|
|
|
orderGoods.setLogisticsStatus(logistics.getLogisticsStatus()); |
|
|
|
bsOrderGoodsService.update(orderGoods); |
|
|
|
orderGoods.setLogisticsStatusDesc(logistics.getLogisticsStatusDesc()); |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
orderGoods.setLogisticsStatus(OrderLogisticsStatusEnum.statusWAIT_ACCEPT.getCode()); |
|
|
|
|
|
|
|
orderGoods.setLogisticsStatusDesc(OrderLogisticsStatusEnum.statusWAIT_ACCEPT.getName()); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
bsOrderGoodsService.update(orderGoods); |
|
|
|
map.put("logistics", logistics); |
|
|
|
map.put("logistics", logistics); |
|
|
|
JSONArray object = JSONArray.parseArray(logistics.getLogisticsTraceDetails()); |
|
|
|
JSONArray object = JSONArray.parseArray(logistics.getLogisticsTraceDetails()); |
|
|
|
map.put("logisticsTraceDetails", object); |
|
|
|
map.put("logisticsTraceDetails", object); |
|
|
|