Merge branch 'dev_order'
Showing
6 changed files
with
106 additions
and
13 deletions
@@ -17,13 +17,16 @@ | @@ -17,13 +17,16 @@ | ||
17 | <groupId>com.yohoufo.fore</groupId> | 17 | <groupId>com.yohoufo.fore</groupId> |
18 | <artifactId>yohoufo-fore-common</artifactId> | 18 | <artifactId>yohoufo-fore-common</artifactId> |
19 | </dependency> | 19 | </dependency> |
20 | + | ||
20 | <dependency> | 21 | <dependency> |
21 | - <groupId>com.yoho.service.model</groupId> | ||
22 | - <artifactId>order-service-model</artifactId> | 22 | + <groupId>com.yohoufo.fore</groupId> |
23 | + <artifactId>yohoufo-fore-dal</artifactId> | ||
23 | </dependency> | 24 | </dependency> |
25 | + | ||
26 | + | ||
24 | <dependency> | 27 | <dependency> |
25 | - <groupId>javax.servlet</groupId> | ||
26 | - <artifactId>javax.servlet-api</artifactId> | 28 | + <groupId>com.yoho.ufo.model</groupId> |
29 | + <artifactId>order-ufo-model</artifactId> | ||
27 | </dependency> | 30 | </dependency> |
28 | </dependencies> | 31 | </dependencies> |
29 | </project> | 32 | </project> |
1 | +package com.yohoufo.order.controller; | ||
2 | + | ||
3 | +import com.yohobuy.ufo.model.order.bo.SoldPrdComputeBo; | ||
4 | +import com.yohobuy.ufo.model.order.req.SellerOrderComputeReq; | ||
5 | +import com.yohoufo.common.ApiResponse; | ||
6 | +import com.yohoufo.order.service.SellerOrderService; | ||
7 | +import org.slf4j.Logger; | ||
8 | +import org.slf4j.LoggerFactory; | ||
9 | +import org.springframework.beans.factory.annotation.Autowired; | ||
10 | +import org.springframework.stereotype.Controller; | ||
11 | +import org.springframework.web.bind.annotation.RequestMapping; | ||
12 | +import org.springframework.web.bind.annotation.RequestParam; | ||
13 | + | ||
14 | +/** | ||
15 | + * Created by chenchao on 2018/9/13. | ||
16 | + */ | ||
17 | +@Controller | ||
18 | +public class SellerOrderController { | ||
19 | + | ||
20 | + | ||
21 | + private final Logger logger = LoggerFactory.getLogger(getClass()); | ||
22 | + | ||
23 | + @Autowired | ||
24 | + private SellerOrderService sellerOrderService; | ||
25 | + | ||
26 | + @RequestMapping(params = "method=ufo.sellerOrder.computePublishPrd") | ||
27 | + public ApiResponse computePublishPrd(@RequestParam(name = "uid", required = true)int uid, | ||
28 | + @RequestParam(name = "storage_id", required = true)int storage_id, | ||
29 | + @RequestParam(name="price", required = true)String price){ | ||
30 | + SellerOrderComputeReq req = SellerOrderComputeReq.builder().uid(uid).storageId(storage_id).price(price).build(); | ||
31 | + SoldPrdComputeBo computeBo = sellerOrderService.computePublishPrd(req); | ||
32 | + | ||
33 | + return new ApiResponse.ApiResponseBuilder().code(200).data(computeBo).message("算费成功").build(); | ||
34 | + } | ||
35 | + | ||
36 | + | ||
37 | + | ||
38 | + | ||
39 | + | ||
40 | + @RequestMapping(params = "method=ufo.sellerOrder.publishPrd") | ||
41 | + public ApiResponse publishPrd(){ | ||
42 | + | ||
43 | + | ||
44 | + | ||
45 | + return new ApiResponse.ApiResponseBuilder().code(200).message("算费成功").build(); | ||
46 | + } | ||
47 | +} |
1 | +package com.yohoufo.order.service; | ||
2 | + | ||
3 | +import com.yohobuy.ufo.model.order.bo.SoldPrdComputeBo; | ||
4 | +import com.yohobuy.ufo.model.order.req.SellerOrderComputeReq; | ||
5 | +import com.yohoufo.order.dal.SellerOrderMapper; | ||
6 | +import lombok.extern.slf4j.Slf4j; | ||
7 | +import org.springframework.beans.factory.annotation.Autowired; | ||
8 | +import org.springframework.stereotype.Service; | ||
9 | + | ||
10 | +/** | ||
11 | + * Created by chenchao on 2018/9/13. | ||
12 | + */ | ||
13 | +@Service | ||
14 | +@Slf4j | ||
15 | +public class SellerOrderService { | ||
16 | + | ||
17 | + @Autowired | ||
18 | + private SellerOrderMapper sellerOrderMapper; | ||
19 | + | ||
20 | + | ||
21 | + | ||
22 | + public SoldPrdComputeBo computePublishPrd(SellerOrderComputeReq req){ | ||
23 | + SoldPrdComputeBo computeBo = null; | ||
24 | + //TODO | ||
25 | + | ||
26 | + return computeBo; | ||
27 | + } | ||
28 | +} |
@@ -39,9 +39,9 @@ | @@ -39,9 +39,9 @@ | ||
39 | <orderEntry type="library" name="Maven: org.apache.curator:curator-client:2.9.1" level="project" /> | 39 | <orderEntry type="library" name="Maven: org.apache.curator:curator-client:2.9.1" level="project" /> |
40 | <orderEntry type="library" name="Maven: com.yoho.common:error-code:1.4.4-SNAPSHOT" level="project" /> | 40 | <orderEntry type="library" name="Maven: com.yoho.common:error-code:1.4.4-SNAPSHOT" level="project" /> |
41 | <orderEntry type="library" name="Maven: org.springframework:spring-core:4.3.8.RELEASE" level="project" /> | 41 | <orderEntry type="library" name="Maven: org.springframework:spring-core:4.3.8.RELEASE" level="project" /> |
42 | - <orderEntry type="library" name="Maven: commons-logging:commons-logging:1.2" level="project" /> | ||
43 | <orderEntry type="library" name="Maven: org.springframework:spring-beans:4.3.8.RELEASE" level="project" /> | 42 | <orderEntry type="library" name="Maven: org.springframework:spring-beans:4.3.8.RELEASE" level="project" /> |
44 | <orderEntry type="library" name="Maven: org.springframework:spring-context:4.3.8.RELEASE" level="project" /> | 43 | <orderEntry type="library" name="Maven: org.springframework:spring-context:4.3.8.RELEASE" level="project" /> |
44 | + <orderEntry type="library" name="Maven: com.alibaba:fastjson:1.2.13.sec01" level="project" /> | ||
45 | <orderEntry type="library" name="Maven: org.springframework:spring-test:4.3.8.RELEASE" level="project" /> | 45 | <orderEntry type="library" name="Maven: org.springframework:spring-test:4.3.8.RELEASE" level="project" /> |
46 | <orderEntry type="library" name="Maven: org.yaml:snakeyaml:1.14" level="project" /> | 46 | <orderEntry type="library" name="Maven: org.yaml:snakeyaml:1.14" level="project" /> |
47 | <orderEntry type="library" name="Maven: com.yoho.core:yoho-core-common:1.4.4-SNAPSHOT" level="project" /> | 47 | <orderEntry type="library" name="Maven: com.yoho.core:yoho-core-common:1.4.4-SNAPSHOT" level="project" /> |
@@ -143,10 +143,14 @@ | @@ -143,10 +143,14 @@ | ||
143 | <orderEntry type="library" name="Maven: com.yoho.service.model:resource-service-model:1.4.4-SNAPSHOT" level="project" /> | 143 | <orderEntry type="library" name="Maven: com.yoho.service.model:resource-service-model:1.4.4-SNAPSHOT" level="project" /> |
144 | <orderEntry type="library" name="Maven: com.yoho.service.model:users-service-model:1.4.4-SNAPSHOT" level="project" /> | 144 | <orderEntry type="library" name="Maven: com.yoho.service.model:users-service-model:1.4.4-SNAPSHOT" level="project" /> |
145 | <orderEntry type="library" name="Maven: com.yoho.service.model:shops-service-model:1.4.4-SNAPSHOT" level="project" /> | 145 | <orderEntry type="library" name="Maven: com.yoho.service.model:shops-service-model:1.4.4-SNAPSHOT" level="project" /> |
146 | - <orderEntry type="library" name="Maven: com.yoho.service.model:order-service-model:1.4.4-SNAPSHOT" level="project" /> | ||
147 | - <orderEntry type="library" name="Maven: com.alibaba:fastjson:1.2.13.sec01" level="project" /> | ||
148 | - <orderEntry type="library" name="Maven: com.yoho.service.model:product-service-model:1.4.4-SNAPSHOT" level="project" /> | ||
149 | - <orderEntry type="library" name="Maven: com.yoho.service.model:promotion-service-model:1.4.4-SNAPSHOT" level="project" /> | ||
150 | - <orderEntry type="library" scope="PROVIDED" name="Maven: javax.servlet:javax.servlet-api:3.1.0" level="project" /> | 146 | + <orderEntry type="module" module-name="yohoufo-fore-dal" /> |
147 | + <orderEntry type="library" name="Maven: org.apache.commons:commons-dbcp2:2.1.1" level="project" /> | ||
148 | + <orderEntry type="library" name="Maven: commons-logging:commons-logging:1.2" level="project" /> | ||
149 | + <orderEntry type="library" name="Maven: commons-dbcp:commons-dbcp:1.4" level="project" /> | ||
150 | + <orderEntry type="library" name="Maven: commons-pool:commons-pool:20030825.183949" level="project" /> | ||
151 | + <orderEntry type="library" name="Maven: org.mybatis:mybatis-spring:1.2.2" level="project" /> | ||
152 | + <orderEntry type="library" name="Maven: org.mybatis:mybatis:3.2.6" level="project" /> | ||
153 | + <orderEntry type="library" name="Maven: mysql:mysql-connector-java:5.1.30" level="project" /> | ||
154 | + <orderEntry type="module" module-name="order-ufo-model" /> | ||
151 | </component> | 155 | </component> |
152 | </module> | 156 | </module> |
@@ -144,9 +144,14 @@ | @@ -144,9 +144,14 @@ | ||
144 | <orderEntry type="library" name="Maven: com.yoho.service.model:users-service-model:1.4.4-SNAPSHOT" level="project" /> | 144 | <orderEntry type="library" name="Maven: com.yoho.service.model:users-service-model:1.4.4-SNAPSHOT" level="project" /> |
145 | <orderEntry type="library" name="Maven: com.yoho.service.model:shops-service-model:1.4.4-SNAPSHOT" level="project" /> | 145 | <orderEntry type="library" name="Maven: com.yoho.service.model:shops-service-model:1.4.4-SNAPSHOT" level="project" /> |
146 | <orderEntry type="module" module-name="yohoufo-fore-order" /> | 146 | <orderEntry type="module" module-name="yohoufo-fore-order" /> |
147 | - <orderEntry type="library" name="Maven: com.yoho.service.model:order-service-model:1.4.4-SNAPSHOT" level="project" /> | ||
148 | - <orderEntry type="library" name="Maven: com.yoho.service.model:product-service-model:1.4.4-SNAPSHOT" level="project" /> | ||
149 | - <orderEntry type="library" name="Maven: com.yoho.service.model:promotion-service-model:1.4.4-SNAPSHOT" level="project" /> | 147 | + <orderEntry type="module" module-name="yohoufo-fore-dal" /> |
148 | + <orderEntry type="library" name="Maven: org.apache.commons:commons-dbcp2:2.1.1" level="project" /> | ||
149 | + <orderEntry type="library" name="Maven: commons-dbcp:commons-dbcp:1.4" level="project" /> | ||
150 | + <orderEntry type="library" name="Maven: commons-pool:commons-pool:20030825.183949" level="project" /> | ||
151 | + <orderEntry type="library" name="Maven: org.mybatis:mybatis-spring:1.2.2" level="project" /> | ||
152 | + <orderEntry type="library" name="Maven: org.mybatis:mybatis:3.2.6" level="project" /> | ||
153 | + <orderEntry type="library" name="Maven: mysql:mysql-connector-java:5.1.30" level="project" /> | ||
154 | + <orderEntry type="module" module-name="order-ufo-model" /> | ||
150 | <orderEntry type="library" scope="PROVIDED" name="Maven: javax.servlet:javax.servlet-api:3.1.0" level="project" /> | 155 | <orderEntry type="library" scope="PROVIDED" name="Maven: javax.servlet:javax.servlet-api:3.1.0" level="project" /> |
151 | </component> | 156 | </component> |
152 | </module> | 157 | </module> |
@@ -18,6 +18,7 @@ | @@ -18,6 +18,7 @@ | ||
18 | <properties> | 18 | <properties> |
19 | <qiniu.version>7.0.5</qiniu.version> | 19 | <qiniu.version>7.0.5</qiniu.version> |
20 | <project-name>com.yohoufo.fore</project-name> | 20 | <project-name>com.yohoufo.fore</project-name> |
21 | + <model.version>1.0-SNAPSHOT</model.version> | ||
21 | </properties> | 22 | </properties> |
22 | 23 | ||
23 | <dependencyManagement> | 24 | <dependencyManagement> |
@@ -76,6 +77,11 @@ | @@ -76,6 +77,11 @@ | ||
76 | <version>${project.version}</version> | 77 | <version>${project.version}</version> |
77 | </dependency> | 78 | </dependency> |
78 | 79 | ||
80 | + <dependency> | ||
81 | + <groupId>com.yoho.ufo.model</groupId> | ||
82 | + <artifactId>order-ufo-model</artifactId> | ||
83 | + <version>${model.version}</version> | ||
84 | + </dependency> | ||
79 | </dependencies> | 85 | </dependencies> |
80 | </dependencyManagement> | 86 | </dependencyManagement> |
81 | 87 |
-
Please register or login to post a comment