|
|
@@ -15,6 +15,7 @@ import com.goafanti.common.bo.Result;
|
|
|
import com.goafanti.common.constant.ErrorConstants;
|
|
|
import com.goafanti.common.controller.CertifyApiController;
|
|
|
import com.goafanti.common.enums.AchievementOrderFields;
|
|
|
+import com.goafanti.common.enums.DemandOrderStatus;
|
|
|
import com.goafanti.common.model.DemandOrder;
|
|
|
import com.goafanti.common.model.DemandOrderLog;
|
|
|
import com.goafanti.demand.bo.InputDemandOrder;
|
|
|
@@ -117,6 +118,30 @@ public class AdminOrderApiController extends CertifyApiController {
|
|
|
BeanUtils.copyProperties(inputDemandOrder, dol);
|
|
|
res.setData(demandOrderService.updateDemandOrder(order, dol, recordTimeFormattedDate));
|
|
|
return res;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 关闭科技需求线索单/意向单
|
|
|
+ */
|
|
|
+ @RequestMapping(value = "/demandShutdown", method = RequestMethod.POST)
|
|
|
+ public Result shutdown(String id) {
|
|
|
+ Result res = new Result();
|
|
|
+ if (StringUtils.isBlank(id)) {
|
|
|
+ res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "找不到订单ID", "订单ID"));
|
|
|
+ return res;
|
|
|
+ }
|
|
|
|
|
|
+ DemandOrder order = demandOrderService.selectByPrimaryKey(id);
|
|
|
+ if (null == order) {
|
|
|
+ res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "科技需求订单ID"));
|
|
|
+ return res;
|
|
|
+ }
|
|
|
+ Boolean unSign = false;
|
|
|
+ if (DemandOrderStatus.CREATE.getCode().equals(order.getStatus())
|
|
|
+ || DemandOrderStatus.INTENTIONMONEY.getCode().equals(order.getStatus())){
|
|
|
+ unSign = true;
|
|
|
+ }
|
|
|
+ res.setData(demandOrderService.updateShutdownByUser(order, unSign));
|
|
|
+ return res;
|
|
|
}
|
|
|
}
|