Commit f594b1f853aac2718fa3a2278a0a9149cd312b64
1 parent
63e8b057
初始化工程-接口定义
Showing
34 changed files
with
768 additions
and
709 deletions
mobsite-getway-domain/src/main/java/com/diligrp/mobsite/getway/domain/protocol/City.java
1 | package com.diligrp.mobsite.getway.domain.protocol; | 1 | package com.diligrp.mobsite.getway.domain.protocol; |
2 | 2 | ||
3 | 3 | ||
4 | +import io.swagger.annotations.ApiModelProperty; | ||
4 | 5 | ||
5 | /** | 6 | /** |
6 | * <B>Description</B> 城市信息 <br /> | 7 | * <B>Description</B> 城市信息 <br /> |
@@ -23,22 +24,27 @@ public class City { | @@ -23,22 +24,27 @@ public class City { | ||
23 | /** | 24 | /** |
24 | * 城市 ID | 25 | * 城市 ID |
25 | */ | 26 | */ |
27 | + @ApiModelProperty(value = "城市id") | ||
26 | private Long id; | 28 | private Long id; |
27 | /** | 29 | /** |
28 | * 城市级别 | 30 | * 城市级别 |
29 | */ | 31 | */ |
32 | + @ApiModelProperty(value = "城市级别") | ||
30 | private Integer level; | 33 | private Integer level; |
31 | /** | 34 | /** |
32 | * 城市名称 | 35 | * 城市名称 |
33 | */ | 36 | */ |
37 | + @ApiModelProperty(value = "城市name") | ||
34 | private String name; | 38 | private String name; |
35 | /** | 39 | /** |
36 | * 是否子级分类,HASNEXT_* | 40 | * 是否子级分类,HASNEXT_* |
37 | */ | 41 | */ |
42 | + @ApiModelProperty(value = "是否子级分类:1有,2否") | ||
38 | private Integer hasNext; | 43 | private Integer hasNext; |
39 | /** | 44 | /** |
40 | * 父级地区ID | 45 | * 父级地区ID |
41 | */ | 46 | */ |
47 | + @ApiModelProperty(value = "父级地区ID") | ||
42 | private Long pid; | 48 | private Long pid; |
43 | 49 | ||
44 | /** | 50 | /** |
mobsite-getway-domain/src/main/java/com/diligrp/mobsite/getway/domain/protocol/common/GetAgreementUrlReq.java
@@ -2,6 +2,7 @@ | @@ -2,6 +2,7 @@ | ||
2 | package com.diligrp.mobsite.getway.domain.protocol.common; | 2 | package com.diligrp.mobsite.getway.domain.protocol.common; |
3 | 3 | ||
4 | import com.diligrp.mobsite.getway.domain.protocol.BaseReq; | 4 | import com.diligrp.mobsite.getway.domain.protocol.BaseReq; |
5 | +import io.swagger.annotations.ApiModelProperty; | ||
5 | 6 | ||
6 | /** | 7 | /** |
7 | * 店铺协议 | 8 | * 店铺协议 |
@@ -14,6 +15,7 @@ public class GetAgreementUrlReq extends BaseReq { | @@ -14,6 +15,7 @@ public class GetAgreementUrlReq extends BaseReq { | ||
14 | /** | 15 | /** |
15 | * 协议类型 | 16 | * 协议类型 |
16 | */ | 17 | */ |
18 | + @ApiModelProperty(value = "协议类型") | ||
17 | private Integer agreementType; | 19 | private Integer agreementType; |
18 | 20 | ||
19 | public Integer getAgreementType() { | 21 | public Integer getAgreementType() { |
mobsite-getway-domain/src/main/java/com/diligrp/mobsite/getway/domain/protocol/common/GetAgreementUrlResp.java
@@ -2,6 +2,7 @@ | @@ -2,6 +2,7 @@ | ||
2 | package com.diligrp.mobsite.getway.domain.protocol.common; | 2 | package com.diligrp.mobsite.getway.domain.protocol.common; |
3 | 3 | ||
4 | import com.diligrp.mobsite.getway.domain.protocol.BaseResp; | 4 | import com.diligrp.mobsite.getway.domain.protocol.BaseResp; |
5 | +import io.swagger.annotations.ApiModelProperty; | ||
5 | 6 | ||
6 | /** | 7 | /** |
7 | * 店铺协议 | 8 | * 店铺协议 |
@@ -14,6 +15,7 @@ public class GetAgreementUrlResp extends BaseResp { | @@ -14,6 +15,7 @@ public class GetAgreementUrlResp extends BaseResp { | ||
14 | /** | 15 | /** |
15 | * 协议地址 | 16 | * 协议地址 |
16 | */ | 17 | */ |
18 | + @ApiModelProperty(value = "协议地址") | ||
17 | private String agreementUrl; | 19 | private String agreementUrl; |
18 | 20 | ||
19 | public String getAgreementUrl() { | 21 | public String getAgreementUrl() { |
mobsite-getway-domain/src/main/java/com/diligrp/mobsite/getway/domain/protocol/common/GetCityReq.java
1 | package com.diligrp.mobsite.getway.domain.protocol.common; | 1 | package com.diligrp.mobsite.getway.domain.protocol.common; |
2 | 2 | ||
3 | import com.diligrp.mobsite.getway.domain.protocol.BaseReq; | 3 | import com.diligrp.mobsite.getway.domain.protocol.BaseReq; |
4 | +import io.swagger.annotations.ApiModelProperty; | ||
4 | 5 | ||
5 | /** | 6 | /** |
6 | * <B>Description</B> 获取地区接口 <br /> | 7 | * <B>Description</B> 获取地区接口 <br /> |
@@ -30,6 +31,7 @@ public class GetCityReq extends BaseReq { | @@ -30,6 +31,7 @@ public class GetCityReq extends BaseReq { | ||
30 | * -10:中国 | 31 | * -10:中国 |
31 | * -99999999:海外 | 32 | * -99999999:海外 |
32 | */ | 33 | */ |
34 | + @ApiModelProperty(value = "城市id",required = true) | ||
33 | private Long cityId; | 35 | private Long cityId; |
34 | 36 | ||
35 | /** | 37 | /** |
mobsite-getway-domain/src/main/java/com/diligrp/mobsite/getway/domain/protocol/common/GetCitysReq.java
1 | package com.diligrp.mobsite.getway.domain.protocol.common; | 1 | package com.diligrp.mobsite.getway.domain.protocol.common; |
2 | 2 | ||
3 | import com.diligrp.mobsite.getway.domain.protocol.BaseReq; | 3 | import com.diligrp.mobsite.getway.domain.protocol.BaseReq; |
4 | +import io.swagger.annotations.ApiModelProperty; | ||
4 | 5 | ||
5 | import java.util.List; | 6 | import java.util.List; |
6 | 7 | ||
@@ -13,6 +14,7 @@ import java.util.List; | @@ -13,6 +14,7 @@ import java.util.List; | ||
13 | * @author wujianjun | 14 | * @author wujianjun |
14 | */ | 15 | */ |
15 | public class GetCitysReq extends BaseReq { | 16 | public class GetCitysReq extends BaseReq { |
17 | + @ApiModelProperty(value = "ids") | ||
16 | private List<Long> ids; | 18 | private List<Long> ids; |
17 | 19 | ||
18 | public List<Long> getIds() { | 20 | public List<Long> getIds() { |
mobsite-getway-rpc/src/main/java/com/diligrp/mobsite/getway/rpc/buyer/impl/GoodsRPCImpl.java
@@ -86,7 +86,7 @@ public class GoodsRPCImpl implements GoodsRPC { | @@ -86,7 +86,7 @@ public class GoodsRPCImpl implements GoodsRPC { | ||
86 | public List<Product> getProductByIds(List<Long> productId, String[] defindResult) { | 86 | public List<Product> getProductByIds(List<Long> productId, String[] defindResult) { |
87 | BaseOutput<List<Product>> output = null; | 87 | BaseOutput<List<Product>> output = null; |
88 | try { | 88 | try { |
89 | - output = titanClient.getProductService().getProductInfo(productId, defindResult); | 89 | + // output = titanClient.getProductService().getProductInfo(productId, defindResult); |
90 | } catch (Exception e) { | 90 | } catch (Exception e) { |
91 | logger.error("titanClient接口挂掉:搜索商品详情",e); | 91 | logger.error("titanClient接口挂掉:搜索商品详情",e); |
92 | throw new RuntimeException(ErrorMessage.NETWORK_ERROR); | 92 | throw new RuntimeException(ErrorMessage.NETWORK_ERROR); |
mobsite-getway-service/src/main/java/com/diligrp/mobsite/getway/service/buyer/shop/ShopService.java
@@ -15,10 +15,9 @@ import com.diligrp.mobsite.getway.domain.protocol.shop.*; | @@ -15,10 +15,9 @@ import com.diligrp.mobsite.getway.domain.protocol.shop.*; | ||
15 | */ | 15 | */ |
16 | public interface ShopService { | 16 | public interface ShopService { |
17 | 17 | ||
18 | - @Deprecated | 18 | + |
19 | SearchShopResp searchKeyword(SearchShopReq req); | 19 | SearchShopResp searchKeyword(SearchShopReq req); |
20 | 20 | ||
21 | - GetShopByIdResp getById(GetShopByIdReq req); | ||
22 | 21 | ||
23 | GetShopDetailResp getDetailById(GetShopDetailReq req); | 22 | GetShopDetailResp getDetailById(GetShopDetailReq req); |
24 | 23 | ||
@@ -107,4 +106,8 @@ public interface ShopService { | @@ -107,4 +106,8 @@ public interface ShopService { | ||
107 | 106 | ||
108 | 107 | ||
109 | BindToShopResp getShopIntroduction(BindToShopReq req); | 108 | BindToShopResp getShopIntroduction(BindToShopReq req); |
109 | + | ||
110 | + BindToShopResp bindToShop(BindToShopReq req); | ||
111 | + | ||
112 | + GetShopByIdResp getShopById(GetShopByIdReq req); | ||
110 | } | 113 | } |
mobsite-getway-service/src/main/java/com/diligrp/mobsite/getway/service/buyer/shop/impl/ShopServiceImpl.java
@@ -47,10 +47,6 @@ public class ShopServiceImpl implements ShopService { | @@ -47,10 +47,6 @@ public class ShopServiceImpl implements ShopService { | ||
47 | return null; | 47 | return null; |
48 | } | 48 | } |
49 | 49 | ||
50 | - @Override | ||
51 | - public GetShopByIdResp getById(GetShopByIdReq req) { | ||
52 | - return null; | ||
53 | - } | ||
54 | 50 | ||
55 | @Override | 51 | @Override |
56 | public GetShopDetailResp getDetailById(GetShopDetailReq req) { | 52 | public GetShopDetailResp getDetailById(GetShopDetailReq req) { |
@@ -116,4 +112,14 @@ public class ShopServiceImpl implements ShopService { | @@ -116,4 +112,14 @@ public class ShopServiceImpl implements ShopService { | ||
116 | public BindToShopResp getShopIntroduction(BindToShopReq req) { | 112 | public BindToShopResp getShopIntroduction(BindToShopReq req) { |
117 | return null; | 113 | return null; |
118 | } | 114 | } |
115 | + | ||
116 | + @Override | ||
117 | + public BindToShopResp bindToShop(BindToShopReq req) { | ||
118 | + return null; | ||
119 | + } | ||
120 | + | ||
121 | + @Override | ||
122 | + public GetShopByIdResp getShopById(GetShopByIdReq req) { | ||
123 | + return null; | ||
124 | + } | ||
119 | } | 125 | } |
mobsite-getway-web/pom.xml
@@ -38,8 +38,8 @@ | @@ -38,8 +38,8 @@ | ||
38 | <version>2.2</version> | 38 | <version>2.2</version> |
39 | <configuration> | 39 | <configuration> |
40 | <port>8082</port> | 40 | <port>8082</port> |
41 | - <url>http://10.28.11.173:8081/manager</url> | ||
42 | - <username>getway</username> | 41 | + <url>http://10.28.11.181:8080/manager</url> |
42 | + <username>gateway</username> | ||
43 | <password>123456</password> | 43 | <password>123456</password> |
44 | <path>/</path> | 44 | <path>/</path> |
45 | </configuration> | 45 | </configuration> |
@@ -79,93 +79,52 @@ | @@ -79,93 +79,52 @@ | ||
79 | <project.view.VMDefault>layout/default</project.view.VMDefault> | 79 | <project.view.VMDefault>layout/default</project.view.VMDefault> |
80 | 80 | ||
81 | <!-- redis 配置 --> | 81 | <!-- redis 配置 --> |
82 | - <project.redis.host1>10.28.10.208</project.redis.host1> | 82 | + <project.redis.host1>10.28.11.205</project.redis.host1> |
83 | <project.redis.port1>6379</project.redis.port1> | 83 | <project.redis.port1>6379</project.redis.port1> |
84 | - | ||
85 | - <!-- 商品详情链接地址 --> | ||
86 | - <project.product.detail.path>http://www.1n4j.com/product/</project.product.detail.path> | ||
87 | - | ||
88 | - <!-- 后台默认静态资源地址 --> | ||
89 | - <project.default.assets.path>http://static.1n4j.com/static/ace1.3/assets</project.default.assets.path> | ||
90 | - | ||
91 | - <!-- 公共样式引用 --> | ||
92 | - <project.default.assets.common.path>http://static.1n4j.com/static/</project.default.assets.common.path> | ||
93 | - | ||
94 | - <!-- 本地资源地址 --> | ||
95 | - <project.default.local.path>/</project.default.local.path> | ||
96 | - | 84 | + |
85 | + | ||
97 | <!-- 店铺域名 --> | 86 | <!-- 店铺域名 --> |
98 | - <project.shop.url>http://shop.1n4j.com</project.shop.url> | ||
99 | - <project.shop.sign>FzZGZxd2VycXdlYXNzZHZzdnp4Y3Z</project.shop.sign> | ||
100 | - <project.shop.system>pnr-getway</project.shop.system> | 87 | + <project.shop.url>http://shopuser.zandeapp.com</project.shop.url> |
88 | + <project.shop.sign></project.shop.sign> | ||
89 | + <project.shop.system></project.shop.system> | ||
101 | 90 | ||
102 | <!-- sms.webchina.cn 短信发送接口的配置 --> | 91 | <!-- sms.webchina.cn 短信发送接口的配置 --> |
103 | <project.sms.webchina.SMSKey>2cf3264488ee3beef224</project.sms.webchina.SMSKey> | 92 | <project.sms.webchina.SMSKey>2cf3264488ee3beef224</project.sms.webchina.SMSKey> |
104 | <project.sms.webchina.userName>itly</project.sms.webchina.userName> | 93 | <project.sms.webchina.userName>itly</project.sms.webchina.userName> |
105 | <project.sms.webchina.postURL>http://gbk.sms.webchinese.cn</project.sms.webchina.postURL> | 94 | <project.sms.webchina.postURL>http://gbk.sms.webchinese.cn</project.sms.webchina.postURL> |
106 | 95 | ||
107 | - <!-- interface line --> | ||
108 | - <company.yibu.baseUrl>http://wl.1n4j.com</company.yibu.baseUrl> | ||
109 | - <company.yibu.token>token</company.yibu.token> | ||
110 | 96 | ||
111 | - <!-- 七巧板 --> | ||
112 | - <website.act.baseUrl>http://m.act.1n4j.com/act</website.act.baseUrl> | ||
113 | - <website.act.token>token</website.act.token> | ||
114 | - | ||
115 | - <!-- interface user --> | ||
116 | - <website.user.baseUrl>http://user.1n4j.com</website.user.baseUrl> | ||
117 | - <website.user.token>token</website.user.token> | ||
118 | - | ||
119 | - <!-- interface websiteClient --> | ||
120 | - <website.websiteClient.baseUrl>http://manweb.1n4j.com/</website.websiteClient.baseUrl> | ||
121 | - <website.websiteClient.token>token</website.websiteClient.token> | ||
122 | - | ||
123 | - <!-- interface home --> | ||
124 | - <website.home.baseUrl>http://www.1n4j.com/</website.home.baseUrl> | ||
125 | - <website.home.token>token</website.home.token> | ||
126 | - | 97 | + |
98 | + | ||
127 | <!-- interface stationmsg --> | 99 | <!-- interface stationmsg --> |
128 | - <website.stationmsg.baseUrl>http://message.1n4j.com/api</website.stationmsg.baseUrl> | 100 | + <website.stationmsg.baseUrl>http://message.zandeapp.com/api</website.stationmsg.baseUrl> |
129 | <website.stationmsg.token>token</website.stationmsg.token> | 101 | <website.stationmsg.token>token</website.stationmsg.token> |
130 | 102 | ||
131 | <!-- interface order --> | 103 | <!-- interface order --> |
132 | - <website.order.baseUrl>http://orders.1n4j.com</website.order.baseUrl> | 104 | + <website.order.baseUrl>http://orders.zandeapp.com</website.order.baseUrl> |
133 | <website.order.token>token</website.order.token> | 105 | <website.order.token>token</website.order.token> |
134 | 106 | ||
135 | - <!-- interface srvce --> | ||
136 | - <website.srvce.baseUrl>http://orders.1n4j.com/srvce-web</website.srvce.baseUrl> | ||
137 | - <website.srvce.token>token</website.srvce.token> | 107 | + |
138 | 108 | ||
139 | <!-- interface titan --> | 109 | <!-- interface titan --> |
140 | <website.titan.accesskey>accesskey</website.titan.accesskey> | 110 | <website.titan.accesskey>accesskey</website.titan.accesskey> |
141 | <website.titan.secretkey>secretkey</website.titan.secretkey> | 111 | <website.titan.secretkey>secretkey</website.titan.secretkey> |
142 | - <website.titan.url>http://titan.api.1n4j.com</website.titan.url> | 112 | + <website.titan.url>http://titan.api.zandeapp.com</website.titan.url> |
143 | 113 | ||
144 | - <!-- interface search --> | ||
145 | - <website.search.host>interface.1n4j.com</website.search.host> | ||
146 | - <website.search.port>9831</website.search.port> | ||
147 | 114 | ||
148 | - <!-- auth center interface--> | ||
149 | - <website.authcenter.token>token</website.authcenter.token> | ||
150 | - <website.authcenter.url>http://10.28.6.105:8080/</website.authcenter.url> | ||
151 | - | ||
152 | - <!--supply message interface--> | ||
153 | - <website.supply.baseUrl>http://supplymsg.1n4j.com</website.supply.baseUrl> | ||
154 | - <website.supply.token>token</website.supply.token> | ||
155 | - | ||
156 | <!--passport interface--> | 115 | <!--passport interface--> |
157 | - <website.passport.baseUrl>http://passport.api.1n4j.com</website.passport.baseUrl> | 116 | + <website.passport.baseUrl>http://passport.api.zandeapp.com</website.passport.baseUrl> |
158 | <website.passport.token>token</website.passport.token> | 117 | <website.passport.token>token</website.passport.token> |
159 | <!-- passportSign --> | 118 | <!-- passportSign --> |
160 | <passport.login.passportSign>MTIzNDU2Nzg5</passport.login.passportSign> | 119 | <passport.login.passportSign>MTIzNDU2Nzg5</passport.login.passportSign> |
161 | 120 | ||
162 | 121 | ||
163 | <!-- messagecenter --> | 122 | <!-- messagecenter --> |
164 | - <website.messagecenter.namesrvAddr>10.28.10.209:9876</website.messagecenter.namesrvAddr> | 123 | + <website.messagecenter.namesrvAddr>10.28.11.193:9876</website.messagecenter.namesrvAddr> |
165 | <website.messagecenter.producerGroup>mobsite_getway</website.messagecenter.producerGroup> | 124 | <website.messagecenter.producerGroup>mobsite_getway</website.messagecenter.producerGroup> |
166 | 125 | ||
167 | <!--cms--> | 126 | <!--cms--> |
168 | - <project.cms.baseUrl>http://cms.1n4j.com/admin</project.cms.baseUrl> | 127 | + <project.cms.baseUrl>http://cms.zandeapp.com/admin</project.cms.baseUrl> |
169 | <project.cms.port>80</project.cms.port> | 128 | <project.cms.port>80</project.cms.port> |
170 | 129 | ||
171 | <!-- fastdfs--> | 130 | <!-- fastdfs--> |
@@ -179,7 +138,7 @@ | @@ -179,7 +138,7 @@ | ||
179 | <project.imageserver.prefix>http://10.28.6.153</project.imageserver.prefix> | 138 | <project.imageserver.prefix>http://10.28.6.153</project.imageserver.prefix> |
180 | 139 | ||
181 | <!-- 上传文件服务 --> | 140 | <!-- 上传文件服务 --> |
182 | - <project.store.url>http://up.1n4j.com</project.store.url> | 141 | + <project.store.url>http://up.zandeapp.com</project.store.url> |
183 | <project.store.imageAccessKey>jNvRQi3lLAY7tFpJkWYeF5Fa99Cl6kZRcEiMaZGp</project.store.imageAccessKey> | 142 | <project.store.imageAccessKey>jNvRQi3lLAY7tFpJkWYeF5Fa99Cl6kZRcEiMaZGp</project.store.imageAccessKey> |
184 | <project.store.imageSecretKey>1fsaziPx11A3llwHIi84BsIyF90_rB9IAqIx7pU8</project.store.imageSecretKey> | 143 | <project.store.imageSecretKey>1fsaziPx11A3llwHIi84BsIyF90_rB9IAqIx7pU8</project.store.imageSecretKey> |
185 | <!-- 上传音频服务 --> | 144 | <!-- 上传音频服务 --> |
@@ -187,13 +146,13 @@ | @@ -187,13 +146,13 @@ | ||
187 | <project.store.messageSecretKey>00V-jKrjBgpePC2gSuUJE7cWQ1ReJuzltvXA5yq-</project.store.messageSecretKey> | 146 | <project.store.messageSecretKey>00V-jKrjBgpePC2gSuUJE7cWQ1ReJuzltvXA5yq-</project.store.messageSecretKey> |
188 | <!-- 关键词过滤配置--> | 147 | <!-- 关键词过滤配置--> |
189 | <project.keyword.token></project.keyword.token> | 148 | <project.keyword.token></project.keyword.token> |
190 | - <project.keyword.url>http://keyword.filter.1n4j.com</project.keyword.url> | 149 | + <project.keyword.url>http://keyword.filter.zandeapp.com</project.keyword.url> |
191 | <!-- 网关配置--> | 150 | <!-- 网关配置--> |
192 | <getway.log.isPrintParam>true</getway.log.isPrintParam> | 151 | <getway.log.isPrintParam>true</getway.log.isPrintParam> |
193 | 152 | ||
194 | <!-- 数据库连接池配置文件 --> | 153 | <!-- 数据库连接池配置文件 --> |
195 | <project.dbpool.driverClass>org.mariadb.jdbc.Driver</project.dbpool.driverClass> | 154 | <project.dbpool.driverClass>org.mariadb.jdbc.Driver</project.dbpool.driverClass> |
196 | - <project.dbpool.jdbcUrl>jdbc:mysql://10.28.10.188:3306/mobsite_man?useUnicode=true&characterEncoding=utf8</project.dbpool.jdbcUrl> | 155 | + <project.dbpool.jdbcUrl>jdbc:mysql://10.28.11.162:3306/mobsite_man?useUnicode=true&characterEncoding=utf8</project.dbpool.jdbcUrl> |
197 | <project.dbpool.username>root</project.dbpool.username> | 156 | <project.dbpool.username>root</project.dbpool.username> |
198 | <project.dbpool.password>123456</project.dbpool.password> | 157 | <project.dbpool.password>123456</project.dbpool.password> |
199 | <project.dbpool.idleConnectionTestPeriodInMinutes>1</project.dbpool.idleConnectionTestPeriodInMinutes> | 158 | <project.dbpool.idleConnectionTestPeriodInMinutes>1</project.dbpool.idleConnectionTestPeriodInMinutes> |
@@ -222,13 +181,13 @@ | @@ -222,13 +181,13 @@ | ||
222 | <project.redis.port1>6379</project.redis.port1> | 181 | <project.redis.port1>6379</project.redis.port1> |
223 | 182 | ||
224 | <!-- 商品详情链接地址 --> | 183 | <!-- 商品详情链接地址 --> |
225 | - <project.product.detail.path>http://www.1n4j.com/product/</project.product.detail.path> | 184 | + <project.product.detail.path>http://www.zandeapp.com/product/</project.product.detail.path> |
226 | 185 | ||
227 | <!-- 后台默认静态资源地址 --> | 186 | <!-- 后台默认静态资源地址 --> |
228 | - <project.default.assets.path>http://static.1n4j.com/static/ace1.3/assets</project.default.assets.path> | 187 | + <project.default.assets.path>http://static.zandeapp.com/static/ace1.3/assets</project.default.assets.path> |
229 | 188 | ||
230 | <!-- 公共样式引用 --> | 189 | <!-- 公共样式引用 --> |
231 | - <project.default.assets.common.path>http://static.1n4j.com/static/</project.default.assets.common.path> | 190 | + <project.default.assets.common.path>http://static.zandeapp.com/static/</project.default.assets.common.path> |
232 | 191 | ||
233 | <!-- 本地资源地址 --> | 192 | <!-- 本地资源地址 --> |
234 | <project.default.local.path>/</project.default.local.path> | 193 | <project.default.local.path>/</project.default.local.path> |
@@ -237,7 +196,7 @@ | @@ -237,7 +196,7 @@ | ||
237 | <project.imageserver.prefix>http://10.28.6.153</project.imageserver.prefix> | 196 | <project.imageserver.prefix>http://10.28.6.153</project.imageserver.prefix> |
238 | 197 | ||
239 | <!-- 店铺域名 --> | 198 | <!-- 店铺域名 --> |
240 | - <project.shop.url>http://shop.1n4j.com</project.shop.url> | 199 | + <project.shop.url>http://shop.zandeapp.com</project.shop.url> |
241 | <project.shop.sign>FzZGZxd2VycXdlYXNzZHZzdnp4Y3Z</project.shop.sign> | 200 | <project.shop.sign>FzZGZxd2VycXdlYXNzZHZzdnp4Y3Z</project.shop.sign> |
242 | <project.shop.system>pnr-getway</project.shop.system> | 201 | <project.shop.system>pnr-getway</project.shop.system> |
243 | 202 | ||
@@ -247,60 +206,60 @@ | @@ -247,60 +206,60 @@ | ||
247 | <project.sms.webchina.postURL>http://gbk.sms.webchinese.cn</project.sms.webchina.postURL> | 206 | <project.sms.webchina.postURL>http://gbk.sms.webchinese.cn</project.sms.webchina.postURL> |
248 | 207 | ||
249 | <!-- interface line --> | 208 | <!-- interface line --> |
250 | - <company.yibu.baseUrl>http://wl.1n4j.com</company.yibu.baseUrl> | 209 | + <company.yibu.baseUrl>http://wl.zandeapp.com</company.yibu.baseUrl> |
251 | <company.yibu.token>token</company.yibu.token> | 210 | <company.yibu.token>token</company.yibu.token> |
252 | 211 | ||
253 | <!-- 七巧板 --> | 212 | <!-- 七巧板 --> |
254 | - <website.act.baseUrl>http://m.act.1n4j.com/act</website.act.baseUrl> | 213 | + <website.act.baseUrl>http://m.act.zandeapp.com/act</website.act.baseUrl> |
255 | <website.act.token>token</website.act.token> | 214 | <website.act.token>token</website.act.token> |
256 | 215 | ||
257 | <!-- interface user --> | 216 | <!-- interface user --> |
258 | - <website.user.baseUrl>http://user.1n4j.com</website.user.baseUrl> | 217 | + <website.user.baseUrl>http://user.zandeapp.com</website.user.baseUrl> |
259 | <website.user.token>token</website.user.token> | 218 | <website.user.token>token</website.user.token> |
260 | 219 | ||
261 | <!-- interface order --> | 220 | <!-- interface order --> |
262 | - <website.order.baseUrl>http://orders.1n4j.com</website.order.baseUrl> | 221 | + <website.order.baseUrl>http://orders.zandeapp.com</website.order.baseUrl> |
263 | <website.order.token>token</website.order.token> | 222 | <website.order.token>token</website.order.token> |
264 | <!-- interface srvce --> | 223 | <!-- interface srvce --> |
265 | - <website.srvce.baseUrl>http://orders.1n4j.com</website.srvce.baseUrl> | 224 | + <website.srvce.baseUrl>http://orders.zandeapp.com</website.srvce.baseUrl> |
266 | <website.srvce.token>token</website.srvce.token> | 225 | <website.srvce.token>token</website.srvce.token> |
267 | <!-- interface home --> | 226 | <!-- interface home --> |
268 | - <website.home.baseUrl>http://www.1n4j.com</website.home.baseUrl> | 227 | + <website.home.baseUrl>http://www.zandeapp.com</website.home.baseUrl> |
269 | <website.home.token>token</website.home.token> | 228 | <website.home.token>token</website.home.token> |
270 | <!-- interface stationmsg --> | 229 | <!-- interface stationmsg --> |
271 | - <website.stationmsg.baseUrl>http://message.1n4j.com/api</website.stationmsg.baseUrl> | 230 | + <website.stationmsg.baseUrl>http://message.zandeapp.com/api</website.stationmsg.baseUrl> |
272 | <website.stationmsg.token>token</website.stationmsg.token> | 231 | <website.stationmsg.token>token</website.stationmsg.token> |
273 | <!--supply message interface--> | 232 | <!--supply message interface--> |
274 | - <website.supply.baseUrl>http://supplymsg.1n4j.com</website.supply.baseUrl> | 233 | + <website.supply.baseUrl>http://supplymsg.zandeapp.com</website.supply.baseUrl> |
275 | <website.supply.token>token</website.supply.token> | 234 | <website.supply.token>token</website.supply.token> |
276 | <!-- interface websiteClient --> | 235 | <!-- interface websiteClient --> |
277 | - <website.websiteClient.baseUrl>http://manweb.1n4j.com/</website.websiteClient.baseUrl> | 236 | + <website.websiteClient.baseUrl>http://manweb.zandeapp.com/</website.websiteClient.baseUrl> |
278 | <website.websiteClient.token>token</website.websiteClient.token> | 237 | <website.websiteClient.token>token</website.websiteClient.token> |
279 | 238 | ||
280 | <!-- interface order --> | 239 | <!-- interface order --> |
281 | - <website.order.baseUrl>http://orders.1n4j.com</website.order.baseUrl> | 240 | + <website.order.baseUrl>http://orders.zandeapp.com</website.order.baseUrl> |
282 | <website.order.token>token</website.order.token> | 241 | <website.order.token>token</website.order.token> |
283 | 242 | ||
284 | <!-- interface srvce --> | 243 | <!-- interface srvce --> |
285 | - <website.srvce.baseUrl>http://orders.1n4j.com/srvce-web</website.srvce.baseUrl> | 244 | + <website.srvce.baseUrl>http://orders.zandeapp.com/srvce-web</website.srvce.baseUrl> |
286 | <website.srvce.token>token</website.srvce.token> | 245 | <website.srvce.token>token</website.srvce.token> |
287 | 246 | ||
288 | 247 | ||
289 | <!-- interface titan --> | 248 | <!-- interface titan --> |
290 | <website.titan.accesskey>accesskey</website.titan.accesskey> | 249 | <website.titan.accesskey>accesskey</website.titan.accesskey> |
291 | <website.titan.secretkey>secretkey</website.titan.secretkey> | 250 | <website.titan.secretkey>secretkey</website.titan.secretkey> |
292 | - <website.titan.url>http://titan.api.1n4j.com</website.titan.url> | 251 | + <website.titan.url>http://titan.api.zandeapp.com</website.titan.url> |
293 | 252 | ||
294 | <!-- interface search --> | 253 | <!-- interface search --> |
295 | - <website.search.host>interface.1n4j.com</website.search.host> | 254 | + <website.search.host>interface.zandeapp.com</website.search.host> |
296 | <website.search.port>9831</website.search.port> | 255 | <website.search.port>9831</website.search.port> |
297 | 256 | ||
298 | <!-- auth center --> | 257 | <!-- auth center --> |
299 | <website.authcenter.token>token</website.authcenter.token> | 258 | <website.authcenter.token>token</website.authcenter.token> |
300 | - <website.authcenter.url>http://authencenter.1n4j.com</website.authcenter.url> | 259 | + <website.authcenter.url>http://authencenter.zandeapp.com</website.authcenter.url> |
301 | 260 | ||
302 | <!--passport interface--> | 261 | <!--passport interface--> |
303 | - <website.passport.baseUrl>http://passport.api.1n4j.com</website.passport.baseUrl> | 262 | + <website.passport.baseUrl>http://passport.api.zandeapp.com</website.passport.baseUrl> |
304 | <website.passport.token>token</website.passport.token> | 263 | <website.passport.token>token</website.passport.token> |
305 | 264 | ||
306 | <!-- passportSign --> | 265 | <!-- passportSign --> |
@@ -311,7 +270,7 @@ | @@ -311,7 +270,7 @@ | ||
311 | <website.messagecenter.producerGroup>mobsite_getway</website.messagecenter.producerGroup> | 270 | <website.messagecenter.producerGroup>mobsite_getway</website.messagecenter.producerGroup> |
312 | 271 | ||
313 | <!--cms--> | 272 | <!--cms--> |
314 | - <project.cms.baseUrl>http://cms.1n4j.com/admin</project.cms.baseUrl> | 273 | + <project.cms.baseUrl>http://cms.zandeapp.com/admin</project.cms.baseUrl> |
315 | <project.cms.port>80</project.cms.port> | 274 | <project.cms.port>80</project.cms.port> |
316 | 275 | ||
317 | <!-- fastdfs --> | 276 | <!-- fastdfs --> |
@@ -324,7 +283,7 @@ | @@ -324,7 +283,7 @@ | ||
324 | 283 | ||
325 | 284 | ||
326 | <!-- 上传文件服务 --> | 285 | <!-- 上传文件服务 --> |
327 | - <project.store.url>http://up.1n4j.com</project.store.url> | 286 | + <project.store.url>http://up.zandeapp.com</project.store.url> |
328 | <project.store.imageAccessKey>jNvRQi3lLAY7tFpJkWYeF5Fa99Cl6kZRcEiMaZGp</project.store.imageAccessKey> | 287 | <project.store.imageAccessKey>jNvRQi3lLAY7tFpJkWYeF5Fa99Cl6kZRcEiMaZGp</project.store.imageAccessKey> |
329 | <project.store.imageSecretKey>1fsaziPx11A3llwHIi84BsIyF90_rB9IAqIx7pU8</project.store.imageSecretKey> | 288 | <project.store.imageSecretKey>1fsaziPx11A3llwHIi84BsIyF90_rB9IAqIx7pU8</project.store.imageSecretKey> |
330 | <!-- 上传音频服务 --> | 289 | <!-- 上传音频服务 --> |
@@ -341,7 +300,7 @@ | @@ -341,7 +300,7 @@ | ||
341 | 300 | ||
342 | <!-- 关键词过滤配置--> | 301 | <!-- 关键词过滤配置--> |
343 | <project.keyword.token></project.keyword.token> | 302 | <project.keyword.token></project.keyword.token> |
344 | - <project.keyword.url>http://keyword.filter.1n4j.com</project.keyword.url> | 303 | + <project.keyword.url>http://keyword.filter.zandeapp.com</project.keyword.url> |
345 | <!-- 网关配置--> | 304 | <!-- 网关配置--> |
346 | <getway.log.isPrintParam>true</getway.log.isPrintParam> | 305 | <getway.log.isPrintParam>true</getway.log.isPrintParam> |
347 | 306 | ||
@@ -371,26 +330,26 @@ | @@ -371,26 +330,26 @@ | ||
371 | <project.view.VMDefault>layout/default</project.view.VMDefault> | 330 | <project.view.VMDefault>layout/default</project.view.VMDefault> |
372 | 331 | ||
373 | <!-- redis 配置 --> | 332 | <!-- redis 配置 --> |
374 | - <project.redis.host1>redis.1n4j.com</project.redis.host1> | 333 | + <project.redis.host1>redis.zandeapp.com</project.redis.host1> |
375 | <project.redis.port1>6379</project.redis.port1> | 334 | <project.redis.port1>6379</project.redis.port1> |
376 | 335 | ||
377 | <!-- 商品详情链接地址 --> | 336 | <!-- 商品详情链接地址 --> |
378 | - <project.product.detail.path>http://www.1n4j.com/product/</project.product.detail.path> | 337 | + <project.product.detail.path>http://www.zandeapp.com/product/</project.product.detail.path> |
379 | 338 | ||
380 | <!-- 后台默认静态资源地址 --> | 339 | <!-- 后台默认静态资源地址 --> |
381 | - <project.default.assets.path>http://static.1n4j.com/static/ace1.3/assets</project.default.assets.path> | 340 | + <project.default.assets.path>http://static.zandeapp.com/static/ace1.3/assets</project.default.assets.path> |
382 | 341 | ||
383 | <!-- 公共样式引用 --> | 342 | <!-- 公共样式引用 --> |
384 | - <project.default.assets.common.path>http://static.1n4j.com/static/</project.default.assets.common.path> | 343 | + <project.default.assets.common.path>http://static.zandeapp.com/static/</project.default.assets.common.path> |
385 | 344 | ||
386 | <!-- 本地资源地址 --> | 345 | <!-- 本地资源地址 --> |
387 | <project.default.local.path>/</project.default.local.path> | 346 | <project.default.local.path>/</project.default.local.path> |
388 | 347 | ||
389 | <project.imageserver.prefix>http://192.168.28.22:8000</project.imageserver.prefix> | 348 | <project.imageserver.prefix>http://192.168.28.22:8000</project.imageserver.prefix> |
390 | - <project.imageserver.domain>1n4j.com</project.imageserver.domain> | 349 | + <project.imageserver.domain>zandeapp.com</project.imageserver.domain> |
391 | 350 | ||
392 | <!-- 店铺域名 --> | 351 | <!-- 店铺域名 --> |
393 | - <project.shop.url>http://shop.1n4j.com</project.shop.url> | 352 | + <project.shop.url>http://shop.zandeapp.com</project.shop.url> |
394 | <project.shop.sign>FzZGZxd2VycXdlYXNzZHZzdnp4Y3Z</project.shop.sign> | 353 | <project.shop.sign>FzZGZxd2VycXdlYXNzZHZzdnp4Y3Z</project.shop.sign> |
395 | <project.shop.system>pnr-getway</project.shop.system> | 354 | <project.shop.system>pnr-getway</project.shop.system> |
396 | 355 | ||
@@ -400,60 +359,60 @@ | @@ -400,60 +359,60 @@ | ||
400 | <project.sms.webchina.postURL>http://gbk.sms.webchinese.cn</project.sms.webchina.postURL> | 359 | <project.sms.webchina.postURL>http://gbk.sms.webchinese.cn</project.sms.webchina.postURL> |
401 | 360 | ||
402 | <!-- interface line --> | 361 | <!-- interface line --> |
403 | - <company.yibu.baseUrl>http://wl.1n4j.com</company.yibu.baseUrl> | 362 | + <company.yibu.baseUrl>http://wl.zandeapp.com</company.yibu.baseUrl> |
404 | <company.yibu.token>token</company.yibu.token> | 363 | <company.yibu.token>token</company.yibu.token> |
405 | 364 | ||
406 | <!-- 七巧板 --> | 365 | <!-- 七巧板 --> |
407 | - <website.act.baseUrl>http://m.act.1n4j.com/act</website.act.baseUrl> | 366 | + <website.act.baseUrl>http://m.act.zandeapp.com/act</website.act.baseUrl> |
408 | <website.act.token>token</website.act.token> | 367 | <website.act.token>token</website.act.token> |
409 | 368 | ||
410 | <!-- interface user --> | 369 | <!-- interface user --> |
411 | - <website.user.baseUrl>http://user.1n4j.com</website.user.baseUrl> | 370 | + <website.user.baseUrl>http://user.zandeapp.com</website.user.baseUrl> |
412 | <website.user.token>token</website.user.token> | 371 | <website.user.token>token</website.user.token> |
413 | 372 | ||
414 | <!-- interface order --> | 373 | <!-- interface order --> |
415 | - <website.order.baseUrl>http://orders.1n4j.com</website.order.baseUrl> | 374 | + <website.order.baseUrl>http://orders.zandeapp.com</website.order.baseUrl> |
416 | <website.order.token>token</website.order.token> | 375 | <website.order.token>token</website.order.token> |
417 | <!-- interface srvce --> | 376 | <!-- interface srvce --> |
418 | - <website.srvce.baseUrl>http://orders.1n4j.com</website.srvce.baseUrl> | 377 | + <website.srvce.baseUrl>http://orders.zandeapp.com</website.srvce.baseUrl> |
419 | <website.srvce.token>token</website.srvce.token> | 378 | <website.srvce.token>token</website.srvce.token> |
420 | <!-- interface home --> | 379 | <!-- interface home --> |
421 | - <website.home.baseUrl>http://www.1n4j.com</website.home.baseUrl> | 380 | + <website.home.baseUrl>http://www.zandeapp.com</website.home.baseUrl> |
422 | <website.home.token>token</website.home.token> | 381 | <website.home.token>token</website.home.token> |
423 | <!-- interface stationmsg --> | 382 | <!-- interface stationmsg --> |
424 | - <website.stationmsg.baseUrl>http://message.1n4j.com/api</website.stationmsg.baseUrl> | 383 | + <website.stationmsg.baseUrl>http://message.zandeapp.com/api</website.stationmsg.baseUrl> |
425 | <website.stationmsg.token>token</website.stationmsg.token> | 384 | <website.stationmsg.token>token</website.stationmsg.token> |
426 | <!--supply message interface--> | 385 | <!--supply message interface--> |
427 | - <website.supply.baseUrl>http://supplymsg.1n4j.com</website.supply.baseUrl> | 386 | + <website.supply.baseUrl>http://supplymsg.zandeapp.com</website.supply.baseUrl> |
428 | <website.supply.token>token</website.supply.token> | 387 | <website.supply.token>token</website.supply.token> |
429 | <!-- interface websiteClient --> | 388 | <!-- interface websiteClient --> |
430 | - <website.websiteClient.baseUrl>http://manweb.1n4j.com/</website.websiteClient.baseUrl> | 389 | + <website.websiteClient.baseUrl>http://manweb.zandeapp.com/</website.websiteClient.baseUrl> |
431 | <website.websiteClient.token>token</website.websiteClient.token> | 390 | <website.websiteClient.token>token</website.websiteClient.token> |
432 | 391 | ||
433 | <!-- interface order --> | 392 | <!-- interface order --> |
434 | - <website.order.baseUrl>http://orders.1n4j.com</website.order.baseUrl> | 393 | + <website.order.baseUrl>http://orders.zandeapp.com</website.order.baseUrl> |
435 | <website.order.token>token</website.order.token> | 394 | <website.order.token>token</website.order.token> |
436 | 395 | ||
437 | <!-- interface srvce --> | 396 | <!-- interface srvce --> |
438 | - <website.srvce.baseUrl>http://orders.1n4j.com/srvce-web</website.srvce.baseUrl> | 397 | + <website.srvce.baseUrl>http://orders.zandeapp.com/srvce-web</website.srvce.baseUrl> |
439 | <website.srvce.token>token</website.srvce.token> | 398 | <website.srvce.token>token</website.srvce.token> |
440 | 399 | ||
441 | 400 | ||
442 | <!-- interface titan --> | 401 | <!-- interface titan --> |
443 | <website.titan.accesskey>accesskey</website.titan.accesskey> | 402 | <website.titan.accesskey>accesskey</website.titan.accesskey> |
444 | <website.titan.secretkey>secretkey</website.titan.secretkey> | 403 | <website.titan.secretkey>secretkey</website.titan.secretkey> |
445 | - <website.titan.url>http://titan.api.1n4j.com</website.titan.url> | 404 | + <website.titan.url>http://titan.api.zandeapp.com</website.titan.url> |
446 | 405 | ||
447 | <!-- interface search --> | 406 | <!-- interface search --> |
448 | - <website.search.host>interface.1n4j.com</website.search.host> | 407 | + <website.search.host>interface.zandeapp.com</website.search.host> |
449 | <website.search.port>9831</website.search.port> | 408 | <website.search.port>9831</website.search.port> |
450 | 409 | ||
451 | <!-- auth center --> | 410 | <!-- auth center --> |
452 | <website.authcenter.token>token</website.authcenter.token> | 411 | <website.authcenter.token>token</website.authcenter.token> |
453 | - <website.authcenter.url>http://authencenter.1n4j.com</website.authcenter.url> | 412 | + <website.authcenter.url>http://authencenter.zandeapp.com</website.authcenter.url> |
454 | 413 | ||
455 | <!--passport interface--> | 414 | <!--passport interface--> |
456 | - <website.passport.baseUrl>http://passport.api.1n4j.com</website.passport.baseUrl> | 415 | + <website.passport.baseUrl>http://passport.api.zandeapp.com</website.passport.baseUrl> |
457 | <website.passport.token>token</website.passport.token> | 416 | <website.passport.token>token</website.passport.token> |
458 | 417 | ||
459 | <!-- passportSign --> | 418 | <!-- passportSign --> |
@@ -464,7 +423,7 @@ | @@ -464,7 +423,7 @@ | ||
464 | <website.messagecenter.producerGroup>mobsite_getway</website.messagecenter.producerGroup> | 423 | <website.messagecenter.producerGroup>mobsite_getway</website.messagecenter.producerGroup> |
465 | 424 | ||
466 | <!--cms--> | 425 | <!--cms--> |
467 | - <project.cms.baseUrl>http://cms.1n4j.com/admin</project.cms.baseUrl> | 426 | + <project.cms.baseUrl>http://cms.zandeapp.com/admin</project.cms.baseUrl> |
468 | <project.cms.port>80</project.cms.port> | 427 | <project.cms.port>80</project.cms.port> |
469 | 428 | ||
470 | <!-- fastdfs --> | 429 | <!-- fastdfs --> |
@@ -478,7 +437,7 @@ | @@ -478,7 +437,7 @@ | ||
478 | 437 | ||
479 | 438 | ||
480 | <!-- 上传文件服务 --> | 439 | <!-- 上传文件服务 --> |
481 | - <project.store.url>http://up.1n4j.com</project.store.url> | 440 | + <project.store.url>http://up.zandeapp.com</project.store.url> |
482 | <project.store.imageAccessKey>d6a300418bd6fa2178b3bbb06a421f32</project.store.imageAccessKey> | 441 | <project.store.imageAccessKey>d6a300418bd6fa2178b3bbb06a421f32</project.store.imageAccessKey> |
483 | <project.store.imageSecretKey>8d2d1ac5541dcfbbd78ac1793ce4f782</project.store.imageSecretKey> | 442 | <project.store.imageSecretKey>8d2d1ac5541dcfbbd78ac1793ce4f782</project.store.imageSecretKey> |
484 | <!-- 上传音频服务 --> | 443 | <!-- 上传音频服务 --> |
@@ -495,13 +454,13 @@ | @@ -495,13 +454,13 @@ | ||
495 | 454 | ||
496 | <!-- 关键词过滤配置--> | 455 | <!-- 关键词过滤配置--> |
497 | <project.keyword.token></project.keyword.token> | 456 | <project.keyword.token></project.keyword.token> |
498 | - <project.keyword.url>http://keyword.filter.1n4j.com</project.keyword.url> | 457 | + <project.keyword.url>http://keyword.filter.zandeapp.com</project.keyword.url> |
499 | <!-- 网关配置--> | 458 | <!-- 网关配置--> |
500 | <getway.log.isPrintParam>true</getway.log.isPrintParam> | 459 | <getway.log.isPrintParam>true</getway.log.isPrintParam> |
501 | 460 | ||
502 | <!-- 数据库连接池配置文件 --> | 461 | <!-- 数据库连接池配置文件 --> |
503 | <project.dbpool.driverClass>org.mariadb.jdbc.Driver</project.dbpool.driverClass> | 462 | <project.dbpool.driverClass>org.mariadb.jdbc.Driver</project.dbpool.driverClass> |
504 | - <project.dbpool.jdbcUrl>jdbc:mysql://mobsite.man.db.1n4j.com:3306/agriez_mobsite_man?useUnicode=true&characterEncoding=utf8</project.dbpool.jdbcUrl> | 463 | + <project.dbpool.jdbcUrl>jdbc:mysql://mobsite.man.db.zandeapp.com:3306/agriez_mobsite_man?useUnicode=true&characterEncoding=utf8</project.dbpool.jdbcUrl> |
505 | <project.dbpool.username>root</project.dbpool.username> | 464 | <project.dbpool.username>root</project.dbpool.username> |
506 | <project.dbpool.password>123456</project.dbpool.password> | 465 | <project.dbpool.password>123456</project.dbpool.password> |
507 | <project.dbpool.idleConnectionTestPeriodInMinutes>1</project.dbpool.idleConnectionTestPeriodInMinutes> | 466 | <project.dbpool.idleConnectionTestPeriodInMinutes>1</project.dbpool.idleConnectionTestPeriodInMinutes> |
@@ -522,28 +481,28 @@ | @@ -522,28 +481,28 @@ | ||
522 | <project.view.VMDefault>layout/default</project.view.VMDefault> | 481 | <project.view.VMDefault>layout/default</project.view.VMDefault> |
523 | 482 | ||
524 | <!-- redis 配置 --> | 483 | <!-- redis 配置 --> |
525 | - <project.redis.host1>udlredis.1n4j.com</project.redis.host1> | 484 | + <project.redis.host1>udlredis.zandeapp.com</project.redis.host1> |
526 | <project.redis.port1>6379</project.redis.port1> | 485 | <project.redis.port1>6379</project.redis.port1> |
527 | 486 | ||
528 | <!-- 商品详情链接地址 --> | 487 | <!-- 商品详情链接地址 --> |
529 | - <project.product.detail.path>http://www.1n4j.com/product/</project.product.detail.path> | 488 | + <project.product.detail.path>http://www.zandeapp.com/product/</project.product.detail.path> |
530 | 489 | ||
531 | <!-- 后台默认静态资源地址 --> | 490 | <!-- 后台默认静态资源地址 --> |
532 | - <project.default.assets.path>http://static.1n4j.com/static/ace1.3/assets</project.default.assets.path> | 491 | + <project.default.assets.path>http://static.zandeapp.com/static/ace1.3/assets</project.default.assets.path> |
533 | 492 | ||
534 | <!-- 公共样式引用 --> | 493 | <!-- 公共样式引用 --> |
535 | - <project.default.assets.common.path>http://static.1n4j.com/static/</project.default.assets.common.path> | 494 | + <project.default.assets.common.path>http://static.zandeapp.com/static/</project.default.assets.common.path> |
536 | 495 | ||
537 | <!-- 本地资源地址 --> | 496 | <!-- 本地资源地址 --> |
538 | <project.default.local.path>/</project.default.local.path> | 497 | <project.default.local.path>/</project.default.local.path> |
539 | 498 | ||
540 | <!-- 图片服务器前缀 --> | 499 | <!-- 图片服务器前缀 --> |
541 | <project.imageserver.prefix>http://192.168.28.22:8000</project.imageserver.prefix> | 500 | <project.imageserver.prefix>http://192.168.28.22:8000</project.imageserver.prefix> |
542 | - <project.imageserver.domain>1n4j.com</project.imageserver.domain> | 501 | + <project.imageserver.domain>zandeapp.com</project.imageserver.domain> |
543 | 502 | ||
544 | 503 | ||
545 | <!-- 店铺域名 --> | 504 | <!-- 店铺域名 --> |
546 | - <project.shop.url>http://shop.1n4j.com</project.shop.url> | 505 | + <project.shop.url>http://shop.zandeapp.com</project.shop.url> |
547 | <project.shop.sign>FzZGZxd2VycXdlYXNzZHZzdnp4Y3Z</project.shop.sign> | 506 | <project.shop.sign>FzZGZxd2VycXdlYXNzZHZzdnp4Y3Z</project.shop.sign> |
548 | <project.shop.system>pnr-getway</project.shop.system> | 507 | <project.shop.system>pnr-getway</project.shop.system> |
549 | 508 | ||
@@ -555,67 +514,67 @@ | @@ -555,67 +514,67 @@ | ||
555 | 514 | ||
556 | 515 | ||
557 | <!-- interface user --> | 516 | <!-- interface user --> |
558 | - <website.user.baseUrl>http://user.1n4j.com</website.user.baseUrl> | 517 | + <website.user.baseUrl>http://user.zandeapp.com</website.user.baseUrl> |
559 | <website.user.token>token</website.user.token> | 518 | <website.user.token>token</website.user.token> |
560 | 519 | ||
561 | <!-- interface order --> | 520 | <!-- interface order --> |
562 | - <website.order.baseUrl>http://orders.1n4j.com</website.order.baseUrl> | 521 | + <website.order.baseUrl>http://orders.zandeapp.com</website.order.baseUrl> |
563 | <website.order.token>token</website.order.token> | 522 | <website.order.token>token</website.order.token> |
564 | 523 | ||
565 | <!-- interface srvce --> | 524 | <!-- interface srvce --> |
566 | - <website.srvce.baseUrl>http://orders.1n4j.com</website.srvce.baseUrl> | 525 | + <website.srvce.baseUrl>http://orders.zandeapp.com</website.srvce.baseUrl> |
567 | <website.srvce.token>token</website.srvce.token> | 526 | <website.srvce.token>token</website.srvce.token> |
568 | 527 | ||
569 | <!-- interface home --> | 528 | <!-- interface home --> |
570 | - <website.home.baseUrl>http://www.1n4j.com</website.home.baseUrl> | 529 | + <website.home.baseUrl>http://www.zandeapp.com</website.home.baseUrl> |
571 | <website.home.token>token</website.home.token> | 530 | <website.home.token>token</website.home.token> |
572 | 531 | ||
573 | <!-- interface stationmsg --> | 532 | <!-- interface stationmsg --> |
574 | - <website.stationmsg.baseUrl>http://message.1n4j.com/api</website.stationmsg.baseUrl> | 533 | + <website.stationmsg.baseUrl>http://message.zandeapp.com/api</website.stationmsg.baseUrl> |
575 | <website.stationmsg.token>token</website.stationmsg.token> | 534 | <website.stationmsg.token>token</website.stationmsg.token> |
576 | 535 | ||
577 | <!--supply message interface--> | 536 | <!--supply message interface--> |
578 | - <website.supply.baseUrl>http://supplymsg.1n4j.com</website.supply.baseUrl> | 537 | + <website.supply.baseUrl>http://supplymsg.zandeapp.com</website.supply.baseUrl> |
579 | <website.supply.token>token</website.supply.token> | 538 | <website.supply.token>token</website.supply.token> |
580 | 539 | ||
581 | <!-- interface websiteClient --> | 540 | <!-- interface websiteClient --> |
582 | - <website.websiteClient.baseUrl>http://manweb.1n4j.com/</website.websiteClient.baseUrl> | 541 | + <website.websiteClient.baseUrl>http://manweb.zandeapp.com/</website.websiteClient.baseUrl> |
583 | <website.websiteClient.token>token</website.websiteClient.token> | 542 | <website.websiteClient.token>token</website.websiteClient.token> |
584 | 543 | ||
585 | <!-- interface order --> | 544 | <!-- interface order --> |
586 | - <website.order.baseUrl>http://orders.1n4j.com</website.order.baseUrl> | 545 | + <website.order.baseUrl>http://orders.zandeapp.com</website.order.baseUrl> |
587 | <website.order.token>token</website.order.token> | 546 | <website.order.token>token</website.order.token> |
588 | 547 | ||
589 | <!-- interface srvce --> | 548 | <!-- interface srvce --> |
590 | - <website.srvce.baseUrl>http://orders.1n4j.com/srvce-web</website.srvce.baseUrl> | 549 | + <website.srvce.baseUrl>http://orders.zandeapp.com/srvce-web</website.srvce.baseUrl> |
591 | <website.srvce.token>token</website.srvce.token> | 550 | <website.srvce.token>token</website.srvce.token> |
592 | 551 | ||
593 | 552 | ||
594 | <!-- interface titan --> | 553 | <!-- interface titan --> |
595 | <website.titan.accesskey>accesskey</website.titan.accesskey> | 554 | <website.titan.accesskey>accesskey</website.titan.accesskey> |
596 | <website.titan.secretkey>secretkey</website.titan.secretkey> | 555 | <website.titan.secretkey>secretkey</website.titan.secretkey> |
597 | - <website.titan.url>http://titan.api.1n4j.com</website.titan.url> | 556 | + <website.titan.url>http://titan.api.zandeapp.com</website.titan.url> |
598 | 557 | ||
599 | <!-- interface search --> | 558 | <!-- interface search --> |
600 | - <website.search.host>interface.dd.1n4j.com</website.search.host> | 559 | + <website.search.host>interface.dd.zandeapp.com</website.search.host> |
601 | <website.search.port>9831</website.search.port> | 560 | <website.search.port>9831</website.search.port> |
602 | 561 | ||
603 | <!-- auth center --> | 562 | <!-- auth center --> |
604 | <website.authcenter.token>token</website.authcenter.token> | 563 | <website.authcenter.token>token</website.authcenter.token> |
605 | - <website.authcenter.url>http://authencenter.1n4j.com/</website.authcenter.url> | 564 | + <website.authcenter.url>http://authencenter.zandeapp.com/</website.authcenter.url> |
606 | 565 | ||
607 | <!-- messagecenter --> | 566 | <!-- messagecenter --> |
608 | <website.messagecenter.namesrvAddr>192.168.28.34:9876;192.168.28.35:9876</website.messagecenter.namesrvAddr> | 567 | <website.messagecenter.namesrvAddr>192.168.28.34:9876;192.168.28.35:9876</website.messagecenter.namesrvAddr> |
609 | <website.messagecenter.producerGroup>mobsite_getway</website.messagecenter.producerGroup> | 568 | <website.messagecenter.producerGroup>mobsite_getway</website.messagecenter.producerGroup> |
610 | 569 | ||
611 | <!--passport interface--> | 570 | <!--passport interface--> |
612 | - <website.passport.baseUrl>http://passport.api.1n4j.com</website.passport.baseUrl> | 571 | + <website.passport.baseUrl>http://passport.api.zandeapp.com</website.passport.baseUrl> |
613 | <website.passport.token>token</website.passport.token> | 572 | <website.passport.token>token</website.passport.token> |
614 | <!-- passportSign --> | 573 | <!-- passportSign --> |
615 | <passport.login.passportSign>TkdqQUhyUFprVGdJM2U3UzZvUWdrQjZwYnpibmRK</passport.login.passportSign> | 574 | <passport.login.passportSign>TkdqQUhyUFprVGdJM2U3UzZvUWdrQjZwYnpibmRK</passport.login.passportSign> |
616 | 575 | ||
617 | <!--cms--> | 576 | <!--cms--> |
618 | - <project.cms.baseUrl>http://cms.1n4j.com</project.cms.baseUrl> | 577 | + <project.cms.baseUrl>http://cms.zandeapp.com</project.cms.baseUrl> |
619 | <project.cms.port>80</project.cms.port> | 578 | <project.cms.port>80</project.cms.port> |
620 | 579 | ||
621 | 580 | ||
@@ -646,13 +605,13 @@ | @@ -646,13 +605,13 @@ | ||
646 | 605 | ||
647 | <!-- 关键词过滤配置--> | 606 | <!-- 关键词过滤配置--> |
648 | <project.keyword.token></project.keyword.token> | 607 | <project.keyword.token></project.keyword.token> |
649 | - <project.keyword.url>http://keyword.filter.1n4j.com</project.keyword.url> | 608 | + <project.keyword.url>http://keyword.filter.zandeapp.com</project.keyword.url> |
650 | <!-- 网关配置--> | 609 | <!-- 网关配置--> |
651 | <getway.log.isPrintParam>false</getway.log.isPrintParam> | 610 | <getway.log.isPrintParam>false</getway.log.isPrintParam> |
652 | 611 | ||
653 | <!-- 数据库连接池配置文件 --> | 612 | <!-- 数据库连接池配置文件 --> |
654 | <project.dbpool.driverClass>org.mariadb.jdbc.Driver</project.dbpool.driverClass> | 613 | <project.dbpool.driverClass>org.mariadb.jdbc.Driver</project.dbpool.driverClass> |
655 | - <project.dbpool.jdbcUrl>jdbc:mysql://mobsite.man.db.1n4j.com:3306/mobsite_man?useUnicode=true&characterEncoding=utf8</project.dbpool.jdbcUrl> | 614 | + <project.dbpool.jdbcUrl>jdbc:mysql://mobsite.man.db.zandeapp.com:3306/mobsite_man?useUnicode=true&characterEncoding=utf8</project.dbpool.jdbcUrl> |
656 | <project.dbpool.username>FG_yunwei</project.dbpool.username> | 615 | <project.dbpool.username>FG_yunwei</project.dbpool.username> |
657 | <project.dbpool.password>vtA]7xU2h~ne_b</project.dbpool.password> | 616 | <project.dbpool.password>vtA]7xU2h~ne_b</project.dbpool.password> |
658 | <project.dbpool.idleConnectionTestPeriodInMinutes>1</project.dbpool.idleConnectionTestPeriodInMinutes> | 617 | <project.dbpool.idleConnectionTestPeriodInMinutes>1</project.dbpool.idleConnectionTestPeriodInMinutes> |
mobsite-getway-web/src/main/java/com/diligrp/mobsite/getway/web/api/base/CommonController.java
1 | -//package com.diligrp.mobsite.getway.web.api.base; | ||
2 | -// | ||
3 | -//import com.diligrp.mobsite.getway.domain.GetDicsReq; | ||
4 | -//import com.diligrp.mobsite.getway.domain.GetDicsResp; | ||
5 | -//import com.diligrp.mobsite.getway.domain.common.ErrorMessage; | ||
6 | -//import com.diligrp.mobsite.getway.domain.except.ServiceException; | ||
7 | -//import com.diligrp.mobsite.getway.domain.protocol.common.*; | ||
8 | -//import com.diligrp.mobsite.getway.rpc.buyer.impl.StoreRPCImpl; | ||
9 | -//import com.diligrp.mobsite.getway.service.common.CommonService; | ||
10 | -//import com.diligrp.website.util.security.Validator; | ||
11 | -//import org.slf4j.Logger; | ||
12 | -//import org.slf4j.LoggerFactory; | ||
13 | -//import org.springframework.stereotype.Controller; | ||
14 | -//import org.springframework.web.bind.annotation.RequestBody; | ||
15 | -//import org.springframework.web.bind.annotation.RequestMapping; | ||
16 | -//import org.springframework.web.bind.annotation.RequestParam; | ||
17 | -//import org.springframework.web.bind.annotation.ResponseBody; | ||
18 | -//import org.springframework.web.multipart.MultipartFile; | ||
19 | -// | ||
20 | -//import javax.annotation.Resource; | ||
21 | -//import javax.servlet.http.HttpServletRequest; | ||
22 | -//import java.io.IOException; | ||
23 | -//import java.util.ArrayList; | ||
24 | -//import java.util.List; | ||
25 | -// | ||
26 | -///** | ||
27 | -// * <B>Description</B> 公共Controller <br /> | ||
28 | -// * <B>Copyright</B> Copyright (c) 2014 www.diligrp.com All rights reserved. <br /> | ||
29 | -// * 本软件源代码版权归地利集团,未经许可不得任意复制与传播.<br /> | ||
30 | -// * <B>Company</B> 地利集团 | ||
31 | -// * @createTime Aug 5, 2014 5:34:08 PM | ||
32 | -// * @author zhangshirui | ||
33 | -// */ | ||
34 | -//@Controller | ||
35 | -//@RequestMapping("/mobsiteApp/common") | ||
36 | -//public class CommonController extends BaseApiController { | ||
37 | -// | ||
38 | -// | ||
39 | -// @Resource | ||
40 | -// private CommonService commonService; | ||
41 | -// | ||
42 | -// private Logger log = LoggerFactory.getLogger(getClass()); | ||
43 | -// | ||
44 | -// | ||
45 | -// /** | ||
46 | -// * 根据城市id查询城市信息 | ||
47 | -// */ | ||
48 | -// @RequestMapping("getCity") | ||
49 | -// @ResponseBody | ||
50 | -// public void getCity() { | ||
51 | -// GetCityReq req = getRequest(GetCityReq.class); | ||
52 | -// try { | ||
53 | -// GetCityResp resp = commonService.getCity(Validator.isNull(req) ? 0 : req.getCityId()); | ||
54 | -// sendSuccessResp(resp); | ||
55 | -// } catch (Exception e) { | ||
56 | -// log.error(String.format("获取国内城市接口[msg=%s,UserId=%s]",e.getMessage(),req.getUserId()), e); | ||
57 | -// sendError(e.getMessage()); | ||
58 | -// } | ||
59 | -// } | ||
60 | -// | ||
61 | -// /** | ||
62 | -// * 根据城市id查询城市信息 | ||
63 | -// */ | ||
64 | -// @RequestMapping("getCitys") | ||
65 | -// @ResponseBody | ||
66 | -// public void getCitys() { | ||
67 | -// GetCitysReq req = getRequest(GetCitysReq.class); | ||
68 | -// try { | ||
69 | -// GetCitysResp resp = commonService.getCitys(req); | ||
70 | -// sendSuccessResp(resp); | ||
71 | -// } catch (Exception e) { | ||
72 | -// log.error(String.format("获取城市接口[msg=%s]",e.getMessage()), e); | ||
73 | -// sendError(e.getMessage()); | ||
74 | -// } | ||
75 | -// } | ||
76 | -// | ||
77 | -// /** | ||
78 | -// * 获取国家的城市信息,目前只支持国内城市与国家名 | ||
79 | -// * 0:是所有 | ||
80 | -// * -10:中国 | ||
81 | -// * -9999:海外 | ||
82 | -// */ | ||
83 | -// @RequestMapping("getCountry") | ||
84 | -// @ResponseBody | ||
85 | -// public void getCountry() { | ||
86 | -// GetCityReq req = getRequest(GetCityReq.class); | ||
87 | -// try { | ||
88 | -// GetCityResp resp = commonService.getCountry(Validator.isNull(req) || Validator.isNull(req.getCityId()) | ||
89 | -// ? 0 : req.getCityId()); | ||
90 | -// sendSuccessResp(resp); | ||
91 | -// } catch (Exception e) { | ||
92 | -// log.error(String.format("获取国家和城市接口[msg=%s,UserId=%s]",e.getMessage(),req.getUserId()), e); | ||
93 | -// sendError(e.getMessage()); | ||
94 | -// } | ||
95 | -// } | ||
96 | -// | ||
97 | -// | ||
98 | -// /** | ||
99 | -// * 获取国家的所有城市信息,目前只支持国内城市与国家名 | ||
100 | -// */ | ||
101 | -// @RequestMapping("getAllCountryTree") | ||
102 | -// @ResponseBody | ||
103 | -// public void getAllCountryTree() { | ||
104 | -// GetCityReq req = getRequest(GetCityReq.class); | ||
105 | -// try { | ||
106 | -// GetAllCountryTreeResp resp = commonService.getAllCountryTree(); | ||
107 | -// sendSuccessResp(resp); | ||
108 | -// } catch (Exception e) { | ||
109 | -// log.error(String.format("获取国家和城市接口[msg=%s,UserId=%s]",e.getMessage(),req.getUserId()), e); | ||
110 | -// sendError(e.getMessage()); | ||
111 | -// } | ||
112 | -// } | ||
113 | -// | ||
114 | -// | ||
115 | -// /** | ||
116 | -// * 获取单位信息 | ||
117 | -// * | ||
118 | -// * getUnitInfo | ||
119 | -// * | ||
120 | -// * GetUnitInfoReq | ||
121 | -// * GetUnitInfoResp | ||
122 | -// */ | ||
123 | -// @RequestMapping("getUnitInfo") | ||
124 | -// @ResponseBody | ||
125 | -// public void getUnitInfo() { | ||
126 | -// GetUnitInfoReq req = getRequest(GetUnitInfoReq.class); | ||
127 | -// try { | ||
128 | -// GetUnitInfoResp resp = commonService.getUnitInfo(req); | ||
129 | -// sendSuccessResp(resp); | ||
130 | -// } catch (Exception e) { | ||
131 | -// log.error(String.format("获取单位信息接口[msg=%s,UserId=%s]",e.getMessage(),req.getUserId()), e); | ||
132 | -// sendError(e.getMessage()); | ||
133 | -// } | ||
134 | -// } | ||
135 | -// | ||
136 | -// /** | ||
137 | -// * 上传图片 | ||
138 | -// * | ||
139 | -// * uploadImg | ||
140 | -// */ | ||
141 | -// @RequestMapping("uploadImg") | ||
142 | -// @ResponseBody | ||
143 | -// public void uploadImg(@RequestBody byte[] file){ | ||
144 | -// sendJSON(uploadFile(file,StoreRPCImpl.BUDGET_NAME_IMAGES,StoreRPCImpl.FILE_TYPE_IMGE)); | ||
145 | -// } | ||
146 | -// | ||
147 | -// /** | ||
148 | -// * 上传图片,获取全部url | ||
149 | -// * | ||
150 | -// * uploadImgFullUrl | ||
151 | -// */ | ||
152 | -// @RequestMapping("uploadImgFullUrl") | ||
153 | -// @ResponseBody | ||
154 | -// public void uploadImgFullUrl(@RequestParam("files") MultipartFile[] files){ | ||
155 | -// | ||
156 | -// try { | ||
157 | -// List<UploadFileResp> listResp = new ArrayList<>(); | ||
158 | -// for (MultipartFile file : files) { | ||
159 | -// UploadFileResp resp = uploadFile(file.getBytes(),StoreRPCImpl.BUDGET_NAME_IMAGES,StoreRPCImpl.FILE_TYPE_IMGE); | ||
160 | -// listResp.add(resp); | ||
161 | -// } | ||
162 | -// sendJSON(listResp); | ||
163 | -// } catch (IOException e) { | ||
164 | -// log.error(String.format("上传图片接口[msg=%s]",e.getMessage()), e); | ||
165 | -// sendError(e.getMessage()); | ||
166 | -// } | ||
167 | -// } | ||
168 | -// | ||
169 | -// /** | ||
170 | -// * 上传音频 | ||
171 | -// * | ||
172 | -// */ | ||
173 | -// @RequestMapping("uploadAudio") | ||
174 | -// @ResponseBody | ||
175 | -// public void uploadAudio(@RequestBody byte[] file){ | ||
176 | -// sendJSON(uploadFile(file, StoreRPCImpl.BUDGET_NAME_MESSAGE,StoreRPCImpl.FILE_TYPE_AUDIO)); | ||
177 | -// } | ||
178 | -// | ||
179 | -// private UploadFileResp uploadFile(@RequestBody byte[] file,String bucket,String fileType) { | ||
180 | -// try { | ||
181 | -// return commonService.uploadFiles(file, bucket,fileType); | ||
182 | -// }catch(ServiceException e){ | ||
183 | -// log.error(String.format("Code=%s,ErrorMessage=%s", | ||
184 | -// e.getCode(), e.getMessage()), e); | ||
185 | -// super.sendError(e.getCode(), e.getMessage()); | ||
186 | -// } catch (Exception e) { | ||
187 | -// log.error(String.format("上传文件错误[msg=%s]",e.getMessage()), e); | ||
188 | -// sendError(e.getMessage()); | ||
189 | -// } | ||
190 | -// return null; | ||
191 | -// } | ||
192 | -// | ||
193 | -// /** | ||
194 | -// * 获取字典信息 | ||
195 | -// */ | ||
196 | -// @RequestMapping("getSystemConfig") | ||
197 | -// @ResponseBody | ||
198 | -// public void getSystemConfig(){ | ||
199 | -// GetSystemConfigReq req = getRequest(GetSystemConfigReq.class); | ||
200 | -// if (Validator.isNull(req.getCode())) { | ||
201 | -// sendError(ErrorMessage.COMMON_REQUEST_PARAM_ERROR); | ||
202 | -// } | ||
203 | -// try { | ||
204 | -// GetSystemConfigResp resp = commonService.getDicInfoByCode(req.getCode()); | ||
205 | -// sendSuccessResp(resp); | ||
206 | -// } catch (Exception e) { | ||
207 | -// log.error(String.format("获取国家和城市接口[msg=%s,UserId=%s]",e.getMessage(),req.getUserId()), e); | ||
208 | -// sendError(e.getMessage()); | ||
209 | -// } | ||
210 | -// } | ||
211 | -// | ||
212 | -// /** | ||
213 | -// * 获取首页统计信息 | ||
214 | -// */ | ||
215 | -// @RequestMapping("getHomeStatistics") | ||
216 | -// @ResponseBody | ||
217 | -// public void getHomeStatistics(){ | ||
218 | -// GetHomeStatisticsReq req = getRequest(GetHomeStatisticsReq.class); | ||
219 | -// try { | ||
220 | -// GetHomeStatisticsResp resp = commonService.getHomeStatistics(req); | ||
221 | -// sendSuccessResp(resp); | ||
222 | -// } catch (Exception e) { | ||
223 | -// log.error(String.format("获取国家和城市接口[msg=%s,UserId=%s]",e.getMessage(),req.getUserId()), e); | ||
224 | -// sendError(e.getMessage()); | ||
225 | -// } | ||
226 | -// } | ||
227 | -// | ||
228 | -// /** | ||
229 | -// * 根据数据字典code获取全部的数据字典 | ||
230 | -// */ | ||
231 | -// @RequestMapping("getDics") | ||
232 | -// @ResponseBody | ||
233 | -// public void getDics(){ | ||
234 | -// GetDicsReq req = getRequest(GetDicsReq.class); | ||
235 | -// try { | ||
236 | -// GetDicsResp resp = commonService.getDics(req); | ||
237 | -// sendSuccessResp(resp); | ||
238 | -// } catch (Exception e) { | ||
239 | -// log.error(String.format("获取数据字典接口[msg=%s,UserId=%s]",e.getMessage(),req.getCode()), e); | ||
240 | -// sendError(e.getMessage()); | ||
241 | -// } | ||
242 | -// } | ||
243 | -// | ||
244 | -// /** | ||
245 | -// * 获取协议地址协议 | ||
246 | -// * @createTime 2015年6月9日 下午3:52:12 | ||
247 | -// * @author zhangshirui | ||
248 | -// */ | ||
249 | -// @RequestMapping("getAgreementUrl") | ||
250 | -// @ResponseBody | ||
251 | -// public void getAgreementUrl() { | ||
252 | -// GetAgreementUrlReq req = getRequest(GetAgreementUrlReq.class); | ||
253 | -// try { | ||
254 | -// GetAgreementUrlResp resp = commonService.getAgreementUrl(req); | ||
255 | -// sendSuccessResp(resp); | ||
256 | -// } | ||
257 | -// catch(Exception e) { | ||
258 | -// log.error(String.format("ErrorMessage=%s,UserId=%s",e.getMessage(),req.getUserId()), e); | ||
259 | -// sendError(e.getMessage()); | ||
260 | -// } | ||
261 | -// } | ||
262 | -// | ||
263 | -// /** | ||
264 | -// * 获取通知 | ||
265 | -// * | ||
266 | -// * @createTime 2015年10月27日 下午3:58:35 | ||
267 | -// * @author duanyugen | ||
268 | -// */ | ||
269 | -// @RequestMapping("getNotice") | ||
270 | -// @ResponseBody | ||
271 | -// public void getAgreement(HttpServletRequest request){ | ||
272 | -// try { | ||
273 | -// GetNoticeResp resp = commonService.getNotice(); | ||
274 | -// sendSuccessResp(resp); | ||
275 | -// } catch (ServiceException e) { | ||
276 | -// log.error("获取通知异常", e); | ||
277 | -// super.sendError(e.getCode(), e.getMessage()); | ||
278 | -// } catch (Exception e) { | ||
279 | -// log.error("获取通知异常", e); | ||
280 | -// super.sendError(e.getMessage()); | ||
281 | -// } | ||
282 | -// } | ||
283 | -// | ||
284 | -// /** | ||
285 | -// * 获取自贸区列表 | ||
286 | -// */ | ||
287 | -// @RequestMapping("getFATlist") | ||
288 | -// @ResponseBody | ||
289 | -// public void getFATlist(){ | ||
290 | -// GetSystemConfigReq req = getRequest(GetSystemConfigReq.class); | ||
291 | -// try { | ||
292 | -// GetFATlistResp resp = commonService.getFATlist(req.getCode()); | ||
293 | -// sendSuccessResp(resp); | ||
294 | -// } catch (Exception e) { | ||
295 | -// log.error(String.format("获取自贸区列表[msg=%s,UserId=%s]",e.getMessage(),req.getUserId()), e); | ||
296 | -// sendError(e.getMessage()); | ||
297 | -// } | ||
298 | -// } | ||
299 | -// | ||
300 | -// | ||
301 | -//} | 1 | +package com.diligrp.mobsite.getway.web.api.base; |
2 | + | ||
3 | +import com.diligrp.mobsite.getway.domain.except.ServiceException; | ||
4 | +import com.diligrp.mobsite.getway.domain.protocol.common.*; | ||
5 | +import com.diligrp.mobsite.getway.rpc.buyer.impl.StoreRPCImpl; | ||
6 | +import com.diligrp.mobsite.getway.service.common.CommonService; | ||
7 | +import com.diligrp.website.util.security.Validator; | ||
8 | +import io.swagger.annotations.Api; | ||
9 | +import io.swagger.annotations.ApiOperation; | ||
10 | +import org.slf4j.Logger; | ||
11 | +import org.slf4j.LoggerFactory; | ||
12 | +import org.springframework.stereotype.Controller; | ||
13 | +import org.springframework.web.bind.annotation.*; | ||
14 | + | ||
15 | +import javax.annotation.Resource; | ||
16 | + | ||
17 | +/** | ||
18 | + * <B>Description</B> 公共Controller <br /> | ||
19 | + * <B>Copyright</B> Copyright (c) 2014 www.diligrp.com All rights reserved. <br /> | ||
20 | + * 本软件源代码版权归地利集团,未经许可不得任意复制与传播.<br /> | ||
21 | + * <B>Company</B> 地利集团 | ||
22 | + * @createTime Aug 5, 2014 5:34:08 PM | ||
23 | + * @author zhangshirui | ||
24 | + */ | ||
25 | +@Controller | ||
26 | +@RequestMapping("/mobsiteApp/common") | ||
27 | +@Api(value = "/mobsiteApp/common", description = "公共:城市信息,上传图片等") | ||
28 | + | ||
29 | +public class CommonController extends BaseApiController { | ||
30 | + | ||
31 | + | ||
32 | + @Resource | ||
33 | + private CommonService commonService; | ||
34 | + | ||
35 | + private Logger log = LoggerFactory.getLogger(getClass()); | ||
36 | + | ||
37 | + | ||
38 | + /** | ||
39 | + * 根据城市id查询城市信息 | ||
40 | + */ | ||
41 | + @ApiOperation(value = "根据城市id查询城市信息", httpMethod = "POST",response = GetCityResp.class) | ||
42 | + @RequestMapping(value = "/getCity",method = RequestMethod.POST) | ||
43 | + @ResponseBody | ||
44 | + public void getCity(@ModelAttribute GetCityReq temp) { | ||
45 | + GetCityReq req = getRequest(GetCityReq.class); | ||
46 | + try { | ||
47 | + GetCityResp resp = commonService.getCity(Validator.isNull(req) ? 0 : req.getCityId()); | ||
48 | + sendSuccessResp(resp); | ||
49 | + } catch (Exception e) { | ||
50 | + log.error(String.format("获取国内城市接口[msg=%s,UserId=%s]",e.getMessage(),req.getUserId()), e); | ||
51 | + sendError(e.getMessage()); | ||
52 | + } | ||
53 | + } | ||
54 | + | ||
55 | + /** | ||
56 | + * 根据城市id查询城市信息 | ||
57 | + */ | ||
58 | + @ApiOperation(value = "根据城市id查询城市信息", httpMethod = "POST",response = GetCitysResp.class) | ||
59 | + @RequestMapping(value = "/getCitys",method = RequestMethod.POST) | ||
60 | + @ResponseBody | ||
61 | + public void getCitys(@ModelAttribute GetCitysReq temp) { | ||
62 | + GetCitysReq req = getRequest(GetCitysReq.class); | ||
63 | + try { | ||
64 | + GetCitysResp resp = commonService.getCitys(req); | ||
65 | + sendSuccessResp(resp); | ||
66 | + } catch (Exception e) { | ||
67 | + log.error(String.format("获取城市接口[msg=%s]",e.getMessage()), e); | ||
68 | + sendError(e.getMessage()); | ||
69 | + } | ||
70 | + } | ||
71 | + | ||
72 | + /** | ||
73 | + * 获取国家的城市信息,目前只支持国内城市与国家名 | ||
74 | + * 0:是所有 | ||
75 | + * -10:中国 | ||
76 | + * -9999:海外 | ||
77 | + */ | ||
78 | + @ApiOperation(value = "获取国家的城市信息,目前只支持国内城市与国家名:0:是所有,-10:中国,-9999:海外", httpMethod = "POST",response =GetCityResp.class ) | ||
79 | + @RequestMapping(value = "/getCountry",method = RequestMethod.POST) | ||
80 | + @ResponseBody | ||
81 | + public void getCountry(@ModelAttribute GetCityReq temp) { | ||
82 | + GetCityReq req = getRequest(GetCityReq.class); | ||
83 | + try { | ||
84 | + GetCityResp resp = commonService.getCountry(Validator.isNull(req) || Validator.isNull(req.getCityId()) | ||
85 | + ? 0 : req.getCityId()); | ||
86 | + sendSuccessResp(resp); | ||
87 | + } catch (Exception e) { | ||
88 | + log.error(String.format("获取国家和城市接口[msg=%s,UserId=%s]",e.getMessage(),req.getUserId()), e); | ||
89 | + sendError(e.getMessage()); | ||
90 | + } | ||
91 | + } | ||
92 | + | ||
93 | + | ||
94 | + /** | ||
95 | + * 获取国家的所有城市信息,目前只支持国内城市与国家名 | ||
96 | + */ | ||
97 | + @ApiOperation(value = "获取国家的城市信息,目前只支持国内城市与国家名", httpMethod = "POST",response = GetAllCountryTreeResp.class) | ||
98 | + @RequestMapping(value = "/getAllCountryTree",method = RequestMethod.POST) | ||
99 | + @ResponseBody | ||
100 | + public void getAllCountryTree(@ModelAttribute GetCityReq temp) { | ||
101 | + GetCityReq req = getRequest(GetCityReq.class); | ||
102 | + try { | ||
103 | + GetAllCountryTreeResp resp = commonService.getAllCountryTree(); | ||
104 | + sendSuccessResp(resp); | ||
105 | + } catch (Exception e) { | ||
106 | + log.error(String.format("获取国家和城市接口[msg=%s,UserId=%s]",e.getMessage(),req.getUserId()), e); | ||
107 | + sendError(e.getMessage()); | ||
108 | + } | ||
109 | + } | ||
110 | + | ||
111 | + | ||
112 | + /** | ||
113 | + * 获取单位信息 | ||
114 | + * | ||
115 | + * getUnitInfo | ||
116 | + * | ||
117 | + * GetUnitInfoReq | ||
118 | + * GetUnitInfoResp | ||
119 | + */ | ||
120 | + //@RequestMapping("getUnitInfo") | ||
121 | + //@ResponseBody | ||
122 | + //public void getUnitInfo() { | ||
123 | + // GetUnitInfoReq req = getRequest(GetUnitInfoReq.class); | ||
124 | + // try { | ||
125 | + // GetUnitInfoResp resp = commonService.getUnitInfo(req); | ||
126 | + // sendSuccessResp(resp); | ||
127 | + // } catch (Exception e) { | ||
128 | + // log.error(String.format("获取单位信息接口[msg=%s,UserId=%s]",e.getMessage(),req.getUserId()), e); | ||
129 | + // sendError(e.getMessage()); | ||
130 | + // } | ||
131 | + //} | ||
132 | + | ||
133 | + /** | ||
134 | + * 上传图片 | ||
135 | + * | ||
136 | + * uploadImg | ||
137 | + */ | ||
138 | + @ApiOperation(value = "上传图片", httpMethod = "POST") | ||
139 | + @RequestMapping(value = "/uploadImg",method = RequestMethod.POST) | ||
140 | + @ResponseBody | ||
141 | + public void uploadImg(@RequestBody byte[] file){ | ||
142 | + sendJSON(uploadFile(file,StoreRPCImpl.BUDGET_NAME_IMAGES,StoreRPCImpl.FILE_TYPE_IMGE)); | ||
143 | + } | ||
144 | + | ||
145 | + ///** | ||
146 | + // * 上传图片,获取全部url | ||
147 | + // * | ||
148 | + // * uploadImgFullUrl | ||
149 | + // */ | ||
150 | + //@RequestMapping("uploadImgFullUrl") | ||
151 | + //@ResponseBody | ||
152 | + //public void uploadImgFullUrl(@RequestParam("files") MultipartFile[] files){ | ||
153 | + // | ||
154 | + // try { | ||
155 | + // List<UploadFileResp> listResp = new ArrayList<>(); | ||
156 | + // for (MultipartFile file : files) { | ||
157 | + // UploadFileResp resp = uploadFile(file.getBytes(),StoreRPCImpl.BUDGET_NAME_IMAGES,StoreRPCImpl.FILE_TYPE_IMGE); | ||
158 | + // listResp.add(resp); | ||
159 | + // } | ||
160 | + // sendJSON(listResp); | ||
161 | + // } catch (IOException e) { | ||
162 | + // log.error(String.format("上传图片接口[msg=%s]",e.getMessage()), e); | ||
163 | + // sendError(e.getMessage()); | ||
164 | + // } | ||
165 | + //} | ||
166 | + // | ||
167 | + ///** | ||
168 | + // * 上传音频 | ||
169 | + // * | ||
170 | + // */ | ||
171 | + //@RequestMapping("uploadAudio") | ||
172 | + //@ResponseBody | ||
173 | + //public void uploadAudio(@RequestBody byte[] file){ | ||
174 | + // sendJSON(uploadFile(file, StoreRPCImpl.BUDGET_NAME_MESSAGE,StoreRPCImpl.FILE_TYPE_AUDIO)); | ||
175 | + //} | ||
176 | + | ||
177 | + private UploadFileResp uploadFile(@RequestBody byte[] file,String bucket,String fileType) { | ||
178 | + try { | ||
179 | + return commonService.uploadFiles(file, bucket,fileType); | ||
180 | + }catch(ServiceException e){ | ||
181 | + log.error(String.format("Code=%s,ErrorMessage=%s", | ||
182 | + e.getCode(), e.getMessage()), e); | ||
183 | + super.sendError(e.getCode(), e.getMessage()); | ||
184 | + } catch (Exception e) { | ||
185 | + log.error(String.format("上传文件错误[msg=%s]",e.getMessage()), e); | ||
186 | + sendError(e.getMessage()); | ||
187 | + } | ||
188 | + return null; | ||
189 | + } | ||
190 | + | ||
191 | + ///** | ||
192 | + // * 获取字典信息 | ||
193 | + // */ | ||
194 | + //@ApiOperation(value = "获取数据字典信息", httpMethod = "POST") | ||
195 | + //@RequestMapping(value = "/getSystemConfig",method = RequestMethod.POST) | ||
196 | + //@ResponseBody | ||
197 | + //public void getSystemConfig(){ | ||
198 | + // GetSystemConfigReq req = getRequest(GetSystemConfigReq.class); | ||
199 | + // if (Validator.isNull(req.getCode())) { | ||
200 | + // sendError(ErrorMessage.COMMON_REQUEST_PARAM_ERROR); | ||
201 | + //} | ||
202 | + // try { | ||
203 | + // GetSystemConfigResp resp = commonService.getDicInfoByCode(req.getCode()); | ||
204 | + // sendSuccessResp(resp); | ||
205 | + // } catch (Exception e) { | ||
206 | + // log.error(String.format("获取国家和城市接口[msg=%s,UserId=%s]",e.getMessage(),req.getUserId()), e); | ||
207 | + // sendError(e.getMessage()); | ||
208 | + // } | ||
209 | + //} | ||
210 | + // | ||
211 | + ///** | ||
212 | + // * 获取首页统计信息 | ||
213 | + // */ | ||
214 | + //@RequestMapping("getHomeStatistics") | ||
215 | + //@ResponseBody | ||
216 | + //public void getHomeStatistics(){ | ||
217 | + // GetHomeStatisticsReq req = getRequest(GetHomeStatisticsReq.class); | ||
218 | + // try { | ||
219 | + // GetHomeStatisticsResp resp = commonService.getHomeStatistics(req); | ||
220 | + // sendSuccessResp(resp); | ||
221 | + // } catch (Exception e) { | ||
222 | + // log.error(String.format("获取国家和城市接口[msg=%s,UserId=%s]",e.getMessage(),req.getUserId()), e); | ||
223 | + // sendError(e.getMessage()); | ||
224 | + // } | ||
225 | + //} | ||
226 | + // | ||
227 | + ///** | ||
228 | + // * 根据数据字典code获取全部的数据字典 | ||
229 | + // */ | ||
230 | + //@RequestMapping("getDics") | ||
231 | + //@ResponseBody | ||
232 | + //public void getDics(){ | ||
233 | + // GetDicsReq req = getRequest(GetDicsReq.class); | ||
234 | + // try { | ||
235 | + // GetDicsResp resp = commonService.getDics(req); | ||
236 | + // sendSuccessResp(resp); | ||
237 | + // } catch (Exception e) { | ||
238 | + // log.error(String.format("获取数据字典接口[msg=%s,UserId=%s]",e.getMessage(),req.getCode()), e); | ||
239 | + // sendError(e.getMessage()); | ||
240 | + // } | ||
241 | + //} | ||
242 | + | ||
243 | + /** | ||
244 | + * 获取协议地址协议 | ||
245 | + * @createTime 2015年6月9日 下午3:52:12 | ||
246 | + * @author zhangshirui | ||
247 | + */ | ||
248 | + //@ApiOperation(value = "获取协议地址协议", httpMethod = "POST",response = GetAgreementUrlResp.class) | ||
249 | + //@RequestMapping(value = "/getAgreementUrl",method = RequestMethod.POST) | ||
250 | + //@ResponseBody | ||
251 | + //public void getAgreementUrl(@ModelAttribute GetAgreementUrlReq temp) { | ||
252 | + // GetAgreementUrlReq req = getRequest(GetAgreementUrlReq.class); | ||
253 | + // try { | ||
254 | + // GetAgreementUrlResp resp = commonService.getAgreementUrl(req); | ||
255 | + // sendSuccessResp(resp); | ||
256 | + // } | ||
257 | + // catch(Exception e) { | ||
258 | + // log.error(String.format("ErrorMessage=%s,UserId=%s",e.getMessage(),req.getUserId()), e); | ||
259 | + // sendError(e.getMessage()); | ||
260 | + // } | ||
261 | + //} | ||
262 | + | ||
263 | + | ||
264 | + | ||
265 | + | ||
266 | + | ||
267 | +} |
mobsite-getway-web/src/main/java/com/diligrp/mobsite/getway/web/api/buyer/cart/CartController.java
@@ -12,7 +12,7 @@ import io.swagger.annotations.ApiOperation; | @@ -12,7 +12,7 @@ import io.swagger.annotations.ApiOperation; | ||
12 | import org.slf4j.Logger; | 12 | import org.slf4j.Logger; |
13 | import org.slf4j.LoggerFactory; | 13 | import org.slf4j.LoggerFactory; |
14 | import org.springframework.stereotype.Controller; | 14 | import org.springframework.stereotype.Controller; |
15 | -import org.springframework.web.bind.annotation.ModelAttribute; | 15 | +import org.springframework.web.bind.annotation.RequestBody; |
16 | import org.springframework.web.bind.annotation.RequestMapping; | 16 | import org.springframework.web.bind.annotation.RequestMapping; |
17 | import org.springframework.web.bind.annotation.RequestMethod; | 17 | import org.springframework.web.bind.annotation.RequestMethod; |
18 | import org.springframework.web.bind.annotation.ResponseBody; | 18 | import org.springframework.web.bind.annotation.ResponseBody; |
@@ -30,7 +30,7 @@ import javax.annotation.Resource; | @@ -30,7 +30,7 @@ import javax.annotation.Resource; | ||
30 | */ | 30 | */ |
31 | @Controller | 31 | @Controller |
32 | @RequestMapping("/mobsiteApp/cart") | 32 | @RequestMapping("/mobsiteApp/cart") |
33 | -@Api(value = "cart", description = "菜篮子接口") | 33 | +@Api(value = "mobsiteApp-cart", description = "菜篮子接口") |
34 | public class CartController extends BaseApiController { | 34 | public class CartController extends BaseApiController { |
35 | @Resource | 35 | @Resource |
36 | private CartService cartService; | 36 | private CartService cartService; |
@@ -43,7 +43,7 @@ public class CartController extends BaseApiController { | @@ -43,7 +43,7 @@ public class CartController extends BaseApiController { | ||
43 | @ApiOperation(value = "购物车列表", httpMethod = "POST",response = GetCartByUserResp.class) | 43 | @ApiOperation(value = "购物车列表", httpMethod = "POST",response = GetCartByUserResp.class) |
44 | @RequestMapping(value = "/getCartByUser",method = RequestMethod.POST) | 44 | @RequestMapping(value = "/getCartByUser",method = RequestMethod.POST) |
45 | @ResponseBody | 45 | @ResponseBody |
46 | - public void getCartByUser(@ModelAttribute GetCartByUserReq temp) { | 46 | + public void getCartByUser(@RequestBody GetCartByUserReq temp) { |
47 | GetCartByUserReq req = getRequest(GetCartByUserReq.class); | 47 | GetCartByUserReq req = getRequest(GetCartByUserReq.class); |
48 | try { | 48 | try { |
49 | GetCartByUserResp resp = cartService.getCart(req); | 49 | GetCartByUserResp resp = cartService.getCart(req); |
@@ -63,7 +63,7 @@ public class CartController extends BaseApiController { | @@ -63,7 +63,7 @@ public class CartController extends BaseApiController { | ||
63 | @ApiOperation(value = "添加商品到购物车", httpMethod = "POST",response = AddCartProductResp.class) | 63 | @ApiOperation(value = "添加商品到购物车", httpMethod = "POST",response = AddCartProductResp.class) |
64 | @RequestMapping(value = "/addCartProduct",method = RequestMethod.POST) | 64 | @RequestMapping(value = "/addCartProduct",method = RequestMethod.POST) |
65 | @ResponseBody | 65 | @ResponseBody |
66 | - public void addCartProduct(@ModelAttribute AddCartProductReq temp) { | 66 | + public void addCartProduct(@RequestBody AddCartProductReq temp) { |
67 | AddCartProductReq req = getRequest(AddCartProductReq.class); | 67 | AddCartProductReq req = getRequest(AddCartProductReq.class); |
68 | try { | 68 | try { |
69 | BeanValidator.validator(req); | 69 | BeanValidator.validator(req); |
@@ -117,7 +117,7 @@ public class CartController extends BaseApiController { | @@ -117,7 +117,7 @@ public class CartController extends BaseApiController { | ||
117 | @ApiOperation(value = "删除购物车中的商品", httpMethod = "POST",response = DelCartsResp.class) | 117 | @ApiOperation(value = "删除购物车中的商品", httpMethod = "POST",response = DelCartsResp.class) |
118 | @RequestMapping(value = "/delCartByIds",method = RequestMethod.POST) | 118 | @RequestMapping(value = "/delCartByIds",method = RequestMethod.POST) |
119 | @ResponseBody | 119 | @ResponseBody |
120 | - public void delCartByIds(@ModelAttribute DelCartsReq temp) { | 120 | + public void delCartByIds(@RequestBody DelCartsReq temp) { |
121 | DelCartsReq req = getRequest(DelCartsReq.class); | 121 | DelCartsReq req = getRequest(DelCartsReq.class); |
122 | try { | 122 | try { |
123 | if(!Validator.isEmpty(req.getSkus())){ | 123 | if(!Validator.isEmpty(req.getSkus())){ |
@@ -142,7 +142,7 @@ public class CartController extends BaseApiController { | @@ -142,7 +142,7 @@ public class CartController extends BaseApiController { | ||
142 | @ApiOperation(value = "修改购买数量", httpMethod = "POST",response = ModifyAmountResp.class) | 142 | @ApiOperation(value = "修改购买数量", httpMethod = "POST",response = ModifyAmountResp.class) |
143 | @RequestMapping(value = "/modifyAmount",method = RequestMethod.POST) | 143 | @RequestMapping(value = "/modifyAmount",method = RequestMethod.POST) |
144 | @ResponseBody | 144 | @ResponseBody |
145 | - public void modifyAmount(@ModelAttribute ModifyAmountReq temp) { | 145 | + public void modifyAmount(@RequestBody ModifyAmountReq temp) { |
146 | ModifyAmountReq req = getRequest(ModifyAmountReq.class); | 146 | ModifyAmountReq req = getRequest(ModifyAmountReq.class); |
147 | try { | 147 | try { |
148 | ModifyAmountResp resp = cartService.modifyAmount(req); | 148 | ModifyAmountResp resp = cartService.modifyAmount(req); |
@@ -168,7 +168,7 @@ public class CartController extends BaseApiController { | @@ -168,7 +168,7 @@ public class CartController extends BaseApiController { | ||
168 | @ApiOperation(value = "购物车确认提交", httpMethod = "POST",response = ConfirmCartResp.class) | 168 | @ApiOperation(value = "购物车确认提交", httpMethod = "POST",response = ConfirmCartResp.class) |
169 | @RequestMapping(value = "/confirmCartInfo",method = RequestMethod.POST) | 169 | @RequestMapping(value = "/confirmCartInfo",method = RequestMethod.POST) |
170 | @ResponseBody | 170 | @ResponseBody |
171 | - public void confirmCartInfo(@ModelAttribute ConfirmCartReq temp){ | 171 | + public void confirmCartInfo(@RequestBody ConfirmCartReq temp){ |
172 | ConfirmCartReq req = getRequest(ConfirmCartReq.class); | 172 | ConfirmCartReq req = getRequest(ConfirmCartReq.class); |
173 | 173 | ||
174 | if (Validator.isEmpty(req.getSkus())) { | 174 | if (Validator.isEmpty(req.getSkus())) { |
mobsite-getway-web/src/main/java/com/diligrp/mobsite/getway/web/api/buyer/goods/GoodsController.java
@@ -15,7 +15,7 @@ import io.swagger.annotations.Api; | @@ -15,7 +15,7 @@ import io.swagger.annotations.Api; | ||
15 | import io.swagger.annotations.ApiOperation; | 15 | import io.swagger.annotations.ApiOperation; |
16 | import org.apache.log4j.Logger; | 16 | import org.apache.log4j.Logger; |
17 | import org.springframework.stereotype.Controller; | 17 | import org.springframework.stereotype.Controller; |
18 | -import org.springframework.web.bind.annotation.ModelAttribute; | 18 | +import org.springframework.web.bind.annotation.RequestBody; |
19 | import org.springframework.web.bind.annotation.RequestMapping; | 19 | import org.springframework.web.bind.annotation.RequestMapping; |
20 | import org.springframework.web.bind.annotation.RequestMethod; | 20 | import org.springframework.web.bind.annotation.RequestMethod; |
21 | import org.springframework.web.bind.annotation.ResponseBody; | 21 | import org.springframework.web.bind.annotation.ResponseBody; |
@@ -33,7 +33,7 @@ import javax.annotation.Resource; | @@ -33,7 +33,7 @@ import javax.annotation.Resource; | ||
33 | */ | 33 | */ |
34 | @Controller | 34 | @Controller |
35 | @RequestMapping("/mobsiteApp/goods/") | 35 | @RequestMapping("/mobsiteApp/goods/") |
36 | -@Api(value = "/mobsiteApp/goods", description = "商品接口-买家") | 36 | +@Api(value = "/mobsiteApp-goods", description = "商品接口-买家") |
37 | public class GoodsController extends BaseApiController { | 37 | public class GoodsController extends BaseApiController { |
38 | 38 | ||
39 | @Resource | 39 | @Resource |
@@ -50,7 +50,7 @@ public class GoodsController extends BaseApiController { | @@ -50,7 +50,7 @@ public class GoodsController extends BaseApiController { | ||
50 | @ApiOperation(value = "商品搜索列表", httpMethod = "POST",response = SearchProductByKeywordResp.class) | 50 | @ApiOperation(value = "商品搜索列表", httpMethod = "POST",response = SearchProductByKeywordResp.class) |
51 | @RequestMapping(value = "/searchGoodList",method = RequestMethod.POST) | 51 | @RequestMapping(value = "/searchGoodList",method = RequestMethod.POST) |
52 | @ResponseBody | 52 | @ResponseBody |
53 | - public void searchGoodList(@ModelAttribute SearchProductByKeywordReq temp) { | 53 | + public void searchGoodList(@RequestBody SearchProductByKeywordReq temp) { |
54 | SearchProductByKeywordReq req = super.getRequest(SearchProductByKeywordReq.class); | 54 | SearchProductByKeywordReq req = super.getRequest(SearchProductByKeywordReq.class); |
55 | try { | 55 | try { |
56 | SearchProductByKeywordResp resp = goodsService.searchGoodList(req); | 56 | SearchProductByKeywordResp resp = goodsService.searchGoodList(req); |
@@ -78,7 +78,7 @@ public class GoodsController extends BaseApiController { | @@ -78,7 +78,7 @@ public class GoodsController extends BaseApiController { | ||
78 | @ApiOperation(value = "获取商品分类", httpMethod = "POST",response = GetProductCategoryResp.class) | 78 | @ApiOperation(value = "获取商品分类", httpMethod = "POST",response = GetProductCategoryResp.class) |
79 | @RequestMapping(value = "/getProductCategory",method = RequestMethod.POST) | 79 | @RequestMapping(value = "/getProductCategory",method = RequestMethod.POST) |
80 | @ResponseBody | 80 | @ResponseBody |
81 | - public void getProductCategory(@ModelAttribute GetProductCategoryReq temp) { | 81 | + public void getProductCategory(@RequestBody GetProductCategoryReq temp) { |
82 | GetProductCategoryReq req = getRequest(GetProductCategoryReq.class); | 82 | GetProductCategoryReq req = getRequest(GetProductCategoryReq.class); |
83 | try { | 83 | try { |
84 | GetProductCategoryResp resp = goodsService.getProductCategory(req); | 84 | GetProductCategoryResp resp = goodsService.getProductCategory(req); |
@@ -103,7 +103,7 @@ public class GoodsController extends BaseApiController { | @@ -103,7 +103,7 @@ public class GoodsController extends BaseApiController { | ||
103 | @ApiOperation(value = "根据类别id查询商品列表", httpMethod = "POST",response = SearchProductByCategoryResp.class) | 103 | @ApiOperation(value = "根据类别id查询商品列表", httpMethod = "POST",response = SearchProductByCategoryResp.class) |
104 | @RequestMapping(value = "/getProductByCid",method = RequestMethod.POST) | 104 | @RequestMapping(value = "/getProductByCid",method = RequestMethod.POST) |
105 | @ResponseBody | 105 | @ResponseBody |
106 | - public void getProductByCid(@ModelAttribute SearchProductByCategoryReq temp) { | 106 | + public void getProductByCid(@RequestBody SearchProductByCategoryReq temp) { |
107 | SearchProductByCategoryReq req = super.getRequest(SearchProductByCategoryReq.class); | 107 | SearchProductByCategoryReq req = super.getRequest(SearchProductByCategoryReq.class); |
108 | try { | 108 | try { |
109 | SearchProductByCategoryResp resp = goodsService.searchByCategory(req); | 109 | SearchProductByCategoryResp resp = goodsService.searchByCategory(req); |
@@ -131,7 +131,7 @@ public class GoodsController extends BaseApiController { | @@ -131,7 +131,7 @@ public class GoodsController extends BaseApiController { | ||
131 | @ApiOperation(value = "根据商品id查询商品详情", httpMethod = "POST",response = SearchProductByKeywordResp.class) | 131 | @ApiOperation(value = "根据商品id查询商品详情", httpMethod = "POST",response = SearchProductByKeywordResp.class) |
132 | @RequestMapping(value = "/getProductIntroduction",method = RequestMethod.POST) | 132 | @RequestMapping(value = "/getProductIntroduction",method = RequestMethod.POST) |
133 | @ResponseBody | 133 | @ResponseBody |
134 | - public void getGoodsById(@ModelAttribute GetProductIntroductionReq temp) { | 134 | + public void getGoodsById(@RequestBody GetProductIntroductionReq temp) { |
135 | GetProductIntroductionReq req = super.getRequest(GetProductIntroductionReq.class); | 135 | GetProductIntroductionReq req = super.getRequest(GetProductIntroductionReq.class); |
136 | try { | 136 | try { |
137 | GetProductIntroductionResp goods = goodsService.getIntroductionById(req); | 137 | GetProductIntroductionResp goods = goodsService.getIntroductionById(req); |
mobsite-getway-web/src/main/java/com/diligrp/mobsite/getway/web/api/buyer/home/ConsigneeController.java
@@ -9,7 +9,7 @@ import io.swagger.annotations.ApiOperation; | @@ -9,7 +9,7 @@ import io.swagger.annotations.ApiOperation; | ||
9 | import org.slf4j.Logger; | 9 | import org.slf4j.Logger; |
10 | import org.slf4j.LoggerFactory; | 10 | import org.slf4j.LoggerFactory; |
11 | import org.springframework.stereotype.Controller; | 11 | import org.springframework.stereotype.Controller; |
12 | -import org.springframework.web.bind.annotation.ModelAttribute; | 12 | +import org.springframework.web.bind.annotation.RequestBody; |
13 | import org.springframework.web.bind.annotation.RequestMapping; | 13 | import org.springframework.web.bind.annotation.RequestMapping; |
14 | import org.springframework.web.bind.annotation.RequestMethod; | 14 | import org.springframework.web.bind.annotation.RequestMethod; |
15 | import org.springframework.web.bind.annotation.ResponseBody; | 15 | import org.springframework.web.bind.annotation.ResponseBody; |
@@ -27,7 +27,7 @@ import javax.annotation.Resource; | @@ -27,7 +27,7 @@ import javax.annotation.Resource; | ||
27 | */ | 27 | */ |
28 | @Controller | 28 | @Controller |
29 | @RequestMapping("/mobsiteApp/consignee") | 29 | @RequestMapping("/mobsiteApp/consignee") |
30 | -@Api(value = "/mobsiteApp/consignee", description = "收货人接口") | 30 | +@Api(value = "/mobsiteApp-consignee", description = "收货人接口") |
31 | public class ConsigneeController extends BaseApiController { | 31 | public class ConsigneeController extends BaseApiController { |
32 | 32 | ||
33 | @Resource | 33 | @Resource |
@@ -80,7 +80,7 @@ public class ConsigneeController extends BaseApiController { | @@ -80,7 +80,7 @@ public class ConsigneeController extends BaseApiController { | ||
80 | @ApiOperation(value = "删除收货人", httpMethod = "POST",response = DelConsigneeResp.class) | 80 | @ApiOperation(value = "删除收货人", httpMethod = "POST",response = DelConsigneeResp.class) |
81 | @RequestMapping(value = "/delConsignee",method = RequestMethod.POST) | 81 | @RequestMapping(value = "/delConsignee",method = RequestMethod.POST) |
82 | @ResponseBody | 82 | @ResponseBody |
83 | - public void delConsignee(@ModelAttribute DelConsigneeReq temp) { | 83 | + public void delConsignee(@RequestBody DelConsigneeReq temp) { |
84 | DelConsigneeReq req = getRequest(DelConsigneeReq.class); | 84 | DelConsigneeReq req = getRequest(DelConsigneeReq.class); |
85 | try { | 85 | try { |
86 | DelConsigneeResp resp = consigneeService.delConsignee(req); | 86 | DelConsigneeResp resp = consigneeService.delConsignee(req); |
@@ -100,7 +100,7 @@ public class ConsigneeController extends BaseApiController { | @@ -100,7 +100,7 @@ public class ConsigneeController extends BaseApiController { | ||
100 | @ApiOperation(value = "修改收货人", httpMethod = "POST",response = GetConsigneeResp.class) | 100 | @ApiOperation(value = "修改收货人", httpMethod = "POST",response = GetConsigneeResp.class) |
101 | @RequestMapping(value = "/getConsignee",method = RequestMethod.POST) | 101 | @RequestMapping(value = "/getConsignee",method = RequestMethod.POST) |
102 | @ResponseBody | 102 | @ResponseBody |
103 | - public void getConsignee(@ModelAttribute GetConsigneeReq temp) { | 103 | + public void getConsignee(@RequestBody GetConsigneeReq temp) { |
104 | GetConsigneeReq req = getRequest(GetConsigneeReq.class); | 104 | GetConsigneeReq req = getRequest(GetConsigneeReq.class); |
105 | try { | 105 | try { |
106 | GetConsigneeResp resp = consigneeService.getConsignee(req); | 106 | GetConsigneeResp resp = consigneeService.getConsignee(req); |
@@ -120,7 +120,7 @@ public class ConsigneeController extends BaseApiController { | @@ -120,7 +120,7 @@ public class ConsigneeController extends BaseApiController { | ||
120 | @ApiOperation(value = "修改收货人", httpMethod = "POST",response = UpdateConsigneeResp.class) | 120 | @ApiOperation(value = "修改收货人", httpMethod = "POST",response = UpdateConsigneeResp.class) |
121 | @RequestMapping(value = "/updateConsignee",method = RequestMethod.POST) | 121 | @RequestMapping(value = "/updateConsignee",method = RequestMethod.POST) |
122 | @ResponseBody | 122 | @ResponseBody |
123 | - public void updateConsignee(@ModelAttribute UpdateConsigneeReq temp) { | 123 | + public void updateConsignee(@RequestBody UpdateConsigneeReq temp) { |
124 | UpdateConsigneeReq req = getRequest(UpdateConsigneeReq.class); | 124 | UpdateConsigneeReq req = getRequest(UpdateConsigneeReq.class); |
125 | try { | 125 | try { |
126 | UpdateConsigneeResp resp = consigneeService.updateConsignee(req); | 126 | UpdateConsigneeResp resp = consigneeService.updateConsignee(req); |
@@ -140,7 +140,7 @@ public class ConsigneeController extends BaseApiController { | @@ -140,7 +140,7 @@ public class ConsigneeController extends BaseApiController { | ||
140 | @ApiOperation(value = "新增收货人", httpMethod = "POST",response = AddConsigneeResp.class) | 140 | @ApiOperation(value = "新增收货人", httpMethod = "POST",response = AddConsigneeResp.class) |
141 | @RequestMapping(value = "/addConsignee",method = RequestMethod.POST) | 141 | @RequestMapping(value = "/addConsignee",method = RequestMethod.POST) |
142 | @ResponseBody | 142 | @ResponseBody |
143 | - public void addConsignee(@ModelAttribute AddConsigneeReq temp) { | 143 | + public void addConsignee(@RequestBody AddConsigneeReq temp) { |
144 | AddConsigneeReq req = getRequest(AddConsigneeReq.class); | 144 | AddConsigneeReq req = getRequest(AddConsigneeReq.class); |
145 | try { | 145 | try { |
146 | AddConsigneeResp resp = consigneeService.addConsignee(req); | 146 | AddConsigneeResp resp = consigneeService.addConsignee(req); |
@@ -160,7 +160,7 @@ public class ConsigneeController extends BaseApiController { | @@ -160,7 +160,7 @@ public class ConsigneeController extends BaseApiController { | ||
160 | @ApiOperation(value = "设置默认收货人", httpMethod = "POST",response = SetDefaultConsigneeReq.class) | 160 | @ApiOperation(value = "设置默认收货人", httpMethod = "POST",response = SetDefaultConsigneeReq.class) |
161 | @RequestMapping(value = "/setDefault",method = RequestMethod.POST) | 161 | @RequestMapping(value = "/setDefault",method = RequestMethod.POST) |
162 | @ResponseBody | 162 | @ResponseBody |
163 | - public void setDefault(@ModelAttribute SetDefaultConsigneeReq temp) { | 163 | + public void setDefault(@RequestBody SetDefaultConsigneeReq temp) { |
164 | SetDefaultConsigneeReq req = getRequest(SetDefaultConsigneeReq.class); | 164 | SetDefaultConsigneeReq req = getRequest(SetDefaultConsigneeReq.class); |
165 | try { | 165 | try { |
166 | SetDefaultConsigneeResp resp = consigneeService.setDefault(req.getId(),req.getUserId()); | 166 | SetDefaultConsigneeResp resp = consigneeService.setDefault(req.getId(),req.getUserId()); |
mobsite-getway-web/src/main/java/com/diligrp/mobsite/getway/web/api/buyer/home/MealDeployController.java
@@ -18,7 +18,7 @@ import org.springframework.web.bind.annotation.RequestMethod; | @@ -18,7 +18,7 @@ import org.springframework.web.bind.annotation.RequestMethod; | ||
18 | 18 | ||
19 | @Controller | 19 | @Controller |
20 | @RequestMapping("/mobsiteApp/meal/") | 20 | @RequestMapping("/mobsiteApp/meal/") |
21 | -@Api(value = "/mobsiteApp/meal", description = "营养配餐接口") | 21 | +@Api(value = "/mobsiteApp-meal", description = "营养配餐接口") |
22 | public class MealDeployController extends BaseApiController{ | 22 | public class MealDeployController extends BaseApiController{ |
23 | 23 | ||
24 | 24 |
mobsite-getway-web/src/main/java/com/diligrp/mobsite/getway/web/api/buyer/home/TopicController.java
@@ -4,11 +4,12 @@ import com.diligrp.mobsite.getway.domain.except.ServiceException; | @@ -4,11 +4,12 @@ import com.diligrp.mobsite.getway.domain.except.ServiceException; | ||
4 | import com.diligrp.mobsite.getway.domain.protocol.topic.*; | 4 | import com.diligrp.mobsite.getway.domain.protocol.topic.*; |
5 | import com.diligrp.mobsite.getway.service.buyer.home.TopicService; | 5 | import com.diligrp.mobsite.getway.service.buyer.home.TopicService; |
6 | import com.diligrp.mobsite.getway.web.api.base.BaseApiController; | 6 | import com.diligrp.mobsite.getway.web.api.base.BaseApiController; |
7 | +import io.swagger.annotations.Api; | ||
7 | import io.swagger.annotations.ApiOperation; | 8 | import io.swagger.annotations.ApiOperation; |
8 | import org.slf4j.Logger; | 9 | import org.slf4j.Logger; |
9 | import org.slf4j.LoggerFactory; | 10 | import org.slf4j.LoggerFactory; |
10 | import org.springframework.stereotype.Controller; | 11 | import org.springframework.stereotype.Controller; |
11 | -import org.springframework.web.bind.annotation.ModelAttribute; | 12 | +import org.springframework.web.bind.annotation.RequestBody; |
12 | import org.springframework.web.bind.annotation.RequestMapping; | 13 | import org.springframework.web.bind.annotation.RequestMapping; |
13 | import org.springframework.web.bind.annotation.RequestMethod; | 14 | import org.springframework.web.bind.annotation.RequestMethod; |
14 | import org.springframework.web.bind.annotation.ResponseBody; | 15 | import org.springframework.web.bind.annotation.ResponseBody; |
@@ -26,7 +27,8 @@ import javax.annotation.Resource; | @@ -26,7 +27,8 @@ import javax.annotation.Resource; | ||
26 | * @author zhangshirui | 27 | * @author zhangshirui |
27 | */ | 28 | */ |
28 | @Controller | 29 | @Controller |
29 | -@RequestMapping("/mobsiteApp/home/") | 30 | +@RequestMapping("/mobsiteApp/topic") |
31 | +@Api(value = "mobsiteApp-topic",description = "首页") | ||
30 | public class TopicController extends BaseApiController { | 32 | public class TopicController extends BaseApiController { |
31 | 33 | ||
32 | @Resource | 34 | @Resource |
@@ -94,7 +96,7 @@ public class TopicController extends BaseApiController { | @@ -94,7 +96,7 @@ public class TopicController extends BaseApiController { | ||
94 | @ApiOperation(value = "首页滚动信息详情", httpMethod = "POST",response = GetHomeStatisticsTopicResp.class) | 96 | @ApiOperation(value = "首页滚动信息详情", httpMethod = "POST",response = GetHomeStatisticsTopicResp.class) |
95 | @RequestMapping(value = "/getTopicDetail",method = RequestMethod.POST) | 97 | @RequestMapping(value = "/getTopicDetail",method = RequestMethod.POST) |
96 | @ResponseBody | 98 | @ResponseBody |
97 | - public void getTopicDetail(@ModelAttribute GetTopicDetailReq temp) { | 99 | + public void getTopicDetail(@RequestBody GetTopicDetailReq temp) { |
98 | GetTopicDetailReq req = super.getRequest(GetTopicDetailReq.class); | 100 | GetTopicDetailReq req = super.getRequest(GetTopicDetailReq.class); |
99 | try { | 101 | try { |
100 | GetTopicDetailResp resp = topicService.getTopicDetail(req); | 102 | GetTopicDetailResp resp = topicService.getTopicDetail(req); |
mobsite-getway-web/src/main/java/com/diligrp/mobsite/getway/web/api/buyer/shop/ShopController.java
@@ -11,7 +11,7 @@ import io.swagger.annotations.ApiOperation; | @@ -11,7 +11,7 @@ import io.swagger.annotations.ApiOperation; | ||
11 | import org.slf4j.Logger; | 11 | import org.slf4j.Logger; |
12 | import org.slf4j.LoggerFactory; | 12 | import org.slf4j.LoggerFactory; |
13 | import org.springframework.stereotype.Controller; | 13 | import org.springframework.stereotype.Controller; |
14 | -import org.springframework.web.bind.annotation.ModelAttribute; | 14 | +import org.springframework.web.bind.annotation.RequestBody; |
15 | import org.springframework.web.bind.annotation.RequestMapping; | 15 | import org.springframework.web.bind.annotation.RequestMapping; |
16 | import org.springframework.web.bind.annotation.RequestMethod; | 16 | import org.springframework.web.bind.annotation.RequestMethod; |
17 | import org.springframework.web.bind.annotation.ResponseBody; | 17 | import org.springframework.web.bind.annotation.ResponseBody; |
@@ -29,7 +29,7 @@ import javax.annotation.Resource; | @@ -29,7 +29,7 @@ import javax.annotation.Resource; | ||
29 | */ | 29 | */ |
30 | @Controller | 30 | @Controller |
31 | @RequestMapping("/mobsiteApp/shop") | 31 | @RequestMapping("/mobsiteApp/shop") |
32 | -@Api(value = "/mobsiteApp/shop", description = "店铺接口-买家") | 32 | +@Api(value = "/mobsiteApp-shop", description = "店铺接口-买家") |
33 | public class ShopController extends BaseApiController { | 33 | public class ShopController extends BaseApiController { |
34 | 34 | ||
35 | @Resource | 35 | @Resource |
@@ -45,10 +45,10 @@ public class ShopController extends BaseApiController { | @@ -45,10 +45,10 @@ public class ShopController extends BaseApiController { | ||
45 | @ApiOperation(value = "获取店铺基本信息", httpMethod = "POST",response = GetShopByIdResp.class) | 45 | @ApiOperation(value = "获取店铺基本信息", httpMethod = "POST",response = GetShopByIdResp.class) |
46 | @RequestMapping(value = "/getShopById",method = RequestMethod.POST) | 46 | @RequestMapping(value = "/getShopById",method = RequestMethod.POST) |
47 | @ResponseBody | 47 | @ResponseBody |
48 | - public void getShopById() { | 48 | + public void getShopById(@RequestBody GetShopByIdReq temp) { |
49 | GetShopByIdReq req = getRequest(GetShopByIdReq.class); | 49 | GetShopByIdReq req = getRequest(GetShopByIdReq.class); |
50 | try { | 50 | try { |
51 | - GetShopByIdResp resp = shopServiceImpl.getById(req); | 51 | + GetShopByIdResp resp = shopServiceImpl.getShopById(req); |
52 | sendSuccessResp(resp); | 52 | sendSuccessResp(resp); |
53 | } | 53 | } |
54 | catch(Exception e) { | 54 | catch(Exception e) { |
@@ -63,11 +63,30 @@ public class ShopController extends BaseApiController { | @@ -63,11 +63,30 @@ public class ShopController extends BaseApiController { | ||
63 | @ApiOperation(value = "买家绑定店铺", httpMethod = "POST",response = BindToShopResp.class) | 63 | @ApiOperation(value = "买家绑定店铺", httpMethod = "POST",response = BindToShopResp.class) |
64 | @RequestMapping(value = "/bindToShop",method = RequestMethod.POST) | 64 | @RequestMapping(value = "/bindToShop",method = RequestMethod.POST) |
65 | @ResponseBody | 65 | @ResponseBody |
66 | - public void bindToShop(@ModelAttribute BindToShopReq temp) { | 66 | + public void bindToShop(@RequestBody BindToShopReq temp) { |
67 | BindToShopReq req = getRequest(BindToShopReq.class); | 67 | BindToShopReq req = getRequest(BindToShopReq.class); |
68 | try { | 68 | try { |
69 | BeanValidator.validator(req); | 69 | BeanValidator.validator(req); |
70 | - BindToShopResp resp = shopServiceImpl.getShopIntroduction(req); | 70 | + BindToShopResp resp = shopServiceImpl.bindToShop(req); |
71 | + sendSuccessResp(resp); | ||
72 | + } | ||
73 | + catch(Exception e) { | ||
74 | + log.error(String.format("ErrorMessage=%s,UserId=%s",e.getMessage(),req.getUserId()), e); | ||
75 | + sendError(e.getMessage()); | ||
76 | + } | ||
77 | + } | ||
78 | + | ||
79 | + /** | ||
80 | + * 买家更换绑定店铺 | ||
81 | + */ | ||
82 | + @ApiOperation(value = "买家更换绑定店铺", httpMethod = "POST",response = BindToShopResp.class) | ||
83 | + @RequestMapping(value = "/changeBindToShop",method = RequestMethod.POST) | ||
84 | + @ResponseBody | ||
85 | + public void changeBindToShop(@RequestBody BindToShopReq temp) { | ||
86 | + BindToShopReq req = getRequest(BindToShopReq.class); | ||
87 | + try { | ||
88 | + BeanValidator.validator(req); | ||
89 | + BindToShopResp resp = shopServiceImpl.bindToShop(req); | ||
71 | sendSuccessResp(resp); | 90 | sendSuccessResp(resp); |
72 | } | 91 | } |
73 | catch(Exception e) { | 92 | catch(Exception e) { |
@@ -82,7 +101,7 @@ public class ShopController extends BaseApiController { | @@ -82,7 +101,7 @@ public class ShopController extends BaseApiController { | ||
82 | @ApiOperation(value = "热门推荐", httpMethod = "POST",response = BindToShopResp.class) | 101 | @ApiOperation(value = "热门推荐", httpMethod = "POST",response = BindToShopResp.class) |
83 | @RequestMapping(value = "/getProductRecommend",method = RequestMethod.POST) | 102 | @RequestMapping(value = "/getProductRecommend",method = RequestMethod.POST) |
84 | @ResponseBody | 103 | @ResponseBody |
85 | - public void getProductRecommend(@ModelAttribute GetProductRecommendReq temp) { | 104 | + public void getProductRecommend(@RequestBody GetProductRecommendReq temp) { |
86 | GetProductRecommendReq req = getRequest(GetProductRecommendReq.class); | 105 | GetProductRecommendReq req = getRequest(GetProductRecommendReq.class); |
87 | GetProductRecommendResp resp = null; | 106 | GetProductRecommendResp resp = null; |
88 | try { | 107 | try { |
@@ -103,7 +122,7 @@ public class ShopController extends BaseApiController { | @@ -103,7 +122,7 @@ public class ShopController extends BaseApiController { | ||
103 | @ApiOperation(value = "获取送货配送时间段", httpMethod = "POST",response = GetShopDeliveryTimeResp.class) | 122 | @ApiOperation(value = "获取送货配送时间段", httpMethod = "POST",response = GetShopDeliveryTimeResp.class) |
104 | @RequestMapping(value = "/getShopDeliveryTime",method = RequestMethod.POST) | 123 | @RequestMapping(value = "/getShopDeliveryTime",method = RequestMethod.POST) |
105 | @ResponseBody | 124 | @ResponseBody |
106 | - public void getShopDeliveryTime(@ModelAttribute GetShopDeliveryTimeReq temp) { | 125 | + public void getShopDeliveryTime(@RequestBody GetShopDeliveryTimeReq temp) { |
107 | GetShopDeliveryTimeReq req = getRequest(GetShopDeliveryTimeReq.class); | 126 | GetShopDeliveryTimeReq req = getRequest(GetShopDeliveryTimeReq.class); |
108 | GetShopDeliveryTimeResp resp = null; | 127 | GetShopDeliveryTimeResp resp = null; |
109 | try { | 128 | try { |
mobsite-getway-web/src/main/java/com/diligrp/mobsite/getway/web/api/buyer/user/OrderController.java
@@ -6,13 +6,12 @@ import com.diligrp.mobsite.getway.service.buyer.user.OrderService; | @@ -6,13 +6,12 @@ import com.diligrp.mobsite.getway.service.buyer.user.OrderService; | ||
6 | import com.diligrp.mobsite.getway.web.api.base.BaseApiController; | 6 | import com.diligrp.mobsite.getway.web.api.base.BaseApiController; |
7 | import com.diligrp.mobsite.getway.web.utils.BeanValidator; | 7 | import com.diligrp.mobsite.getway.web.utils.BeanValidator; |
8 | import io.swagger.annotations.Api; | 8 | import io.swagger.annotations.Api; |
9 | +import io.swagger.annotations.ApiImplicitParam; | ||
10 | +import io.swagger.annotations.ApiImplicitParams; | ||
9 | import io.swagger.annotations.ApiOperation; | 11 | import io.swagger.annotations.ApiOperation; |
10 | import org.apache.log4j.Logger; | 12 | import org.apache.log4j.Logger; |
11 | import org.springframework.stereotype.Controller; | 13 | import org.springframework.stereotype.Controller; |
12 | -import org.springframework.web.bind.annotation.ModelAttribute; | ||
13 | -import org.springframework.web.bind.annotation.RequestMapping; | ||
14 | -import org.springframework.web.bind.annotation.RequestMethod; | ||
15 | -import org.springframework.web.bind.annotation.ResponseBody; | 14 | +import org.springframework.web.bind.annotation.*; |
16 | 15 | ||
17 | import javax.annotation.Resource; | 16 | import javax.annotation.Resource; |
18 | import javax.servlet.http.HttpServletRequest; | 17 | import javax.servlet.http.HttpServletRequest; |
@@ -28,7 +27,7 @@ import javax.servlet.http.HttpServletRequest; | @@ -28,7 +27,7 @@ import javax.servlet.http.HttpServletRequest; | ||
28 | */ | 27 | */ |
29 | @Controller | 28 | @Controller |
30 | @RequestMapping("/mobsiteApp/order/") | 29 | @RequestMapping("/mobsiteApp/order/") |
31 | -@Api(value = "/mobsiteApp/order", description = "订单接口-买家") | 30 | +@Api(value = "mobsiteApp-order", description = "订单接口-买家") |
32 | public class OrderController extends BaseApiController { | 31 | public class OrderController extends BaseApiController { |
33 | 32 | ||
34 | @Resource | 33 | @Resource |
@@ -48,8 +47,11 @@ public class OrderController extends BaseApiController { | @@ -48,8 +47,11 @@ public class OrderController extends BaseApiController { | ||
48 | */ | 47 | */ |
49 | @ApiOperation(value = "获取订单列表", httpMethod = "POST",response = SearchOrderResp.class) | 48 | @ApiOperation(value = "获取订单列表", httpMethod = "POST",response = SearchOrderResp.class) |
50 | @RequestMapping(value = "/getOrders",method = RequestMethod.POST) | 49 | @RequestMapping(value = "/getOrders",method = RequestMethod.POST) |
50 | + @ApiImplicitParams({ | ||
51 | + @ApiImplicitParam(paramType = "body",name = "temp",dataType = "SearchOrderReq") | ||
52 | + }) | ||
51 | @ResponseBody | 53 | @ResponseBody |
52 | - public void getOrders(@ModelAttribute SearchOrderReq temp){ | 54 | + public void getOrders(@RequestBody SearchOrderReq temp){ |
53 | 55 | ||
54 | SearchOrderReq req = super.getRequest(SearchOrderReq.class); | 56 | SearchOrderReq req = super.getRequest(SearchOrderReq.class); |
55 | try { | 57 | try { |
@@ -76,7 +78,7 @@ public class OrderController extends BaseApiController { | @@ -76,7 +78,7 @@ public class OrderController extends BaseApiController { | ||
76 | @ApiOperation(value = "根据订单id查询订单", httpMethod = "POST",response = GetOrderResp.class) | 78 | @ApiOperation(value = "根据订单id查询订单", httpMethod = "POST",response = GetOrderResp.class) |
77 | @RequestMapping(value = "/getOrderById",method = RequestMethod.POST) | 79 | @RequestMapping(value = "/getOrderById",method = RequestMethod.POST) |
78 | @ResponseBody | 80 | @ResponseBody |
79 | - public void getOrderById(@ModelAttribute GetOrderReq temp){ | 81 | + public void getOrderById(@RequestBody GetOrderReq temp){ |
80 | 82 | ||
81 | GetOrderReq req = super.getRequest(GetOrderReq.class); | 83 | GetOrderReq req = super.getRequest(GetOrderReq.class); |
82 | try { | 84 | try { |
@@ -104,7 +106,7 @@ public class OrderController extends BaseApiController { | @@ -104,7 +106,7 @@ public class OrderController extends BaseApiController { | ||
104 | @ApiOperation(value = "提交订单", httpMethod = "POST",response = SubmitOrderResp.class) | 106 | @ApiOperation(value = "提交订单", httpMethod = "POST",response = SubmitOrderResp.class) |
105 | @RequestMapping(value = "/submitOrder",method = RequestMethod.POST) | 107 | @RequestMapping(value = "/submitOrder",method = RequestMethod.POST) |
106 | @ResponseBody | 108 | @ResponseBody |
107 | - public void submitOrder(HttpServletRequest request,@ModelAttribute SubmitOrderReq temp){ | 109 | + public void submitOrder(HttpServletRequest request,@RequestBody SubmitOrderReq temp){ |
108 | 110 | ||
109 | SubmitOrderReq req = super.getRequest(SubmitOrderReq.class); | 111 | SubmitOrderReq req = super.getRequest(SubmitOrderReq.class); |
110 | try { | 112 | try { |
@@ -138,7 +140,7 @@ public class OrderController extends BaseApiController { | @@ -138,7 +140,7 @@ public class OrderController extends BaseApiController { | ||
138 | @ApiOperation(value = "支付", httpMethod = "POST",response = PaymentResp.class) | 140 | @ApiOperation(value = "支付", httpMethod = "POST",response = PaymentResp.class) |
139 | @RequestMapping(value = "/payment",method = RequestMethod.POST) | 141 | @RequestMapping(value = "/payment",method = RequestMethod.POST) |
140 | @ResponseBody | 142 | @ResponseBody |
141 | - public void payment(@ModelAttribute PaymentReq temp){ | 143 | + public void payment(@RequestBody PaymentReq temp){ |
142 | PaymentReq req = super.getRequest(PaymentReq.class); | 144 | PaymentReq req = super.getRequest(PaymentReq.class); |
143 | try { | 145 | try { |
144 | BeanValidator.validator(req); | 146 | BeanValidator.validator(req); |
@@ -168,7 +170,7 @@ public class OrderController extends BaseApiController { | @@ -168,7 +170,7 @@ public class OrderController extends BaseApiController { | ||
168 | @ApiOperation(value = "取消订单", httpMethod = "POST",response = CancelOrderResp.class) | 170 | @ApiOperation(value = "取消订单", httpMethod = "POST",response = CancelOrderResp.class) |
169 | @RequestMapping(value = "/cancelOrder",method = RequestMethod.POST) | 171 | @RequestMapping(value = "/cancelOrder",method = RequestMethod.POST) |
170 | @ResponseBody | 172 | @ResponseBody |
171 | - public void cancelOrder(@ModelAttribute CancelOrderReq temp){ | 173 | + public void cancelOrder(@RequestBody CancelOrderReq temp){ |
172 | 174 | ||
173 | CancelOrderReq req = super.getRequest(CancelOrderReq.class); | 175 | CancelOrderReq req = super.getRequest(CancelOrderReq.class); |
174 | try { | 176 | try { |
@@ -195,7 +197,7 @@ public class OrderController extends BaseApiController { | @@ -195,7 +197,7 @@ public class OrderController extends BaseApiController { | ||
195 | @ApiOperation(value = "删除订单", httpMethod = "POST",response = DelOrderResp.class) | 197 | @ApiOperation(value = "删除订单", httpMethod = "POST",response = DelOrderResp.class) |
196 | @RequestMapping(value = "/delOrder",method = RequestMethod.POST) | 198 | @RequestMapping(value = "/delOrder",method = RequestMethod.POST) |
197 | @ResponseBody | 199 | @ResponseBody |
198 | - public void delOrder(@ModelAttribute DelOrderReq temp){ | 200 | + public void delOrder(@RequestBody DelOrderReq temp){ |
199 | 201 | ||
200 | DelOrderReq req = super.getRequest(DelOrderReq.class); | 202 | DelOrderReq req = super.getRequest(DelOrderReq.class); |
201 | try { | 203 | try { |
@@ -223,7 +225,7 @@ public class OrderController extends BaseApiController { | @@ -223,7 +225,7 @@ public class OrderController extends BaseApiController { | ||
223 | @ApiOperation(value = "确认收货", httpMethod = "POST",response = ConfirmPickUpResp.class) | 225 | @ApiOperation(value = "确认收货", httpMethod = "POST",response = ConfirmPickUpResp.class) |
224 | @RequestMapping(value = "/confirmPickUp",method = RequestMethod.POST) | 226 | @RequestMapping(value = "/confirmPickUp",method = RequestMethod.POST) |
225 | @ResponseBody | 227 | @ResponseBody |
226 | - public void confirmPickUp(@ModelAttribute ConfirmPickUpReq temp){ | 228 | + public void confirmPickUp(@RequestBody ConfirmPickUpReq temp){ |
227 | ConfirmPickUpReq req = super.getRequest(ConfirmPickUpReq.class); | 229 | ConfirmPickUpReq req = super.getRequest(ConfirmPickUpReq.class); |
228 | try { | 230 | try { |
229 | ConfirmPickUpResp resp = orderService.confirmPickUp(req); | 231 | ConfirmPickUpResp resp = orderService.confirmPickUp(req); |
mobsite-getway-web/src/main/java/com/diligrp/mobsite/getway/web/api/buyer/user/StationMsgController.java
@@ -8,7 +8,7 @@ import io.swagger.annotations.Api; | @@ -8,7 +8,7 @@ import io.swagger.annotations.Api; | ||
8 | import io.swagger.annotations.ApiOperation; | 8 | import io.swagger.annotations.ApiOperation; |
9 | import org.apache.log4j.Logger; | 9 | import org.apache.log4j.Logger; |
10 | import org.springframework.stereotype.Controller; | 10 | import org.springframework.stereotype.Controller; |
11 | -import org.springframework.web.bind.annotation.ModelAttribute; | 11 | +import org.springframework.web.bind.annotation.RequestBody; |
12 | import org.springframework.web.bind.annotation.RequestMapping; | 12 | import org.springframework.web.bind.annotation.RequestMapping; |
13 | import org.springframework.web.bind.annotation.RequestMethod; | 13 | import org.springframework.web.bind.annotation.RequestMethod; |
14 | import org.springframework.web.bind.annotation.ResponseBody; | 14 | import org.springframework.web.bind.annotation.ResponseBody; |
@@ -26,7 +26,7 @@ import javax.annotation.Resource; | @@ -26,7 +26,7 @@ import javax.annotation.Resource; | ||
26 | */ | 26 | */ |
27 | @Controller | 27 | @Controller |
28 | @RequestMapping("/mobsiteApp/stationMsg") | 28 | @RequestMapping("/mobsiteApp/stationMsg") |
29 | -@Api(value = "/mobsiteApp/stationMsg", description = "站内信") | 29 | +@Api(value = "mobsiteApp-stationMsg", description = "站内信") |
30 | public class StationMsgController extends BaseApiController { | 30 | public class StationMsgController extends BaseApiController { |
31 | @Resource | 31 | @Resource |
32 | private StationMsgService stationMsgService; | 32 | private StationMsgService stationMsgService; |
@@ -42,7 +42,7 @@ public class StationMsgController extends BaseApiController { | @@ -42,7 +42,7 @@ public class StationMsgController extends BaseApiController { | ||
42 | @ApiOperation(value = "标识站内信已读", httpMethod = "POST",response = MarkStationMsgResp.class) | 42 | @ApiOperation(value = "标识站内信已读", httpMethod = "POST",response = MarkStationMsgResp.class) |
43 | @RequestMapping(value = "/markStationMsg",method = RequestMethod.POST) | 43 | @RequestMapping(value = "/markStationMsg",method = RequestMethod.POST) |
44 | @ResponseBody | 44 | @ResponseBody |
45 | - public void markStationMsg(@ModelAttribute MarkStationMsgReq temp){ | 45 | + public void markStationMsg(@RequestBody MarkStationMsgReq temp){ |
46 | MarkStationMsgReq req = super.getRequest(MarkStationMsgReq.class); | 46 | MarkStationMsgReq req = super.getRequest(MarkStationMsgReq.class); |
47 | try { | 47 | try { |
48 | MarkStationMsgResp resp = stationMsgService.markStationMsg(req); | 48 | MarkStationMsgResp resp = stationMsgService.markStationMsg(req); |
@@ -66,7 +66,7 @@ public class StationMsgController extends BaseApiController { | @@ -66,7 +66,7 @@ public class StationMsgController extends BaseApiController { | ||
66 | @ApiOperation(value = "获取站内信列表", httpMethod = "POST",response = GetStationMsgListResp.class) | 66 | @ApiOperation(value = "获取站内信列表", httpMethod = "POST",response = GetStationMsgListResp.class) |
67 | @RequestMapping(value = "/getStationMsgList",method = RequestMethod.POST) | 67 | @RequestMapping(value = "/getStationMsgList",method = RequestMethod.POST) |
68 | @ResponseBody | 68 | @ResponseBody |
69 | - public void getStationMsgList(@ModelAttribute GetStationMsgListReq temp){ | 69 | + public void getStationMsgList(@RequestBody GetStationMsgListReq temp){ |
70 | GetStationMsgListReq req = super.getRequest(GetStationMsgListReq.class); | 70 | GetStationMsgListReq req = super.getRequest(GetStationMsgListReq.class); |
71 | try { | 71 | try { |
72 | GetStationMsgListResp resp = stationMsgService.getStationMsgList(req); | 72 | GetStationMsgListResp resp = stationMsgService.getStationMsgList(req); |
@@ -89,7 +89,7 @@ public class StationMsgController extends BaseApiController { | @@ -89,7 +89,7 @@ public class StationMsgController extends BaseApiController { | ||
89 | @ApiOperation(value = "获取站内信首页信息", httpMethod = "POST",response = GetHomeInfoResp.class) | 89 | @ApiOperation(value = "获取站内信首页信息", httpMethod = "POST",response = GetHomeInfoResp.class) |
90 | @RequestMapping(value = "/getHomeInfo",method = RequestMethod.POST) | 90 | @RequestMapping(value = "/getHomeInfo",method = RequestMethod.POST) |
91 | @ResponseBody | 91 | @ResponseBody |
92 | - public void getHomeInfo(@ModelAttribute GetHomeInfoReq temp){ | 92 | + public void getHomeInfo(@RequestBody GetHomeInfoReq temp){ |
93 | GetHomeInfoReq req = super.getRequest(GetHomeInfoReq.class); | 93 | GetHomeInfoReq req = super.getRequest(GetHomeInfoReq.class); |
94 | try { | 94 | try { |
95 | GetHomeInfoResp resp = stationMsgService.getHomeInfoArray(req); | 95 | GetHomeInfoResp resp = stationMsgService.getHomeInfoArray(req); |
mobsite-getway-web/src/main/java/com/diligrp/mobsite/getway/web/api/buyer/user/UserController.java
@@ -13,7 +13,7 @@ import io.swagger.annotations.Api; | @@ -13,7 +13,7 @@ import io.swagger.annotations.Api; | ||
13 | import io.swagger.annotations.ApiOperation; | 13 | import io.swagger.annotations.ApiOperation; |
14 | import org.apache.log4j.Logger; | 14 | import org.apache.log4j.Logger; |
15 | import org.springframework.stereotype.Controller; | 15 | import org.springframework.stereotype.Controller; |
16 | -import org.springframework.web.bind.annotation.ModelAttribute; | 16 | +import org.springframework.web.bind.annotation.RequestBody; |
17 | import org.springframework.web.bind.annotation.RequestMapping; | 17 | import org.springframework.web.bind.annotation.RequestMapping; |
18 | import org.springframework.web.bind.annotation.RequestMethod; | 18 | import org.springframework.web.bind.annotation.RequestMethod; |
19 | import org.springframework.web.bind.annotation.ResponseBody; | 19 | import org.springframework.web.bind.annotation.ResponseBody; |
@@ -32,7 +32,7 @@ import javax.servlet.http.HttpServletRequest; | @@ -32,7 +32,7 @@ import javax.servlet.http.HttpServletRequest; | ||
32 | */ | 32 | */ |
33 | @Controller | 33 | @Controller |
34 | @RequestMapping("/mobsiteApp/user") | 34 | @RequestMapping("/mobsiteApp/user") |
35 | -@Api(value = "/mobsiteApp/user", description = "用户接口") | 35 | +@Api(value = "/mobsiteApp-user", description = "用户接口-买家") |
36 | public class UserController extends BaseApiController { | 36 | public class UserController extends BaseApiController { |
37 | 37 | ||
38 | @Resource | 38 | @Resource |
@@ -48,7 +48,7 @@ public class UserController extends BaseApiController { | @@ -48,7 +48,7 @@ public class UserController extends BaseApiController { | ||
48 | @ApiOperation(value = "买家登录", httpMethod = "POST",response = LoginResp.class) | 48 | @ApiOperation(value = "买家登录", httpMethod = "POST",response = LoginResp.class) |
49 | @RequestMapping(value = "/buyerLogin",method = RequestMethod.POST) | 49 | @RequestMapping(value = "/buyerLogin",method = RequestMethod.POST) |
50 | @ResponseBody | 50 | @ResponseBody |
51 | - public void buyerLogin(HttpServletRequest request,@ModelAttribute LoginReq temp ){ | 51 | + public void buyerLogin(HttpServletRequest request,@RequestBody LoginReq temp ){ |
52 | LoginReq req = super.getRequest(LoginReq.class); | 52 | LoginReq req = super.getRequest(LoginReq.class); |
53 | try { | 53 | try { |
54 | BeanValidator.validator(req); | 54 | BeanValidator.validator(req); |
@@ -75,7 +75,7 @@ public class UserController extends BaseApiController { | @@ -75,7 +75,7 @@ public class UserController extends BaseApiController { | ||
75 | @ApiOperation(value = "买家登录", httpMethod = "POST",response = LoginResp.class) | 75 | @ApiOperation(value = "买家登录", httpMethod = "POST",response = LoginResp.class) |
76 | @RequestMapping(value = "/buyerLogins",method = RequestMethod.POST) | 76 | @RequestMapping(value = "/buyerLogins",method = RequestMethod.POST) |
77 | @ResponseBody | 77 | @ResponseBody |
78 | - public void buyerLogins(@ModelAttribute LoginReq temp){ | 78 | + public void buyerLogins(@RequestBody LoginReq temp){ |
79 | LoginReq req = super.getRequest(LoginReq.class); | 79 | LoginReq req = super.getRequest(LoginReq.class); |
80 | try { | 80 | try { |
81 | BeanValidator.validator(req); | 81 | BeanValidator.validator(req); |
@@ -100,7 +100,7 @@ public class UserController extends BaseApiController { | @@ -100,7 +100,7 @@ public class UserController extends BaseApiController { | ||
100 | @ApiOperation(value = "买家验证码登录", httpMethod = "POST" , notes = "买家验证码登录",response = LoginResp.class) | 100 | @ApiOperation(value = "买家验证码登录", httpMethod = "POST" , notes = "买家验证码登录",response = LoginResp.class) |
101 | @RequestMapping(value = "/loginForAuth",method = RequestMethod.POST) | 101 | @RequestMapping(value = "/loginForAuth",method = RequestMethod.POST) |
102 | @ResponseBody | 102 | @ResponseBody |
103 | - public void loginForAuth(@ModelAttribute LoginReq temp){ | 103 | + public void loginForAuth(@RequestBody LoginReq temp){ |
104 | LoginReq req = super.getRequest(LoginReq.class); | 104 | LoginReq req = super.getRequest(LoginReq.class); |
105 | try { | 105 | try { |
106 | BeanValidator.validator(req); | 106 | BeanValidator.validator(req); |
@@ -148,7 +148,7 @@ public class UserController extends BaseApiController { | @@ -148,7 +148,7 @@ public class UserController extends BaseApiController { | ||
148 | @ApiOperation(value = "发送验证码到手机", httpMethod = "POST" , notes = "发送验证码到手机",response = SendVeriCodeResp.class) | 148 | @ApiOperation(value = "发送验证码到手机", httpMethod = "POST" , notes = "发送验证码到手机",response = SendVeriCodeResp.class) |
149 | @RequestMapping(value = "/sendAuthCode",method = RequestMethod.POST) | 149 | @RequestMapping(value = "/sendAuthCode",method = RequestMethod.POST) |
150 | @ResponseBody | 150 | @ResponseBody |
151 | - public void sendAuthCode(@ModelAttribute SendVeriCodeReq temp){ | 151 | + public void sendAuthCode(@RequestBody SendVeriCodeReq temp){ |
152 | SendVeriCodeReq req= super.getRequest(SendVeriCodeReq.class); | 152 | SendVeriCodeReq req= super.getRequest(SendVeriCodeReq.class); |
153 | try { | 153 | try { |
154 | BeanValidator.validator(req); | 154 | BeanValidator.validator(req); |
@@ -172,7 +172,7 @@ public class UserController extends BaseApiController { | @@ -172,7 +172,7 @@ public class UserController extends BaseApiController { | ||
172 | @ApiOperation(value = "验证手机收到的验证码", httpMethod = "POST" , notes = "验证手机收到的验证码",response = CheckVeriCodeResp.class) | 172 | @ApiOperation(value = "验证手机收到的验证码", httpMethod = "POST" , notes = "验证手机收到的验证码",response = CheckVeriCodeResp.class) |
173 | @RequestMapping(value = "/checkAuthCode",method = RequestMethod.POST) | 173 | @RequestMapping(value = "/checkAuthCode",method = RequestMethod.POST) |
174 | @ResponseBody | 174 | @ResponseBody |
175 | - public void checkAuthCode(@ModelAttribute CheckVeriCodeReq temp){ | 175 | + public void checkAuthCode(@RequestBody CheckVeriCodeReq temp){ |
176 | CheckVeriCodeReq req= super.getRequest(CheckVeriCodeReq.class); | 176 | CheckVeriCodeReq req= super.getRequest(CheckVeriCodeReq.class); |
177 | try { | 177 | try { |
178 | BeanValidator.validator(req); | 178 | BeanValidator.validator(req); |
@@ -245,7 +245,7 @@ public class UserController extends BaseApiController { | @@ -245,7 +245,7 @@ public class UserController extends BaseApiController { | ||
245 | @ApiOperation(value = "找回密码-修改用户密码", httpMethod = "POST" ,response = SendVeriCodeResp.class) | 245 | @ApiOperation(value = "找回密码-修改用户密码", httpMethod = "POST" ,response = SendVeriCodeResp.class) |
246 | @RequestMapping(value = "/modifyPwd",method = RequestMethod.POST) | 246 | @RequestMapping(value = "/modifyPwd",method = RequestMethod.POST) |
247 | @ResponseBody | 247 | @ResponseBody |
248 | - public void modifyPwd(@ModelAttribute ModifyPwdReq temp){ | 248 | + public void modifyPwd(@RequestBody ModifyPwdReq temp){ |
249 | ModifyPwdReq req = super.getRequest(ModifyPwdReq.class); | 249 | ModifyPwdReq req = super.getRequest(ModifyPwdReq.class); |
250 | ModifyPwdResp resp = null; | 250 | ModifyPwdResp resp = null; |
251 | try { | 251 | try { |
@@ -271,7 +271,7 @@ public class UserController extends BaseApiController { | @@ -271,7 +271,7 @@ public class UserController extends BaseApiController { | ||
271 | @ApiOperation(value = "买家注册", httpMethod = "POST" ,response = UserRegisterResp.class) | 271 | @ApiOperation(value = "买家注册", httpMethod = "POST" ,response = UserRegisterResp.class) |
272 | @RequestMapping(value = "/buyerRegister",method = RequestMethod.POST) | 272 | @RequestMapping(value = "/buyerRegister",method = RequestMethod.POST) |
273 | @ResponseBody | 273 | @ResponseBody |
274 | - public void buyerRegister(@ModelAttribute UserRegisterReq temp){ | 274 | + public void buyerRegister(@RequestBody UserRegisterReq temp){ |
275 | UserRegisterReq req = super.getRequest(UserRegisterReq.class); | 275 | UserRegisterReq req = super.getRequest(UserRegisterReq.class); |
276 | try { | 276 | try { |
277 | BeanValidator.validator(req); | 277 | BeanValidator.validator(req); |
@@ -295,7 +295,7 @@ public class UserController extends BaseApiController { | @@ -295,7 +295,7 @@ public class UserController extends BaseApiController { | ||
295 | @ApiOperation(value = "买家注册", httpMethod = "POST" ,response = UserRegisterResp.class) | 295 | @ApiOperation(value = "买家注册", httpMethod = "POST" ,response = UserRegisterResp.class) |
296 | @RequestMapping(value = "/buyerRegisters",method = RequestMethod.POST) | 296 | @RequestMapping(value = "/buyerRegisters",method = RequestMethod.POST) |
297 | @ResponseBody | 297 | @ResponseBody |
298 | - public void buyerRegisters(@ModelAttribute UserRegisterReq temp){ | 298 | + public void buyerRegisters(@RequestBody UserRegisterReq temp){ |
299 | UserRegisterReq req = super.getRequest(UserRegisterReq.class); | 299 | UserRegisterReq req = super.getRequest(UserRegisterReq.class); |
300 | try { | 300 | try { |
301 | BeanValidator.validator(req); | 301 | BeanValidator.validator(req); |
@@ -321,7 +321,7 @@ public class UserController extends BaseApiController { | @@ -321,7 +321,7 @@ public class UserController extends BaseApiController { | ||
321 | @ApiOperation(value = "退出", httpMethod = "POST" ,response = LogoutResp.class) | 321 | @ApiOperation(value = "退出", httpMethod = "POST" ,response = LogoutResp.class) |
322 | @RequestMapping(value = "/logout",method = RequestMethod.POST) | 322 | @RequestMapping(value = "/logout",method = RequestMethod.POST) |
323 | @ResponseBody | 323 | @ResponseBody |
324 | - public void logout(@ModelAttribute LogoutReq temp){ | 324 | + public void logout(@RequestBody LogoutReq temp){ |
325 | LogoutReq req = super.getRequest(LogoutReq.class); | 325 | LogoutReq req = super.getRequest(LogoutReq.class); |
326 | try { | 326 | try { |
327 | if(Validator.isNull(req) || !Validator.isNumber(req.getUserId()+"")) { | 327 | if(Validator.isNull(req) || !Validator.isNumber(req.getUserId()+"")) { |
@@ -348,7 +348,7 @@ public class UserController extends BaseApiController { | @@ -348,7 +348,7 @@ public class UserController extends BaseApiController { | ||
348 | @ApiOperation(value = "个人信息维护", httpMethod = "POST" ,response = UpdateUserInfoResp.class) | 348 | @ApiOperation(value = "个人信息维护", httpMethod = "POST" ,response = UpdateUserInfoResp.class) |
349 | @RequestMapping(value = "/updateUserInfo",method = RequestMethod.POST) | 349 | @RequestMapping(value = "/updateUserInfo",method = RequestMethod.POST) |
350 | @ResponseBody | 350 | @ResponseBody |
351 | - public void updateUserInfo(@ModelAttribute UpdateUserInfoReq temp){ | 351 | + public void updateUserInfo(@RequestBody UpdateUserInfoReq temp){ |
352 | UpdateUserInfoReq req = super.getRequest(UpdateUserInfoReq.class); | 352 | UpdateUserInfoReq req = super.getRequest(UpdateUserInfoReq.class); |
353 | try { | 353 | try { |
354 | UpdateUserInfoResp resp = userService.updateUserInfo(req); | 354 | UpdateUserInfoResp resp = userService.updateUserInfo(req); |
@@ -420,7 +420,7 @@ public class UserController extends BaseApiController { | @@ -420,7 +420,7 @@ public class UserController extends BaseApiController { | ||
420 | @ApiOperation(value = "搜索买家用户信息", httpMethod = "POST" ,response = SearchUserInfoResp.class) | 420 | @ApiOperation(value = "搜索买家用户信息", httpMethod = "POST" ,response = SearchUserInfoResp.class) |
421 | @RequestMapping(value = "/searchBuyerInfo",method = RequestMethod.POST) | 421 | @RequestMapping(value = "/searchBuyerInfo",method = RequestMethod.POST) |
422 | @ResponseBody | 422 | @ResponseBody |
423 | - public void searchBuyerInfo(@ModelAttribute SearchUserInfoReq temp) { | 423 | + public void searchBuyerInfo(@RequestBody SearchUserInfoReq temp) { |
424 | SearchUserInfoReq req = getRequest(SearchUserInfoReq.class); | 424 | SearchUserInfoReq req = getRequest(SearchUserInfoReq.class); |
425 | try { | 425 | try { |
426 | SearchUserInfoResp resp = userService.searchBuyerInfo(req); | 426 | SearchUserInfoResp resp = userService.searchBuyerInfo(req); |
mobsite-getway-web/src/main/java/com/diligrp/mobsite/getway/web/api/seller/fund/FundController.java
@@ -8,7 +8,7 @@ import io.swagger.annotations.Api; | @@ -8,7 +8,7 @@ import io.swagger.annotations.Api; | ||
8 | import io.swagger.annotations.ApiOperation; | 8 | import io.swagger.annotations.ApiOperation; |
9 | import org.apache.log4j.Logger; | 9 | import org.apache.log4j.Logger; |
10 | import org.springframework.stereotype.Controller; | 10 | import org.springframework.stereotype.Controller; |
11 | -import org.springframework.web.bind.annotation.ModelAttribute; | 11 | +import org.springframework.web.bind.annotation.RequestBody; |
12 | import org.springframework.web.bind.annotation.RequestMapping; | 12 | import org.springframework.web.bind.annotation.RequestMapping; |
13 | import org.springframework.web.bind.annotation.RequestMethod; | 13 | import org.springframework.web.bind.annotation.RequestMethod; |
14 | import org.springframework.web.bind.annotation.ResponseBody; | 14 | import org.springframework.web.bind.annotation.ResponseBody; |
@@ -20,8 +20,8 @@ import javax.annotation.Resource; | @@ -20,8 +20,8 @@ import javax.annotation.Resource; | ||
20 | */ | 20 | */ |
21 | 21 | ||
22 | @Controller | 22 | @Controller |
23 | -@RequestMapping(value = "/mobsiteApp/seller/fund/") | ||
24 | -@Api(value = "/mobsiteApp/seller/fund/",description = "储值管理") | 23 | +@RequestMapping(value = "/mobsiteApp/seller/fund") |
24 | +@Api(value = "mobsiteApp-seller-fund",description = "储值管理") | ||
25 | public class FundController extends BaseApiController{ | 25 | public class FundController extends BaseApiController{ |
26 | 26 | ||
27 | 27 | ||
@@ -72,7 +72,7 @@ public class FundController extends BaseApiController{ | @@ -72,7 +72,7 @@ public class FundController extends BaseApiController{ | ||
72 | @ApiOperation(value = "储值卡操作", httpMethod = "POST",response = FundTradeResp.class) | 72 | @ApiOperation(value = "储值卡操作", httpMethod = "POST",response = FundTradeResp.class) |
73 | @RequestMapping(value = "/fundTrade",method = RequestMethod.POST) | 73 | @RequestMapping(value = "/fundTrade",method = RequestMethod.POST) |
74 | @ResponseBody | 74 | @ResponseBody |
75 | - public void fundTrade(@ModelAttribute FundTradeReq temp) { | 75 | + public void fundTrade(@RequestBody FundTradeReq temp) { |
76 | 76 | ||
77 | FundTradeReq req = super.getRequest(FundTradeReq.class); | 77 | FundTradeReq req = super.getRequest(FundTradeReq.class); |
78 | try { | 78 | try { |
@@ -101,7 +101,7 @@ public class FundController extends BaseApiController{ | @@ -101,7 +101,7 @@ public class FundController extends BaseApiController{ | ||
101 | @ApiOperation(value = "获取储值/交易记录", httpMethod = "POST",response = GetfundTradeRecordResp.class) | 101 | @ApiOperation(value = "获取储值/交易记录", httpMethod = "POST",response = GetfundTradeRecordResp.class) |
102 | @RequestMapping(value = "/getfundTradeRecord",method = RequestMethod.POST) | 102 | @RequestMapping(value = "/getfundTradeRecord",method = RequestMethod.POST) |
103 | @ResponseBody | 103 | @ResponseBody |
104 | - public void getfundTradeRecord(@ModelAttribute GetfundTradeRecordReq temp) { | 104 | + public void getfundTradeRecord(@RequestBody GetfundTradeRecordReq temp) { |
105 | 105 | ||
106 | GetfundTradeRecordReq req = super.getRequest(GetfundTradeRecordReq.class); | 106 | GetfundTradeRecordReq req = super.getRequest(GetfundTradeRecordReq.class); |
107 | try { | 107 | try { |
mobsite-getway-web/src/main/java/com/diligrp/mobsite/getway/web/api/seller/order/SellerOrderController.java
@@ -10,7 +10,7 @@ import io.swagger.annotations.Api; | @@ -10,7 +10,7 @@ import io.swagger.annotations.Api; | ||
10 | import io.swagger.annotations.ApiOperation; | 10 | import io.swagger.annotations.ApiOperation; |
11 | import org.apache.log4j.Logger; | 11 | import org.apache.log4j.Logger; |
12 | import org.springframework.stereotype.Controller; | 12 | import org.springframework.stereotype.Controller; |
13 | -import org.springframework.web.bind.annotation.ModelAttribute; | 13 | +import org.springframework.web.bind.annotation.RequestBody; |
14 | import org.springframework.web.bind.annotation.RequestMapping; | 14 | import org.springframework.web.bind.annotation.RequestMapping; |
15 | import org.springframework.web.bind.annotation.RequestMethod; | 15 | import org.springframework.web.bind.annotation.RequestMethod; |
16 | import org.springframework.web.bind.annotation.ResponseBody; | 16 | import org.springframework.web.bind.annotation.ResponseBody; |
@@ -27,8 +27,8 @@ import javax.annotation.Resource; | @@ -27,8 +27,8 @@ import javax.annotation.Resource; | ||
27 | * @author weili | 27 | * @author weili |
28 | */ | 28 | */ |
29 | @Controller | 29 | @Controller |
30 | -@RequestMapping("/mobsiteApp/seller/order/") | ||
31 | -@Api(value = "/mobsiteApp/seller/order", description = "订单接口-卖家") | 30 | +@RequestMapping("/mobsiteApp/seller/order") |
31 | +@Api(value = "/mobsiteApp-order-seller", description = "订单接口-卖家") | ||
32 | public class SellerOrderController extends BaseApiController { | 32 | public class SellerOrderController extends BaseApiController { |
33 | 33 | ||
34 | @Resource | 34 | @Resource |
@@ -49,7 +49,7 @@ public class SellerOrderController extends BaseApiController { | @@ -49,7 +49,7 @@ public class SellerOrderController extends BaseApiController { | ||
49 | @ApiOperation(value = "获取订单列表", httpMethod = "POST",response = GetOrderListResp.class) | 49 | @ApiOperation(value = "获取订单列表", httpMethod = "POST",response = GetOrderListResp.class) |
50 | @RequestMapping(value = "/getOrders",method = RequestMethod.POST) | 50 | @RequestMapping(value = "/getOrders",method = RequestMethod.POST) |
51 | @ResponseBody | 51 | @ResponseBody |
52 | - public void getOrders(@ModelAttribute GetOrderListReq temp) { | 52 | + public void getOrders(@RequestBody GetOrderListReq temp) { |
53 | 53 | ||
54 | GetOrderListReq req = super.getRequest(GetOrderListReq.class); | 54 | GetOrderListReq req = super.getRequest(GetOrderListReq.class); |
55 | try { | 55 | try { |
@@ -76,7 +76,7 @@ public class SellerOrderController extends BaseApiController { | @@ -76,7 +76,7 @@ public class SellerOrderController extends BaseApiController { | ||
76 | @ApiOperation(value = "根据订单id查询订单", httpMethod = "POST",response = GetOrderDetailResp.class) | 76 | @ApiOperation(value = "根据订单id查询订单", httpMethod = "POST",response = GetOrderDetailResp.class) |
77 | @RequestMapping(value = "/getOrderById",method = RequestMethod.POST) | 77 | @RequestMapping(value = "/getOrderById",method = RequestMethod.POST) |
78 | @ResponseBody | 78 | @ResponseBody |
79 | - public void getOrderById(@ModelAttribute GetOrderDetailReq temp) { | 79 | + public void getOrderById(@RequestBody GetOrderDetailReq temp) { |
80 | 80 | ||
81 | GetOrderDetailReq req = super.getRequest(GetOrderDetailReq.class); | 81 | GetOrderDetailReq req = super.getRequest(GetOrderDetailReq.class); |
82 | try { | 82 | try { |
@@ -105,7 +105,7 @@ public class SellerOrderController extends BaseApiController { | @@ -105,7 +105,7 @@ public class SellerOrderController extends BaseApiController { | ||
105 | @ApiOperation(value = "搜索订单列表", httpMethod = "POST",response = SearchOrderListResp.class) | 105 | @ApiOperation(value = "搜索订单列表", httpMethod = "POST",response = SearchOrderListResp.class) |
106 | @RequestMapping(value = "/searchOrders",method = RequestMethod.POST) | 106 | @RequestMapping(value = "/searchOrders",method = RequestMethod.POST) |
107 | @ResponseBody | 107 | @ResponseBody |
108 | - public void searchOrders(@ModelAttribute SearchOrderListReq temp) { | 108 | + public void searchOrders(@RequestBody SearchOrderListReq temp) { |
109 | 109 | ||
110 | SearchOrderListReq req = super.getRequest(SearchOrderListReq.class); | 110 | SearchOrderListReq req = super.getRequest(SearchOrderListReq.class); |
111 | try { | 111 | try { |
@@ -132,7 +132,7 @@ public class SellerOrderController extends BaseApiController { | @@ -132,7 +132,7 @@ public class SellerOrderController extends BaseApiController { | ||
132 | @ApiOperation(value = "确认收款", httpMethod = "POST",response = ConfirmReceiptMoneyResp.class) | 132 | @ApiOperation(value = "确认收款", httpMethod = "POST",response = ConfirmReceiptMoneyResp.class) |
133 | @RequestMapping(value = "/comfirmReceiveMoney",method = RequestMethod.POST) | 133 | @RequestMapping(value = "/comfirmReceiveMoney",method = RequestMethod.POST) |
134 | @ResponseBody | 134 | @ResponseBody |
135 | - public void comfirmReceiveMoney(@ModelAttribute ConfirmReceiptMoneyReq temp) { | 135 | + public void comfirmReceiveMoney(@RequestBody ConfirmReceiptMoneyReq temp) { |
136 | ConfirmReceiptMoneyReq req = super.getRequest(ConfirmReceiptMoneyReq.class); | 136 | ConfirmReceiptMoneyReq req = super.getRequest(ConfirmReceiptMoneyReq.class); |
137 | try { | 137 | try { |
138 | ConfirmReceiptMoneyResp resp = sellerOrderService.comfirmReceiveMoney(req); | 138 | ConfirmReceiptMoneyResp resp = sellerOrderService.comfirmReceiveMoney(req); |
@@ -161,7 +161,7 @@ public class SellerOrderController extends BaseApiController { | @@ -161,7 +161,7 @@ public class SellerOrderController extends BaseApiController { | ||
161 | @ApiOperation(value = "接单", httpMethod = "POST",response = CancelOrderResp.class) | 161 | @ApiOperation(value = "接单", httpMethod = "POST",response = CancelOrderResp.class) |
162 | @RequestMapping(value = "/takeOrder",method = RequestMethod.POST) | 162 | @RequestMapping(value = "/takeOrder",method = RequestMethod.POST) |
163 | @ResponseBody | 163 | @ResponseBody |
164 | - public void takeOrder(@ModelAttribute takeOrderReq temp) { | 164 | + public void takeOrder(@RequestBody takeOrderReq temp) { |
165 | takeOrderReq req = super.getRequest(takeOrderReq.class); | 165 | takeOrderReq req = super.getRequest(takeOrderReq.class); |
166 | try { | 166 | try { |
167 | BaseResp resp = sellerOrderService.takeOrder(req); | 167 | BaseResp resp = sellerOrderService.takeOrder(req); |
@@ -188,7 +188,7 @@ public class SellerOrderController extends BaseApiController { | @@ -188,7 +188,7 @@ public class SellerOrderController extends BaseApiController { | ||
188 | @ApiOperation(value = "拒绝接单", httpMethod = "POST",response = CancelOrderResp.class) | 188 | @ApiOperation(value = "拒绝接单", httpMethod = "POST",response = CancelOrderResp.class) |
189 | @RequestMapping(value = "/refuseOrder",method = RequestMethod.POST) | 189 | @RequestMapping(value = "/refuseOrder",method = RequestMethod.POST) |
190 | @ResponseBody | 190 | @ResponseBody |
191 | - public void refuseOrder(@ModelAttribute RefuseQuoteReq temp) { | 191 | + public void refuseOrder(@RequestBody RefuseQuoteReq temp) { |
192 | RefuseQuoteReq req = super.getRequest(RefuseQuoteReq.class); | 192 | RefuseQuoteReq req = super.getRequest(RefuseQuoteReq.class); |
193 | try { | 193 | try { |
194 | RefuseQuoteResp resp = sellerOrderService.refuseOrder(req); | 194 | RefuseQuoteResp resp = sellerOrderService.refuseOrder(req); |
mobsite-getway-web/src/main/java/com/diligrp/mobsite/getway/web/api/seller/product/SellerGoodsController.java
@@ -8,7 +8,7 @@ import io.swagger.annotations.Api; | @@ -8,7 +8,7 @@ import io.swagger.annotations.Api; | ||
8 | import io.swagger.annotations.ApiOperation; | 8 | import io.swagger.annotations.ApiOperation; |
9 | import org.apache.log4j.Logger; | 9 | import org.apache.log4j.Logger; |
10 | import org.springframework.stereotype.Controller; | 10 | import org.springframework.stereotype.Controller; |
11 | -import org.springframework.web.bind.annotation.ModelAttribute; | 11 | +import org.springframework.web.bind.annotation.RequestBody; |
12 | import org.springframework.web.bind.annotation.RequestMapping; | 12 | import org.springframework.web.bind.annotation.RequestMapping; |
13 | import org.springframework.web.bind.annotation.RequestMethod; | 13 | import org.springframework.web.bind.annotation.RequestMethod; |
14 | import org.springframework.web.bind.annotation.ResponseBody; | 14 | import org.springframework.web.bind.annotation.ResponseBody; |
@@ -25,7 +25,7 @@ import javax.annotation.Resource; | @@ -25,7 +25,7 @@ import javax.annotation.Resource; | ||
25 | */ | 25 | */ |
26 | @Controller | 26 | @Controller |
27 | @RequestMapping("/mobsiteApp/seller/goods") | 27 | @RequestMapping("/mobsiteApp/seller/goods") |
28 | -@Api(value = "/mobsiteApp/seller/goods", description = "商品接口-卖家") | 28 | +@Api(value = "/mobsiteApp-goods-seller", description = "商品接口-卖家") |
29 | public class SellerGoodsController extends BaseApiController { | 29 | public class SellerGoodsController extends BaseApiController { |
30 | 30 | ||
31 | @Resource | 31 | @Resource |
@@ -54,7 +54,7 @@ public class SellerGoodsController extends BaseApiController { | @@ -54,7 +54,7 @@ public class SellerGoodsController extends BaseApiController { | ||
54 | @ApiOperation(value = "添加商品分类", httpMethod = "POST",response = AddProductCategoryResp.class) | 54 | @ApiOperation(value = "添加商品分类", httpMethod = "POST",response = AddProductCategoryResp.class) |
55 | @RequestMapping(value = "/addProductCategory",method = RequestMethod.POST) | 55 | @RequestMapping(value = "/addProductCategory",method = RequestMethod.POST) |
56 | @ResponseBody | 56 | @ResponseBody |
57 | - public void addProductCategory(@ModelAttribute AddProductCategoryReq temp) { | 57 | + public void addProductCategory(@RequestBody AddProductCategoryReq temp) { |
58 | AddProductCategoryReq req = getRequest(AddProductCategoryReq.class); | 58 | AddProductCategoryReq req = getRequest(AddProductCategoryReq.class); |
59 | try { | 59 | try { |
60 | AddProductCategoryResp resp = sellerGoodsService.addProductCategory(req); | 60 | AddProductCategoryResp resp = sellerGoodsService.addProductCategory(req); |
@@ -82,7 +82,7 @@ public class SellerGoodsController extends BaseApiController { | @@ -82,7 +82,7 @@ public class SellerGoodsController extends BaseApiController { | ||
82 | @ApiOperation(value = "修改商品分类", httpMethod = "POST",response = UpdateProductCategoryResp.class) | 82 | @ApiOperation(value = "修改商品分类", httpMethod = "POST",response = UpdateProductCategoryResp.class) |
83 | @RequestMapping(value = "/updateProductCategory",method = RequestMethod.POST) | 83 | @RequestMapping(value = "/updateProductCategory",method = RequestMethod.POST) |
84 | @ResponseBody | 84 | @ResponseBody |
85 | - public void updateProductCategory(@ModelAttribute UpdateProductCategoryReq temp) { | 85 | + public void updateProductCategory(@RequestBody UpdateProductCategoryReq temp) { |
86 | UpdateProductCategoryReq req = getRequest(UpdateProductCategoryReq.class); | 86 | UpdateProductCategoryReq req = getRequest(UpdateProductCategoryReq.class); |
87 | try { | 87 | try { |
88 | UpdateProductCategoryResp resp = sellerGoodsService.updateProductCategory(req); | 88 | UpdateProductCategoryResp resp = sellerGoodsService.updateProductCategory(req); |
@@ -110,7 +110,7 @@ public class SellerGoodsController extends BaseApiController { | @@ -110,7 +110,7 @@ public class SellerGoodsController extends BaseApiController { | ||
110 | @ApiOperation(value = "搜索商品分类", httpMethod = "POST",response = SearchProductCategoryResp.class) | 110 | @ApiOperation(value = "搜索商品分类", httpMethod = "POST",response = SearchProductCategoryResp.class) |
111 | @RequestMapping(value = "/searchProductCategory",method = RequestMethod.POST) | 111 | @RequestMapping(value = "/searchProductCategory",method = RequestMethod.POST) |
112 | @ResponseBody | 112 | @ResponseBody |
113 | - public void searchProductCategory(@ModelAttribute SearchProductCategoryReq temp) { | 113 | + public void searchProductCategory(@RequestBody SearchProductCategoryReq temp) { |
114 | SearchProductCategoryReq req = getRequest(SearchProductCategoryReq.class); | 114 | SearchProductCategoryReq req = getRequest(SearchProductCategoryReq.class); |
115 | try { | 115 | try { |
116 | SearchProductCategoryResp resp = sellerGoodsService.searchProductCategory(req); | 116 | SearchProductCategoryResp resp = sellerGoodsService.searchProductCategory(req); |
@@ -141,7 +141,7 @@ public class SellerGoodsController extends BaseApiController { | @@ -141,7 +141,7 @@ public class SellerGoodsController extends BaseApiController { | ||
141 | @ApiOperation(value = "添加新商品", httpMethod = "POST",response = AddGoodsResp.class) | 141 | @ApiOperation(value = "添加新商品", httpMethod = "POST",response = AddGoodsResp.class) |
142 | @RequestMapping(value = "/addGoods",method = RequestMethod.POST) | 142 | @RequestMapping(value = "/addGoods",method = RequestMethod.POST) |
143 | @ResponseBody | 143 | @ResponseBody |
144 | - public void addGoods(@ModelAttribute AddGoodsReq temp) { | 144 | + public void addGoods(@RequestBody AddGoodsReq temp) { |
145 | AddGoodsReq req = getRequest(AddGoodsReq.class); | 145 | AddGoodsReq req = getRequest(AddGoodsReq.class); |
146 | try { | 146 | try { |
147 | AddGoodsResp resp = sellerGoodsService.addGoods(req); | 147 | AddGoodsResp resp = sellerGoodsService.addGoods(req); |
@@ -169,7 +169,7 @@ public class SellerGoodsController extends BaseApiController { | @@ -169,7 +169,7 @@ public class SellerGoodsController extends BaseApiController { | ||
169 | @ApiOperation(value = "修改商品", httpMethod = "POST",response = UpdateGoodsResp.class) | 169 | @ApiOperation(value = "修改商品", httpMethod = "POST",response = UpdateGoodsResp.class) |
170 | @RequestMapping(value = "/updateGoods",method = RequestMethod.POST) | 170 | @RequestMapping(value = "/updateGoods",method = RequestMethod.POST) |
171 | @ResponseBody | 171 | @ResponseBody |
172 | - public void updateGoods(@ModelAttribute UpdateGoodsReq temp) { | 172 | + public void updateGoods(@RequestBody UpdateGoodsReq temp) { |
173 | UpdateGoodsReq req = getRequest(UpdateGoodsReq.class); | 173 | UpdateGoodsReq req = getRequest(UpdateGoodsReq.class); |
174 | try { | 174 | try { |
175 | UpdateGoodsResp resp = sellerGoodsService.updateGoods(req); | 175 | UpdateGoodsResp resp = sellerGoodsService.updateGoods(req); |
@@ -198,7 +198,7 @@ public class SellerGoodsController extends BaseApiController { | @@ -198,7 +198,7 @@ public class SellerGoodsController extends BaseApiController { | ||
198 | @ApiOperation(value = "卖家获取商品列表", httpMethod = "POST",response = GetGoodsResp.class) | 198 | @ApiOperation(value = "卖家获取商品列表", httpMethod = "POST",response = GetGoodsResp.class) |
199 | @RequestMapping(value = "/getGoods",method = RequestMethod.POST) | 199 | @RequestMapping(value = "/getGoods",method = RequestMethod.POST) |
200 | @ResponseBody | 200 | @ResponseBody |
201 | - public void getGoods(@ModelAttribute GetGoodsReq temp) { | 201 | + public void getGoods(@RequestBody GetGoodsReq temp) { |
202 | GetGoodsReq req = getRequest(GetGoodsReq.class); | 202 | GetGoodsReq req = getRequest(GetGoodsReq.class); |
203 | try { | 203 | try { |
204 | GetGoodsResp resp = sellerGoodsService.getGoods(req); | 204 | GetGoodsResp resp = sellerGoodsService.getGoods(req); |
@@ -227,7 +227,7 @@ public class SellerGoodsController extends BaseApiController { | @@ -227,7 +227,7 @@ public class SellerGoodsController extends BaseApiController { | ||
227 | @ApiOperation(value = "卖家操作商品:1上架 2 下架 3设置促销 4设置首页推荐 5删除", httpMethod = "POST",response = HandleGoodsResp.class) | 227 | @ApiOperation(value = "卖家操作商品:1上架 2 下架 3设置促销 4设置首页推荐 5删除", httpMethod = "POST",response = HandleGoodsResp.class) |
228 | @RequestMapping(value = "/handleGoods",method = RequestMethod.POST) | 228 | @RequestMapping(value = "/handleGoods",method = RequestMethod.POST) |
229 | @ResponseBody | 229 | @ResponseBody |
230 | - public void handleGoods(@ModelAttribute HandleGoodsReq temp) { | 230 | + public void handleGoods(@RequestBody HandleGoodsReq temp) { |
231 | HandleGoodsReq req = getRequest(HandleGoodsReq.class); | 231 | HandleGoodsReq req = getRequest(HandleGoodsReq.class); |
232 | try { | 232 | try { |
233 | HandleGoodsResp resp = sellerGoodsService.handleGoods(req); | 233 | HandleGoodsResp resp = sellerGoodsService.handleGoods(req); |
mobsite-getway-web/src/main/java/com/diligrp/mobsite/getway/web/api/seller/shop/SellerShopController.java
@@ -11,7 +11,7 @@ import io.swagger.annotations.ApiOperation; | @@ -11,7 +11,7 @@ import io.swagger.annotations.ApiOperation; | ||
11 | import org.slf4j.Logger; | 11 | import org.slf4j.Logger; |
12 | import org.slf4j.LoggerFactory; | 12 | import org.slf4j.LoggerFactory; |
13 | import org.springframework.stereotype.Controller; | 13 | import org.springframework.stereotype.Controller; |
14 | -import org.springframework.web.bind.annotation.ModelAttribute; | 14 | +import org.springframework.web.bind.annotation.RequestBody; |
15 | import org.springframework.web.bind.annotation.RequestMapping; | 15 | import org.springframework.web.bind.annotation.RequestMapping; |
16 | import org.springframework.web.bind.annotation.RequestMethod; | 16 | import org.springframework.web.bind.annotation.RequestMethod; |
17 | import org.springframework.web.bind.annotation.ResponseBody; | 17 | import org.springframework.web.bind.annotation.ResponseBody; |
@@ -22,8 +22,8 @@ import javax.annotation.Resource; | @@ -22,8 +22,8 @@ import javax.annotation.Resource; | ||
22 | * Created by weili on 2016/12/27. | 22 | * Created by weili on 2016/12/27. |
23 | */ | 23 | */ |
24 | @Controller | 24 | @Controller |
25 | -@RequestMapping("/mobsiteApp/seller/shop/") | ||
26 | -@Api(value = "/mobsiteApp/seller/shop", description = "店铺接口-卖家") | 25 | +@RequestMapping("/mobsiteApp/seller/shop") |
26 | +@Api(value = "/mobsiteApp-shop-seller", description = "店铺接口-卖家") | ||
27 | public class SellerShopController extends BaseApiController{ | 27 | public class SellerShopController extends BaseApiController{ |
28 | 28 | ||
29 | private Logger log = LoggerFactory.getLogger(getClass()); | 29 | private Logger log = LoggerFactory.getLogger(getClass()); |
@@ -37,7 +37,7 @@ public class SellerShopController extends BaseApiController{ | @@ -37,7 +37,7 @@ public class SellerShopController extends BaseApiController{ | ||
37 | @ApiOperation(value = "创建或修改店铺信息", httpMethod = "POST",response = CreateOrUpdateShopResp.class) | 37 | @ApiOperation(value = "创建或修改店铺信息", httpMethod = "POST",response = CreateOrUpdateShopResp.class) |
38 | @RequestMapping(value = "/createOrUpdateShop",method = RequestMethod.POST) | 38 | @RequestMapping(value = "/createOrUpdateShop",method = RequestMethod.POST) |
39 | @ResponseBody | 39 | @ResponseBody |
40 | - public void createOrUpdateShop(@ModelAttribute CreateOrUpdateShopReq temp) { | 40 | + public void createOrUpdateShop(@RequestBody CreateOrUpdateShopReq temp) { |
41 | CreateOrUpdateShopReq req = getRequest(CreateOrUpdateShopReq.class); | 41 | CreateOrUpdateShopReq req = getRequest(CreateOrUpdateShopReq.class); |
42 | try { | 42 | try { |
43 | //BeanValidator.validator(req); | 43 | //BeanValidator.validator(req); |
@@ -76,7 +76,7 @@ public class SellerShopController extends BaseApiController{ | @@ -76,7 +76,7 @@ public class SellerShopController extends BaseApiController{ | ||
76 | @ApiOperation(value = "设置送货时间段", httpMethod = "POST",response = AddShopDeliveryTimeResp.class) | 76 | @ApiOperation(value = "设置送货时间段", httpMethod = "POST",response = AddShopDeliveryTimeResp.class) |
77 | @RequestMapping(value = "/addShopDeliveryTime",method = RequestMethod.POST) | 77 | @RequestMapping(value = "/addShopDeliveryTime",method = RequestMethod.POST) |
78 | @ResponseBody | 78 | @ResponseBody |
79 | - public void addShopDeliveryTime(@ModelAttribute AddShopDeliveryTimeReq temp) { | 79 | + public void addShopDeliveryTime(@RequestBody AddShopDeliveryTimeReq temp) { |
80 | AddShopDeliveryTimeReq req = getRequest(AddShopDeliveryTimeReq.class); | 80 | AddShopDeliveryTimeReq req = getRequest(AddShopDeliveryTimeReq.class); |
81 | try { | 81 | try { |
82 | //BeanValidator.validator(req); | 82 | //BeanValidator.validator(req); |
@@ -96,7 +96,7 @@ public class SellerShopController extends BaseApiController{ | @@ -96,7 +96,7 @@ public class SellerShopController extends BaseApiController{ | ||
96 | @ApiOperation(value = "获取送货时间段", httpMethod = "POST",response = GetShopDeliveryTimeResp.class) | 96 | @ApiOperation(value = "获取送货时间段", httpMethod = "POST",response = GetShopDeliveryTimeResp.class) |
97 | @RequestMapping(value = "/getShopDeliveryTime",method = RequestMethod.POST) | 97 | @RequestMapping(value = "/getShopDeliveryTime",method = RequestMethod.POST) |
98 | @ResponseBody | 98 | @ResponseBody |
99 | - public void getShopDeliveryTime(@ModelAttribute GetShopDeliveryTimeReq temp) { | 99 | + public void getShopDeliveryTime(@RequestBody GetShopDeliveryTimeReq temp) { |
100 | GetShopDeliveryTimeReq req = getRequest(GetShopDeliveryTimeReq.class); | 100 | GetShopDeliveryTimeReq req = getRequest(GetShopDeliveryTimeReq.class); |
101 | try { | 101 | try { |
102 | //BeanValidator.validator(req); | 102 | //BeanValidator.validator(req); |
@@ -115,7 +115,7 @@ public class SellerShopController extends BaseApiController{ | @@ -115,7 +115,7 @@ public class SellerShopController extends BaseApiController{ | ||
115 | @ApiOperation(value = "设置送货时间段", httpMethod = "POST",response = DelShopDeliveryTimeResp.class) | 115 | @ApiOperation(value = "设置送货时间段", httpMethod = "POST",response = DelShopDeliveryTimeResp.class) |
116 | @RequestMapping(value = "/delShopDeliveryTime",method = RequestMethod.POST) | 116 | @RequestMapping(value = "/delShopDeliveryTime",method = RequestMethod.POST) |
117 | @ResponseBody | 117 | @ResponseBody |
118 | - public void delShopDeliveryTime(@ModelAttribute DelShopDeliveryTimeReq temp) { | 118 | + public void delShopDeliveryTime(@RequestBody DelShopDeliveryTimeReq temp) { |
119 | DelShopDeliveryTimeReq req = getRequest(DelShopDeliveryTimeReq.class); | 119 | DelShopDeliveryTimeReq req = getRequest(DelShopDeliveryTimeReq.class); |
120 | try { | 120 | try { |
121 | //BeanValidator.validator(req); | 121 | //BeanValidator.validator(req); |
mobsite-getway-web/src/main/java/com/diligrp/mobsite/getway/web/api/seller/user/SellerUserController.java
@@ -5,9 +5,13 @@ import com.diligrp.mobsite.getway.domain.protocol.saler.user.SellerLoginReq; | @@ -5,9 +5,13 @@ import com.diligrp.mobsite.getway.domain.protocol.saler.user.SellerLoginReq; | ||
5 | import com.diligrp.mobsite.getway.domain.protocol.saler.user.SellerLoginResp; | 5 | import com.diligrp.mobsite.getway.domain.protocol.saler.user.SellerLoginResp; |
6 | import com.diligrp.mobsite.getway.service.seller.SellerUserService; | 6 | import com.diligrp.mobsite.getway.service.seller.SellerUserService; |
7 | import com.diligrp.mobsite.getway.web.api.base.BaseApiController; | 7 | import com.diligrp.mobsite.getway.web.api.base.BaseApiController; |
8 | +import io.swagger.annotations.Api; | ||
9 | +import io.swagger.annotations.ApiOperation; | ||
8 | import org.apache.log4j.Logger; | 10 | import org.apache.log4j.Logger; |
9 | import org.springframework.stereotype.Controller; | 11 | import org.springframework.stereotype.Controller; |
12 | +import org.springframework.web.bind.annotation.RequestBody; | ||
10 | import org.springframework.web.bind.annotation.RequestMapping; | 13 | import org.springframework.web.bind.annotation.RequestMapping; |
14 | +import org.springframework.web.bind.annotation.RequestMethod; | ||
11 | import org.springframework.web.bind.annotation.ResponseBody; | 15 | import org.springframework.web.bind.annotation.ResponseBody; |
12 | 16 | ||
13 | import javax.annotation.Resource; | 17 | import javax.annotation.Resource; |
@@ -23,6 +27,7 @@ import javax.annotation.Resource; | @@ -23,6 +27,7 @@ import javax.annotation.Resource; | ||
23 | */ | 27 | */ |
24 | @Controller | 28 | @Controller |
25 | @RequestMapping("/mobsiteApp/seller/user/") | 29 | @RequestMapping("/mobsiteApp/seller/user/") |
30 | +@Api(value = "mobsiteApp-user-seller",description = "用户接口-卖家") | ||
26 | public class SellerUserController extends BaseApiController { | 31 | public class SellerUserController extends BaseApiController { |
27 | 32 | ||
28 | private final static Logger log = Logger.getLogger(SellerUserController.class); | 33 | private final static Logger log = Logger.getLogger(SellerUserController.class); |
@@ -35,10 +40,10 @@ public class SellerUserController extends BaseApiController { | @@ -35,10 +40,10 @@ public class SellerUserController extends BaseApiController { | ||
35 | * @createTime 2014年8月24日 下午10:55:03 | 40 | * @createTime 2014年8月24日 下午10:55:03 |
36 | * @author duanyugen | 41 | * @author duanyugen |
37 | */ | 42 | */ |
38 | - @RequestMapping("sellerLogin") | 43 | + @ApiOperation(value = "卖家登录", httpMethod = "POST",response = SellerLoginResp.class) |
44 | + @RequestMapping(value = "/sellerLogin",method = RequestMethod.POST) | ||
39 | @ResponseBody | 45 | @ResponseBody |
40 | - @Deprecated | ||
41 | - public void sellerLogin(){ | 46 | + public void sellerLogin(@RequestBody SellerLoginReq temp){ |
42 | SellerLoginReq req = super.getRequest(SellerLoginReq.class); | 47 | SellerLoginReq req = super.getRequest(SellerLoginReq.class); |
43 | try { | 48 | try { |
44 | SellerLoginResp resp = sellerUserService.login(req); | 49 | SellerLoginResp resp = sellerUserService.login(req); |
mobsite-getway-web/src/main/java/com/diligrp/mobsite/getway/web/filter/GuardLoginInterceptor.java
@@ -4,15 +4,12 @@ import com.diligrp.manage.sdk.session.ManageConfig; | @@ -4,15 +4,12 @@ import com.diligrp.manage.sdk.session.ManageConfig; | ||
4 | import com.diligrp.manage.sdk.session.PermissionContext; | 4 | import com.diligrp.manage.sdk.session.PermissionContext; |
5 | import com.diligrp.manage.sdk.session.SessionConstants; | 5 | import com.diligrp.manage.sdk.session.SessionConstants; |
6 | import com.diligrp.manage.sdk.session.SessionContext; | 6 | import com.diligrp.manage.sdk.session.SessionContext; |
7 | -import com.diligrp.manage.sdk.sessionRedis.UserResProcessor; | ||
8 | -import com.diligrp.mobsite.getway.domain.common.ErrorMessage; | ||
9 | import com.diligrp.mobsite.getway.domain.common.RedisKey; | 7 | import com.diligrp.mobsite.getway.domain.common.RedisKey; |
10 | import com.diligrp.mobsite.getway.domain.common.ResultCode; | 8 | import com.diligrp.mobsite.getway.domain.common.ResultCode; |
11 | import com.diligrp.mobsite.getway.domain.protocol.saler.order.GuardOperateCommonReq; | 9 | import com.diligrp.mobsite.getway.domain.protocol.saler.order.GuardOperateCommonReq; |
12 | import com.diligrp.mobsite.getway.web.utils.WebContent; | 10 | import com.diligrp.mobsite.getway.web.utils.WebContent; |
13 | import com.diligrp.website.util.redis.RedisUtil; | 11 | import com.diligrp.website.util.redis.RedisUtil; |
14 | import com.diligrp.website.util.security.Validator; | 12 | import com.diligrp.website.util.security.Validator; |
15 | - | ||
16 | import org.nutz.json.Json; | 13 | import org.nutz.json.Json; |
17 | import org.slf4j.Logger; | 14 | import org.slf4j.Logger; |
18 | import org.slf4j.LoggerFactory; | 15 | import org.slf4j.LoggerFactory; |
@@ -50,14 +47,14 @@ public class GuardLoginInterceptor extends HandlerInterceptorAdapter { | @@ -50,14 +47,14 @@ public class GuardLoginInterceptor extends HandlerInterceptorAdapter { | ||
50 | @Override | 47 | @Override |
51 | public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception { | 48 | public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception { |
52 | //检测body是否合法 | 49 | //检测body是否合法 |
53 | - String body = WebContent.getRequestBody(); | ||
54 | - if (Validator.isNull(body)) { | ||
55 | - WebContent.sendErrorInfo(ResultCode.REQUET_PARAMS_ERROR, ErrorMessage.NETWORK_ERROR); | ||
56 | - log.warn(ErrorMessage.COMMON_REQUEST_PARAM_ERROR); | ||
57 | - return false; | ||
58 | - } | ||
59 | - | ||
60 | - if(!checkTokenInfo(body,request)) return false; | 50 | + //String body = WebContent.getRequestBody(); |
51 | + //if (Validator.isNull(body)) { | ||
52 | + // WebContent.sendErrorInfo(ResultCode.REQUET_PARAMS_ERROR, ErrorMessage.NETWORK_ERROR); | ||
53 | + // log.warn(ErrorMessage.COMMON_REQUEST_PARAM_ERROR); | ||
54 | + // return false; | ||
55 | + //} | ||
56 | + // | ||
57 | + //if(!checkTokenInfo(body,request)) return false; | ||
61 | 58 | ||
62 | return super.preHandle(request, response, handler); | 59 | return super.preHandle(request, response, handler); |
63 | } | 60 | } |
mobsite-getway-web/src/main/java/com/diligrp/mobsite/getway/web/filter/LoginTimeoutInterceptor.java
@@ -49,9 +49,9 @@ public class LoginTimeoutInterceptor extends HandlerInterceptorAdapter { | @@ -49,9 +49,9 @@ public class LoginTimeoutInterceptor extends HandlerInterceptorAdapter { | ||
49 | } | 49 | } |
50 | 50 | ||
51 | //检测token信息 | 51 | //检测token信息 |
52 | - if (!checkTokenInfo(body,request)) { | ||
53 | - return false; | ||
54 | - } | 52 | + //if (!checkTokenInfo(body,request)) { |
53 | + // return false; | ||
54 | + //} | ||
55 | 55 | ||
56 | return super.preHandle(request, response, handler); | 56 | return super.preHandle(request, response, handler); |
57 | } | 57 | } |
mobsite-getway-web/src/main/java/com/diligrp/mobsite/getway/web/filter/WebContentFilter.java
1 | package com.diligrp.mobsite.getway.web.filter; | 1 | package com.diligrp.mobsite.getway.web.filter; |
2 | 2 | ||
3 | -import java.io.IOException; | ||
4 | -import java.util.regex.Pattern; | 3 | +import com.diligrp.mobsite.getway.web.utils.BodyReaderHttpServletRequestWrapper; |
4 | +import com.diligrp.mobsite.getway.web.utils.WebContent; | ||
5 | +import org.apache.commons.lang.StringUtils; | ||
5 | 6 | ||
6 | -import javax.servlet.Filter; | ||
7 | -import javax.servlet.FilterChain; | ||
8 | -import javax.servlet.FilterConfig; | ||
9 | -import javax.servlet.ServletException; | ||
10 | -import javax.servlet.ServletRequest; | ||
11 | -import javax.servlet.ServletResponse; | 7 | +import javax.servlet.*; |
12 | import javax.servlet.http.HttpServletRequest; | 8 | import javax.servlet.http.HttpServletRequest; |
13 | import javax.servlet.http.HttpServletResponse; | 9 | import javax.servlet.http.HttpServletResponse; |
14 | - | ||
15 | -import org.apache.commons.lang.StringUtils; | ||
16 | - | ||
17 | -import com.diligrp.mobsite.getway.web.utils.WebContent; | 10 | +import java.io.IOException; |
11 | +import java.util.regex.Pattern; | ||
18 | 12 | ||
19 | public class WebContentFilter implements Filter { | 13 | public class WebContentFilter implements Filter { |
20 | 14 | ||
@@ -37,9 +31,11 @@ public class WebContentFilter implements Filter { | @@ -37,9 +31,11 @@ public class WebContentFilter implements Filter { | ||
37 | return; | 31 | return; |
38 | } | 32 | } |
39 | try { | 33 | try { |
40 | - WebContent.put((HttpServletRequest) request); | 34 | + HttpServletRequest requestWrapper = new BodyReaderHttpServletRequestWrapper((HttpServletRequest)request); |
35 | + | ||
36 | + WebContent.put(requestWrapper); | ||
41 | WebContent.put((HttpServletResponse) response); | 37 | WebContent.put((HttpServletResponse) response); |
42 | - chain.doFilter(request, response); | 38 | + chain.doFilter(requestWrapper, response); |
43 | } finally { | 39 | } finally { |
44 | WebContent.clean(); | 40 | WebContent.clean(); |
45 | } | 41 | } |
mobsite-getway-web/src/main/java/com/diligrp/mobsite/getway/web/utils/BodyReaderHttpServletRequestWrapper.java
0 → 100644
1 | +package com.diligrp.mobsite.getway.web.utils; | ||
2 | + | ||
3 | +import javax.servlet.ServletInputStream; | ||
4 | +import javax.servlet.http.HttpServletRequest; | ||
5 | +import javax.servlet.http.HttpServletRequestWrapper; | ||
6 | +import java.io.BufferedReader; | ||
7 | +import java.io.ByteArrayInputStream; | ||
8 | +import java.io.IOException; | ||
9 | +import java.io.InputStreamReader; | ||
10 | +import java.nio.charset.Charset; | ||
11 | + | ||
12 | +/** | ||
13 | + * Created by xxxzzz on 2017/1/5. | ||
14 | + */ | ||
15 | +public class BodyReaderHttpServletRequestWrapper extends HttpServletRequestWrapper{ | ||
16 | + | ||
17 | + | ||
18 | + private final byte[] body; | ||
19 | + | ||
20 | + public BodyReaderHttpServletRequestWrapper(HttpServletRequest request) throws IOException { | ||
21 | + super(request); | ||
22 | + body = HttpHelper.getBodyString(request).getBytes(Charset.forName("UTF-8")); | ||
23 | + } | ||
24 | + | ||
25 | + @Override | ||
26 | + public BufferedReader getReader() throws IOException { | ||
27 | + return new BufferedReader(new InputStreamReader(getInputStream())); | ||
28 | + } | ||
29 | + | ||
30 | + @Override | ||
31 | + public ServletInputStream getInputStream() throws IOException { | ||
32 | + | ||
33 | + final ByteArrayInputStream bais = new ByteArrayInputStream(body); | ||
34 | + | ||
35 | + return new ServletInputStream() { | ||
36 | + | ||
37 | + @Override | ||
38 | + public int read() throws IOException { | ||
39 | + return bais.read(); | ||
40 | + } | ||
41 | + | ||
42 | + //@Override | ||
43 | + //public boolean isFinished() { | ||
44 | + // return false; | ||
45 | + //} | ||
46 | + // | ||
47 | + //@Override | ||
48 | + //public boolean isReady() { | ||
49 | + // return false; | ||
50 | + //} | ||
51 | + // | ||
52 | + //@Override | ||
53 | + //public void setReadListener(ReadListener readListener) { | ||
54 | + // | ||
55 | + //} | ||
56 | + }; | ||
57 | + } | ||
58 | +} |
mobsite-getway-web/src/main/java/com/diligrp/mobsite/getway/web/utils/HttpHelper.java
0 → 100644
1 | +package com.diligrp.mobsite.getway.web.utils; | ||
2 | + | ||
3 | +import javax.servlet.ServletRequest; | ||
4 | +import java.io.BufferedReader; | ||
5 | +import java.io.IOException; | ||
6 | +import java.io.InputStream; | ||
7 | +import java.io.InputStreamReader; | ||
8 | +import java.nio.charset.Charset; | ||
9 | + | ||
10 | +/** | ||
11 | + * Created by xxxzzz on 2017/1/5. | ||
12 | + */ | ||
13 | +public class HttpHelper { | ||
14 | + | ||
15 | + /** | ||
16 | + * 获取请求Body | ||
17 | + * | ||
18 | + * @param request | ||
19 | + * @return | ||
20 | + */ | ||
21 | + public static String getBodyString(ServletRequest request) { | ||
22 | + StringBuilder sb = new StringBuilder(); | ||
23 | + InputStream inputStream = null; | ||
24 | + BufferedReader reader = null; | ||
25 | + try { | ||
26 | + inputStream = request.getInputStream(); | ||
27 | + reader = new BufferedReader(new InputStreamReader(inputStream, Charset.forName("UTF-8"))); | ||
28 | + String line = ""; | ||
29 | + while ((line = reader.readLine()) != null) { | ||
30 | + sb.append(line); | ||
31 | + } | ||
32 | + } catch (IOException e) { | ||
33 | + e.printStackTrace(); | ||
34 | + } finally { | ||
35 | + if (inputStream != null) { | ||
36 | + try { | ||
37 | + inputStream.close(); | ||
38 | + } catch (IOException e) { | ||
39 | + e.printStackTrace(); | ||
40 | + } | ||
41 | + } | ||
42 | + if (reader != null) { | ||
43 | + try { | ||
44 | + reader.close(); | ||
45 | + } catch (IOException e) { | ||
46 | + e.printStackTrace(); | ||
47 | + } | ||
48 | + } | ||
49 | + } | ||
50 | + return sb.toString(); | ||
51 | + } | ||
52 | + | ||
53 | +} | ||
0 | \ No newline at end of file | 54 | \ No newline at end of file |
mobsite-getway-web/src/main/java/com/diligrp/mobsite/getway/web/utils/WebContent.java
1 | package com.diligrp.mobsite.getway.web.utils; | 1 | package com.diligrp.mobsite.getway.web.utils; |
2 | 2 | ||
3 | -import java.io.IOException; | ||
4 | -import java.io.UnsupportedEncodingException; | ||
5 | -import java.net.URLEncoder; | ||
6 | -import java.util.HashMap; | ||
7 | -import java.util.Map; | ||
8 | - | ||
9 | -import javax.servlet.http.Cookie; | ||
10 | -import javax.servlet.http.HttpServletRequest; | ||
11 | -import javax.servlet.http.HttpServletResponse; | ||
12 | - | 3 | +import com.diligrp.mobsite.getway.domain.common.ErrorMessage; |
4 | +import com.diligrp.mobsite.getway.domain.common.ResultCode; | ||
5 | +import com.diligrp.mobsite.getway.domain.protocol.BaseResp; | ||
6 | +import com.diligrp.website.util.security.Validator; | ||
13 | import org.apache.commons.io.Charsets; | 7 | import org.apache.commons.io.Charsets; |
14 | import org.apache.commons.io.IOUtils; | 8 | import org.apache.commons.io.IOUtils; |
15 | import org.apache.commons.lang3.StringUtils; | 9 | import org.apache.commons.lang3.StringUtils; |
16 | import org.nutz.json.Json; | 10 | import org.nutz.json.Json; |
17 | import org.slf4j.Logger; | 11 | import org.slf4j.Logger; |
18 | import org.slf4j.LoggerFactory; | 12 | import org.slf4j.LoggerFactory; |
19 | -import org.slf4j.helpers.MessageFormatter; | ||
20 | import org.springframework.context.ApplicationContext; | 13 | import org.springframework.context.ApplicationContext; |
21 | import org.springframework.web.context.support.WebApplicationContextUtils; | 14 | import org.springframework.web.context.support.WebApplicationContextUtils; |
22 | -import org.springframework.web.multipart.MultipartFile; | ||
23 | 15 | ||
24 | -import com.alibaba.fastjson.JSONArray; | ||
25 | -import com.alibaba.fastjson.JSONObject; | ||
26 | -import com.dili.imageserver.sdk.service.ImageUploadService; | ||
27 | -import com.dili.imageserver.sdk.service.UploadOption; | ||
28 | -import com.dili.imageserver.sdk.service.UploadOption.SUPPORTED_CATEGORY_TYPE; | ||
29 | -import com.dili.passport.common.model.DiliAuthTicket; | ||
30 | -import com.diligrp.mobsite.getway.domain.common.ErrorMessage; | ||
31 | -import com.diligrp.mobsite.getway.domain.common.ResultCode; | ||
32 | -import com.diligrp.mobsite.getway.domain.protocol.BaseResp; | ||
33 | -import com.diligrp.website.util.security.Validator; | 16 | +import javax.servlet.http.Cookie; |
17 | +import javax.servlet.http.HttpServletRequest; | ||
18 | +import javax.servlet.http.HttpServletResponse; | ||
19 | +import java.io.IOException; | ||
20 | +import java.io.UnsupportedEncodingException; | ||
21 | +import java.net.URLEncoder; | ||
22 | +import java.util.HashMap; | ||
23 | +import java.util.Map; | ||
34 | 24 | ||
35 | /** | 25 | /** |
36 | * MVC容器 | 26 | * MVC容器 |
@@ -182,109 +172,109 @@ public class WebContent { | @@ -182,109 +172,109 @@ public class WebContent { | ||
182 | e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates. | 172 | e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates. |
183 | } | 173 | } |
184 | } | 174 | } |
185 | - /** | ||
186 | - * | ||
187 | - * this method is 上传图片,返回URL (默认Category为 shop) | ||
188 | - * @param image | ||
189 | - * @return | ||
190 | - * @createTime 2014年5月20日 下午12:09:11 | ||
191 | - * @author yangweidong | ||
192 | - */ | ||
193 | - public static String upload(ImageUploadService imageUploadService,MultipartFile image){ | ||
194 | - return upload(imageUploadService,image,SUPPORTED_CATEGORY_TYPE.SHOP,0); | ||
195 | - } | ||
196 | - | ||
197 | - /** | ||
198 | - * | ||
199 | - * this method is 上传图片,返回URL | ||
200 | - * @param image | ||
201 | - * @return | ||
202 | - * @createTime 2014年5月20日 下午12:09:11 | ||
203 | - * @author yangweidong | ||
204 | - */ | ||
205 | - public static String upload(ImageUploadService imageUploadService,MultipartFile image, SUPPORTED_CATEGORY_TYPE category, int index){ | ||
206 | - UploadOption option = new UploadOption(); | ||
207 | - option.setFileName(image.getOriginalFilename()); | ||
208 | - option.setImageCategory(category); | ||
209 | - option.setFileLength(image.getSize()); | ||
210 | - return upload(imageUploadService,option, image,index); | ||
211 | - } | ||
212 | - | ||
213 | - /** | ||
214 | - * 上传图片到图片服务器,返回第index张图片, 如果index小于0,则返回所有的切图 | ||
215 | - * @param imageUploadService | ||
216 | - * @param option | ||
217 | - * @return | ||
218 | - * @createTime 2014年7月7日 下午3:37:25 | ||
219 | - * @author yangweidong | ||
220 | - */ | ||
221 | - public static String upload(ImageUploadService imageUploadService,UploadOption option,MultipartFile image, int index){ | ||
222 | - return uploadImage(imageUploadService,option,image, index).toJSONString(); | ||
223 | - } | ||
224 | - | ||
225 | - /** | ||
226 | - * 上传图片到图片服务器,返回第一张图片 | ||
227 | - * @param imageUploadService | ||
228 | - * @param option | ||
229 | - * @return | ||
230 | - * @createTime 2014年7月7日 下午3:37:25 | ||
231 | - * @author yangweidong | ||
232 | - */ | ||
233 | - public static String upload(ImageUploadService imageUploadService,UploadOption option,MultipartFile image){ | ||
234 | - return uploadImage(imageUploadService, option, image, 0).toJSONString(); | ||
235 | - } | ||
236 | - | ||
237 | - public static JSONObject uploadImage(ImageUploadService imageUploadService,UploadOption option,MultipartFile image, int index) { | ||
238 | - | ||
239 | - JSONObject jon = new JSONObject(); | ||
240 | - try { | ||
241 | - option.setInputStream(image.getInputStream()); | ||
242 | - } catch (IOException e) { | ||
243 | - if (LOGGER.isErrorEnabled()) { | ||
244 | - DiliAuthTicket userInfo = DiliAuthTicket.getTicket(); | ||
245 | - LOGGER.error( | ||
246 | - MessageFormatter.format("上传图片失败[accountName={}]", | ||
247 | - userInfo.getUsername()).getMessage(), e); | ||
248 | - } | ||
249 | - jon.put("success", false); | ||
250 | - jon.put("message", "读取上传内容失败"); | ||
251 | - return jon; | ||
252 | - } | ||
253 | - //{"code":0,"data":{"OriginalFileName":"11.png","absoluteImgUrl":"/12/01/7C3DB75E3158C6F3F76387E5EEBD3CB5.png","imgUrls":[{"imgUrl":"http://img3.dlimg.com/images/shop/12/01/7C3DB75E3158C6F3F76387E5EEBD3CB5.png"}],"md5":"7C3DB75E3158C6F3F76387E5EEBD3CB5"},"errorMsg":"","success":true} | ||
254 | - String result = imageUploadService.uploadImage(option); | ||
255 | - DiliAuthTicket userInfo = DiliAuthTicket.getTicket(); | ||
256 | - if(Validator.isEmpty(result)) { | ||
257 | - try { | ||
258 | - LOGGER.error(MessageFormatter.format("上传图片失败[accountName={}]", userInfo.getUsername()).getMessage()); | ||
259 | - } catch (Exception e) { | ||
260 | - LOGGER.warn(e.getMessage(), e); | ||
261 | - } | ||
262 | - jon.put("success", false); | ||
263 | - jon.put("message", "读取上传内容失败"); | ||
264 | - return jon; | ||
265 | - } | ||
266 | - JSONObject object = JSONObject.parseObject(result); | ||
267 | - if (!object.getBoolean("success")) { | ||
268 | - if (LOGGER.isWarnEnabled()) { | ||
269 | - try { | ||
270 | - LOGGER.warn( | ||
271 | - MessageFormatter | ||
272 | - .format("上传图片失败[accountName={}, resultcode={}, resultmessage={}]", | ||
273 | - userInfo.getUsername()).getMessage(), | ||
274 | - object.getInteger("code"), object.getString("errorMsg")); | ||
275 | - } catch (Exception e) { | ||
276 | - LOGGER.warn(e.getMessage(), e ); | ||
277 | - } | ||
278 | - } | ||
279 | - jon.put("success", false); | ||
280 | - jon.put("message", object.getString("errorMsg")); | ||
281 | - return jon; | ||
282 | - } | ||
283 | - jon.put("success", true); | ||
284 | - jon.put("shortUrl", object.getJSONObject("data").getString("absoluteImgUrl")); | ||
285 | - JSONArray jonArray = object.getJSONObject("data").getJSONArray("imgUrls"); | ||
286 | - //{"message":"http://img3.dlimg.com/images/shop/12/01/7C3DB75E3158C6F3F76387E5EEBD3CB5.png","shortUrl":"/12/01/7C3DB75E3158C6F3F76387E5EEBD3CB5.png","success":true} | ||
287 | - jon.put("message", (index < 0 ) ? jonArray:jonArray.getJSONObject(index).getString("imgUrl")); //{"message":[{"imgUrl":"http://img3.dlimg.com/images/shop/12/01/7C3DB75E3158C6F3F76387E5EEBD3CB5.png"}],"shortUrl":"/12/01/7C3DB75E3158C6F3F76387E5EEBD3CB5.png","success":true} | ||
288 | - return jon; | ||
289 | - } | 175 | + ///** |
176 | + // * | ||
177 | + // * this method is 上传图片,返回URL (默认Category为 shop) | ||
178 | + // * @param image | ||
179 | + // * @return | ||
180 | + // * @createTime 2014年5月20日 下午12:09:11 | ||
181 | + // * @author yangweidong | ||
182 | + // */ | ||
183 | + //public static String upload(ImageUploadService imageUploadService,MultipartFile image){ | ||
184 | + // return upload(imageUploadService,image,SUPPORTED_CATEGORY_TYPE.SHOP,0); | ||
185 | + //} | ||
186 | + // | ||
187 | + ///** | ||
188 | + // * | ||
189 | + // * this method is 上传图片,返回URL | ||
190 | + // * @param image | ||
191 | + // * @return | ||
192 | + // * @createTime 2014年5月20日 下午12:09:11 | ||
193 | + // * @author yangweidong | ||
194 | + // */ | ||
195 | + //public static String upload(ImageUploadService imageUploadService,MultipartFile image, SUPPORTED_CATEGORY_TYPE category, int index){ | ||
196 | + // UploadOption option = new UploadOption(); | ||
197 | + // option.setFileName(image.getOriginalFilename()); | ||
198 | + // option.setImageCategory(category); | ||
199 | + // option.setFileLength(image.getSize()); | ||
200 | + // return upload(imageUploadService,option, image,index); | ||
201 | + //} | ||
202 | + // | ||
203 | + ///** | ||
204 | + // * 上传图片到图片服务器,返回第index张图片, 如果index小于0,则返回所有的切图 | ||
205 | + // * @param imageUploadService | ||
206 | + // * @param option | ||
207 | + // * @return | ||
208 | + // * @createTime 2014年7月7日 下午3:37:25 | ||
209 | + // * @author yangweidong | ||
210 | + // */ | ||
211 | + //public static String upload(ImageUploadService imageUploadService,UploadOption option,MultipartFile image, int index){ | ||
212 | + // return uploadImage(imageUploadService,option,image, index).toJSONString(); | ||
213 | + //} | ||
214 | + // | ||
215 | + ///** | ||
216 | + // * 上传图片到图片服务器,返回第一张图片 | ||
217 | + // * @param imageUploadService | ||
218 | + // * @param option | ||
219 | + // * @return | ||
220 | + // * @createTime 2014年7月7日 下午3:37:25 | ||
221 | + // * @author yangweidong | ||
222 | + // */ | ||
223 | + //public static String upload(ImageUploadService imageUploadService,UploadOption option,MultipartFile image){ | ||
224 | + // return uploadImage(imageUploadService, option, image, 0).toJSONString(); | ||
225 | + //} | ||
226 | + // | ||
227 | + //public static JSONObject uploadImage(ImageUploadService imageUploadService,UploadOption option,MultipartFile image, int index) { | ||
228 | + // | ||
229 | + // JSONObject jon = new JSONObject(); | ||
230 | + // try { | ||
231 | + // option.setInputStream(image.getInputStream()); | ||
232 | + // } catch (IOException e) { | ||
233 | + // if (LOGGER.isErrorEnabled()) { | ||
234 | + // DiliAuthTicket userInfo = DiliAuthTicket.getTicket(); | ||
235 | + // LOGGER.error( | ||
236 | + // MessageFormatter.format("上传图片失败[accountName={}]", | ||
237 | + // userInfo.getUsername()).getMessage(), e); | ||
238 | + // } | ||
239 | + // jon.put("success", false); | ||
240 | + // jon.put("message", "读取上传内容失败"); | ||
241 | + // return jon; | ||
242 | + // } | ||
243 | + // //{"code":0,"data":{"OriginalFileName":"11.png","absoluteImgUrl":"/12/01/7C3DB75E3158C6F3F76387E5EEBD3CB5.png","imgUrls":[{"imgUrl":"http://img3.dlimg.com/images/shop/12/01/7C3DB75E3158C6F3F76387E5EEBD3CB5.png"}],"md5":"7C3DB75E3158C6F3F76387E5EEBD3CB5"},"errorMsg":"","success":true} | ||
244 | + // String result = imageUploadService.uploadImage(option); | ||
245 | + // DiliAuthTicket userInfo = DiliAuthTicket.getTicket(); | ||
246 | + // if(Validator.isEmpty(result)) { | ||
247 | + // try { | ||
248 | + // LOGGER.error(MessageFormatter.format("上传图片失败[accountName={}]", userInfo.getUsername()).getMessage()); | ||
249 | + // } catch (Exception e) { | ||
250 | + // LOGGER.warn(e.getMessage(), e); | ||
251 | + // } | ||
252 | + // jon.put("success", false); | ||
253 | + // jon.put("message", "读取上传内容失败"); | ||
254 | + // return jon; | ||
255 | + // } | ||
256 | + // JSONObject object = JSONObject.parseObject(result); | ||
257 | + // if (!object.getBoolean("success")) { | ||
258 | + // if (LOGGER.isWarnEnabled()) { | ||
259 | + // try { | ||
260 | + // LOGGER.warn( | ||
261 | + // MessageFormatter | ||
262 | + // .format("上传图片失败[accountName={}, resultcode={}, resultmessage={}]", | ||
263 | + // userInfo.getUsername()).getMessage(), | ||
264 | + // object.getInteger("code"), object.getString("errorMsg")); | ||
265 | + // } catch (Exception e) { | ||
266 | + // LOGGER.warn(e.getMessage(), e ); | ||
267 | + // } | ||
268 | + // } | ||
269 | + // jon.put("success", false); | ||
270 | + // jon.put("message", object.getString("errorMsg")); | ||
271 | + // return jon; | ||
272 | + // } | ||
273 | + // jon.put("success", true); | ||
274 | + // jon.put("shortUrl", object.getJSONObject("data").getString("absoluteImgUrl")); | ||
275 | + // JSONArray jonArray = object.getJSONObject("data").getJSONArray("imgUrls"); | ||
276 | + // //{"message":"http://img3.dlimg.com/images/shop/12/01/7C3DB75E3158C6F3F76387E5EEBD3CB5.png","shortUrl":"/12/01/7C3DB75E3158C6F3F76387E5EEBD3CB5.png","success":true} | ||
277 | + // jon.put("message", (index < 0 ) ? jonArray:jonArray.getJSONObject(index).getString("imgUrl")); //{"message":[{"imgUrl":"http://img3.dlimg.com/images/shop/12/01/7C3DB75E3158C6F3F76387E5EEBD3CB5.png"}],"shortUrl":"/12/01/7C3DB75E3158C6F3F76387E5EEBD3CB5.png","success":true} | ||
278 | + // return jon; | ||
279 | + //} | ||
290 | } | 280 | } |
mobsite-getway-web/src/main/resources/config.properties
@@ -2,8 +2,8 @@ | @@ -2,8 +2,8 @@ | ||
2 | mq.namesrvAddr=${website.messagecenter.namesrvAddr} | 2 | mq.namesrvAddr=${website.messagecenter.namesrvAddr} |
3 | mq.producerGroup=${website.messagecenter.producerGroup} | 3 | mq.producerGroup=${website.messagecenter.producerGroup} |
4 | 4 | ||
5 | -system.shopurl.prefix=http://m.nong12.com/shop/storedetail.do?id=%s | ||
6 | -system.producturl.prefix=http://m.nong12.com/goods/getIntroductionPageById.do?pid=%s | 5 | +#system.shopurl.prefix=http://m.nong12.com/shop/storedetail.do?id=%s |
6 | +#system.producturl.prefix=http://m.nong12.com/goods/getIntroductionPageById.do?pid=%s | ||
7 | system.unname.userid=9999999999999 | 7 | system.unname.userid=9999999999999 |
8 | 8 | ||
9 | #unit: sec, defult: 30 day 2592000 | 9 | #unit: sec, defult: 30 day 2592000 |
@@ -22,7 +22,7 @@ passport.login.passportSign=${passport.login.passportSign} | @@ -22,7 +22,7 @@ passport.login.passportSign=${passport.login.passportSign} | ||
22 | getway.log.isPrintParam=${getway.log.isPrintParam} | 22 | getway.log.isPrintParam=${getway.log.isPrintParam} |
23 | 23 | ||
24 | #登录权限检查地址(后台配置) | 24 | #登录权限检查地址(后台配置) |
25 | -login.permission.url=http://mobapi.nong12.com/mobsiteApp/outverify/user/login.do | 25 | +#login.permission.url=http://mobapi.nong12.com/mobsiteApp/outverify/user/login.do |
26 | #unit: sec, defult: 24 | 26 | #unit: sec, defult: 24 |
27 | guardlogin.timeout.second=86400 | 27 | guardlogin.timeout.second=86400 |
28 | #供应消息过期时间 单位:天 | 28 | #供应消息过期时间 单位:天 |
mobsite-getway-web/src/main/resources/db.properties
1 | ##dataSource | 1 | ##dataSource |
2 | -bonecp.driverClass=${project.dbpool.driverClass} | ||
3 | -bonecp.jdbcUrl=${project.dbpool.jdbcUrl} | ||
4 | -bonecp.username=${project.dbpool.username} | ||
5 | -bonecp.password=${project.dbpool.password} | ||
6 | -bonecp.idleConnectionTestPeriodInMinutes=${project.dbpool.idleConnectionTestPeriodInMinutes} | ||
7 | -bonecp.idleMaxAgeInMinutes=${project.dbpool.idleMaxAgeInMinutes} | ||
8 | -bonecp.partitionCount=${project.dbpool.partitionCount} | ||
9 | -bonecp.maxConnectionsPerPartition=${project.dbpool.maxConnectionsPerPartition} | ||
10 | -bonecp.minConnectionsPerPartition=${project.dbpool.minConnectionsPerPartition} | ||
11 | -bonecp.acquireIncrement=${project.dbpool.acquireIncrement} | ||
12 | -bonecp.statementsCacheSize=${project.dbpool.statementsCacheSize} | ||
13 | -bonecp.releaseHelperThreads=${project.dbpool.releaseHelperThreads} | 2 | + |
14 | 3 | ||
15 | jdbc.jdbcUrl=${project.dbpool.jdbcUrl} | 4 | jdbc.jdbcUrl=${project.dbpool.jdbcUrl} |
16 | jdbc.username=${project.dbpool.username} | 5 | jdbc.username=${project.dbpool.username} |
mobsite-getway-web/src/main/resources/log4j.xml
@@ -12,7 +12,7 @@ | @@ -12,7 +12,7 @@ | ||
12 | <param name="Append" value="true" /> | 12 | <param name="Append" value="true" /> |
13 | <param name="BufferedIO" value="true" /> | 13 | <param name="BufferedIO" value="true" /> |
14 | <param name="BufferSize" value="8192" /> | 14 | <param name="BufferSize" value="8192" /> |
15 | - <param name="File" value="${catalina.base}/logs/getway.log" /> | 15 | + <param name="File" value="${catalina.base}/logs/gateway.log" /> |
16 | <param name="DatePattern" value="'.'yyyy-MM-dd'.log'" /> | 16 | <param name="DatePattern" value="'.'yyyy-MM-dd'.log'" /> |
17 | <layout class="org.apache.log4j.PatternLayout"> | 17 | <layout class="org.apache.log4j.PatternLayout"> |
18 | <param name="ConversionPattern" value="%d{yyyy-MM-dd HH:mm:ss}:%p %l - %m%n" /> | 18 | <param name="ConversionPattern" value="%d{yyyy-MM-dd HH:mm:ss}:%p %l - %m%n" /> |
pom.xml
@@ -250,11 +250,11 @@ | @@ -250,11 +250,11 @@ | ||
250 | <version>0.0.1-SNAPSHOT</version> | 250 | <version>0.0.1-SNAPSHOT</version> |
251 | </dependency> | 251 | </dependency> |
252 | 252 | ||
253 | - <dependency> | ||
254 | - <groupId>com.diligrp</groupId> | ||
255 | - <artifactId>image-server-sdk</artifactId> | ||
256 | - <version>1.0.10</version> | ||
257 | - </dependency> | 253 | + <!--<dependency>--> |
254 | + <!--<groupId>com.diligrp</groupId>--> | ||
255 | + <!--<artifactId>image-server-sdk</artifactId>--> | ||
256 | + <!--<version>1.0.10</version>--> | ||
257 | + <!--</dependency>--> | ||
258 | 258 | ||
259 | <dependency> | 259 | <dependency> |
260 | <groupId>javolution</groupId> | 260 | <groupId>javolution</groupId> |