|
@@ -13,10 +13,7 @@ import com.pj.utils.sg.AjaxJson;
|
|
|
import com.pj.utils.so.SoMap;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.validation.annotation.Validated;
|
|
|
-import org.springframework.web.bind.annotation.RequestBody;
|
|
|
-import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
-import org.springframework.web.bind.annotation.RequestParam;
|
|
|
-import org.springframework.web.bind.annotation.RestController;
|
|
|
+import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
import java.util.List;
|
|
|
|
|
@@ -33,8 +30,6 @@ public class GoodsTransitAppController {
|
|
|
@Autowired
|
|
|
private TbGoodsTransitService tbGoodsTransitService;
|
|
|
|
|
|
- @Autowired
|
|
|
- TbOrderService tbOrderService;
|
|
|
|
|
|
/**
|
|
|
* 查 - 根据id
|
|
@@ -88,33 +83,15 @@ public class GoodsTransitAppController {
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * 改 enterprise_confirm:'商铺确认情况[0=待确认,1=已确认,2=拒绝]',
|
|
|
+ * 改 商铺确认情况[0=待确认,1=已确认,2=拒绝]
|
|
|
*/
|
|
|
- @RequestMapping("updateEnterpriseConfirm")
|
|
|
-// @SaCheckPermission(TbGoodsTransit.PERMISSION_CODE_EDIT)
|
|
|
+ @PostMapping("updateEnterpriseConfirm")
|
|
|
public AjaxJson updateEnterpriseConfirm(Long id, Integer enterpriseConfirm) {
|
|
|
- TbGoodsTransit t = new TbGoodsTransit();
|
|
|
- t.setId(id);
|
|
|
- t.setEnterpriseConfirm(enterpriseConfirm);
|
|
|
- // 商户拒绝接单后把订单状态恢复为未被下单
|
|
|
- if (2 == enterpriseConfirm) {
|
|
|
- t.setIsOrders(0);
|
|
|
- }
|
|
|
- tbGoodsTransitService.update(t);
|
|
|
-
|
|
|
- // 商户确认接单后修改订单表的‘商家确认状态’为已确认
|
|
|
- if (1 == enterpriseConfirm) {
|
|
|
- LambdaUpdateWrapper<TbOrder> wrapper = new LambdaUpdateWrapper();
|
|
|
- //一级市场商户确认(0=待确认,1=是,2=否)
|
|
|
- wrapper.set(TbOrder::getEnterpriseConfirm, 1);
|
|
|
- // TODO: 申报[0=待申报,1=申报通过,2=申报不通过]
|
|
|
- //wrapper.set(TbOrder::getApply, 1);
|
|
|
+ TbGoodsTransit tbGoodsTransit = new TbGoodsTransit();
|
|
|
+ tbGoodsTransit.setId(id);
|
|
|
+ tbGoodsTransit.setEnterpriseConfirm(enterpriseConfirm);
|
|
|
|
|
|
- wrapper.eq(TbOrder::getGoodsId, id);
|
|
|
- tbOrderService.update(wrapper);
|
|
|
- }
|
|
|
-
|
|
|
- return AjaxJson.getSuccess();
|
|
|
+ return AjaxJson.toAjax(tbGoodsTransitService.updateEnterpriseConfirm(tbGoodsTransit));
|
|
|
}
|
|
|
|
|
|
/**
|