Commit 0f05daa6 by huvchao@126.com

order-management

parent b44ca46c
...@@ -313,6 +313,11 @@ ...@@ -313,6 +313,11 @@
<version>2.4.1-SNAPSHOT</version> <version>2.4.1-SNAPSHOT</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>cn.freemud</groupId>
<artifactId>order-management</artifactId>
<version>1.0.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>tk.mybatis</groupId> <groupId>tk.mybatis</groupId>
<artifactId>mapper-spring-boot-starter</artifactId> <artifactId>mapper-spring-boot-starter</artifactId>
</dependency> </dependency>
......
...@@ -60,6 +60,74 @@ ...@@ -60,6 +60,74 @@
<groupId>cn.freemud.commons</groupId> <groupId>cn.freemud.commons</groupId>
<artifactId>commons-base</artifactId> <artifactId>commons-base</artifactId>
</dependency> </dependency>
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger2</artifactId>
<version>2.7.0</version>
<scope>provided</scope>
<exclusions>
<exclusion>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
</exclusion>
<exclusion>
<groupId>org.springframework</groupId>
<artifactId>spring-beans</artifactId>
</exclusion>
<exclusion>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
</exclusion>
<exclusion>
<groupId>org.springframework</groupId>
<artifactId>spring-context-support</artifactId>
</exclusion>
<exclusion>
<groupId>org.springframework</groupId>
<artifactId>spring-aop</artifactId>
</exclusion>
<exclusion>
<groupId>org.springframework</groupId>
<artifactId>spring-tx</artifactId>
</exclusion>
<exclusion>
<groupId>org.springframework</groupId>
<artifactId>spring-orm</artifactId>
</exclusion>
<exclusion>
<groupId>org.springframework</groupId>
<artifactId>spring-jdbc</artifactId>
</exclusion>
<exclusion>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
</exclusion>
<exclusion>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
</exclusion>
<exclusion>
<groupId>org.springframework</groupId>
<artifactId>spring-oxm</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger-ui</artifactId>
<version>2.7.0</version>
<scope>provided</scope>
</dependency>
</dependencies> </dependencies>
</project> </project>
package cn.freemud.management.controller;
import cn.freemud.base.entity.BaseResponse;
import cn.freemud.management.service.OrderDeliveryService;
import com.freemud.application.sdk.api.log.ApiAnnotation;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
/**
* 创建配送单
*/
@Slf4j
@RequestMapping("/order")
@RestController
@Validated
public class DeliveryOrderController {
@Autowired
private OrderDeliveryService orderDeliveryService;
@ApiAnnotation(logMessage = "创建配送单")
@ApiOperation(value = "创建配送单", notes = "创建配送单", produces = "application/json")
@GetMapping("/delivery/create")
public BaseResponse deliveryCreate(@RequestParam("orderCode") String orderCode
, @RequestParam(value = "operator", required = false) String operator) {
return orderDeliveryService.createDelivery(orderCode);
}
}
...@@ -70,11 +70,11 @@ public class OrderDeliveryService { ...@@ -70,11 +70,11 @@ public class OrderDeliveryService {
//创建配送单失败,更新订单为异常单 //创建配送单失败,更新订单为异常单
if (deliveryResponse == null || SUCCESS != deliveryResponse.getCode() || deliveryResponse.getData() == null) { if (deliveryResponse == null || SUCCESS != deliveryResponse.getCode() || deliveryResponse.getData() == null) {
String deliveryId = deliveryResponse != null && deliveryResponse.getData() != null ? deliveryResponse.getData().getDeliveryId() : ""; String deliveryId = deliveryResponse != null && deliveryResponse.getData() != null ? deliveryResponse.getData().getDeliveryId() : "";
orderBaseService.updateDeliveryAbnormal(orderBean.getCompanyId(), orderBean.getOid(), deliveryId, ""); orderBaseService.updateDeliveryAbnormal(orderBean.getCompanyId(), orderBean.getOid(), deliveryId, "sys");
return false; return false;
} }
// 创建配送单成功 // 创建配送单成功
orderBaseService.updateDeliverySuccess(orderBean.getOid(), deliveryResponse.getData().getDeliveryId(), ""); orderBaseService.updateDeliverySuccess(orderBean.getOid(), deliveryResponse.getData().getDeliveryId(), "sys");
return true; return true;
} }
......
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