|
|
@@ -0,0 +1,43 @@
|
|
|
+package com.goafanti.order.controller;
|
|
|
+
|
|
|
+
|
|
|
+import org.apache.commons.lang3.StringUtils;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
+import org.springframework.web.bind.annotation.RequestMethod;
|
|
|
+import org.springframework.web.bind.annotation.RestController;
|
|
|
+
|
|
|
+import com.goafanti.common.bo.Result;
|
|
|
+import com.goafanti.common.constant.ErrorConstants;
|
|
|
+import com.goafanti.common.controller.CertifyApiController;
|
|
|
+import com.goafanti.order.enums.CommodityType;
|
|
|
+import com.goafanti.order.service.OrderNewService;
|
|
|
+
|
|
|
+@RestController
|
|
|
+@RequestMapping(value = "/api/admin/newOrder")
|
|
|
+public class AdminNewOrderApiController extends CertifyApiController {
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private OrderNewService orderNewService;
|
|
|
+ /**
|
|
|
+ * 创建订单
|
|
|
+ * @param uid
|
|
|
+ * @param orderType
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @RequestMapping(value = "/createOrder",method = RequestMethod.POST)
|
|
|
+ public Result createOrder(String uid,Integer orderType){
|
|
|
+ Result res = new Result();
|
|
|
+ if(StringUtils.isBlank(uid)){
|
|
|
+ res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"","客户编号"));
|
|
|
+ return res;
|
|
|
+ }
|
|
|
+
|
|
|
+ if(orderType == null){
|
|
|
+ res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"","订单类型"));
|
|
|
+ return res;
|
|
|
+ }
|
|
|
+ //orderNewService.createServiceOrder(uid,orderType);
|
|
|
+ return res;
|
|
|
+ }
|
|
|
+}
|