Commit 207329b4878a9a054b822377f582a156c5bb9d4e
Merge branch 'dev' of http://git3.nong12.com/b2c/gateway into dev
# Conflicts: # .gitignore # mobsite-getway-rpc/src/main/java/com/diligrp/mobsite/getway/rpc/OrderRPC.java # mobsite-getway-rpc/src/main/java/com/diligrp/mobsite/getway/rpc/impl/OrderRPCImpl.java # mobsite-getway-rpc/src/main/java/com/diligrp/mobsite/getway/rpc/seller/SellerOrderRPC.java # mobsite-getway-rpc/src/main/java/com/diligrp/mobsite/getway/rpc/seller/impl/SellerOrderRPCImpl.java
Showing
75 changed files
with
2166 additions
and
686 deletions
.gitignore
1 | +#target/ | |
2 | +target/ | |
3 | + | |
4 | +# IDEA # | |
5 | +.idea/ | |
1 | 6 | *.iml |
2 | -.idea | |
7 | + | |
8 | +# Eclipse # | |
9 | +.settings/ | |
3 | 10 | .classpath |
4 | -*/target/ | |
5 | -*/webapp/WEB-INF/classes | |
6 | -*/webapp/WEB-INF/lib | |
7 | -*.MF | |
8 | -**/WEB-INF/classes/ | |
9 | -**/WEB-INF/lib | |
10 | -**/.settings/ | |
11 | -**/.classpath | |
12 | -**/.project | |
13 | 11 | \ No newline at end of file |
12 | +.project | |
13 | + | |
14 | +# Log # | |
15 | +logs/ | |
16 | +*.log% | |
17 | + | |
18 | +#mac | |
19 | +.DS_Store | |
20 | + | |
21 | +#svn | |
22 | +.svn | |
14 | 23 | \ No newline at end of file | ... | ... |
mobsite-getway-domain/src/main/java/com/diligrp/mobsite/getway/domain/protocol/detail/GetShopCategoryResp.java
1 | 1 | package com.diligrp.mobsite.getway.domain.protocol.detail; |
2 | 2 | |
3 | -import java.util.List; | |
4 | - | |
5 | 3 | import com.diligrp.mobsite.getway.domain.protocol.BaseResp; |
6 | 4 | import com.diligrp.mobsite.getway.domain.protocol.ShopCategory; |
7 | 5 | |
6 | +import java.util.List; | |
7 | + | |
8 | 8 | /** |
9 | 9 | * <B>Description</B> 返回店铺自定义分类 <br /> |
10 | 10 | * <B>Copyright</B> Copyright (c) 2014 www.diligrp.com All rights reserved. <br /> |
... | ... | @@ -19,26 +19,14 @@ public class GetShopCategoryResp extends BaseResp { |
19 | 19 | /** |
20 | 20 | * 店铺自定义分类信息 |
21 | 21 | */ |
22 | - private List<ShopCategory> categorys; | |
22 | + private List<ShopCategory> categories; | |
23 | 23 | |
24 | - /** | |
25 | - * get value of GetShopCategoryResp.categorys | |
26 | - * @return the categorys | |
27 | - * @createTime Aug 18, 2014 11:21:43 AM | |
28 | - * @author wujianjun | |
29 | - */ | |
30 | - public List<ShopCategory> getCategorys() { | |
31 | - return categorys; | |
32 | - } | |
33 | 24 | |
34 | - /** | |
35 | - * set value of GetShopCategoryResp.categorys | |
36 | - * @param categorys the categorys to set | |
37 | - * @createTime Aug 18, 2014 11:21:43 AM | |
38 | - * @author wujianjun | |
39 | - */ | |
40 | - public void setCategorys(List<ShopCategory> categorys) { | |
41 | - this.categorys = categorys; | |
25 | + public List<ShopCategory> getCategories() { | |
26 | + return categories; | |
42 | 27 | } |
43 | 28 | |
29 | + public void setCategories(List<ShopCategory> categories) { | |
30 | + this.categories = categories; | |
31 | + } | |
44 | 32 | } | ... | ... |
mobsite-getway-domain/src/main/java/com/diligrp/mobsite/getway/domain/protocol/fund/GetFundsReq.java
1 | 1 | package com.diligrp.mobsite.getway.domain.protocol.fund; |
2 | 2 | |
3 | 3 | import com.diligrp.mobsite.getway.domain.protocol.BaseReq; |
4 | +import io.swagger.annotations.ApiModelProperty; | |
4 | 5 | |
5 | 6 | /** |
6 | 7 | * Created by xxxzzz on 2017/1/3. |
7 | 8 | */ |
8 | 9 | public class GetFundsReq extends BaseReq { |
10 | + @ApiModelProperty(value = "搜索关键词") | |
11 | + private String keyword; | |
12 | + @ApiModelProperty(value="店铺ID") | |
13 | + private Long shopId; | |
14 | + | |
15 | + public String getKeyword() { | |
16 | + return keyword; | |
17 | + } | |
18 | + | |
19 | + public void setKeyword(String keyword) { | |
20 | + this.keyword = keyword; | |
21 | + } | |
22 | + | |
23 | + public Long getShopId() { | |
24 | + return shopId; | |
25 | + } | |
26 | + | |
27 | + public void setShopId(Long shopId) { | |
28 | + this.shopId = shopId; | |
29 | + } | |
9 | 30 | } | ... | ... |
mobsite-getway-domain/src/main/java/com/diligrp/mobsite/getway/domain/protocol/fund/GetFundsResp.java
1 | 1 | package com.diligrp.mobsite.getway.domain.protocol.fund; |
2 | 2 | |
3 | +import com.b2c.myapp.common.api.shop.output.ShopOutput; | |
4 | +import com.b2c.myapp.common.api.shopBuyer.output.ShopBuyerDetailOutput; | |
3 | 5 | import com.diligrp.mobsite.getway.domain.base.BaseListResp; |
4 | 6 | import io.swagger.annotations.ApiModelProperty; |
5 | 7 | |
8 | +import java.util.List; | |
9 | + | |
6 | 10 | /** |
7 | 11 | * Created by xxxzzz on 2017/1/3. |
8 | 12 | */ |
9 | 13 | public class GetFundsResp extends BaseListResp { |
10 | - | |
11 | - | |
12 | - @ApiModelProperty(value = "储值总金额") | |
14 | + /** | |
15 | + * 店铺储值总金额 | |
16 | + */ | |
17 | + @ApiModelProperty(value = "店铺储值总金额") | |
13 | 18 | private Long storedTotalPrice; |
14 | - | |
15 | - @ApiModelProperty(value = "可用余额") | |
19 | + /** | |
20 | + * 店铺可用余额 | |
21 | + */ | |
22 | + @ApiModelProperty(value = "店铺可用余额") | |
16 | 23 | private Long residueTotalPrice; |
17 | - | |
18 | - @ApiModelProperty(value = "冻结总金额") | |
24 | + /** | |
25 | + * 店铺冻结总金额 | |
26 | + */ | |
27 | + @ApiModelProperty(value = "店铺冻结总金额") | |
19 | 28 | private Long freezeTotalPrice; |
20 | 29 | |
21 | - @ApiModelProperty(value = "用户名称") | |
22 | - private String userName ; | |
23 | - | |
24 | - @ApiModelProperty(value = "用户头像") | |
25 | - private String headImg ; | |
26 | - | |
27 | - public String getHeadImg() { | |
28 | - return headImg; | |
30 | + private List<ShopBuyerDetailOutput> shopBuyers; | |
31 | + public List<ShopBuyerDetailOutput> getShopBuyers() { | |
32 | + return shopBuyers; | |
29 | 33 | } |
30 | 34 | |
31 | - public void setHeadImg(String headImg) { | |
32 | - this.headImg = headImg; | |
33 | - } | |
34 | - | |
35 | - public String getUserName() { | |
36 | - return userName; | |
37 | - } | |
38 | - | |
39 | - public void setUserName(String userName) { | |
40 | - this.userName = userName; | |
35 | + public void setShopBuyers(List<ShopBuyerDetailOutput> shopBuyers) { | |
36 | + this.shopBuyers = shopBuyers; | |
41 | 37 | } |
42 | 38 | |
43 | 39 | public Long getStoredTotalPrice() { |
... | ... | @@ -63,6 +59,4 @@ public class GetFundsResp extends BaseListResp { |
63 | 59 | public void setFreezeTotalPrice(Long freezeTotalPrice) { |
64 | 60 | this.freezeTotalPrice = freezeTotalPrice; |
65 | 61 | } |
66 | - | |
67 | - | |
68 | 62 | } | ... | ... |
mobsite-getway-domain/src/main/java/com/diligrp/mobsite/getway/domain/protocol/fund/GetfundTradeRecordReq.java
... | ... | @@ -11,6 +11,8 @@ public class GetfundTradeRecordReq extends BaseListReq { |
11 | 11 | |
12 | 12 | @ApiModelProperty(value = "查询类型(1:充值 2:冻结4:消费)" ,required = true) |
13 | 13 | private Long tradeType; |
14 | + @ApiModelProperty(value = "店铺用户ID,绑定的唯一标识") | |
15 | + private Long shopBuyerId; | |
14 | 16 | |
15 | 17 | public Long getTradeType() { |
16 | 18 | return tradeType; |
... | ... | @@ -19,4 +21,12 @@ public class GetfundTradeRecordReq extends BaseListReq { |
19 | 21 | public void setTradeType(Long tradeType) { |
20 | 22 | this.tradeType = tradeType; |
21 | 23 | } |
24 | + | |
25 | + public Long getShopBuyerId() { | |
26 | + return shopBuyerId; | |
27 | + } | |
28 | + | |
29 | + public void setShopBuyerId(Long shopBuyerId) { | |
30 | + this.shopBuyerId = shopBuyerId; | |
31 | + } | |
22 | 32 | } | ... | ... |
mobsite-getway-domain/src/main/java/com/diligrp/mobsite/getway/domain/protocol/fund/GetfundTradeRecordResp.java
... | ... | @@ -16,6 +16,9 @@ public class GetfundTradeRecordResp extends BaseListResp { |
16 | 16 | @ApiModelProperty(value = "储值时间/消费时间") |
17 | 17 | private String tradeTime; |
18 | 18 | |
19 | + @ApiModelProperty(value = "交易类型") | |
20 | + private Long tradeType; | |
21 | + | |
19 | 22 | //@ApiModelProperty(value = "储值余额/消费时间") |
20 | 23 | //private Long residueTotalPrice; |
21 | 24 | |
... | ... | @@ -35,4 +38,12 @@ public class GetfundTradeRecordResp extends BaseListResp { |
35 | 38 | public void setTradeTime(String tradeTime) { |
36 | 39 | this.tradeTime = tradeTime; |
37 | 40 | } |
41 | + | |
42 | + public Long getTradeType() { | |
43 | + return tradeType; | |
44 | + } | |
45 | + | |
46 | + public void setTradeType(Long tradeType) { | |
47 | + this.tradeType = tradeType; | |
48 | + } | |
38 | 49 | } | ... | ... |
mobsite-getway-domain/src/main/java/com/diligrp/mobsite/getway/domain/protocol/login/AuthLoginReq.java
0 → 100644
1 | +package com.diligrp.mobsite.getway.domain.protocol.login; | |
2 | + | |
3 | +import com.diligrp.mobsite.getway.domain.protocol.BaseReq; | |
4 | +import io.swagger.annotations.ApiModelProperty; | |
5 | + | |
6 | +import javax.validation.constraints.NotNull; | |
7 | + | |
8 | +/** | |
9 | + * <B>Description</B> 登录请求 <br /> | |
10 | + * <B>Copyright</B> Copyright (c) 2014 www.diligrp.com All rights reserved. <br /> | |
11 | + * 本软件源代码版权归地利集团,未经许可不得任意复制与传播.<br /> | |
12 | + * <B>Company</B> 地利集团 | |
13 | + * @createTime Aug 12, 2014 7:57:01 PM | |
14 | + * @author wujianjun | |
15 | + */ | |
16 | +public class AuthLoginReq extends BaseReq { | |
17 | + | |
18 | + /** | |
19 | + * 会员名称 | |
20 | + */ | |
21 | + @NotNull(message = "账号不能为空") | |
22 | + @ApiModelProperty(value = "登录账号",required = true) | |
23 | + private String accountName; | |
24 | + | |
25 | + /** | |
26 | + * 验证码 | |
27 | + */ | |
28 | + @ApiModelProperty(value = "验证码",required = true) | |
29 | + private String authCode; | |
30 | + | |
31 | + | |
32 | + //极光ID | |
33 | + @ApiModelProperty(value = "极光ID") | |
34 | + private String registerNo; | |
35 | + | |
36 | + | |
37 | + public AuthLoginReq() { | |
38 | + } | |
39 | + | |
40 | + public String getRegisterNo() { | |
41 | + return registerNo; | |
42 | + } | |
43 | + | |
44 | + public void setRegisterNo(String registerNo) { | |
45 | + this.registerNo = registerNo; | |
46 | + } | |
47 | + | |
48 | + /** | |
49 | + * get value of LoginReq.accountName | |
50 | + * @return the accountName | |
51 | + * @createTime Aug 12, 2014 7:58:27 PM | |
52 | + * @author wujianjun | |
53 | + */ | |
54 | + public String getAccountName() { | |
55 | + return accountName; | |
56 | + } | |
57 | + | |
58 | + /** | |
59 | + * set value of LoginReq.accountName | |
60 | + * @param accountName the accountName to set | |
61 | + * @createTime Aug 12, 2014 7:58:27 PM | |
62 | + * @author wujianjun | |
63 | + */ | |
64 | + public void setAccountName(String accountName) { | |
65 | + this.accountName = accountName; | |
66 | + } | |
67 | + | |
68 | + | |
69 | +} | ... | ... |
mobsite-getway-domain/src/main/java/com/diligrp/mobsite/getway/domain/protocol/login/CheckVeriCodeReq.java
... | ... | @@ -19,12 +19,12 @@ public class CheckVeriCodeReq extends BaseReq { |
19 | 19 | /** |
20 | 20 | * 手机验证码 |
21 | 21 | */ |
22 | - @ApiModelProperty(value = "验证码") | |
22 | + @ApiModelProperty(value = "验证码",required = true) | |
23 | 23 | private String veriCode; |
24 | 24 | /** |
25 | 25 | * 手机号码 |
26 | 26 | */ |
27 | - @ApiModelProperty(value = "手机号码") | |
27 | + @ApiModelProperty(value = "手机号码",required = true) | |
28 | 28 | private String mobile; |
29 | 29 | /** |
30 | 30 | * 消息类型 | ... | ... |
mobsite-getway-domain/src/main/java/com/diligrp/mobsite/getway/domain/protocol/login/CheckVeriCodeResp.java
1 | 1 | package com.diligrp.mobsite.getway.domain.protocol.login; |
2 | 2 | |
3 | 3 | import com.diligrp.mobsite.getway.domain.protocol.BaseResp; |
4 | - | |
4 | +import io.swagger.annotations.ApiModelProperty; | |
5 | 5 | |
6 | 6 | |
7 | 7 | /** |
... | ... | @@ -22,7 +22,7 @@ public class CheckVeriCodeResp extends BaseResp { |
22 | 22 | /** |
23 | 23 | * 验证结果:1-验证码正确,2验证码错误 |
24 | 24 | */ |
25 | - @Deprecated | |
25 | + @ApiModelProperty(value = "验证结果:1-验证码正确,2验证码错误") | |
26 | 26 | private Integer checkFlag = CHECK_FLAG_RIGHT; |
27 | 27 | |
28 | 28 | ... | ... |
mobsite-getway-domain/src/main/java/com/diligrp/mobsite/getway/domain/protocol/login/LoginReq.java
... | ... | @@ -28,14 +28,15 @@ public class LoginReq extends BaseReq { |
28 | 28 | @ApiModelProperty(value = "登录密码",required = true) |
29 | 29 | private String password; |
30 | 30 | |
31 | - /** | |
32 | - * 密码 | |
33 | - */ | |
34 | - @ApiModelProperty(value = "验证码") | |
35 | - private String authCode; | |
31 | + ///** | |
32 | + // * 验证码 | |
33 | + // */ | |
34 | + //@ApiModelProperty(value = "验证码") | |
35 | + //private String authCode; | |
36 | 36 | |
37 | 37 | |
38 | 38 | //极光ID |
39 | + @ApiModelProperty(value = "极光ID") | |
39 | 40 | private String registerNo; |
40 | 41 | |
41 | 42 | ... | ... |
mobsite-getway-domain/src/main/java/com/diligrp/mobsite/getway/domain/protocol/login/LoginResp.java
... | ... | @@ -57,7 +57,7 @@ public class LoginResp extends BaseResp { |
57 | 57 | /** |
58 | 58 | * 账户ID |
59 | 59 | */ |
60 | - @ApiModelProperty(value = "账号") | |
60 | + @ApiModelProperty(value = "用户id") | |
61 | 61 | private Long accountId; |
62 | 62 | /** |
63 | 63 | * 账户名 |
... | ... | @@ -69,25 +69,25 @@ public class LoginResp extends BaseResp { |
69 | 69 | */ |
70 | 70 | @ApiModelProperty(value = "手机号码") |
71 | 71 | private String mobile; |
72 | - /** | |
73 | - * 邮箱地址 | |
74 | - */ | |
75 | - @ApiModelProperty(value = "邮箱") | |
76 | - private String email; | |
77 | - /** | |
78 | - * 1:个人用户, 2:企业用户 | |
79 | - */ | |
80 | - @ApiModelProperty(value = "用户类型:个人用户,2:企业用户") | |
81 | - private Integer userType; | |
82 | - /** | |
83 | - * 1 登入 -1 登出 (出场验货专用) | |
84 | - */ | |
85 | - private Integer accountState; | |
86 | - /** | |
87 | - * 真实姓名 | |
88 | - */ | |
89 | - @ApiModelProperty(value = "真实姓名") | |
90 | - private String realName; | |
72 | + ///** | |
73 | + // * 邮箱地址 | |
74 | + // */ | |
75 | + //@ApiModelProperty(value = "邮箱") | |
76 | + //private String email; | |
77 | + ///** | |
78 | + // * 1:个人用户, 2:企业用户 | |
79 | + // */ | |
80 | + //@ApiModelProperty(value = "用户类型:个人用户,2:企业用户") | |
81 | + //private Integer userType; | |
82 | + ///** | |
83 | + // * 1 登入 -1 登出 (出场验货专用) | |
84 | + // */ | |
85 | + //private Integer accountState; | |
86 | + ///** | |
87 | + // * 真实姓名 | |
88 | + // */ | |
89 | + //@ApiModelProperty(value = "真实姓名") | |
90 | + //private String realName; | |
91 | 91 | /** |
92 | 92 | * 登录之后,passport返回 |
93 | 93 | * 用于支付鉴权 |
... | ... | @@ -165,67 +165,9 @@ public class LoginResp extends BaseResp { |
165 | 165 | this.mobile = mobile; |
166 | 166 | } |
167 | 167 | |
168 | - /** | |
169 | - * get value of LoginResp.email | |
170 | - * @return the email | |
171 | - * @createTime Aug 13, 2014 9:58:39 AM | |
172 | - * @author wujianjun | |
173 | - */ | |
174 | - public String getEmail() { | |
175 | - return email; | |
176 | - } | |
177 | - | |
178 | - /** | |
179 | - * set value of LoginResp.email | |
180 | - * @param email the email to set | |
181 | - * @createTime Aug 13, 2014 9:58:39 AM | |
182 | - * @author wujianjun | |
183 | - */ | |
184 | - public void setEmail(String email) { | |
185 | - this.email = email; | |
186 | - } | |
187 | 168 | |
188 | - /** | |
189 | - * get value of LoginResp.userType | |
190 | - * @return the userType | |
191 | - * @createTime Aug 13, 2014 9:58:39 AM | |
192 | - * @author wujianjun | |
193 | - */ | |
194 | - public Integer getUserType() { | |
195 | - return userType; | |
196 | - } | |
197 | 169 | |
198 | - /** | |
199 | - * set value of LoginResp.userType | |
200 | - * @param userType the userType to set | |
201 | - * @createTime Aug 13, 2014 9:58:39 AM | |
202 | - * @author wujianjun | |
203 | - */ | |
204 | - public void setUserType(Integer userType) { | |
205 | - this.userType = userType; | |
206 | - } | |
207 | - | |
208 | - /** | |
209 | - * get value of LoginResp.accountState | |
210 | - * @return the accountState | |
211 | - * @createTime Aug 13, 2014 9:58:39 AM | |
212 | - * @author wujianjun | |
213 | - */ | |
214 | - public Integer getAccountState() { | |
215 | - return accountState; | |
216 | - } | |
217 | - | |
218 | - /** | |
219 | - * set value of LoginResp.accountState | |
220 | - * @param accountState the accountState to set | |
221 | - * @createTime Aug 13, 2014 9:58:39 AM | |
222 | - * @author wujianjun | |
223 | - */ | |
224 | - public void setAccountState(Integer accountState) { | |
225 | - this.accountState = accountState; | |
226 | - } | |
227 | - | |
228 | - public String getToken() { | |
170 | + public String getToken() { | |
229 | 171 | return token; |
230 | 172 | } |
231 | 173 | |
... | ... | @@ -234,17 +176,7 @@ public class LoginResp extends BaseResp { |
234 | 176 | this.token = token; |
235 | 177 | } |
236 | 178 | |
237 | - | |
238 | - public String getRealName() { | |
239 | - return realName; | |
240 | - } | |
241 | - | |
242 | - | |
243 | - public void setRealName(String realName) { | |
244 | - this.realName = realName; | |
245 | - } | |
246 | 179 | |
247 | - | |
248 | 180 | public String getHeadImg() { |
249 | 181 | return headImg; |
250 | 182 | } | ... | ... |
mobsite-getway-domain/src/main/java/com/diligrp/mobsite/getway/domain/protocol/login/SendVeriCodeReq.java
mobsite-getway-domain/src/main/java/com/diligrp/mobsite/getway/domain/protocol/login/SendVeriCodeResp.java
... | ... | @@ -28,11 +28,12 @@ public class SendVeriCodeResp extends BaseResp { |
28 | 28 | /** |
29 | 29 | * 发送结果 |
30 | 30 | */ |
31 | - @ApiModelProperty(value = "发送结果") | |
31 | + @ApiModelProperty(value = "发送结果:1成功") | |
32 | 32 | private Integer sendCode = SEND_CODE_ERROR; |
33 | 33 | /** |
34 | 34 | * 万能验证码 |
35 | 35 | */ |
36 | + @ApiModelProperty(value = "万能验证码") | |
36 | 37 | private String passKey; |
37 | 38 | |
38 | 39 | /** | ... | ... |
mobsite-getway-domain/src/main/java/com/diligrp/mobsite/getway/domain/protocol/register/CheckMobileReq.java
1 | 1 | package com.diligrp.mobsite.getway.domain.protocol.register; |
2 | 2 | |
3 | 3 | import com.diligrp.mobsite.getway.domain.protocol.BaseReq; |
4 | +import io.swagger.annotations.ApiModelProperty; | |
4 | 5 | |
5 | 6 | /** |
6 | 7 | * <B>Description</B> 检测用户手机号码是否合法 <br /> |
... | ... | @@ -16,6 +17,7 @@ public class CheckMobileReq extends BaseReq { |
16 | 17 | /** |
17 | 18 | * 需要检测的手机号码 |
18 | 19 | */ |
20 | + @ApiModelProperty(value="手机号",required = true) | |
19 | 21 | private String mobile; |
20 | 22 | |
21 | 23 | /** | ... | ... |
mobsite-getway-domain/src/main/java/com/diligrp/mobsite/getway/domain/protocol/register/SellerRegisterReq.java
0 → 100644
1 | +package com.diligrp.mobsite.getway.domain.protocol.register; | |
2 | + | |
3 | +import com.diligrp.mobsite.getway.domain.protocol.BaseReq; | |
4 | +import io.swagger.annotations.ApiModel; | |
5 | +import io.swagger.annotations.ApiModelProperty; | |
6 | + | |
7 | +/** | |
8 | + * <B>Description</B> 注册个人用户请求 <br /> | |
9 | + * <B>Copyright</B> Copyright (c) 2014 www.diligrp.com All rights reserved. <br /> | |
10 | + * 本软件源代码版权归地利集团,未经许可不得任意复制与传播.<br /> | |
11 | + * <B>Company</B> 地利集团 | |
12 | + * @createTime Aug 12, 2014 7:48:27 PM | |
13 | + * @author wujianjun | |
14 | + */ | |
15 | +@ApiModel(value = "请求参数") | |
16 | +public class SellerRegisterReq extends BaseReq { | |
17 | + | |
18 | + public static final int USER_TYPE_BUSINESS = 1;//市场商户,企业单位,个体经营,个人 | |
19 | + | |
20 | + public static final int USER_TYPE_COMPANY = 2; | |
21 | + | |
22 | + public static final int USER_TYPE_PERSONMANAGE = 3; | |
23 | + | |
24 | + public static final int USER_TYPE_PERSON = 4; | |
25 | + | |
26 | + public static final int APPTYPE_SHEQU = 1; | |
27 | + | |
28 | + public static final int APPTYPE_LIANSUO = 2; | |
29 | + | |
30 | + /** | |
31 | + * 手机号码 | |
32 | + */ | |
33 | + @ApiModelProperty(value = "手机号码",required = true) | |
34 | + protected String mobile; | |
35 | + | |
36 | + /** | |
37 | + * 密码 | |
38 | + */ | |
39 | + @ApiModelProperty(value = "密码",required = true) | |
40 | + protected String password; | |
41 | + | |
42 | + /** | |
43 | + * 手机验证码 | |
44 | + */ | |
45 | + @ApiModelProperty(value = "手机验证码",required = true) | |
46 | + private String veriCode; | |
47 | + | |
48 | + /** | |
49 | + * 手机验证码 | |
50 | + */ | |
51 | + @ApiModelProperty(value = "app类型(1:社区店版,2:连锁店 ,默认传1)") | |
52 | + private Integer appType = APPTYPE_SHEQU; | |
53 | + | |
54 | + | |
55 | + public String getMobile() { | |
56 | + return mobile; | |
57 | + } | |
58 | + | |
59 | + public void setMobile(String mobile) { | |
60 | + this.mobile = mobile; | |
61 | + } | |
62 | + | |
63 | + public String getPassword() { | |
64 | + return password; | |
65 | + } | |
66 | + | |
67 | + public void setPassword(String password) { | |
68 | + this.password = password; | |
69 | + } | |
70 | + | |
71 | + public String getVeriCode() { | |
72 | + return veriCode; | |
73 | + } | |
74 | + | |
75 | + public void setVeriCode(String veriCode) { | |
76 | + this.veriCode = veriCode; | |
77 | + } | |
78 | + | |
79 | + public Integer getAppType() { | |
80 | + return appType; | |
81 | + } | |
82 | + | |
83 | + public void setAppType(Integer appType) { | |
84 | + this.appType = appType; | |
85 | + } | |
86 | +} | ... | ... |
mobsite-getway-domain/src/main/java/com/diligrp/mobsite/getway/domain/protocol/register/SellerRegisterResp.java
0 → 100644
1 | +package com.diligrp.mobsite.getway.domain.protocol.register; | |
2 | + | |
3 | +import com.diligrp.mobsite.getway.domain.protocol.BaseResp; | |
4 | +import io.swagger.annotations.ApiModelProperty; | |
5 | + | |
6 | + | |
7 | +/** | |
8 | + * <B>Description</B> 注册个人用户请求响应 <br /> | |
9 | + * <B>Copyright</B> Copyright (c) 2014 www.diligrp.com All rights reserved. <br /> | |
10 | + * 本软件源代码版权归地利集团,未经许可不得任意复制与传播.<br /> | |
11 | + * <B>Company</B> 地利集团 | |
12 | + * @createTime Aug 12, 2014 7:48:58 PM | |
13 | + * @author wujianjun | |
14 | + */ | |
15 | +@SuppressWarnings("serial") | |
16 | +public class SellerRegisterResp extends BaseResp { | |
17 | + | |
18 | + /** | |
19 | + * 注册结果 | |
20 | + * 注册成功-1 | |
21 | + */ | |
22 | + public static final int RESULT_FLAG_SUCCESS=1; | |
23 | + /** | |
24 | + * 注册失败-2 | |
25 | + */ | |
26 | + public static final int RESULT_FLAG_FAILED=2; | |
27 | + /** | |
28 | + * 验证码错误-3 | |
29 | + */ | |
30 | + public static final int RESULT_FLAG_VERICODE_WRONG=3; | |
31 | + /** | |
32 | + * 手机号已经注册-4 | |
33 | + */ | |
34 | + public static final int RESULT_FLAG_PHONE_REGISTERED=4; | |
35 | + /** | |
36 | + * 账号已经被注册-5 | |
37 | + */ | |
38 | + public static final Integer RESULT_FLAG_ACCOUNTNAME_REGISTERED=5; | |
39 | + | |
40 | + | |
41 | + /** | |
42 | + * 注册结果 | |
43 | + */ | |
44 | + @ApiModelProperty(value = "注册结果") | |
45 | + private Integer resultFlag = RESULT_FLAG_SUCCESS; | |
46 | + | |
47 | + /** | |
48 | + * get value of RegisterPersonalResp.resultFlag | |
49 | + * @return the resultFlag | |
50 | + * @createTime 2014年8月28日 下午5:19:41 | |
51 | + * @author zhangshirui | |
52 | + */ | |
53 | + public Integer getResultFlag() { | |
54 | + return resultFlag; | |
55 | + } | |
56 | + | |
57 | + /** | |
58 | + * set value of RegisterPersonalResp.resultFlag | |
59 | + * @param resultFlag the resultFlag to set | |
60 | + * @createTime 2014年8月28日 下午5:19:41 | |
61 | + * @author zhangshirui | |
62 | + */ | |
63 | + public void setResultFlag(Integer resultFlag) { | |
64 | + this.resultFlag = resultFlag; | |
65 | + } | |
66 | + | |
67 | +} | ... | ... |
mobsite-getway-domain/src/main/java/com/diligrp/mobsite/getway/domain/protocol/shop/CreateOrUpdateShopReq.java renamed to mobsite-getway-domain/src/main/java/com/diligrp/mobsite/getway/domain/protocol/shop/CreateShopReq.java
... | ... | @@ -13,7 +13,7 @@ import java.util.List; |
13 | 13 | * <B>Company</B> 地利集团 |
14 | 14 | * @author wujiaqiang |
15 | 15 | */ |
16 | -public class CreateOrUpdateShopReq extends BaseReq { | |
16 | +public class CreateShopReq extends BaseReq { | |
17 | 17 | |
18 | 18 | |
19 | 19 | |
... | ... | @@ -30,7 +30,7 @@ public class CreateOrUpdateShopReq extends BaseReq { |
30 | 30 | private String shopLogo; |
31 | 31 | |
32 | 32 | @ApiModelProperty(value = "主营类目") |
33 | - private List<Category> catagorys; | |
33 | + private List<Category> categories; | |
34 | 34 | |
35 | 35 | |
36 | 36 | |
... | ... | @@ -91,12 +91,12 @@ public class CreateOrUpdateShopReq extends BaseReq { |
91 | 91 | } |
92 | 92 | |
93 | 93 | |
94 | - public List<Category> getCatagorys() { | |
95 | - return catagorys; | |
94 | + public List<Category> getCategories() { | |
95 | + return categories; | |
96 | 96 | } |
97 | 97 | |
98 | - public void setCatagorys(List<Category> catagorys) { | |
99 | - this.catagorys = catagorys; | |
98 | + public void setCategories(List<Category> categories) { | |
99 | + this.categories = categories; | |
100 | 100 | } |
101 | 101 | |
102 | 102 | public Integer getProductDisplayWay() { | ... | ... |
mobsite-getway-domain/src/main/java/com/diligrp/mobsite/getway/domain/protocol/shop/CreateOrUpdateShopResp.java renamed to mobsite-getway-domain/src/main/java/com/diligrp/mobsite/getway/domain/protocol/shop/CreateShopResp.java
mobsite-getway-domain/src/main/java/com/diligrp/mobsite/getway/domain/protocol/shop/GetShopInfoResp.java
... | ... | @@ -24,7 +24,7 @@ public class GetShopInfoResp extends BaseResp { |
24 | 24 | private String shopLogo; |
25 | 25 | |
26 | 26 | @ApiModelProperty(value = "主营类目") |
27 | - private List<Category> catagorys; | |
27 | + private List<Category> categories; | |
28 | 28 | |
29 | 29 | |
30 | 30 | |
... | ... | @@ -85,12 +85,12 @@ public class GetShopInfoResp extends BaseResp { |
85 | 85 | } |
86 | 86 | |
87 | 87 | |
88 | - public List<Category> getCatagorys() { | |
89 | - return catagorys; | |
88 | + public List<Category> getCategories() { | |
89 | + return categories; | |
90 | 90 | } |
91 | 91 | |
92 | - public void setCatagorys(List<Category> catagorys) { | |
93 | - this.catagorys = catagorys; | |
92 | + public void setCategories(List<Category> categories) { | |
93 | + this.categories = categories; | |
94 | 94 | } |
95 | 95 | |
96 | 96 | public Integer getProductDisplayWay() { | ... | ... |
mobsite-getway-domain/src/main/java/com/diligrp/mobsite/getway/domain/protocol/shop/UpdateShopReq.java
0 → 100644
1 | +package com.diligrp.mobsite.getway.domain.protocol.shop; | |
2 | + | |
3 | +import com.diligrp.mobsite.getway.domain.protocol.BaseReq; | |
4 | +import com.diligrp.mobsite.getway.domain.protocol.Category; | |
5 | +import io.swagger.annotations.ApiModelProperty; | |
6 | + | |
7 | +import java.util.List; | |
8 | + | |
9 | +/** | |
10 | + * <B>Description</B> 路线管理-获取线路信息 <br /> | |
11 | + * <B>Copyright</B> Copyright (c) 2014 www.diligrp.com All rights reserved. <br /> | |
12 | + * 本软件源代码版权归地利集团,未经许可不得任意复制与传播.<br /> | |
13 | + * <B>Company</B> 地利集团 | |
14 | + * @author wujiaqiang | |
15 | + */ | |
16 | +public class UpdateShopReq extends BaseReq { | |
17 | + | |
18 | + | |
19 | + | |
20 | + @ApiModelProperty(value = "店铺Id") | |
21 | + private Long shopId; | |
22 | + | |
23 | + @ApiModelProperty(value = "城市code") | |
24 | + private Long cityCode; | |
25 | + | |
26 | + @ApiModelProperty(value = "城市名称") | |
27 | + private String cityName; | |
28 | + | |
29 | + @ApiModelProperty(value = "店铺名称") | |
30 | + private String shopName; | |
31 | + | |
32 | + @ApiModelProperty(value = "店铺logo") | |
33 | + private String shopLogo; | |
34 | + | |
35 | + @ApiModelProperty(value = "主营类目") | |
36 | + private List<Category> categories; | |
37 | + | |
38 | + | |
39 | + | |
40 | + @ApiModelProperty(value = "店铺地址") | |
41 | + private String shopAddr; | |
42 | + | |
43 | + @ApiModelProperty(value = "客户电话") | |
44 | + private String phone; | |
45 | + | |
46 | + | |
47 | + @ApiModelProperty(value = "商品排列方式(1:两列式 2:列表式)") | |
48 | + private Integer productDisplayWay; | |
49 | + | |
50 | + @ApiModelProperty(value = "配送费") | |
51 | + private Long postage; | |
52 | + | |
53 | + @ApiModelProperty(value = "订单免配送费金额") | |
54 | + private Long freeShippingPrice; | |
55 | + | |
56 | + @ApiModelProperty(value = "店铺公告") | |
57 | + private String shopNotices; | |
58 | + | |
59 | + @ApiModelProperty(value = "送货时间段") | |
60 | + private List<String> deliveryTime; | |
61 | + | |
62 | + | |
63 | + public Long getShopId() { | |
64 | + return shopId; | |
65 | + } | |
66 | + | |
67 | + public void setShopId(Long shopId) { | |
68 | + this.shopId = shopId; | |
69 | + } | |
70 | + | |
71 | + public Long getCityCode() { | |
72 | + return cityCode; | |
73 | + } | |
74 | + | |
75 | + public void setCityCode(Long cityCode) { | |
76 | + this.cityCode = cityCode; | |
77 | + } | |
78 | + | |
79 | + public String getCityName() { | |
80 | + return cityName; | |
81 | + } | |
82 | + | |
83 | + public void setCityName(String cityName) { | |
84 | + this.cityName = cityName; | |
85 | + } | |
86 | + | |
87 | + public String getShopName() { | |
88 | + return shopName; | |
89 | + } | |
90 | + | |
91 | + public void setShopName(String shopName) { | |
92 | + this.shopName = shopName; | |
93 | + } | |
94 | + | |
95 | + public String getShopLogo() { | |
96 | + return shopLogo; | |
97 | + } | |
98 | + | |
99 | + public void setShopLogo(String shopLogo) { | |
100 | + this.shopLogo = shopLogo; | |
101 | + } | |
102 | + | |
103 | + | |
104 | + public List<Category> getCategories() { | |
105 | + return categories; | |
106 | + } | |
107 | + | |
108 | + public void setCategories(List<Category> categories) { | |
109 | + this.categories = categories; | |
110 | + } | |
111 | + | |
112 | + public Integer getProductDisplayWay() { | |
113 | + return productDisplayWay; | |
114 | + } | |
115 | + | |
116 | + public void setProductDisplayWay(Integer productDisplayWay) { | |
117 | + this.productDisplayWay = productDisplayWay; | |
118 | + } | |
119 | + | |
120 | + public Long getPostage() { | |
121 | + return postage; | |
122 | + } | |
123 | + | |
124 | + public void setPostage(Long postage) { | |
125 | + this.postage = postage; | |
126 | + } | |
127 | + | |
128 | + public Long getFreeShippingPrice() { | |
129 | + return freeShippingPrice; | |
130 | + } | |
131 | + | |
132 | + public void setFreeShippingPrice(Long freeShippingPrice) { | |
133 | + this.freeShippingPrice = freeShippingPrice; | |
134 | + } | |
135 | + | |
136 | + public String getShopNotices() { | |
137 | + return shopNotices; | |
138 | + } | |
139 | + | |
140 | + public void setShopNotices(String shopNotices) { | |
141 | + this.shopNotices = shopNotices; | |
142 | + } | |
143 | + | |
144 | + public List<String> getDeliveryTime() { | |
145 | + return deliveryTime; | |
146 | + } | |
147 | + | |
148 | + public void setDeliveryTime(List<String> deliveryTime) { | |
149 | + this.deliveryTime = deliveryTime; | |
150 | + } | |
151 | + | |
152 | + public String getShopAddr() { | |
153 | + return shopAddr; | |
154 | + } | |
155 | + | |
156 | + public void setShopAddr(String shopAddr) { | |
157 | + this.shopAddr = shopAddr; | |
158 | + } | |
159 | + | |
160 | + public String getPhone() { | |
161 | + return phone; | |
162 | + } | |
163 | + | |
164 | + public void setPhone(String phone) { | |
165 | + this.phone = phone; | |
166 | + } | |
167 | +} | ... | ... |
mobsite-getway-rpc/src/main/java/com/diligrp/mobsite/getway/rpc/seller/SellerProductRPC.java renamed to mobsite-getway-domain/src/main/java/com/diligrp/mobsite/getway/domain/protocol/shop/UpdateShopResp.java
1 | -package com.diligrp.mobsite.getway.rpc.seller; | |
1 | +package com.diligrp.mobsite.getway.domain.protocol.shop; | |
2 | + | |
3 | +import com.diligrp.mobsite.getway.domain.protocol.BaseResp; | |
2 | 4 | |
3 | 5 | /** |
4 | - * <B>Description</B> 验证rpc <br /> | |
6 | + * <B>Description</B> 路线管理-获取线路信息 <br /> | |
5 | 7 | * <B>Copyright</B> Copyright (c) 2014 www.diligrp.com All rights reserved. <br /> |
6 | 8 | * 本软件源代码版权归地利集团,未经许可不得任意复制与传播.<br /> |
7 | 9 | * <B>Company</B> 地利集团 |
8 | - * | |
9 | - * @author duanyugen | |
10 | + * @author wujiaqiang | |
10 | 11 | */ |
11 | -public interface SellerProductRPC { | |
12 | +public class UpdateShopResp extends BaseResp { | |
12 | 13 | |
13 | 14 | |
14 | -} | |
15 | + } | ... | ... |
mobsite-getway-domain/src/main/java/com/diligrp/mobsite/getway/domain/protocol/user/ModifyPwdReq.java
... | ... | @@ -19,23 +19,25 @@ public class ModifyPwdReq extends BaseReq { |
19 | 19 | /** |
20 | 20 | * 验证码 |
21 | 21 | */ |
22 | - private String authCode; | |
22 | + //@ApiModelProperty(value = "验证码",required = true) | |
23 | + //private String authCode; | |
23 | 24 | |
24 | 25 | /** |
25 | 26 | * 新的密码 |
26 | 27 | */ |
27 | - @ApiModelProperty(value = "新密码") | |
28 | + @ApiModelProperty(value = "新密码",required = true) | |
28 | 29 | private String password; |
29 | 30 | |
30 | - /** | |
31 | - * 重复新密码 | |
32 | - */ | |
33 | - @ApiModelProperty(value = "重复新密码") | |
34 | - private String repPassword; | |
31 | + ///** | |
32 | + // * 重复新密码 | |
33 | + // */ | |
34 | + //@ApiModelProperty(value = "重复新密码",required = true) | |
35 | + //private String repPassword; | |
35 | 36 | |
36 | 37 | /** |
37 | - * 用户账号 | |
38 | + * 手机号 | |
38 | 39 | */ |
40 | + @ApiModelProperty(value = "账号(手机号)",required = true) | |
39 | 41 | private String accountName; |
40 | 42 | |
41 | 43 | /** |
... | ... | @@ -81,32 +83,32 @@ public class ModifyPwdReq extends BaseReq { |
81 | 83 | } |
82 | 84 | |
83 | 85 | |
84 | - /** | |
85 | - * get value of ModifyPwdReq.authCode | |
86 | - * @return the authCode | |
87 | - * @createTime 2015年1月24日 下午4:50:08 | |
88 | - * @author zhangshirui | |
89 | - */ | |
90 | - public String getAuthCode() { | |
91 | - return authCode; | |
92 | - } | |
86 | + ///** | |
87 | + // * get value of ModifyPwdReq.authCode | |
88 | + // * @return the authCode | |
89 | + // * @createTime 2015年1月24日 下午4:50:08 | |
90 | + // * @author zhangshirui | |
91 | + // */ | |
92 | + //public String getAuthCode() { | |
93 | + // return authCode; | |
94 | + //} | |
95 | + // | |
96 | + // | |
97 | + ///** | |
98 | + // * set value of ModifyPwdReq.authCode | |
99 | + // * @param authCode the authCode to set | |
100 | + // * @createTime 2015年1月24日 下午4:50:08 | |
101 | + // * @author zhangshirui | |
102 | + // */ | |
103 | + //public void setAuthCode(String authCode) { | |
104 | + // this.authCode = authCode; | |
105 | + //} | |
93 | 106 | |
94 | - | |
95 | - /** | |
96 | - * set value of ModifyPwdReq.authCode | |
97 | - * @param authCode the authCode to set | |
98 | - * @createTime 2015年1月24日 下午4:50:08 | |
99 | - * @author zhangshirui | |
100 | - */ | |
101 | - public void setAuthCode(String authCode) { | |
102 | - this.authCode = authCode; | |
103 | - } | |
104 | - | |
105 | - public String getRepPassword() { | |
106 | - return repPassword; | |
107 | - } | |
108 | - | |
109 | - public void setRepPassword(String repPassword) { | |
110 | - this.repPassword = repPassword; | |
111 | - } | |
107 | + //public String getRepPassword() { | |
108 | + // return repPassword; | |
109 | + //} | |
110 | + // | |
111 | + //public void setRepPassword(String repPassword) { | |
112 | + // this.repPassword = repPassword; | |
113 | + //} | |
112 | 114 | } | ... | ... |
mobsite-getway-rpc/src/main/java/com/diligrp/mobsite/getway/rpc/buyer/CmsRPC.java renamed to mobsite-getway-rpc/src/main/java/com/diligrp/mobsite/getway/rpc/CmsRPC.java
mobsite-getway-rpc/src/main/java/com/diligrp/mobsite/getway/rpc/buyer/ConfigRPC.java renamed to mobsite-getway-rpc/src/main/java/com/diligrp/mobsite/getway/rpc/ConfigRPC.java
mobsite-getway-rpc/src/main/java/com/diligrp/mobsite/getway/rpc/buyer/GoodsRPC.java renamed to mobsite-getway-rpc/src/main/java/com/diligrp/mobsite/getway/rpc/GoodsRPC.java
... | ... | @@ -7,7 +7,7 @@ |
7 | 7 | * @date: 2014年8月14日 上午11:20:17 |
8 | 8 | * @version: V1.0 |
9 | 9 | */ |
10 | -package com.diligrp.mobsite.getway.rpc.buyer; | |
10 | +package com.diligrp.mobsite.getway.rpc; | |
11 | 11 | |
12 | 12 | import com.diligrp.mobsite.getway.domain.protocol.GoodsSuper; |
13 | 13 | import com.diligrp.titan.sdk.domain.Attribute; | ... | ... |
mobsite-getway-rpc/src/main/java/com/diligrp/mobsite/getway/rpc/buyer/MarketRPC.java renamed to mobsite-getway-rpc/src/main/java/com/diligrp/mobsite/getway/rpc/MarketRPC.java
mobsite-getway-rpc/src/main/java/com/diligrp/mobsite/getway/rpc/buyer/MessageRPC.java renamed to mobsite-getway-rpc/src/main/java/com/diligrp/mobsite/getway/rpc/MessageRPC.java
mobsite-getway-rpc/src/main/java/com/diligrp/mobsite/getway/rpc/OrderRPC.java
0 → 100644
1 | +package com.diligrp.mobsite.getway.rpc; | |
2 | + | |
3 | +import com.b2c.orders.domain.client.dto.request.OrderListRequestDto; | |
4 | +import com.b2c.orders.domain.client.dto.response.OrderListResponseDto; | |
5 | +import com.diligrp.mobsite.getway.domain.protocol.ProductAppraise; | |
6 | +import com.diligrp.titan.sdk.output.PageOutput; | |
7 | + | |
8 | +import java.util.List; | |
9 | + | |
10 | + | |
11 | +/** | |
12 | + * <B>Description</B> 订单 <br /> | |
13 | + * <B>Copyright</B> Copyright (c) 2014 www.diligrp.com All rights reserved. <br /> | |
14 | + * 本软件源代码版权归地利集团,未经许可不得任意复制与传播.<br /> | |
15 | + * <B>Company</B> 地利集团 | |
16 | + * @createTime 2014年9月1日 下午6:30:54 | |
17 | + * @author zhangshirui | |
18 | + */ | |
19 | +public interface OrderRPC { | |
20 | + | |
21 | + /** | |
22 | + * 获取订单列表 | |
23 | + * @param input | |
24 | + * @param userId | |
25 | + * @return | |
26 | + * @createTime 2014年9月2日 下午2:36:47 | |
27 | + * @author zhangshirui | |
28 | + */ | |
29 | + PageOutput<List<OrderListResponseDto>> getOrders(OrderListRequestDto input, Long userId); | |
30 | + | |
31 | + /** | |
32 | + * 根据id查询订单详情 | |
33 | + * @param orderId | |
34 | + * @param userId | |
35 | + * @createTime 2014年9月3日 上午11:08:03 | |
36 | + * @author zhangshirui | |
37 | + * @return | |
38 | + */ | |
39 | + OrderListResponseDto getOrderById(Long orderId, Long userId); | |
40 | + | |
41 | + /** | |
42 | + * 取消订单 | |
43 | + * @param orderId | |
44 | + * @param reason | |
45 | + * @param userId | |
46 | + * @return | |
47 | + * @createTime 2014年9月3日 上午11:27:08 | |
48 | + * @author zhangshirui | |
49 | + */ | |
50 | + Integer cancelOrder(Long orderId, String reason, Long userId); | |
51 | + | |
52 | + | |
53 | + /** | |
54 | + * 确认提货 | |
55 | + * @param orderId | |
56 | + * @param userId | |
57 | + * @return | |
58 | + * @createTime 2014年9月3日 下午4:46:26 | |
59 | + * @author zhangshirui | |
60 | + */ | |
61 | + Integer confirmPickUp(Long orderId, String paytoken, Long userId); | |
62 | + | |
63 | + | |
64 | + | |
65 | + | |
66 | + /** | |
67 | + * 发布商品评价 | |
68 | + * @param productAppraises | |
69 | + * @param userId | |
70 | + */ | |
71 | + void addComment(List<ProductAppraise> productAppraises, Long orderId, Long userId); | |
72 | + | |
73 | + | |
74 | + | |
75 | + | |
76 | +} | ... | ... |
mobsite-getway-rpc/src/main/java/com/diligrp/mobsite/getway/rpc/buyer/PassportRPC.java renamed to mobsite-getway-rpc/src/main/java/com/diligrp/mobsite/getway/rpc/PassportRPC.java
mobsite-getway-rpc/src/main/java/com/diligrp/mobsite/getway/rpc/SellerRPC.java
0 → 100644
1 | +package com.diligrp.mobsite.getway.rpc; | |
2 | + | |
3 | +import com.b2c.myapp.common.api.buyerInfo.output.BuyerInfoOutput; | |
4 | +import com.b2c.myapp.common.api.sellerInfo.output.SellerInfoOutput; | |
5 | +import com.diligrp.mobsite.getway.domain.protocol.ConsigneeInfo; | |
6 | +import com.diligrp.mobsite.getway.domain.protocol.cart.ModifyAmountReq; | |
7 | + | |
8 | +import java.util.List; | |
9 | + | |
10 | + | |
11 | +/** | |
12 | + * <B>Description</B> userrpc <br /> | |
13 | + * <B>Copyright</B> Copyright (c) 2014 www.diligrp.com All rights reserved. <br /> | |
14 | + * 本软件源代码版权归地利集团,未经许可不得任意复制与传播.<br /> | |
15 | + * <B>Company</B> 地利集团 | |
16 | + * | |
17 | + * @author wujianjun | |
18 | + * @createTime Aug 19, 2014 2:33:16 PM | |
19 | + */ | |
20 | +public interface SellerRPC { | |
21 | + | |
22 | + | |
23 | + | |
24 | + /** | |
25 | + * 验证电话号码是否存在 | |
26 | + * | |
27 | + * 没有被使用:true | |
28 | + * 已经被使用:false | |
29 | + * | |
30 | + * @param mobile | |
31 | + * @return | |
32 | + * @createTime 2014年8月27日 下午2:31:07 | |
33 | + * @author zhangshirui | |
34 | + */ | |
35 | + boolean checkMobile(String mobile); | |
36 | + | |
37 | + | |
38 | + /** | |
39 | + * 修改进货单数量 | |
40 | + * @param req | |
41 | + * @return | |
42 | + * @createTime 2015年3月9日 下午2:49:27 | |
43 | + * @author zhangshirui | |
44 | + */ | |
45 | + boolean modifyAmount(ModifyAmountReq req); | |
46 | + | |
47 | + /** | |
48 | + * 修改密码 | |
49 | + * @param accountName | |
50 | + * @param newPassword | |
51 | + * @return | |
52 | + * @createTime 2014年8月28日 下午3:01:49 | |
53 | + * @author zhangshirui | |
54 | + */ | |
55 | + boolean modifyPwd(String accountName, String newPassword); | |
56 | + | |
57 | + Long addConsignee(ConsigneeInfo consigneeInfo, Long userId); | |
58 | + | |
59 | + boolean updateConsignee(ConsigneeInfo consigneeInfo, Long userId); | |
60 | + | |
61 | + ConsigneeInfo getConsignee(Long id); | |
62 | + | |
63 | + boolean delConsignee(Long id); | |
64 | + | |
65 | + List<ConsigneeInfo> getConsigneeByUserId(Long userId); | |
66 | + | |
67 | + ConsigneeInfo getDefaultConsignee(Long userId); | |
68 | + | |
69 | + boolean setDefaultConsignee(Long id, Long userId); | |
70 | + | |
71 | + | |
72 | + /** | |
73 | + * 密码加密 | |
74 | + * @param pwd | |
75 | + * @return | |
76 | + * @createTime 2014年9月19日 上午10:04:35 | |
77 | + * @author zhangshirui | |
78 | + */ | |
79 | + String getEncryptPwd(String pwd); | |
80 | + | |
81 | + | |
82 | + | |
83 | + /** | |
84 | + * 验证用户密码 | |
85 | + * @param userId | |
86 | + * @param password | |
87 | + * @return | |
88 | + * @createTime 2015年6月24日 下午1:45:53 | |
89 | + * @author zhangshirui | |
90 | + */ | |
91 | + boolean checkPassword(Long userId, String password); | |
92 | + | |
93 | + | |
94 | + BuyerInfoOutput getUserByMobile(String accountName); | |
95 | + | |
96 | + SellerInfoOutput getSellerByMobile(String accountName); | |
97 | +} | ... | ... |
mobsite-getway-rpc/src/main/java/com/diligrp/mobsite/getway/rpc/ShopBuyerRPC.java
0 → 100644
1 | +package com.diligrp.mobsite.getway.rpc; | |
2 | + | |
3 | +import com.b2c.myapp.common.api.shopBuyer.input.ShopBuyerDetail; | |
4 | +import com.b2c.myapp.common.api.shopBuyer.input.ShopBuyerListInput; | |
5 | +import com.b2c.myapp.common.api.shopBuyer.output.ShopBuyerDetailOutput; | |
6 | +import com.b2c.myapp.common.api.shopBuyer.output.ShopBuyerKeyOutput; | |
7 | +import com.b2c.myapp.common.api.shopBuyer.output.ShopBuyerOutput; | |
8 | +import com.b2c.myapp.common.utils.BaseOutput; | |
9 | +import com.b2c.myapp.common.utils.base.Page; | |
10 | + | |
11 | +import java.util.List; | |
12 | + | |
13 | +/** | |
14 | + * Created by jiangchengyong on 2017/1/10. | |
15 | + */ | |
16 | +public interface ShopBuyerRPC { | |
17 | + /** | |
18 | + * @comment 查找店铺所有买家列表 | |
19 | + * @param shopBuyerDetail 店铺买家对象 | |
20 | + * @return Page<ShopBuyerDetailOutput> | |
21 | + * @author kelan | |
22 | + * @time 2016/12/1 9:59 | |
23 | + */ | |
24 | + public Page<ShopBuyerDetailOutput> queryShopAllBuyerList(ShopBuyerDetail shopBuyerDetail); | |
25 | + /** | |
26 | + * 绑定并激活(查询买家是否绑定相关店铺,未绑定直接绑定,已绑定直接激活) | |
27 | + * @param buyerId | |
28 | + * @param promoCode | |
29 | + * @return | |
30 | + */ | |
31 | + ShopBuyerOutput bindAndActivate(Long buyerId,Long promoCode); | |
32 | + | |
33 | + /** | |
34 | + * 获取店铺用户的相关主键信息(buyId、shopId、sellerId) | |
35 | + * @param shopBuyerId | |
36 | + * @return | |
37 | + */ | |
38 | + ShopBuyerKeyOutput getShopBuyerKeys(Long shopBuyerId); | |
39 | +} | ... | ... |
mobsite-getway-rpc/src/main/java/com/diligrp/mobsite/getway/rpc/ShopRPC.java
0 → 100644
1 | +package com.diligrp.mobsite.getway.rpc; | |
2 | + | |
3 | +import com.b2c.myapp.common.api.shop.input.ShopListInput; | |
4 | +import com.b2c.myapp.common.api.shop.input.ShopSaveInput; | |
5 | +import com.b2c.myapp.common.api.shop.input.ShopUpdateInput; | |
6 | +import com.b2c.myapp.common.api.shop.output.ShopOutput; | |
7 | +import com.b2c.myapp.common.utils.BaseOutput; | |
8 | +import com.diligrp.mobsite.getway.domain.protocol.ProductCategory; | |
9 | +import com.diligrp.mobsite.getway.domain.protocol.ShopIntroduction; | |
10 | +import com.diligrp.mobsite.getway.domain.protocol.shop.model.ShopInfo; | |
11 | + | |
12 | +import java.util.List; | |
13 | + | |
14 | +/** | |
15 | + * <BDescription</B <br / | |
16 | + * <BCopyright</B Copyright (c) 2015 www.diligrp.com All rights reserved. <br / | |
17 | + * 本软件源代码版权归地利集团,未经许可不得任意复制与传播.<br / | |
18 | + * <BCompany</B 地利集团 | |
19 | + * @createTime 2015年6月10日 下午1:40:21 | |
20 | + * @author zhangshirui | |
21 | + */ | |
22 | +public interface ShopRPC { | |
23 | + | |
24 | + | |
25 | + /** | |
26 | + * @comment 创建店铺 | |
27 | + * @param shopSaveInput 店铺基本信息 | |
28 | + * @return Integer | |
29 | + * @author kelan | |
30 | + * @time 2016/11/29 19:03 | |
31 | + */ | |
32 | + public Integer createShopInfo(ShopSaveInput shopSaveInput); | |
33 | + /** | |
34 | + * @comment 通过卖家id获取店铺信息 | |
35 | + * @param sellerId 卖家id | |
36 | + * @return ShopOutput | |
37 | + * @author kelan | |
38 | + * @time 2016/11/29 18:54 | |
39 | + */ | |
40 | + public ShopOutput getShopBySellerId(Long sellerId); | |
41 | + /** | |
42 | + * @comment 通过店铺id获取店铺信息 | |
43 | + * @param shopId 店铺id | |
44 | + * @return ShopOutput | |
45 | + * @author kelan | |
46 | + * @time 2016/12/2 10:15 | |
47 | + */ | |
48 | + public ShopOutput getShopByShopId(Long shopId); | |
49 | + /** | |
50 | + * @comment 多字段条件查询店铺信息 | |
51 | + * @param shopListInput 多字段条件查询 | |
52 | + * @return ShopOutput | |
53 | + * @author kelan | |
54 | + * @time 2016/11/30 10:00 | |
55 | + */ | |
56 | + public ShopOutput getShopInfo(ShopListInput shopListInput); | |
57 | + /** | |
58 | + * @comment 修改店铺基本信息 | |
59 | + * @param shopUpdateInput | |
60 | + * @return Integer | |
61 | + * @author kelan | |
62 | + * @time 2016/11/30 15:43 | |
63 | + */ | |
64 | + public Boolean modifyShopBasicInfo(ShopUpdateInput shopUpdateInput); | |
65 | + | |
66 | +} | ... | ... |
mobsite-getway-rpc/src/main/java/com/diligrp/mobsite/getway/rpc/buyer/StationMsgRPC.java renamed to mobsite-getway-rpc/src/main/java/com/diligrp/mobsite/getway/rpc/StationMsgRPC.java
mobsite-getway-rpc/src/main/java/com/diligrp/mobsite/getway/rpc/buyer/StoreRPC.java renamed to mobsite-getway-rpc/src/main/java/com/diligrp/mobsite/getway/rpc/StoreRPC.java
mobsite-getway-rpc/src/main/java/com/diligrp/mobsite/getway/rpc/buyer/UserRPC.java renamed to mobsite-getway-rpc/src/main/java/com/diligrp/mobsite/getway/rpc/UserRPC.java
1 | -package com.diligrp.mobsite.getway.rpc.buyer; | |
1 | +package com.diligrp.mobsite.getway.rpc; | |
2 | 2 | |
3 | +import com.b2c.myapp.common.api.buyerInfo.output.BuyerInfoOutput; | |
3 | 4 | import com.diligrp.mobsite.getway.domain.protocol.AddCartProduct; |
4 | 5 | import com.diligrp.mobsite.getway.domain.protocol.ConsigneeInfo; |
5 | 6 | import com.diligrp.mobsite.getway.domain.protocol.cart.ModifyAmountReq; |
... | ... | @@ -138,4 +139,5 @@ public interface UserRPC { |
138 | 139 | boolean checkPassword(Long userId, String password); |
139 | 140 | |
140 | 141 | |
142 | + BuyerInfoOutput getUserByMobile(String accountName); | |
141 | 143 | } | ... | ... |
mobsite-getway-rpc/src/main/java/com/diligrp/mobsite/getway/rpc/buyer/ShopRPC.java deleted
100644 → 0
1 | -package com.diligrp.mobsite.getway.rpc.buyer; | |
2 | - | |
3 | -import com.diligrp.mobsite.getway.domain.protocol.ProductCategory; | |
4 | -import com.diligrp.mobsite.getway.domain.protocol.ShopIntroduction; | |
5 | -import com.diligrp.mobsite.getway.domain.protocol.shop.model.ShopInfo; | |
6 | - | |
7 | -import java.util.List; | |
8 | - | |
9 | -/** | |
10 | - * <B>Description</B> <br /> | |
11 | - * <B>Copyright</B> Copyright (c) 2015 www.diligrp.com All rights reserved. <br /> | |
12 | - * 本软件源代码版权归地利集团,未经许可不得任意复制与传播.<br /> | |
13 | - * <B>Company</B> 地利集团 | |
14 | - * @createTime 2015年6月10日 下午1:40:21 | |
15 | - * @author zhangshirui | |
16 | - */ | |
17 | -public interface ShopRPC { | |
18 | - | |
19 | - | |
20 | - /** | |
21 | - * 查询店铺分类信息 | |
22 | - * @param shopId | |
23 | - * @return | |
24 | - * @createTime 2015年6月10日 下午4:35:14 | |
25 | - * @author zhangshirui | |
26 | - */ | |
27 | - List<ProductCategory> getShopCategory(Long shopId); | |
28 | - | |
29 | - /** | |
30 | - * 根据店铺id,查询推荐商品信息 | |
31 | - * @param shopId | |
32 | - * @return | |
33 | - * @createTime 2015年6月11日 下午6:09:41 | |
34 | - * @author zhangshirui | |
35 | - */ | |
36 | - List<Long> getRecommendProducts(Long shopId); | |
37 | - | |
38 | - /** | |
39 | - * 根据店铺id查询店铺简介 | |
40 | - * @param shopId | |
41 | - * @return | |
42 | - * @createTime 2015年6月12日 上午10:37:02 | |
43 | - * @author zhangshirui | |
44 | - */ | |
45 | - ShopIntroduction getShopIntroductionById(Long shopId); | |
46 | - | |
47 | - /** | |
48 | - * 根据用户id查询店铺简介 | |
49 | - * @param userId | |
50 | - * @return | |
51 | - * @createTime 2015年6月12日 上午10:38:32 | |
52 | - * @author zhangshirui | |
53 | - */ | |
54 | - ShopIntroduction getShopIntroductionByUserId(Long userId); | |
55 | - | |
56 | - /** | |
57 | - * 根据二级域名查询店铺信息 | |
58 | - * @param domain | |
59 | - * @return | |
60 | - * @createTime 2015年6月25日 下午3:42:24 | |
61 | - * @author zhangshirui | |
62 | - */ | |
63 | - ShopInfo getShopInfoByDomain(String domain); | |
64 | - | |
65 | - | |
66 | - | |
67 | - /** | |
68 | - * 根据用户信息查询店铺信息 | |
69 | - * @param userId | |
70 | - * @return | |
71 | - * @createTime 2015年8月1日 上午10:53:23 | |
72 | - * @author zhangshirui | |
73 | - */ | |
74 | - ShopInfo getShopInfoByUser(Long userId); | |
75 | - | |
76 | -} |
mobsite-getway-rpc/src/main/java/com/diligrp/mobsite/getway/rpc/buyer/impl/CmsRPCImpl.java renamed to mobsite-getway-rpc/src/main/java/com/diligrp/mobsite/getway/rpc/impl/CmsRPCImpl.java
1 | -package com.diligrp.mobsite.getway.rpc.buyer.impl; | |
1 | +package com.diligrp.mobsite.getway.rpc.impl; | |
2 | 2 | |
3 | 3 | import com.alibaba.fastjson.JSON; |
4 | 4 | import com.diligrp.cms.domain.*; |
5 | 5 | import com.diligrp.cms.sdk.CmsClient; |
6 | 6 | import com.diligrp.mobsite.getway.domain.except.ServiceException; |
7 | -import com.diligrp.mobsite.getway.rpc.buyer.CmsRPC; | |
7 | +import com.diligrp.mobsite.getway.rpc.CmsRPC; | |
8 | 8 | import org.slf4j.Logger; |
9 | 9 | import org.slf4j.LoggerFactory; |
10 | 10 | import org.springframework.stereotype.Service; | ... | ... |
mobsite-getway-rpc/src/main/java/com/diligrp/mobsite/getway/rpc/buyer/impl/ConfigRPCImpl.java renamed to mobsite-getway-rpc/src/main/java/com/diligrp/mobsite/getway/rpc/impl/ConfigRPCImpl.java
1 | -package com.diligrp.mobsite.getway.rpc.buyer.impl; | |
1 | +package com.diligrp.mobsite.getway.rpc.impl; | |
2 | 2 | |
3 | 3 | import com.diligrp.mobsite.getway.domain.common.Constant; |
4 | 4 | import com.diligrp.mobsite.getway.domain.common.RedisKey; |
5 | 5 | import com.diligrp.mobsite.getway.domain.except.ServiceException; |
6 | -import com.diligrp.mobsite.getway.rpc.buyer.ConfigRPC; | |
6 | +import com.diligrp.mobsite.getway.rpc.ConfigRPC; | |
7 | 7 | import com.diligrp.website.util.redis.RedisUtil; |
8 | 8 | import com.diligrp.website.util.security.Validator; |
9 | 9 | import com.diligrp.website.web.interfaces.WebsiteClient; | ... | ... |
mobsite-getway-rpc/src/main/java/com/diligrp/mobsite/getway/rpc/buyer/impl/GoodsRPCImpl.java renamed to mobsite-getway-rpc/src/main/java/com/diligrp/mobsite/getway/rpc/impl/GoodsRPCImpl.java
... | ... | @@ -7,14 +7,14 @@ |
7 | 7 | * @date: 2014年8月14日 上午11:21:21 |
8 | 8 | * @version: V1.0 |
9 | 9 | */ |
10 | -package com.diligrp.mobsite.getway.rpc.buyer.impl; | |
10 | +package com.diligrp.mobsite.getway.rpc.impl; | |
11 | 11 | |
12 | 12 | import com.diligrp.mobsite.getway.domain.common.ErrorMessage; |
13 | 13 | import com.diligrp.mobsite.getway.domain.common.RedisKey; |
14 | 14 | import com.diligrp.mobsite.getway.domain.common.ResultCode; |
15 | 15 | import com.diligrp.mobsite.getway.domain.except.ServiceException; |
16 | 16 | import com.diligrp.mobsite.getway.domain.protocol.GoodsSuper; |
17 | -import com.diligrp.mobsite.getway.rpc.buyer.GoodsRPC; | |
17 | +import com.diligrp.mobsite.getway.rpc.GoodsRPC; | |
18 | 18 | import com.diligrp.titan.sdk.TitanClient; |
19 | 19 | import com.diligrp.titan.sdk.domain.Attribute; |
20 | 20 | import com.diligrp.titan.sdk.domain.Category; | ... | ... |
mobsite-getway-rpc/src/main/java/com/diligrp/mobsite/getway/rpc/buyer/impl/MarketRPCImpl.java renamed to mobsite-getway-rpc/src/main/java/com/diligrp/mobsite/getway/rpc/impl/MarketRPCImpl.java
1 | -package com.diligrp.mobsite.getway.rpc.buyer.impl; | |
1 | +package com.diligrp.mobsite.getway.rpc.impl; | |
2 | 2 | |
3 | 3 | import com.diligrp.mobsite.getway.domain.protocol.Market; |
4 | 4 | import com.diligrp.mobsite.getway.domain.protocol.market.GetDeliveryByCodeReq; |
5 | 5 | import com.diligrp.mobsite.getway.domain.protocol.order.model.MarketInfo; |
6 | -import com.diligrp.mobsite.getway.rpc.buyer.MarketRPC; | |
6 | +import com.diligrp.mobsite.getway.rpc.MarketRPC; | |
7 | 7 | import com.diligrp.website.web.interfaces.domain.input.PickupTypeEnum; |
8 | 8 | import com.diligrp.website.web.interfaces.domain.output.PickUpPointResp; |
9 | 9 | import org.springframework.stereotype.Service; | ... | ... |
mobsite-getway-rpc/src/main/java/com/diligrp/mobsite/getway/rpc/buyer/impl/MessageRPCImpl.java renamed to mobsite-getway-rpc/src/main/java/com/diligrp/mobsite/getway/rpc/impl/MessageRPCImpl.java
1 | -package com.diligrp.mobsite.getway.rpc.buyer.impl; | |
1 | +package com.diligrp.mobsite.getway.rpc.impl; | |
2 | 2 | |
3 | 3 | import com.diligrp.messageCenter.sdk.MessageProducerClient; |
4 | 4 | import com.diligrp.messageCenter.sdk.domain.sms.SMSType; |
5 | 5 | import com.diligrp.mobsite.getway.domain.except.ServiceException; |
6 | -import com.diligrp.mobsite.getway.rpc.buyer.MessageRPC; | |
6 | +import com.diligrp.mobsite.getway.rpc.MessageRPC; | |
7 | 7 | import org.slf4j.Logger; |
8 | 8 | import org.slf4j.LoggerFactory; |
9 | 9 | import org.springframework.beans.factory.annotation.Autowired; | ... | ... |
mobsite-getway-rpc/src/main/java/com/diligrp/mobsite/getway/rpc/buyer/impl/ShopRPCImpl.java renamed to mobsite-getway-rpc/src/main/java/com/diligrp/mobsite/getway/rpc/impl/OrderRPCImpl.java
1 | -package com.diligrp.mobsite.getway.rpc.buyer.impl; | |
1 | +package com.diligrp.mobsite.getway.rpc.impl; | |
2 | 2 | |
3 | -import com.diligrp.mobsite.getway.domain.protocol.ProductCategory; | |
4 | -import com.diligrp.mobsite.getway.domain.protocol.ShopIntroduction; | |
5 | -import com.diligrp.mobsite.getway.domain.protocol.shop.model.ShopInfo; | |
6 | -import com.diligrp.mobsite.getway.rpc.buyer.ShopRPC; | |
3 | +import com.b2c.orders.domain.client.dto.request.OrderListRequestDto; | |
4 | +import com.b2c.orders.domain.client.dto.response.OrderListResponseDto; | |
5 | +import com.diligrp.mobsite.getway.domain.protocol.ProductAppraise; | |
6 | +import com.diligrp.mobsite.getway.rpc.OrderRPC; | |
7 | +import com.diligrp.titan.sdk.output.PageOutput; | |
7 | 8 | import org.slf4j.Logger; |
8 | 9 | import org.slf4j.LoggerFactory; |
9 | 10 | import org.springframework.stereotype.Service; |
10 | 11 | |
11 | 12 | import java.util.List; |
12 | 13 | |
14 | + | |
13 | 15 | /** |
14 | - * <B>Description</B> <br /> | |
15 | - * <B>Copyright</B> Copyright (c) 2015 www.diligrp.com All rights reserved. <br /> | |
16 | + * <B>Description</B> 订单rpc <br /> | |
17 | + * <B>Copyright</B> Copyright (c) 2014 www.diligrp.com All rights reserved. <br /> | |
16 | 18 | * 本软件源代码版权归地利集团,未经许可不得任意复制与传播.<br /> |
17 | 19 | * <B>Company</B> 地利集团 |
18 | - * @createTime 2015年6月10日 下午1:40:41 | |
20 | + * | |
19 | 21 | * @author zhangshirui |
22 | + * @createTime 2014年9月1日 下午6:31:13 | |
20 | 23 | */ |
21 | -@Service | |
22 | -public class ShopRPCImpl implements ShopRPC { | |
23 | - | |
24 | - private Logger logger = LoggerFactory.getLogger(ShopRPCImpl.class); | |
25 | - | |
26 | - @Override | |
27 | - public List<ProductCategory> getShopCategory(Long shopId) { | |
28 | - return null; | |
29 | - } | |
30 | - | |
31 | - @Override | |
32 | - public List<Long> getRecommendProducts(Long shopId) { | |
33 | - return null; | |
34 | - } | |
35 | - | |
36 | - @Override | |
37 | - public ShopIntroduction getShopIntroductionById(Long shopId) { | |
38 | - return null; | |
39 | - } | |
40 | - | |
41 | - @Override | |
42 | - public ShopIntroduction getShopIntroductionByUserId(Long userId) { | |
43 | - return null; | |
44 | - } | |
45 | - | |
46 | - @Override | |
47 | - public ShopInfo getShopInfoByDomain(String domain) { | |
48 | - return null; | |
49 | - } | |
50 | - | |
51 | - @Override | |
52 | - public ShopInfo getShopInfoByUser(Long userId) { | |
53 | - return null; | |
54 | - } | |
24 | +@Service("orderRPC") | |
25 | +public class OrderRPCImpl implements OrderRPC { | |
26 | + | |
27 | + public static final long ORDER_USER_TYPE_BUYER = 10L; | |
28 | + public static final long ORDER_USER_TYPE_SELLER = 20L; | |
29 | + | |
30 | + private static final Logger logger = LoggerFactory.getLogger(OrderRPCImpl.class); | |
31 | + | |
32 | + | |
33 | + @Override | |
34 | + public PageOutput<List<OrderListResponseDto>> getOrders(OrderListRequestDto input, Long userId) { | |
35 | + return null; | |
36 | + } | |
37 | + | |
38 | + @Override | |
39 | + public OrderListResponseDto getOrderById(Long orderId, Long userId) { | |
40 | + return null; | |
41 | + } | |
42 | + | |
43 | + @Override | |
44 | + public Integer cancelOrder(Long orderId, String reason, Long userId) { | |
45 | + return null; | |
46 | + } | |
47 | + | |
48 | + @Override | |
49 | + public Integer confirmPickUp(Long orderId, String paytoken, Long userId) { | |
50 | + return null; | |
51 | + } | |
52 | + | |
53 | + @Override | |
54 | + public void addComment(List<ProductAppraise> productAppraises, Long orderId, Long userId) { | |
55 | 55 | |
56 | + } | |
56 | 57 | } | ... | ... |
mobsite-getway-rpc/src/main/java/com/diligrp/mobsite/getway/rpc/buyer/impl/PassportRPCImpl.java renamed to mobsite-getway-rpc/src/main/java/com/diligrp/mobsite/getway/rpc/impl/PassportRPCImpl.java
1 | -package com.diligrp.mobsite.getway.rpc.buyer.impl; | |
1 | +package com.diligrp.mobsite.getway.rpc.impl; | |
2 | 2 | |
3 | 3 | import com.alibaba.fastjson.JSONObject; |
4 | -import com.diligrp.mobsite.getway.domain.common.Constant; | |
5 | -import com.diligrp.mobsite.getway.domain.common.ErrorMessage; | |
6 | 4 | import com.diligrp.mobsite.getway.domain.common.RedisKey; |
7 | 5 | import com.diligrp.mobsite.getway.domain.common.ResultCode; |
8 | 6 | import com.diligrp.mobsite.getway.domain.except.ServiceException; |
... | ... | @@ -11,9 +9,9 @@ import com.diligrp.mobsite.getway.domain.protocol.login.LoginResp; |
11 | 9 | import com.diligrp.mobsite.getway.domain.protocol.register.UserRegisterReq; |
12 | 10 | import com.diligrp.mobsite.getway.domain.protocol.register.UserRegisterResp; |
13 | 11 | import com.diligrp.mobsite.getway.domain.protocol.saler.user.SellerLoginResp; |
12 | +import com.diligrp.mobsite.getway.rpc.PassportRPC; | |
14 | 13 | import com.diligrp.mobsite.getway.rpc.base.BaseOutput; |
15 | 14 | import com.diligrp.mobsite.getway.rpc.base.impl.BaseServiceImpl; |
16 | -import com.diligrp.mobsite.getway.rpc.buyer.PassportRPC; | |
17 | 15 | import com.diligrp.website.util.redis.RedisUtil; |
18 | 16 | import com.diligrp.website.util.security.Validator; |
19 | 17 | import org.slf4j.Logger; |
... | ... | @@ -93,12 +91,8 @@ public class PassportRPCImpl extends BaseServiceImpl implements PassportRPC { |
93 | 91 | resp.setToken(jsonBody.getString("token")); |
94 | 92 | JSONObject jsonUser = jsonBody.getJSONObject("accountInfo"); |
95 | 93 | resp.setAccountId(jsonUser.getLong("accountId")); |
96 | - resp.setEmail(jsonUser.getString("email")); | |
97 | 94 | resp.setMobile(jsonUser.getString("mobile")); |
98 | - resp.setAccountState(jsonUser.getInteger("accountState")); | |
99 | - resp.setUserType(jsonUser.getInteger("userType")); | |
100 | 95 | resp.setAccountName(jsonUser.getString("accountName")); |
101 | - resp.setRealName(jsonUser.getString("realName")); | |
102 | 96 | resp.setMsg(msg); |
103 | 97 | resp.setHeadImg(jsonUser.getString("face")); |
104 | 98 | if (Validator.isNull(jsonUser.getString("city"))){ |
... | ... | @@ -107,23 +101,23 @@ public class PassportRPCImpl extends BaseServiceImpl implements PassportRPC { |
107 | 101 | resp.setInfoCompleteFlag(LoginResp.USER_INFOCOMPLETEFLAG_YES); |
108 | 102 | } |
109 | 103 | |
110 | - //TODO 提示信息 | |
111 | - if (Constant.USER_STATE_LOCKED == jsonUser.getInteger("accountState")) { | |
112 | - resp.setMsg(ErrorMessage.USER_STATE_LOCKED); | |
113 | - resp.setCode(PASSPORT_LOGIN_CODE_LOCKED); | |
114 | - } | |
104 | + //if (Constant.USER_STATE_LOCKED == jsonUser.getInteger("accountState")) { | |
105 | + //resp.setMsg(ErrorMessage.USER_STATE_LOCKED); | |
106 | + //resp.setCode(PASSPORT_LOGIN_CODE_LOCKED); | |
107 | + //} | |
115 | 108 | |
116 | - if (Validator.isNull(resp.getAccountState()) | |
117 | - || resp.getAccountState()!= LoginResp.ACCOUNT_STATE_NORMAL) { | |
118 | - throw new ServiceException(ResultCode.BUSINESS_FAILED,resp.getMsg()); | |
119 | - } | |
109 | + //if (Validator.isNull(resp.getAccountState()) | |
110 | + // || resp.getAccountState()!= LoginResp.ACCOUNT_STATE_NORMAL) { | |
111 | + // throw new ServiceException(ResultCode.BUSINESS_FAILED,resp.getMsg()); | |
112 | + //} | |
120 | 113 | |
121 | 114 | //登录redisKey=userId-deviceId |
122 | 115 | |
123 | 116 | //String cookieRedisKey = redisUtil.makeKey(RedisKey.USER_LOGININFO, resp.getAccountId()+Constant.COMMON_DASH+req.getDeviceId()); |
124 | 117 | String cookieRedisKey = redisUtil.makeKey(RedisKey.USER_LOGININFO, String.valueOf(resp.getAccountId())); |
125 | 118 | redisUtil.setStringByExpire(cookieRedisKey, String.valueOf(resp.getAccountId()), loginExpireTime); |
126 | - //TODO 去掉登录设备排斥验证 | |
119 | + | |
120 | + // 去掉登录设备排斥验证 | |
127 | 121 | //if (!Validator.isNull(req.getDeviceId())) { |
128 | 122 | // String onlyOneLoginRedisKey = redisUtil.makeKey(RedisKey.USER_DEVICEID, String.valueOf(resp.getAccountId())); |
129 | 123 | // redisUtil.setStringByExpire(onlyOneLoginRedisKey, req.getDeviceId(), loginExpireTime); | ... | ... |
mobsite-getway-rpc/src/main/java/com/diligrp/mobsite/getway/rpc/impl/SellerRPCImpl.java
0 → 100644
1 | +package com.diligrp.mobsite.getway.rpc.impl; | |
2 | + | |
3 | +import com.b2c.myapp.common.api.buyerInfo.output.BuyerInfoOutput; | |
4 | +import com.b2c.myapp.common.api.sellerInfo.output.SellerInfoOutput; | |
5 | +import com.b2c.myapp.common.utils.BaseOutput; | |
6 | +import com.b2c.myapp.sdk.MyAppClient; | |
7 | +import com.diligrp.mobsite.getway.domain.common.ErrorMessage; | |
8 | +import com.diligrp.mobsite.getway.domain.common.ResultCode; | |
9 | +import com.diligrp.mobsite.getway.domain.except.ServiceException; | |
10 | +import com.diligrp.mobsite.getway.domain.protocol.ConsigneeInfo; | |
11 | +import com.diligrp.mobsite.getway.domain.protocol.cart.ModifyAmountReq; | |
12 | +import com.diligrp.mobsite.getway.rpc.GoodsRPC; | |
13 | +import com.diligrp.mobsite.getway.rpc.SellerRPC; | |
14 | +import com.diligrp.website.util.redis.RedisUtil; | |
15 | +import com.diligrp.website.util.security.Validator; | |
16 | +import com.diligrp.website.web.interfaces.WebsiteClient; | |
17 | +import org.slf4j.Logger; | |
18 | +import org.slf4j.LoggerFactory; | |
19 | +import org.springframework.stereotype.Service; | |
20 | + | |
21 | +import javax.annotation.Resource; | |
22 | +import java.util.List; | |
23 | + | |
24 | + | |
25 | +/** | |
26 | + * <B>Description</B> 用户rpc <br /> | |
27 | + * <B>Copyright</B> Copyright (c) 2014 www.diligrp.com All rights reserved. <br /> | |
28 | + * 本软件源代码版权归地利集团,未经许可不得任意复制与传播.<br /> | |
29 | + * <B>Company</B> 地利集团 | |
30 | + * | |
31 | + * @author zhangshirui | |
32 | + * @createTime Aug 19, 2014 2:34:13 PM | |
33 | + */ | |
34 | +@Service | |
35 | +public class SellerRPCImpl implements SellerRPC { | |
36 | + | |
37 | + | |
38 | + @Resource | |
39 | + private RedisUtil redisUtil; | |
40 | + @Resource | |
41 | + private MyAppClient userClient; | |
42 | + @Resource | |
43 | + private WebsiteClient websiteClient; | |
44 | + @Resource | |
45 | + private GoodsRPC goodsRPC; | |
46 | + | |
47 | + | |
48 | + private static final Logger logger = LoggerFactory.getLogger(SellerRPCImpl.class); | |
49 | + | |
50 | + | |
51 | + | |
52 | + @Override | |
53 | + public boolean checkMobile(String mobile) { | |
54 | + BaseOutput<SellerInfoOutput> output = null; | |
55 | + boolean flag = false; | |
56 | + try { | |
57 | + output = userClient.getSellerInfoService().getSellerInfoByMobilePhone(mobile); | |
58 | + } catch (Exception e) { | |
59 | + logger.error("检测电话号码接口挂掉:msg={}",e.getMessage()); | |
60 | + throw new ServiceException(); | |
61 | + } | |
62 | + | |
63 | + if (output==null||!output.getCode().equals(ResultCode.SUCCESS)){ | |
64 | + logger.error("手机号查询卖家接口失败:[userId={},code={},result={}]",new Object[]{mobile,output.getCode(),output.getResult()}); | |
65 | + throw new ServiceException(); | |
66 | + } | |
67 | + flag = !Validator.isNull(output.getData()); | |
68 | + if(flag){ | |
69 | + logger.info("success:电话号码没有被注册:mobile={}",mobile); | |
70 | + }else { | |
71 | + logger.info("error:电话号码已经被注册:mobile={}",mobile); | |
72 | + } | |
73 | + return flag; | |
74 | + } | |
75 | + | |
76 | + @Override | |
77 | + public boolean modifyAmount(ModifyAmountReq req) { | |
78 | + return false; | |
79 | + } | |
80 | + | |
81 | + @Override | |
82 | + public boolean modifyPwd(String accountName, String newPassword) { | |
83 | + return false; | |
84 | + } | |
85 | + | |
86 | + @Override | |
87 | + public Long addConsignee(ConsigneeInfo consigneeInfo, Long userId) { | |
88 | + return null; | |
89 | + } | |
90 | + | |
91 | + @Override | |
92 | + public boolean updateConsignee(ConsigneeInfo consigneeInfo, Long userId) { | |
93 | + return false; | |
94 | + } | |
95 | + | |
96 | + @Override | |
97 | + public ConsigneeInfo getConsignee(Long id) { | |
98 | + return null; | |
99 | + } | |
100 | + | |
101 | + @Override | |
102 | + public boolean delConsignee(Long id) { | |
103 | + return false; | |
104 | + } | |
105 | + | |
106 | + @Override | |
107 | + public List<ConsigneeInfo> getConsigneeByUserId(Long userId) { | |
108 | + return null; | |
109 | + } | |
110 | + | |
111 | + @Override | |
112 | + public ConsigneeInfo getDefaultConsignee(Long userId) { | |
113 | + return null; | |
114 | + } | |
115 | + | |
116 | + @Override | |
117 | + public boolean setDefaultConsignee(Long id, Long userId) { | |
118 | + return false; | |
119 | + } | |
120 | + | |
121 | + @Override | |
122 | + public String getEncryptPwd(String pwd) { | |
123 | + return null; | |
124 | + } | |
125 | + | |
126 | + @Override | |
127 | + public boolean checkPassword(Long userId, String password) { | |
128 | + return false; | |
129 | + } | |
130 | + | |
131 | + @Override | |
132 | + public BuyerInfoOutput getUserByMobile(String accountName) { | |
133 | + BaseOutput<BuyerInfoOutput> output = null; | |
134 | + boolean flag = false; | |
135 | + try { | |
136 | + output = userClient.getBuyerInfoService().getBuyerInfoByMobilePhone(accountName); | |
137 | + } catch (Exception e) { | |
138 | + logger.error("检测电话号码接口挂掉:msg={}",e.getMessage()); | |
139 | + throw new ServiceException(); | |
140 | + } | |
141 | + | |
142 | + if (output==null||!output.getCode().equals(ResultCode.SUCCESS)){ | |
143 | + logger.error("手机号查询买家接口失败:[userId={},code={},result={}]",new Object[]{accountName,output.getCode(),output.getResult()}); | |
144 | + throw new ServiceException(); | |
145 | + } | |
146 | + | |
147 | + if(Validator.isNull(output.getData())){ | |
148 | + logger.info("查询用户为空:[mobile={}]",new Object[]{accountName}); | |
149 | + throw new ServiceException(ResultCode.BUSINESS_FAILED, ErrorMessage.USER_NOT_EXIST); | |
150 | + } | |
151 | + return output.getData(); | |
152 | + } | |
153 | + | |
154 | + @Override | |
155 | + public SellerInfoOutput getSellerByMobile(String accountName) { | |
156 | + BaseOutput<SellerInfoOutput> output = null; | |
157 | + boolean flag = false; | |
158 | + try { | |
159 | + output = userClient.getSellerInfoService().getSellerInfoByMobilePhone(accountName); | |
160 | + } catch (Exception e) { | |
161 | + logger.error("检测电话号码接口挂掉:msg={}",e.getMessage()); | |
162 | + throw new ServiceException(); | |
163 | + } | |
164 | + | |
165 | + if (output==null||!output.getCode().equals(ResultCode.SUCCESS)){ | |
166 | + logger.error("手机号查询买家接口失败:[userId={},code={},result={}]",new Object[]{accountName,output.getCode(),output.getResult()}); | |
167 | + throw new ServiceException(); | |
168 | + } | |
169 | + | |
170 | + if(Validator.isNull(output.getData())){ | |
171 | + logger.info("查询用户为空:[mobile={}]",new Object[]{accountName}); | |
172 | + throw new ServiceException(ResultCode.BUSINESS_FAILED, ErrorMessage.USER_NOT_EXIST); | |
173 | + } | |
174 | + return output.getData(); | |
175 | + } | |
176 | + | |
177 | +} | ... | ... |
mobsite-getway-rpc/src/main/java/com/diligrp/mobsite/getway/rpc/impl/ShopBuyerRPCImpl.java
0 → 100644
1 | +package com.diligrp.mobsite.getway.rpc.impl; | |
2 | + | |
3 | +import com.b2c.myapp.common.api.shopBuyer.input.ShopBuyerDetail; | |
4 | +import com.b2c.myapp.common.api.shopBuyer.input.ShopBuyerListInput; | |
5 | +import com.b2c.myapp.common.api.shopBuyer.output.ShopBuyerDetailOutput; | |
6 | +import com.b2c.myapp.common.api.shopBuyer.output.ShopBuyerKeyOutput; | |
7 | +import com.b2c.myapp.common.api.shopBuyer.output.ShopBuyerOutput; | |
8 | +import com.b2c.myapp.common.utils.BaseOutput; | |
9 | +import com.b2c.myapp.common.utils.base.Page; | |
10 | +import com.b2c.myapp.sdk.MyAppClient; | |
11 | +import com.diligrp.mobsite.getway.domain.except.ServiceException; | |
12 | +import com.diligrp.mobsite.getway.rpc.ShopBuyerRPC; | |
13 | +import org.apache.log4j.Logger; | |
14 | +import org.springframework.stereotype.Service; | |
15 | + | |
16 | +import javax.annotation.Resource; | |
17 | + | |
18 | +/** | |
19 | + * Created by jiangchengyong on 2017/1/10. | |
20 | + */ | |
21 | +@Service | |
22 | +public class ShopBuyerRPCImpl implements ShopBuyerRPC { | |
23 | + private final static Logger log = Logger.getLogger(ShopBuyerRPCImpl.class); | |
24 | + @Resource | |
25 | + private MyAppClient myAppClient; | |
26 | + /** | |
27 | + * @param shopBuyerDetail 店铺买家对象 | |
28 | + * @return BaseOutput<List<ShopBuyerOutput>> | |
29 | + * @comment 查找店铺所有买家列表 | |
30 | + * @author kelan | |
31 | + * @time 2016/12/1 9:59 | |
32 | + */ | |
33 | + @Override | |
34 | + public Page<ShopBuyerDetailOutput> queryShopAllBuyerList(ShopBuyerDetail shopBuyerDetail) { | |
35 | + BaseOutput<Page<ShopBuyerDetailOutput>> output = null; | |
36 | + boolean flag = false; | |
37 | + try { | |
38 | + output = myAppClient.getShopBuyerService().queryShopAllBuyerList(shopBuyerDetail); | |
39 | + if(output.getCode().equals(200)){ | |
40 | + return output.getData(); | |
41 | + } | |
42 | + } catch (Exception e) { | |
43 | + log.error("查找店铺所有买家列表接口出错:msg={}",e); | |
44 | + throw new ServiceException(); | |
45 | + } | |
46 | + return null; | |
47 | + } | |
48 | + | |
49 | + /** | |
50 | + * 绑定并激活(查询买家是否绑定相关店铺,未绑定直接绑定,已绑定直接激活) | |
51 | + * | |
52 | + * @param buyerId | |
53 | + * @param promoCode | |
54 | + * @return | |
55 | + */ | |
56 | + @Override | |
57 | + public ShopBuyerOutput bindAndActivate(Long buyerId, Long promoCode) { | |
58 | + BaseOutput<ShopBuyerOutput> output = null; | |
59 | + boolean flag = false; | |
60 | + try { | |
61 | + output = myAppClient.getShopBuyerService().bindAndActivate(buyerId,promoCode); | |
62 | + if(output.getCode().equals(200)){ | |
63 | + return output.getData(); | |
64 | + } | |
65 | + } catch (Exception e) { | |
66 | + log.error("绑定并激活接口出错:msg={}",e); | |
67 | + throw new ServiceException(); | |
68 | + } | |
69 | + | |
70 | + return null; | |
71 | + } | |
72 | + | |
73 | + /** | |
74 | + * 获取店铺用户的相关主键信息(buyId、shopId、sellerId) | |
75 | + * | |
76 | + * @param shopBuyerId | |
77 | + * @return | |
78 | + */ | |
79 | + @Override | |
80 | + public ShopBuyerKeyOutput getShopBuyerKeys(Long shopBuyerId) { | |
81 | + BaseOutput<ShopBuyerKeyOutput> output = null; | |
82 | + boolean flag = false; | |
83 | + try { | |
84 | + output = myAppClient.getShopBuyerService().getShopBuyerKeys(shopBuyerId); | |
85 | + if(output.getCode().equals(200)){ | |
86 | + return output.getData(); | |
87 | + } | |
88 | + } catch (Exception e) { | |
89 | + log.error("获取店铺用户的相关主键信息接口出错:msg={}",e); | |
90 | + throw new ServiceException(); | |
91 | + } | |
92 | + | |
93 | + return null; | |
94 | + } | |
95 | +} | ... | ... |
mobsite-getway-rpc/src/main/java/com/diligrp/mobsite/getway/rpc/impl/ShopRPCImpl.java
0 → 100644
1 | +package com.diligrp.mobsite.getway.rpc.impl; | |
2 | + | |
3 | +import com.b2c.myapp.common.api.shop.input.ShopListInput; | |
4 | +import com.b2c.myapp.common.api.shop.input.ShopSaveInput; | |
5 | +import com.b2c.myapp.common.api.shop.input.ShopUpdateInput; | |
6 | +import com.b2c.myapp.common.api.shop.output.ShopOutput; | |
7 | +import com.b2c.myapp.common.utils.BaseOutput; | |
8 | +import com.b2c.myapp.sdk.MyAppClient; | |
9 | +import com.diligrp.mobsite.getway.domain.common.ResultCode; | |
10 | +import com.diligrp.mobsite.getway.domain.except.ServiceException; | |
11 | +import com.diligrp.mobsite.getway.domain.protocol.ProductCategory; | |
12 | +import com.diligrp.mobsite.getway.domain.protocol.ShopIntroduction; | |
13 | +import com.diligrp.mobsite.getway.domain.protocol.shop.model.ShopInfo; | |
14 | +import com.diligrp.mobsite.getway.rpc.ShopRPC; | |
15 | +import org.slf4j.Logger; | |
16 | +import org.slf4j.LoggerFactory; | |
17 | +import org.springframework.stereotype.Service; | |
18 | + | |
19 | +import javax.annotation.Resource; | |
20 | +import java.util.List; | |
21 | + | |
22 | +/** | |
23 | + * <B>Description</B> <br /> | |
24 | + * <B>Copyright</B> Copyright (c) 2015 www.diligrp.com All rights reserved. <br /> | |
25 | + * 本软件源代码版权归地利集团,未经许可不得任意复制与传播.<br /> | |
26 | + * <B>Company</B> 地利集团 | |
27 | + * @createTime 2017年1月10日 下午1:40:41 | |
28 | + * @author jiangchengyong | |
29 | + */ | |
30 | +@Service | |
31 | +public class ShopRPCImpl implements ShopRPC { | |
32 | + | |
33 | + private Logger logger = LoggerFactory.getLogger(ShopRPCImpl.class); | |
34 | + | |
35 | + @Resource | |
36 | + private MyAppClient myAppClient; | |
37 | + /** | |
38 | + * @param shopSaveInput 店铺基本信息 | |
39 | + * @return Integer | |
40 | + * @comment 创建店铺 | |
41 | + * @author jiangchengyong | |
42 | + * @time 2016/11/29 19:03 | |
43 | + */ | |
44 | + @Override | |
45 | + public Integer createShopInfo(ShopSaveInput shopSaveInput) { | |
46 | + BaseOutput<Integer> output = null; | |
47 | + try{ | |
48 | + output = myAppClient.getShopInfoService().createShopInfo(shopSaveInput); | |
49 | + if(output.getCode().equals(200)){ | |
50 | + return output.getData(); | |
51 | + } | |
52 | + }catch (Exception e){ | |
53 | + logger.info("调用创建店铺接口出错:",e); | |
54 | + throw new ServiceException(ResultCode.NETWORK_FAILED); | |
55 | + } | |
56 | + return null; | |
57 | + } | |
58 | + | |
59 | + /** | |
60 | + * @param sellerId 卖家id | |
61 | + * @return ShopOutput | |
62 | + * @comment 通过卖家id获取店铺信息 | |
63 | + * @author jiangchengyong | |
64 | + * @time 2016/11/29 18:54 | |
65 | + */ | |
66 | + @Override | |
67 | + public ShopOutput getShopBySellerId(Long sellerId) { | |
68 | + BaseOutput<ShopOutput> output = null; | |
69 | + try{ | |
70 | + output = myAppClient.getShopInfoService().getShopBySellerId(sellerId); | |
71 | + if(output.getCode().equals(200)){ | |
72 | + return output.getData(); | |
73 | + } | |
74 | + }catch (Exception e){ | |
75 | + logger.info("调用通过卖家id获取店铺信息接口出错:",e); | |
76 | + throw new ServiceException(ResultCode.NETWORK_FAILED); | |
77 | + } | |
78 | + return null; | |
79 | + } | |
80 | + | |
81 | + /** | |
82 | + * @param shopId 店铺id | |
83 | + * @return ShopOutput | |
84 | + * @comment 通过店铺id获取店铺信息 | |
85 | + * @author jiangchengyong | |
86 | + * @time 2016/12/2 10:15 | |
87 | + */ | |
88 | + @Override | |
89 | + public ShopOutput getShopByShopId(Long shopId) { | |
90 | + BaseOutput<ShopOutput> output = null; | |
91 | + try{ | |
92 | + output = myAppClient.getShopInfoService().getShopByShopId(shopId); | |
93 | + if(output.getCode().equals(200)){ | |
94 | + return output.getData(); | |
95 | + } | |
96 | + }catch (Exception e){ | |
97 | + logger.info("调用通过店铺id获取店铺信息接口出错:",e); | |
98 | + throw new ServiceException(ResultCode.NETWORK_FAILED); | |
99 | + } | |
100 | + return null; | |
101 | + } | |
102 | + | |
103 | + /** | |
104 | + * @param shopListInput 多字段条件查询 | |
105 | + * @return ShopOutput | |
106 | + * @comment 多字段条件查询店铺信息 | |
107 | + * @author jiangchengyong | |
108 | + * @time 2016/11/30 10:00 | |
109 | + */ | |
110 | + @Override | |
111 | + public ShopOutput getShopInfo(ShopListInput shopListInput) { | |
112 | + BaseOutput<ShopOutput> output = null; | |
113 | + try{ | |
114 | + output = myAppClient.getShopInfoService().getShopInfo(shopListInput); | |
115 | + if(output.getCode().equals(200)){ | |
116 | + return output.getData(); | |
117 | + } | |
118 | + }catch (Exception e){ | |
119 | + logger.info("调用多字段条件查询店铺信息接口出错:",e); | |
120 | + throw new ServiceException(ResultCode.NETWORK_FAILED); | |
121 | + } | |
122 | + return null; | |
123 | + } | |
124 | + | |
125 | + /** | |
126 | + * @param shopUpdateInput | |
127 | + * @return Integer | |
128 | + * @comment 修改店铺基本信息 | |
129 | + * @author jiangchengyong | |
130 | + * @time 2016/11/30 15:43 | |
131 | + */ | |
132 | + @Override | |
133 | + public Boolean modifyShopBasicInfo(ShopUpdateInput shopUpdateInput) { | |
134 | + BaseOutput<Boolean> output = null; | |
135 | + try{ | |
136 | + output = myAppClient.getShopInfoService().modifyShopBasicInfo(shopUpdateInput); | |
137 | + if(output.getCode().equals(200)){ | |
138 | + return output.getData(); | |
139 | + } | |
140 | + }catch (Exception e){ | |
141 | + logger.info("调用修改店铺基本信息接口出错:",e); | |
142 | + throw new ServiceException(ResultCode.NETWORK_FAILED); | |
143 | + } | |
144 | + return null; | |
145 | + } | |
146 | +} | ... | ... |
mobsite-getway-rpc/src/main/java/com/diligrp/mobsite/getway/rpc/buyer/impl/StationMsgRPCImpl.java renamed to mobsite-getway-rpc/src/main/java/com/diligrp/mobsite/getway/rpc/impl/StationMsgRPCImpl.java
1 | -package com.diligrp.mobsite.getway.rpc.buyer.impl; | |
1 | +package com.diligrp.mobsite.getway.rpc.impl; | |
2 | 2 | |
3 | 3 | import com.alibaba.fastjson.JSON; |
4 | 4 | import com.alibaba.fastjson.JSONArray; |
... | ... | @@ -10,7 +10,7 @@ import com.diligrp.mobsite.getway.domain.protocol.msg.model.HomeMsgInfo; |
10 | 10 | import com.diligrp.mobsite.getway.domain.protocol.msg.model.StationMsg; |
11 | 11 | import com.diligrp.mobsite.getway.rpc.base.BaseOutput; |
12 | 12 | import com.diligrp.mobsite.getway.rpc.base.impl.BaseServiceImpl; |
13 | -import com.diligrp.mobsite.getway.rpc.buyer.StationMsgRPC; | |
13 | +import com.diligrp.mobsite.getway.rpc.StationMsgRPC; | |
14 | 14 | import com.diligrp.website.util.security.Validator; |
15 | 15 | import org.slf4j.Logger; |
16 | 16 | import org.slf4j.LoggerFactory; | ... | ... |
mobsite-getway-rpc/src/main/java/com/diligrp/mobsite/getway/rpc/buyer/impl/StoreRPCImpl.java renamed to mobsite-getway-rpc/src/main/java/com/diligrp/mobsite/getway/rpc/impl/StoreRPCImpl.java
1 | -package com.diligrp.mobsite.getway.rpc.buyer.impl; | |
1 | +package com.diligrp.mobsite.getway.rpc.impl; | |
2 | 2 | |
3 | 3 | import com.alibaba.fastjson.JSON; |
4 | 4 | import com.alibaba.fastjson.JSONObject; |
5 | 5 | import com.diligrp.mobsite.getway.domain.except.ServiceException; |
6 | 6 | import com.diligrp.mobsite.getway.domain.protocol.common.UploadFileResp; |
7 | -import com.diligrp.mobsite.getway.rpc.buyer.StoreRPC; | |
7 | +import com.diligrp.mobsite.getway.rpc.StoreRPC; | |
8 | 8 | import com.diligrp.store.api.upload.DiliStoreUpload; |
9 | 9 | import org.slf4j.Logger; |
10 | 10 | import org.slf4j.LoggerFactory; | ... | ... |
mobsite-getway-rpc/src/main/java/com/diligrp/mobsite/getway/rpc/buyer/impl/UserRPCImpl.java renamed to mobsite-getway-rpc/src/main/java/com/diligrp/mobsite/getway/rpc/impl/UserRPCImpl.java
1 | -package com.diligrp.mobsite.getway.rpc.buyer.impl; | |
2 | - | |
1 | +package com.diligrp.mobsite.getway.rpc.impl; | |
2 | + | |
3 | +import com.b2c.myapp.common.api.buyerInfo.output.BuyerInfoOutput; | |
4 | +import com.b2c.myapp.common.utils.BaseOutput; | |
5 | +import com.b2c.myapp.sdk.MyAppClient; | |
6 | +import com.diligrp.mobsite.getway.domain.common.ErrorMessage; | |
7 | +import com.diligrp.mobsite.getway.domain.common.ResultCode; | |
8 | +import com.diligrp.mobsite.getway.domain.except.ServiceException; | |
3 | 9 | import com.diligrp.mobsite.getway.domain.protocol.AddCartProduct; |
4 | 10 | import com.diligrp.mobsite.getway.domain.protocol.ConsigneeInfo; |
5 | 11 | import com.diligrp.mobsite.getway.domain.protocol.cart.ModifyAmountReq; |
6 | -import com.diligrp.mobsite.getway.rpc.buyer.UserRPC; | |
12 | +import com.diligrp.mobsite.getway.rpc.GoodsRPC; | |
13 | +import com.diligrp.mobsite.getway.rpc.UserRPC; | |
14 | +import com.diligrp.website.util.redis.RedisUtil; | |
15 | +import com.diligrp.website.util.security.Validator; | |
16 | +import com.diligrp.website.web.interfaces.WebsiteClient; | |
17 | +import org.slf4j.Logger; | |
18 | +import org.slf4j.LoggerFactory; | |
7 | 19 | import org.springframework.stereotype.Service; |
8 | 20 | |
21 | +import javax.annotation.Resource; | |
9 | 22 | import java.util.List; |
10 | 23 | |
11 | 24 | |
... | ... | @@ -22,6 +35,18 @@ import java.util.List; |
22 | 35 | public class UserRPCImpl implements UserRPC { |
23 | 36 | |
24 | 37 | |
38 | + @Resource | |
39 | + private RedisUtil redisUtil; | |
40 | + @Resource | |
41 | + private MyAppClient userClient; | |
42 | + @Resource | |
43 | + private WebsiteClient websiteClient; | |
44 | + @Resource | |
45 | + private GoodsRPC goodsRPC; | |
46 | + | |
47 | + | |
48 | + private static final Logger logger = LoggerFactory.getLogger(UserRPCImpl.class); | |
49 | + | |
25 | 50 | @Override |
26 | 51 | public boolean checkFavorites(Long id, Long userId, Integer type) { |
27 | 52 | return false; |
... | ... | @@ -54,7 +79,26 @@ public class UserRPCImpl implements UserRPC { |
54 | 79 | |
55 | 80 | @Override |
56 | 81 | public boolean checkMobile(String mobile) { |
57 | - return false; | |
82 | + BaseOutput<BuyerInfoOutput> output = null; | |
83 | + boolean flag = false; | |
84 | + try { | |
85 | + output = userClient.getBuyerInfoService().getBuyerInfoByMobilePhone(mobile); | |
86 | + } catch (Exception e) { | |
87 | + logger.error("检测电话号码接口挂掉:msg={}",e.getMessage()); | |
88 | + throw new ServiceException(); | |
89 | + } | |
90 | + | |
91 | + if (output==null||!output.getCode().equals(ResultCode.SUCCESS)){ | |
92 | + logger.error("手机号查询买家接口失败:[userId={},code={},result={}]",new Object[]{mobile,output.getCode(),output.getResult()}); | |
93 | + throw new ServiceException(); | |
94 | + } | |
95 | + flag = !Validator.isNull(output.getData()); | |
96 | + if(flag){ | |
97 | + logger.info("success:电话号码没有被注册:mobile={}",mobile); | |
98 | + }else { | |
99 | + logger.info("error:电话号码已经被注册:mobile={}",mobile); | |
100 | + } | |
101 | + return flag; | |
58 | 102 | } |
59 | 103 | |
60 | 104 | @Override |
... | ... | @@ -111,4 +155,27 @@ public class UserRPCImpl implements UserRPC { |
111 | 155 | public boolean checkPassword(Long userId, String password) { |
112 | 156 | return false; |
113 | 157 | } |
158 | + | |
159 | + @Override | |
160 | + public BuyerInfoOutput getUserByMobile(String accountName) { | |
161 | + BaseOutput<BuyerInfoOutput> output = null; | |
162 | + boolean flag = false; | |
163 | + try { | |
164 | + output = userClient.getBuyerInfoService().getBuyerInfoByMobilePhone(accountName); | |
165 | + } catch (Exception e) { | |
166 | + logger.error("检测电话号码接口挂掉:msg={}",e.getMessage()); | |
167 | + throw new ServiceException(); | |
168 | + } | |
169 | + | |
170 | + if (output==null||!output.getCode().equals(ResultCode.SUCCESS)){ | |
171 | + logger.error("手机号查询买家接口失败:[userId={},code={},result={}]",new Object[]{accountName,output.getCode(),output.getResult()}); | |
172 | + throw new ServiceException(); | |
173 | + } | |
174 | + | |
175 | + if(Validator.isNull(output.getData())){ | |
176 | + logger.info("查询用户为空:[mobile={}]",new Object[]{accountName}); | |
177 | + throw new ServiceException(ResultCode.BUSINESS_FAILED, ErrorMessage.USER_NOT_EXIST); | |
178 | + } | |
179 | + return output.getData(); | |
180 | + } | |
114 | 181 | } | ... | ... |
mobsite-getway-rpc/src/main/java/com/diligrp/mobsite/getway/rpc/seller/SellerShopRPC.java deleted
100644 → 0
1 | -package com.diligrp.mobsite.getway.rpc.seller; | |
2 | - | |
3 | - | |
4 | -/** | |
5 | - * <B>Description</B> 验证rpc <br /> | |
6 | - * <B>Copyright</B> Copyright (c) 2014 www.diligrp.com All rights reserved. <br /> | |
7 | - * 本软件源代码版权归地利集团,未经许可不得任意复制与传播.<br /> | |
8 | - * <B>Company</B> 地利集团 | |
9 | - * | |
10 | - * @author duanyugen | |
11 | - */ | |
12 | -public interface SellerShopRPC { | |
13 | - | |
14 | -} |
mobsite-getway-rpc/src/main/java/com/diligrp/mobsite/getway/rpc/seller/impl/SellerProductRPCImpl.java deleted
100644 → 0
1 | -package com.diligrp.mobsite.getway.rpc.seller.impl; | |
2 | - | |
3 | -import com.diligrp.mobsite.getway.rpc.seller.SellerProductRPC; | |
4 | -import org.springframework.stereotype.Service; | |
5 | - | |
6 | - | |
7 | -/** | |
8 | - * <B>Description</B> 搜索 <br /> | |
9 | - * <B>Copyright</B> Copyright (c) 2014 www.diligrp.com All rights reserved. <br /> | |
10 | - * 本软件源代码版权归地利集团,未经许可不得任意复制与传播.<br /> | |
11 | - * <B>Company</B> 地利集团 | |
12 | - * @createTime 2014年8月22日 上午11:41:33 | |
13 | - */ | |
14 | -@Service("sellerProductRPC") | |
15 | -public class SellerProductRPCImpl implements SellerProductRPC { | |
16 | - | |
17 | -} |
mobsite-getway-rpc/src/main/java/com/diligrp/mobsite/getway/rpc/seller/impl/SellerShopRPCImpl.java deleted
100644 → 0
1 | -package com.diligrp.mobsite.getway.rpc.seller.impl; | |
2 | - | |
3 | -import com.diligrp.mobsite.getway.rpc.seller.SellerShopRPC; | |
4 | -import org.springframework.stereotype.Service; | |
5 | - | |
6 | - | |
7 | -/** | |
8 | - * <B>Description</B> 订单rpc <br /> | |
9 | - * <B>Copyright</B> Copyright (c) 2014 www.diligrp.com All rights reserved. <br /> | |
10 | - * 本软件源代码版权归地利集团,未经许可不得任意复制与传播.<br /> | |
11 | - * <B>Company</B> 地利集团 | |
12 | - * | |
13 | - * @author duanyugen | |
14 | - * @createTime 2014年9月1日 下午6:31:13 | |
15 | - */ | |
16 | -@Service("sellerShopRPC") | |
17 | -public class SellerShopRPCImpl implements SellerShopRPC { | |
18 | - | |
19 | - | |
20 | -} | |
21 | 0 | \ No newline at end of file |
mobsite-getway-service/src/main/java/com/diligrp/mobsite/getway/service/buyer/home/impl/TopicServiceImpl.java
... | ... | @@ -12,8 +12,8 @@ import com.diligrp.mobsite.getway.domain.protocol.topic.model.HomeStatisticsTopi |
12 | 12 | import com.diligrp.mobsite.getway.domain.protocol.topic.model.PicInfo; |
13 | 13 | import com.diligrp.mobsite.getway.domain.protocol.topic.model.TopicCategory; |
14 | 14 | import com.diligrp.mobsite.getway.domain.protocol.topic.model.TopicDetail; |
15 | -import com.diligrp.mobsite.getway.rpc.buyer.CmsRPC; | |
16 | -import com.diligrp.mobsite.getway.rpc.buyer.impl.CmsRPCImpl; | |
15 | +import com.diligrp.mobsite.getway.rpc.CmsRPC; | |
16 | +import com.diligrp.mobsite.getway.rpc.impl.CmsRPCImpl; | |
17 | 17 | import com.diligrp.mobsite.getway.service.buyer.home.TopicService; |
18 | 18 | import com.diligrp.mobsite.getway.service.common.utils.DateUtils; |
19 | 19 | import com.diligrp.website.util.security.Validator; | ... | ... |
mobsite-getway-service/src/main/java/com/diligrp/mobsite/getway/service/buyer/settle/impl/ConsigneeServiceImpl.java
... | ... | @@ -5,7 +5,7 @@ import com.diligrp.mobsite.getway.domain.common.ResultCode; |
5 | 5 | import com.diligrp.mobsite.getway.domain.except.ServiceException; |
6 | 6 | import com.diligrp.mobsite.getway.domain.protocol.ConsigneeInfo; |
7 | 7 | import com.diligrp.mobsite.getway.domain.protocol.cart.*; |
8 | -import com.diligrp.mobsite.getway.rpc.buyer.UserRPC; | |
8 | +import com.diligrp.mobsite.getway.rpc.UserRPC; | |
9 | 9 | import com.diligrp.mobsite.getway.service.buyer.settle.ConsigneeService; |
10 | 10 | import com.diligrp.website.util.security.Validator; |
11 | 11 | import org.springframework.stereotype.Service; | ... | ... |
mobsite-getway-service/src/main/java/com/diligrp/mobsite/getway/service/buyer/user/UserService.java
1 | 1 | package com.diligrp.mobsite.getway.service.buyer.user; |
2 | 2 | |
3 | -import com.diligrp.mobsite.getway.domain.protocol.login.CheckVeriCodeReq; | |
4 | -import com.diligrp.mobsite.getway.domain.protocol.login.CheckVeriCodeResp; | |
5 | -import com.diligrp.mobsite.getway.domain.protocol.login.LoginReq; | |
6 | -import com.diligrp.mobsite.getway.domain.protocol.login.LoginResp; | |
7 | -import com.diligrp.mobsite.getway.domain.protocol.login.LogoutReq; | |
8 | -import com.diligrp.mobsite.getway.domain.protocol.login.LogoutResp; | |
9 | -import com.diligrp.mobsite.getway.domain.protocol.login.SendVeriCodeReq; | |
10 | -import com.diligrp.mobsite.getway.domain.protocol.login.SendVeriCodeResp; | |
3 | +import com.diligrp.mobsite.getway.domain.protocol.login.*; | |
11 | 4 | import com.diligrp.mobsite.getway.domain.protocol.register.CheckAccountNameReq; |
12 | 5 | import com.diligrp.mobsite.getway.domain.protocol.register.CheckAccountNameResp; |
13 | 6 | import com.diligrp.mobsite.getway.domain.protocol.register.CheckMobileReq; |
... | ... | @@ -183,4 +176,6 @@ public interface UserService { |
183 | 176 | TradeRecordResp getTradeRecord(TradeRecordReq req); |
184 | 177 | |
185 | 178 | SearchUserInfoResp searchBuyerInfo(SearchUserInfoReq req); |
179 | + | |
180 | + LoginResp authlogin(AuthLoginReq req); | |
186 | 181 | } | ... | ... |
mobsite-getway-service/src/main/java/com/diligrp/mobsite/getway/service/buyer/user/impl/OrderServiceImpl.java
... | ... | @@ -2,9 +2,7 @@ package com.diligrp.mobsite.getway.service.buyer.user.impl; |
2 | 2 | |
3 | 3 | |
4 | 4 | import com.diligrp.mobsite.getway.domain.protocol.order.*; |
5 | -import com.diligrp.mobsite.getway.rpc.buyer.*; | |
6 | -import com.diligrp.mobsite.getway.rpc.seller.SellerOrderRPC; | |
7 | -import com.diligrp.mobsite.getway.rpc.seller.SellerShopRPC; | |
5 | +import com.diligrp.mobsite.getway.rpc.*; | |
8 | 6 | import com.diligrp.mobsite.getway.service.buyer.user.OrderService; |
9 | 7 | import com.diligrp.website.util.redis.RedisUtil; |
10 | 8 | import com.diligrp.website.web.interfaces.WebsiteClient; |
... | ... | @@ -44,11 +42,7 @@ public class OrderServiceImpl implements OrderService { |
44 | 42 | |
45 | 43 | @Resource |
46 | 44 | private ShopRPC shopRPC; |
47 | - @Resource | |
48 | - private SellerShopRPC sellerShopRPC; | |
49 | 45 | |
50 | - @Resource | |
51 | - private SellerOrderRPC sellerOrderRPC; | |
52 | 46 | |
53 | 47 | |
54 | 48 | @Resource | ... | ... |
mobsite-getway-service/src/main/java/com/diligrp/mobsite/getway/service/buyer/user/impl/UserServiceImpl.java
1 | 1 | package com.diligrp.mobsite.getway.service.buyer.user.impl; |
2 | 2 | |
3 | +import com.alibaba.fastjson.JSONObject; | |
4 | +import com.b2c.myapp.common.api.buyerInfo.output.BuyerInfoOutput; | |
5 | +import com.diligrp.mobsite.getway.domain.common.Constant; | |
6 | +import com.diligrp.mobsite.getway.domain.common.ErrorMessage; | |
7 | +import com.diligrp.mobsite.getway.domain.common.RedisKey; | |
8 | +import com.diligrp.mobsite.getway.domain.common.ResultCode; | |
9 | +import com.diligrp.mobsite.getway.domain.except.ServiceException; | |
3 | 10 | import com.diligrp.mobsite.getway.domain.protocol.login.*; |
4 | 11 | import com.diligrp.mobsite.getway.domain.protocol.register.*; |
5 | 12 | import com.diligrp.mobsite.getway.domain.protocol.user.*; |
13 | +import com.diligrp.mobsite.getway.manager.common.RegisterNoMapperManager; | |
14 | +import com.diligrp.mobsite.getway.rpc.*; | |
15 | +import com.diligrp.mobsite.getway.rpc.utils.UserRedisUtil; | |
6 | 16 | import com.diligrp.mobsite.getway.service.buyer.user.UserService; |
17 | +import com.diligrp.mobsite.getway.service.common.utils.PassportUtils; | |
18 | +import com.diligrp.website.util.redis.impl.RedisUtilImpl; | |
19 | +import com.diligrp.website.util.security.Validator; | |
20 | +import com.diligrp.website.web.interfaces.domain.output.DataDictionaryResp; | |
21 | +import org.slf4j.Logger; | |
22 | +import org.slf4j.LoggerFactory; | |
23 | +import org.springframework.beans.factory.annotation.Autowired; | |
7 | 24 | import org.springframework.stereotype.Service; |
8 | 25 | |
26 | +import javax.annotation.Resource; | |
27 | +import java.util.HashMap; | |
28 | +import java.util.Map; | |
29 | + | |
9 | 30 | /** |
10 | 31 | * <B>Description</B> 用户 服务层 <br /> |
11 | 32 | * <B>Copyright</B> Copyright (c) 2014 www.diligrp.com All rights reserved. <br /> |
... | ... | @@ -18,6 +39,30 @@ import org.springframework.stereotype.Service; |
18 | 39 | @Service("userService") |
19 | 40 | public class UserServiceImpl implements UserService { |
20 | 41 | |
42 | + @Resource | |
43 | + private UserRPC userRPC; | |
44 | + @Resource | |
45 | + private GoodsRPC goodsRPC; | |
46 | + @Autowired | |
47 | + private RedisUtilImpl redisUtil; | |
48 | + @Autowired | |
49 | + private UserRedisUtil userRedisUtil; | |
50 | + | |
51 | + @Resource | |
52 | + private RegisterNoMapperManager registerNoMapperManager; | |
53 | + @Resource | |
54 | + private PassportRPC passportRPC; | |
55 | + @Resource | |
56 | + private ConfigRPC configRPC; | |
57 | + | |
58 | + @Resource | |
59 | + private ShopRPC shopRPC; | |
60 | + @Autowired | |
61 | + private MessageRPC messageRPC; | |
62 | + | |
63 | + | |
64 | + private static Logger logger = LoggerFactory.getLogger(UserServiceImpl.class); | |
65 | + | |
21 | 66 | @Override |
22 | 67 | public LoginResp login(LoginReq req) { |
23 | 68 | return null; |
... | ... | @@ -30,12 +75,77 @@ public class UserServiceImpl implements UserService { |
30 | 75 | |
31 | 76 | @Override |
32 | 77 | public CheckVeriCodeResp checkVeriCode(CheckVeriCodeReq req) { |
33 | - return null; | |
78 | + CheckVeriCodeResp resp = new CheckVeriCodeResp(); | |
79 | + | |
80 | + checkVeriCode(req.getVeriCode(), req.getMobile(),req.getMsgType()); | |
81 | + | |
82 | + return resp; | |
34 | 83 | } |
35 | 84 | |
36 | 85 | @Override |
37 | 86 | public SendVeriCodeResp sendVeriCode(SendVeriCodeReq req) { |
38 | - return null; | |
87 | + SendVeriCodeResp resp = new SendVeriCodeResp(); | |
88 | + | |
89 | + String mobile = req.getMobile(); | |
90 | + boolean existFlag = !userRPC.checkMobile(mobile); | |
91 | + | |
92 | + Integer msgType = req.getMsgType(); | |
93 | + String code = null; | |
94 | + String message = null; | |
95 | + | |
96 | + String redisKey = redisUtil.makeKey(RedisKey.USER_AUTH_CODE + String.valueOf(msgType), mobile); | |
97 | + String veriCode = redisUtil.getString(redisKey); | |
98 | + | |
99 | + if (Validator.isEmpty(veriCode)) { | |
100 | + //生成验证码 | |
101 | + veriCode = PassportUtils.generateMobileRandomNumber(); | |
102 | + redisUtil.setStringByExpire(redisKey, String.valueOf(veriCode), RedisKey.USER_SEND_VERICODE_EXPIRE_TIME); | |
103 | + } | |
104 | + | |
105 | + if (!Validator.isNull(msgType) && msgType != SendVeriCodeReq.MSG_TYPE_DEFAULT) { | |
106 | + if (msgType==SendVeriCodeReq.MSG_TYPE_REGISTER) { | |
107 | + //注册,电话号码已经存在 | |
108 | + if(existFlag){ | |
109 | + throw new ServiceException(ResultCode.BUSINESS_FAILED, ErrorMessage.USER_MOBILE_EXIST); | |
110 | + } | |
111 | + String passkey = configRPC.getSystemConfig(Constant.USER_REGISTER_PASS_KEY); | |
112 | + resp.setPassKey(passkey); | |
113 | + | |
114 | + messageRPC.sendSMSMsg(mobile, veriCode, Constant.SMS_CONTENT_ACCOUNT_REGISTRATION); | |
115 | + resp.setSendCode(SendVeriCodeResp.SEND_CODE_SUCCESS); | |
116 | + return resp; | |
117 | + }else if(msgType==SendVeriCodeReq.MSG_TYPE_RETRIEVE_PASSWORD) { | |
118 | + //找回密码,电话号码没有存在 | |
119 | + if (!existFlag) { | |
120 | + throw new ServiceException(ResultCode.BUSINESS_FAILED,ErrorMessage.USER_MOBILE_NOT_EXIST); | |
121 | + } | |
122 | + messageRPC.sendSMSMsg(mobile, veriCode,Constant.SMS_CONTENT_RETRIEVE_PASSWORD); | |
123 | + resp.setSendCode(SendVeriCodeResp.SEND_CODE_SUCCESS); | |
124 | + return resp; | |
125 | + }else if(msgType==SendVeriCodeReq.MSG_TYPE_MODIFY_NEW_MOBILE) { | |
126 | + //修改手机号,电话号码已经存在 | |
127 | + if (existFlag) { | |
128 | + throw new ServiceException(ResultCode.BUSINESS_FAILED,ErrorMessage.USER_MOBILE_EXIST); | |
129 | + } | |
130 | + code = Constant.SMS_CONTENT_MODIFY_OLD_PHONE; | |
131 | + }else if (msgType==SendVeriCodeReq.MSG_TYPE_CHECK_OLD_MOBILE) { | |
132 | + //验证旧的手机号,手机不存在 | |
133 | + if (!existFlag) { | |
134 | + throw new ServiceException(ResultCode.BUSINESS_FAILED,ErrorMessage.USER_MOBILE_NOT_EXIST); | |
135 | + } | |
136 | + code = Constant.SMS_CONTENT_MODIFY_OLD_PHONE; | |
137 | + } | |
138 | + DataDictionaryResp dataDic = configRPC.getMessageTemplate(Constant.DIC_SMS_CONTENT); | |
139 | + message = dataDic.getValueByCode(code).getRemark().replace("{code}", veriCode); | |
140 | + }else { | |
141 | + message = Constant.SMS_CONTENT_DEFAULT.replace("{code}", veriCode); | |
142 | + } | |
143 | + | |
144 | + messageRPC.sendSMS(mobile, message); | |
145 | + | |
146 | + resp.setSendCode(SendVeriCodeResp.SEND_CODE_SUCCESS); | |
147 | + | |
148 | + return resp; | |
39 | 149 | } |
40 | 150 | |
41 | 151 | @Override |
... | ... | @@ -55,7 +165,71 @@ public class UserServiceImpl implements UserService { |
55 | 165 | |
56 | 166 | @Override |
57 | 167 | public UserRegisterResp userRegister(UserRegisterReq req) { |
58 | - return null; | |
168 | + UserRegisterResp resp = new UserRegisterResp(); | |
169 | + | |
170 | + //手机号码和账号验证、验证码 | |
171 | + //if (!checkRegisterInfo(resp, req)) { | |
172 | + // return resp; | |
173 | + //} | |
174 | + | |
175 | + resp = passportRPC.register(req); | |
176 | + | |
177 | + return resp; | |
178 | + } | |
179 | + | |
180 | + | |
181 | + /** | |
182 | + * 检测注册信息是否正确 | |
183 | + * 1.电话号码 | |
184 | + * 2.账号,会员名 | |
185 | + * 3.验证码 | |
186 | + * @createTime 2014年10月31日 下午2:37:16 | |
187 | + * @author zhangshirui | |
188 | + */ | |
189 | + private boolean checkRegisterInfo(UserRegisterResp resp, UserRegisterReq req){ | |
190 | + if(!userRPC.checkMobile(req.getMobile())){ | |
191 | + throw new ServiceException(ResultCode.BUSINESS_FAILED,ErrorMessage.USER_MOBILE_EXIST); | |
192 | + } | |
193 | + //验证万能验证码 | |
194 | + String passkey = configRPC.getSystemConfig(Constant.USER_REGISTER_PASS_KEY); | |
195 | + if (req.getVeriCode().equals(passkey)) { | |
196 | + return true; | |
197 | + } | |
198 | + | |
199 | + checkVeriCode(req.getVeriCode(), req.getMobile(),SendVeriCodeReq.MSG_TYPE_REGISTER); | |
200 | + | |
201 | + return true; | |
202 | + } | |
203 | + | |
204 | + /** | |
205 | + * 根据验证码和电话号码,验证收到的验证码 | |
206 | + * | |
207 | + * @param code | |
208 | + * @param mobile | |
209 | + * @return | |
210 | + * @createTime 2014年8月28日 下午5:44:48 | |
211 | + * @author zhangshirui | |
212 | + */ | |
213 | + private void checkVeriCode(String code, String mobile,Integer msgType) { | |
214 | + | |
215 | + String redisKey = redisUtil.makeKey(RedisKey.USER_AUTH_CODE + String.valueOf(msgType), mobile); | |
216 | + | |
217 | + String redisCode = redisUtil.getString(redisKey); | |
218 | + | |
219 | + if(Validator.isEmpty(code)){ | |
220 | + throw new ServiceException(ResultCode.BUSINESS_FAILED,ErrorMessage.USER_AUTH_CODE_EMPTY); | |
221 | + } | |
222 | + | |
223 | + //验证码为空 | |
224 | + if (Validator.isEmpty(redisCode)) { | |
225 | + throw new ServiceException(ResultCode.BUSINESS_FAILED,ErrorMessage.USER_AUTH_CODE_OVERTIME); | |
226 | + } | |
227 | + | |
228 | + //验证码不为空,并且和redis中的验证码相同 | |
229 | + if (!code.equals(redisCode)) { | |
230 | + throw new ServiceException(ResultCode.BUSINESS_FAILED,ErrorMessage.USER_AUTH_CODE_WRONG); | |
231 | + } | |
232 | + | |
59 | 233 | } |
60 | 234 | |
61 | 235 | @Override |
... | ... | @@ -115,7 +289,36 @@ public class UserServiceImpl implements UserService { |
115 | 289 | |
116 | 290 | @Override |
117 | 291 | public ModifyPwdResp modifyPwd(ModifyPwdReq req) { |
118 | - return null; | |
292 | + BuyerInfoOutput userInfo = userRPC.getUserByMobile(req.getAccountName()); | |
293 | + Long userId = userInfo.getId(); | |
294 | + | |
295 | + | |
296 | + Map<String,String> params = new HashMap<String, String>(); | |
297 | + params.put("password", req.getPassword()); | |
298 | + params.put("accountId", String.valueOf(userId)); | |
299 | + | |
300 | + | |
301 | + String result = passportRPC.modifyPwd(params); | |
302 | + | |
303 | + JSONObject jsonBody = JSONObject.parseObject(result); | |
304 | + int code = jsonBody.getIntValue("code"); | |
305 | + ModifyPwdResp resp = new ModifyPwdResp(); | |
306 | + resp.setMsg(jsonBody.getString("msg")); | |
307 | + | |
308 | + if(code != ResultCode.SUCCESS){ | |
309 | + //失败 | |
310 | + resp.setCode(ResultCode.BUSINESS_FAILED); | |
311 | + resp.setResultFlag(ModifyPwdResp.RESULT_FLAG_FAILED); | |
312 | + return resp; | |
313 | + }else { | |
314 | + //修改成功,退出所有账号信息 | |
315 | + String cookieRedisKey = redisUtil.makeKey(RedisKey.USER_LOGININFO, String.valueOf(userId)); | |
316 | + redisUtil.deleteByKey(cookieRedisKey); | |
317 | + } | |
318 | + | |
319 | + logger.info("修改用户密码"+jsonBody.getString("msg")); | |
320 | + | |
321 | + return resp; | |
119 | 322 | } |
120 | 323 | |
121 | 324 | @Override |
... | ... | @@ -172,4 +375,9 @@ public class UserServiceImpl implements UserService { |
172 | 375 | public SearchUserInfoResp searchBuyerInfo(SearchUserInfoReq req) { |
173 | 376 | return null; |
174 | 377 | } |
378 | + | |
379 | + @Override | |
380 | + public LoginResp authlogin(AuthLoginReq req) { | |
381 | + return null; | |
382 | + } | |
175 | 383 | } | ... | ... |
mobsite-getway-service/src/main/java/com/diligrp/mobsite/getway/service/common/impl/CommonServiceImpl.java
... | ... | @@ -8,8 +8,8 @@ import com.diligrp.mobsite.getway.domain.protocol.City; |
8 | 8 | import com.diligrp.mobsite.getway.domain.protocol.common.*; |
9 | 9 | import com.diligrp.mobsite.getway.domain.protocol.common.model.UnitInfo; |
10 | 10 | import com.diligrp.mobsite.getway.domain.protocol.user.MemberInfo; |
11 | -import com.diligrp.mobsite.getway.rpc.buyer.ConfigRPC; | |
12 | -import com.diligrp.mobsite.getway.rpc.buyer.StoreRPC; | |
11 | +import com.diligrp.mobsite.getway.rpc.ConfigRPC; | |
12 | +import com.diligrp.mobsite.getway.rpc.StoreRPC; | |
13 | 13 | import com.diligrp.mobsite.getway.service.common.CommonService; |
14 | 14 | import com.diligrp.website.util.security.Validator; |
15 | 15 | import com.diligrp.website.web.interfaces.domain.output.CityResp; | ... | ... |
mobsite-getway-service/src/main/java/com/diligrp/mobsite/getway/service/common/impl/VersionUpdateServiceImpl.java
... | ... | @@ -15,7 +15,7 @@ import com.diligrp.mobsite.getway.domain.protocol.version.model.AppPatch; |
15 | 15 | import com.diligrp.mobsite.getway.manager.common.AppPatchManager; |
16 | 16 | import com.diligrp.mobsite.getway.manager.common.FeedBackManager; |
17 | 17 | import com.diligrp.mobsite.getway.manager.common.VersionUpdateManager; |
18 | -import com.diligrp.mobsite.getway.rpc.buyer.UserRPC; | |
18 | +import com.diligrp.mobsite.getway.rpc.UserRPC; | |
19 | 19 | import com.diligrp.mobsite.getway.service.common.VersionUpdateService; |
20 | 20 | import com.diligrp.website.util.dao.BaseQuery; |
21 | 21 | import com.diligrp.website.util.security.Validator; | ... | ... |
mobsite-getway-service/src/main/java/com/diligrp/mobsite/getway/service/seller/FundService.java
... | ... | @@ -9,9 +9,9 @@ import com.diligrp.mobsite.getway.domain.protocol.fund.*; |
9 | 9 | public interface FundService { |
10 | 10 | |
11 | 11 | |
12 | - public GetFundsResp getFunds(GetFundsReq req) ; | |
12 | + public GetFundsResp getFunds(GetFundsReq fundsReq) ; | |
13 | 13 | |
14 | - FundTradeResp fundTrade(FundTradeReq req); | |
14 | + FundTradeResp storeValue(Long price); | |
15 | 15 | |
16 | 16 | GetfundTradeRecordResp getfundTradeRecord(GetfundTradeRecordReq req); |
17 | 17 | } | ... | ... |
mobsite-getway-service/src/main/java/com/diligrp/mobsite/getway/service/seller/SellerShopService.java
... | ... | @@ -15,7 +15,7 @@ import com.diligrp.mobsite.getway.domain.protocol.shop.*; |
15 | 15 | */ |
16 | 16 | public interface SellerShopService { |
17 | 17 | |
18 | - CreateOrUpdateShopResp createShop(CreateOrUpdateShopReq req); | |
18 | + CreateShopResp createShop(CreateShopReq req); | |
19 | 19 | |
20 | 20 | GetShopInfoResp getShopInfo(BaseReq req); |
21 | 21 | |
... | ... | @@ -26,4 +26,6 @@ public interface SellerShopService { |
26 | 26 | GetShopDeliveryTimeResp getShopDeliveryTime(GetShopDeliveryTimeReq req); |
27 | 27 | |
28 | 28 | DelShopDeliveryTimeResp delShopDeliveryTime(DelShopDeliveryTimeReq req); |
29 | + | |
30 | + CreateShopResp updateShop(UpdateShopReq req); | |
29 | 31 | } | ... | ... |
mobsite-getway-service/src/main/java/com/diligrp/mobsite/getway/service/seller/SellerUserService.java
1 | 1 | package com.diligrp.mobsite.getway.service.seller; |
2 | 2 | |
3 | -import com.diligrp.mobsite.getway.domain.protocol.BaseResp; | |
4 | -import com.diligrp.mobsite.getway.domain.protocol.saler.user.*; | |
3 | +import com.diligrp.mobsite.getway.domain.protocol.login.*; | |
4 | +import com.diligrp.mobsite.getway.domain.protocol.register.*; | |
5 | +import com.diligrp.mobsite.getway.domain.protocol.saler.user.SellerLoginReq; | |
6 | +import com.diligrp.mobsite.getway.domain.protocol.saler.user.SellerLoginResp; | |
7 | +import com.diligrp.mobsite.getway.domain.protocol.user.*; | |
5 | 8 | |
6 | 9 | |
7 | 10 | /** |
... | ... | @@ -23,61 +26,22 @@ public interface SellerUserService { |
23 | 26 | */ |
24 | 27 | SellerLoginResp login(SellerLoginReq req) throws RuntimeException; |
25 | 28 | |
26 | - /** | |
27 | - *卖家申请开店 | |
28 | - * */ | |
29 | - @Deprecated | |
30 | - BaseResp sellerAplyShop(SellerApplyShopReq req) throws RuntimeException; | |
31 | - | |
32 | - /** | |
33 | - *卖家申请开店 | |
34 | - * */ | |
35 | - BaseResp sellerAplyShopNew(SellerApplyShopNewReq req); | |
36 | 29 | |
37 | - /** | |
38 | - *卖家修改店铺信息 | |
39 | - * */ | |
40 | - BaseResp sellerModifyShop(SellerModifyShopRequest req); | |
41 | - | |
42 | - /** | |
43 | - *获取店铺详情 | |
44 | - * */ | |
45 | - SellerShopResp getShopDetail(GetSellerShopReq req) throws RuntimeException; | |
46 | 30 | |
47 | - /*** | |
48 | - * 开启或关闭赊销功能 1开启 2 关闭 | |
49 | - * */ | |
50 | - BaseResp openOrCloseShopCredit(OpenOrCloseReq req) throws RuntimeException; | |
51 | 31 | |
52 | - /*** | |
53 | - * 增加vip用户 | |
54 | - * */ | |
55 | - BaseResp saveVipUser(VipUserReq req) throws RuntimeException; | |
32 | + SendVeriCodeResp sendVeriCode(SendVeriCodeReq req); | |
56 | 33 | |
57 | - /*** | |
58 | - * 删除vip用户 | |
59 | - * */ | |
60 | - BaseResp deleteVipUser(VipUserReq req) throws RuntimeException; | |
34 | + CheckVeriCodeResp checkVeriCode(CheckVeriCodeReq req); | |
61 | 35 | |
62 | - /*** | |
63 | - * 修改vip用户 | |
64 | - * */ | |
65 | - BaseResp updateVipUser(VipUserReq req) throws RuntimeException; | |
36 | + CheckMobileResp checkMobile(CheckMobileReq req); | |
66 | 37 | |
67 | - /*** | |
68 | - * 查询vip用户号码在店铺是否存在 | |
69 | - * */ | |
70 | - CheckVipExisitResp isExistsNumber(VipUserReq req) throws RuntimeException; | |
38 | + ModifyPwdResp modifyPwd(ModifyPwdReq req); | |
71 | 39 | |
72 | - /*** | |
73 | - * 获取赊账用户列表 | |
74 | - * */ | |
75 | - SellerShopVipListResp queryVipUser(VipUserQueryReq req) throws RuntimeException; | |
40 | + SellerRegisterResp sellerRegister(SellerRegisterReq req); | |
76 | 41 | |
77 | - /*** | |
78 | - * 开启或关闭vip用户 | |
79 | - * */ | |
80 | - OpenOrCloseVipUserResp closeOrOpenVipUser(CloseOrOpenVipUserReq req); | |
42 | + LogoutResp logout(LogoutReq req); | |
81 | 43 | |
44 | + UpdateUserInfoResp updateUserInfo(UpdateUserInfoReq req); | |
82 | 45 | |
46 | + GetUserInfoResp getUserIntroduction(GetUserInfoReq req); | |
83 | 47 | } | ... | ... |
mobsite-getway-service/src/main/java/com/diligrp/mobsite/getway/service/seller/impl/FundServiceImpl.java
1 | 1 | package com.diligrp.mobsite.getway.service.seller.impl; |
2 | 2 | |
3 | +import com.b2c.myapp.common.api.shop.output.ShopOutput; | |
4 | +import com.b2c.myapp.common.api.shopBuyer.input.ShopBuyerDetail; | |
5 | +import com.b2c.myapp.common.api.shopBuyer.input.ShopBuyerListInput; | |
6 | +import com.b2c.myapp.common.api.shopBuyer.output.ShopBuyerDetailOutput; | |
7 | +import com.b2c.myapp.common.utils.base.Page; | |
3 | 8 | import com.diligrp.mobsite.getway.domain.protocol.fund.*; |
9 | +import com.diligrp.mobsite.getway.rpc.ShopBuyerRPC; | |
10 | +import com.diligrp.mobsite.getway.rpc.ShopRPC; | |
4 | 11 | import com.diligrp.mobsite.getway.service.seller.FundService; |
12 | +import org.springframework.beans.factory.annotation.Autowired; | |
5 | 13 | import org.springframework.stereotype.Service; |
6 | 14 | |
7 | 15 | /** |
... | ... | @@ -9,13 +17,30 @@ import org.springframework.stereotype.Service; |
9 | 17 | */ |
10 | 18 | @Service |
11 | 19 | public class FundServiceImpl implements FundService{ |
20 | + @Autowired | |
21 | + private ShopBuyerRPC shopBuyerRPC; | |
22 | + @Autowired | |
23 | + private ShopRPC shopRPC; | |
12 | 24 | @Override |
13 | - public GetFundsResp getFunds(GetFundsReq req) { | |
14 | - return null; | |
25 | + public GetFundsResp getFunds(GetFundsReq fundsReq) { | |
26 | + ShopBuyerDetail shopBuyerDetail = new ShopBuyerDetail(); | |
27 | + shopBuyerDetail.setShopId(fundsReq.getShopId()); | |
28 | + shopBuyerDetail.setBuyerMobilePhone(fundsReq.getKeyword()); | |
29 | + Page<ShopBuyerDetailOutput> shopBuyerDetailOutputPage = shopBuyerRPC.queryShopAllBuyerList(shopBuyerDetail); | |
30 | + ShopOutput shopOutput = shopRPC.getShopByShopId(fundsReq.getShopId()); | |
31 | + | |
32 | + GetFundsResp fundsResp = new GetFundsResp(); | |
33 | + fundsResp.setFreezeTotalPrice(shopOutput.getFreezeTotalPrice()); | |
34 | + fundsResp.setResidueTotalPrice(shopOutput.getResidueTotalPrice()); | |
35 | + fundsResp.setStoredTotalPrice(shopOutput.getStoredTotalPrice()); | |
36 | + fundsResp.setShopBuyers(shopBuyerDetailOutputPage.getResult()); | |
37 | + fundsResp.setMaxPageNum(shopBuyerDetailOutputPage.getPageCount()); | |
38 | + return fundsResp; | |
15 | 39 | } |
16 | 40 | |
17 | 41 | @Override |
18 | - public FundTradeResp fundTrade(FundTradeReq req) { | |
42 | + public FundTradeResp storeValue(Long price) { | |
43 | + | |
19 | 44 | return null; |
20 | 45 | } |
21 | 46 | ... | ... |
mobsite-getway-service/src/main/java/com/diligrp/mobsite/getway/service/seller/impl/SellerGoodsServiceImpl.java
... | ... | @@ -3,10 +3,9 @@ package com.diligrp.mobsite.getway.service.seller.impl; |
3 | 3 | import com.diligrp.mobsite.getway.domain.protocol.product.*; |
4 | 4 | import com.diligrp.mobsite.getway.domain.protocol.saler.SellerUpdateProductReq; |
5 | 5 | import com.diligrp.mobsite.getway.domain.protocol.saler.product.*; |
6 | -import com.diligrp.mobsite.getway.rpc.buyer.ConfigRPC; | |
7 | -import com.diligrp.mobsite.getway.rpc.buyer.GoodsRPC; | |
8 | -import com.diligrp.mobsite.getway.rpc.buyer.UserRPC; | |
9 | -import com.diligrp.mobsite.getway.rpc.seller.SellerProductRPC; | |
6 | +import com.diligrp.mobsite.getway.rpc.ConfigRPC; | |
7 | +import com.diligrp.mobsite.getway.rpc.GoodsRPC; | |
8 | +import com.diligrp.mobsite.getway.rpc.UserRPC; | |
10 | 9 | import com.diligrp.mobsite.getway.service.seller.SellerGoodsService; |
11 | 10 | import com.yqyw.filter.client.KeyWordsClient; |
12 | 11 | import org.apache.log4j.Logger; |
... | ... | @@ -30,8 +29,6 @@ public class SellerGoodsServiceImpl implements SellerGoodsService { |
30 | 29 | private UserRPC userRPC; |
31 | 30 | @Autowired |
32 | 31 | private ConfigRPC configRpc; |
33 | - @Resource | |
34 | - private SellerProductRPC sellerProductRPC; | |
35 | 32 | |
36 | 33 | @Resource |
37 | 34 | private GoodsRPC goodsRPC; | ... | ... |
mobsite-getway-service/src/main/java/com/diligrp/mobsite/getway/service/seller/impl/SellerShopServiceImpl.java
... | ... | @@ -20,7 +20,7 @@ import org.springframework.stereotype.Service; |
20 | 20 | public class SellerShopServiceImpl implements SellerShopService { |
21 | 21 | |
22 | 22 | @Override |
23 | - public CreateOrUpdateShopResp createShop(CreateOrUpdateShopReq req) { | |
23 | + public CreateShopResp createShop(CreateShopReq req) { | |
24 | 24 | return null; |
25 | 25 | } |
26 | 26 | |
... | ... | @@ -48,4 +48,9 @@ public class SellerShopServiceImpl implements SellerShopService { |
48 | 48 | public DelShopDeliveryTimeResp delShopDeliveryTime(DelShopDeliveryTimeReq req) { |
49 | 49 | return null; |
50 | 50 | } |
51 | + | |
52 | + @Override | |
53 | + public CreateShopResp updateShop(UpdateShopReq req) { | |
54 | + return null; | |
55 | + } | |
51 | 56 | } | ... | ... |
mobsite-getway-service/src/main/java/com/diligrp/mobsite/getway/service/seller/impl/SellerUserServiceImpl.java
1 | 1 | package com.diligrp.mobsite.getway.service.seller.impl; |
2 | 2 | |
3 | -import com.diligrp.mobsite.getway.domain.protocol.BaseResp; | |
4 | -import com.diligrp.mobsite.getway.domain.protocol.saler.user.*; | |
3 | +import com.alibaba.fastjson.JSONObject; | |
4 | +import com.b2c.myapp.common.api.sellerInfo.output.SellerInfoOutput; | |
5 | +import com.diligrp.mobsite.getway.domain.common.Constant; | |
6 | +import com.diligrp.mobsite.getway.domain.common.ErrorMessage; | |
7 | +import com.diligrp.mobsite.getway.domain.common.RedisKey; | |
8 | +import com.diligrp.mobsite.getway.domain.common.ResultCode; | |
9 | +import com.diligrp.mobsite.getway.domain.except.ServiceException; | |
10 | +import com.diligrp.mobsite.getway.domain.protocol.login.*; | |
11 | +import com.diligrp.mobsite.getway.domain.protocol.register.*; | |
12 | +import com.diligrp.mobsite.getway.domain.protocol.saler.user.SellerLoginReq; | |
13 | +import com.diligrp.mobsite.getway.domain.protocol.saler.user.SellerLoginResp; | |
14 | +import com.diligrp.mobsite.getway.domain.protocol.user.*; | |
15 | +import com.diligrp.mobsite.getway.manager.common.RegisterNoMapperManager; | |
16 | +import com.diligrp.mobsite.getway.rpc.*; | |
17 | +import com.diligrp.mobsite.getway.rpc.utils.UserRedisUtil; | |
18 | +import com.diligrp.mobsite.getway.service.common.utils.PassportUtils; | |
5 | 19 | import com.diligrp.mobsite.getway.service.seller.SellerUserService; |
20 | +import com.diligrp.website.util.redis.impl.RedisUtilImpl; | |
21 | +import com.diligrp.website.util.security.Validator; | |
22 | +import com.diligrp.website.web.interfaces.domain.output.DataDictionaryResp; | |
23 | +import org.slf4j.Logger; | |
24 | +import org.slf4j.LoggerFactory; | |
25 | +import org.springframework.beans.factory.annotation.Autowired; | |
6 | 26 | import org.springframework.stereotype.Service; |
7 | 27 | |
28 | +import javax.annotation.Resource; | |
29 | +import java.util.HashMap; | |
30 | +import java.util.Map; | |
31 | + | |
8 | 32 | |
9 | 33 | /** |
10 | 34 | * <B>Description</B> 卖家用户信息 <br /> |
... | ... | @@ -17,6 +41,29 @@ import org.springframework.stereotype.Service; |
17 | 41 | @Service |
18 | 42 | public class SellerUserServiceImpl implements SellerUserService { |
19 | 43 | |
44 | + @Resource | |
45 | + private SellerRPC sellerRPC; | |
46 | + @Resource | |
47 | + private GoodsRPC goodsRPC; | |
48 | + @Autowired | |
49 | + private RedisUtilImpl redisUtil; | |
50 | + @Autowired | |
51 | + private UserRedisUtil userRedisUtil; | |
52 | + | |
53 | + @Resource | |
54 | + private RegisterNoMapperManager registerNoMapperManager; | |
55 | + @Resource | |
56 | + private PassportRPC passportRPC; | |
57 | + @Resource | |
58 | + private ConfigRPC configRPC; | |
59 | + | |
60 | + @Resource | |
61 | + private ShopRPC shopRPC; | |
62 | + @Autowired | |
63 | + private MessageRPC messageRPC; | |
64 | + | |
65 | + | |
66 | + private static Logger logger = LoggerFactory.getLogger(SellerUserServiceImpl.class); | |
20 | 67 | |
21 | 68 | @Override |
22 | 69 | public SellerLoginResp login(SellerLoginReq req) throws RuntimeException { |
... | ... | @@ -24,57 +71,138 @@ public class SellerUserServiceImpl implements SellerUserService { |
24 | 71 | } |
25 | 72 | |
26 | 73 | @Override |
27 | - public BaseResp sellerAplyShop(SellerApplyShopReq req) throws RuntimeException { | |
28 | - return null; | |
74 | + public SendVeriCodeResp sendVeriCode(SendVeriCodeReq req) { | |
75 | + SendVeriCodeResp resp = new SendVeriCodeResp(); | |
76 | + | |
77 | + String mobile = req.getMobile(); | |
78 | + boolean existFlag = !sellerRPC.checkMobile(mobile); | |
79 | + | |
80 | + Integer msgType = req.getMsgType(); | |
81 | + String code = null; | |
82 | + String message = null; | |
83 | + | |
84 | + String redisKey = redisUtil.makeKey(RedisKey.USER_AUTH_CODE + String.valueOf(msgType), mobile); | |
85 | + String veriCode = redisUtil.getString(redisKey); | |
86 | + | |
87 | + if (Validator.isEmpty(veriCode)) { | |
88 | + //生成验证码 | |
89 | + veriCode = PassportUtils.generateMobileRandomNumber(); | |
90 | + redisUtil.setStringByExpire(redisKey, String.valueOf(veriCode), RedisKey.USER_SEND_VERICODE_EXPIRE_TIME); | |
91 | + } | |
92 | + | |
93 | + if (!Validator.isNull(msgType) && msgType != SendVeriCodeReq.MSG_TYPE_DEFAULT) { | |
94 | + if (msgType==SendVeriCodeReq.MSG_TYPE_REGISTER) { | |
95 | + //注册,电话号码已经存在 | |
96 | + if(existFlag){ | |
97 | + throw new ServiceException(ResultCode.BUSINESS_FAILED, ErrorMessage.USER_MOBILE_EXIST); | |
98 | + } | |
99 | + String passkey = configRPC.getSystemConfig(Constant.USER_REGISTER_PASS_KEY); | |
100 | + resp.setPassKey(passkey); | |
101 | + | |
102 | + messageRPC.sendSMSMsg(mobile, veriCode, Constant.SMS_CONTENT_ACCOUNT_REGISTRATION); | |
103 | + resp.setSendCode(SendVeriCodeResp.SEND_CODE_SUCCESS); | |
104 | + return resp; | |
105 | + }else if(msgType==SendVeriCodeReq.MSG_TYPE_RETRIEVE_PASSWORD) { | |
106 | + //找回密码,电话号码没有存在 | |
107 | + if (!existFlag) { | |
108 | + throw new ServiceException(ResultCode.BUSINESS_FAILED,ErrorMessage.USER_MOBILE_NOT_EXIST); | |
109 | + } | |
110 | + messageRPC.sendSMSMsg(mobile, veriCode,Constant.SMS_CONTENT_RETRIEVE_PASSWORD); | |
111 | + resp.setSendCode(SendVeriCodeResp.SEND_CODE_SUCCESS); | |
112 | + return resp; | |
113 | + }else if(msgType==SendVeriCodeReq.MSG_TYPE_MODIFY_NEW_MOBILE) { | |
114 | + //修改手机号,电话号码已经存在 | |
115 | + if (existFlag) { | |
116 | + throw new ServiceException(ResultCode.BUSINESS_FAILED,ErrorMessage.USER_MOBILE_EXIST); | |
117 | + } | |
118 | + code = Constant.SMS_CONTENT_MODIFY_OLD_PHONE; | |
119 | + }else if (msgType==SendVeriCodeReq.MSG_TYPE_CHECK_OLD_MOBILE) { | |
120 | + //验证旧的手机号,手机不存在 | |
121 | + if (!existFlag) { | |
122 | + throw new ServiceException(ResultCode.BUSINESS_FAILED,ErrorMessage.USER_MOBILE_NOT_EXIST); | |
123 | + } | |
124 | + code = Constant.SMS_CONTENT_MODIFY_OLD_PHONE; | |
125 | + } | |
126 | + DataDictionaryResp dataDic = configRPC.getMessageTemplate(Constant.DIC_SMS_CONTENT); | |
127 | + message = dataDic.getValueByCode(code).getRemark().replace("{code}", veriCode); | |
128 | + }else { | |
129 | + message = Constant.SMS_CONTENT_DEFAULT.replace("{code}", veriCode); | |
130 | + } | |
131 | + | |
132 | + messageRPC.sendSMS(mobile, message); | |
133 | + | |
134 | + resp.setSendCode(SendVeriCodeResp.SEND_CODE_SUCCESS); | |
135 | + | |
136 | + return resp; | |
29 | 137 | } |
30 | 138 | |
31 | 139 | @Override |
32 | - public BaseResp sellerAplyShopNew(SellerApplyShopNewReq req) { | |
140 | + public CheckVeriCodeResp checkVeriCode(CheckVeriCodeReq req) { | |
33 | 141 | return null; |
34 | 142 | } |
35 | 143 | |
36 | 144 | @Override |
37 | - public BaseResp sellerModifyShop(SellerModifyShopRequest req) { | |
38 | - return null; | |
39 | - } | |
145 | + public CheckMobileResp checkMobile(CheckMobileReq req) { | |
146 | + CheckMobileResp resp = new CheckMobileResp(); | |
40 | 147 | |
41 | - @Override | |
42 | - public SellerShopResp getShopDetail(GetSellerShopReq req) throws RuntimeException { | |
43 | - return null; | |
44 | - } | |
148 | + boolean flag = sellerRPC.checkMobile(req.getMobile()); | |
45 | 149 | |
46 | - @Override | |
47 | - public BaseResp openOrCloseShopCredit(OpenOrCloseReq req) throws RuntimeException { | |
48 | - return null; | |
49 | - } | |
150 | + resp.setCheckFlag(flag ? CheckMobileResp.CHECK_FLAG_OK : CheckMobileResp.CHECK_FLAG_ERROR); | |
50 | 151 | |
51 | - @Override | |
52 | - public BaseResp saveVipUser(VipUserReq req) throws RuntimeException { | |
53 | - return null; | |
152 | + return resp; | |
54 | 153 | } |
55 | 154 | |
56 | 155 | @Override |
57 | - public BaseResp deleteVipUser(VipUserReq req) throws RuntimeException { | |
58 | - return null; | |
156 | + public ModifyPwdResp modifyPwd(ModifyPwdReq req) { | |
157 | + SellerInfoOutput userInfo = sellerRPC.getSellerByMobile(req.getAccountName()); | |
158 | + Long userId = userInfo.getId(); | |
159 | + | |
160 | + | |
161 | + Map<String,String> params = new HashMap<String, String>(); | |
162 | + params.put("password", req.getPassword()); | |
163 | + params.put("accountId", String.valueOf(userId)); | |
164 | + | |
165 | + | |
166 | + String result = passportRPC.modifyPwd(params); | |
167 | + | |
168 | + JSONObject jsonBody = JSONObject.parseObject(result); | |
169 | + int code = jsonBody.getIntValue("code"); | |
170 | + ModifyPwdResp resp = new ModifyPwdResp(); | |
171 | + resp.setMsg(jsonBody.getString("msg")); | |
172 | + | |
173 | + if(code != ResultCode.SUCCESS){ | |
174 | + //失败 | |
175 | + resp.setCode(ResultCode.BUSINESS_FAILED); | |
176 | + resp.setResultFlag(ModifyPwdResp.RESULT_FLAG_FAILED); | |
177 | + return resp; | |
178 | + }else { | |
179 | + //修改成功,退出所有账号信息 | |
180 | + String cookieRedisKey = redisUtil.makeKey(RedisKey.USER_LOGININFO, String.valueOf(userId)); | |
181 | + redisUtil.deleteByKey(cookieRedisKey); | |
182 | + } | |
183 | + | |
184 | + logger.info("修改用户密码"+jsonBody.getString("msg")); | |
185 | + | |
186 | + return resp; | |
59 | 187 | } |
60 | 188 | |
61 | 189 | @Override |
62 | - public BaseResp updateVipUser(VipUserReq req) throws RuntimeException { | |
190 | + public SellerRegisterResp sellerRegister(SellerRegisterReq req) { | |
63 | 191 | return null; |
64 | 192 | } |
65 | 193 | |
66 | 194 | @Override |
67 | - public CheckVipExisitResp isExistsNumber(VipUserReq req) throws RuntimeException { | |
195 | + public LogoutResp logout(LogoutReq req) { | |
68 | 196 | return null; |
69 | 197 | } |
70 | 198 | |
71 | 199 | @Override |
72 | - public SellerShopVipListResp queryVipUser(VipUserQueryReq req) throws RuntimeException { | |
200 | + public UpdateUserInfoResp updateUserInfo(UpdateUserInfoReq req) { | |
73 | 201 | return null; |
74 | 202 | } |
75 | 203 | |
76 | 204 | @Override |
77 | - public OpenOrCloseVipUserResp closeOrOpenVipUser(CloseOrOpenVipUserReq req) { | |
205 | + public GetUserInfoResp getUserIntroduction(GetUserInfoReq req) { | |
78 | 206 | return null; |
79 | 207 | } |
80 | 208 | } | ... | ... |
mobsite-getway-web/pom.xml
... | ... | @@ -72,7 +72,7 @@ |
72 | 72 | <profile> |
73 | 73 | <id>dev</id> |
74 | 74 | <activation> |
75 | - <activeByDefault>false</activeByDefault> | |
75 | + <activeByDefault>true</activeByDefault> | |
76 | 76 | </activation> |
77 | 77 | <properties> |
78 | 78 | <!-- 显示模板 --> |
... | ... | @@ -214,7 +214,7 @@ |
214 | 214 | <website.act.token>token</website.act.token> |
215 | 215 | |
216 | 216 | <!-- interface user --> |
217 | - <website.user.baseUrl>http://user.zandeapp.com</website.user.baseUrl> | |
217 | + <website.user.baseUrl>http://shopuser.zandeapp.com</website.user.baseUrl> | |
218 | 218 | <website.user.token>token</website.user.token> |
219 | 219 | |
220 | 220 | <!-- interface order --> |
... | ... | @@ -367,7 +367,7 @@ |
367 | 367 | <website.act.token>token</website.act.token> |
368 | 368 | |
369 | 369 | <!-- interface user --> |
370 | - <website.user.baseUrl>http://user.zandeapp.com</website.user.baseUrl> | |
370 | + <website.user.baseUrl>http://shopuser.zandeapp.com</website.user.baseUrl> | |
371 | 371 | <website.user.token>token</website.user.token> |
372 | 372 | |
373 | 373 | <!-- interface order --> |
... | ... | @@ -514,7 +514,7 @@ |
514 | 514 | |
515 | 515 | |
516 | 516 | <!-- interface user --> |
517 | - <website.user.baseUrl>http://user.zandeapp.com</website.user.baseUrl> | |
517 | + <website.user.baseUrl>http://shopuser.zandeapp.com</website.user.baseUrl> | |
518 | 518 | <website.user.token>token</website.user.token> |
519 | 519 | |
520 | 520 | <!-- interface order --> | ... | ... |
mobsite-getway-web/src/main/java/com/diligrp/mobsite/getway/web/api/base/CommonController.java
... | ... | @@ -2,7 +2,7 @@ package com.diligrp.mobsite.getway.web.api.base; |
2 | 2 | |
3 | 3 | import com.diligrp.mobsite.getway.domain.except.ServiceException; |
4 | 4 | import com.diligrp.mobsite.getway.domain.protocol.common.*; |
5 | -import com.diligrp.mobsite.getway.rpc.buyer.impl.StoreRPCImpl; | |
5 | +import com.diligrp.mobsite.getway.rpc.impl.StoreRPCImpl; | |
6 | 6 | import com.diligrp.mobsite.getway.service.common.CommonService; |
7 | 7 | import com.diligrp.website.util.security.Validator; |
8 | 8 | import io.swagger.annotations.Api; | ... | ... |
mobsite-getway-web/src/main/java/com/diligrp/mobsite/getway/web/api/buyer/user/UserController.java
... | ... | @@ -100,12 +100,11 @@ public class UserController extends BaseApiController { |
100 | 100 | @ApiOperation(value = "买家验证码登录", httpMethod = "POST" , notes = "买家验证码登录",response = LoginResp.class) |
101 | 101 | @RequestMapping(value = "/loginForAuth",method = RequestMethod.POST) |
102 | 102 | @ResponseBody |
103 | - public void loginForAuth(@RequestBody LoginReq temp){ | |
104 | - LoginReq req = super.getRequest(LoginReq.class); | |
103 | + public void loginForAuth(@RequestBody AuthLoginReq temp){ | |
104 | + AuthLoginReq req = super.getRequest(AuthLoginReq.class); | |
105 | 105 | try { |
106 | 106 | BeanValidator.validator(req); |
107 | - req.setPassword(decodeStr(req.getPassword())); | |
108 | - LoginResp resp = userService.login(req); | |
107 | + LoginResp resp = userService.authlogin(req); | |
109 | 108 | super.sendSuccessResp(resp); |
110 | 109 | } catch (ServiceException e){ |
111 | 110 | LOGGER.error(String.format("Code=%s,ErrorMessage=%s,UserId=%s", |
... | ... | @@ -165,11 +164,11 @@ public class UserController extends BaseApiController { |
165 | 164 | } |
166 | 165 | |
167 | 166 | /** |
168 | - * 验证手机收到的验证码 | |
167 | + * 忘记密码:验证手机收到的验证码 | |
169 | 168 | * @createTime 2014年8月24日 下午10:55:03 |
170 | 169 | * @author weili |
171 | 170 | */ |
172 | - @ApiOperation(value = "验证手机收到的验证码", httpMethod = "POST" , notes = "验证手机收到的验证码",response = CheckVeriCodeResp.class) | |
171 | + @ApiOperation(value = "忘记密码:验证手机号和验证码", httpMethod = "POST" , notes = "验证手机收到的验证码",response = CheckVeriCodeResp.class) | |
173 | 172 | @RequestMapping(value = "/checkAuthCode",method = RequestMethod.POST) |
174 | 173 | @ResponseBody |
175 | 174 | public void checkAuthCode(@RequestBody CheckVeriCodeReq temp){ |
... | ... | @@ -187,54 +186,6 @@ public class UserController extends BaseApiController { |
187 | 186 | super.sendError(e.getMessage()); |
188 | 187 | } |
189 | 188 | } |
190 | - // | |
191 | - ///** | |
192 | - // * 修改用户信息 | |
193 | - // * @createTime 2014年8月24日 下午10:55:03 | |
194 | - // * @author weili | |
195 | - // */ | |
196 | - //@RequestMapping("/updateUserInfo") | |
197 | - //@ResponseBody | |
198 | - //@ApiOperation(value = "修改用户信息", httpMethod = "POST") | |
199 | - //public void updateUserInfo(){ | |
200 | - // UpdateUserInfoReq req = super.getRequest(UpdateUserInfoReq.class); | |
201 | - // try { | |
202 | - // UpdateUserInfoResp resp = userService.updateUserInfo(req); | |
203 | - // super.sendSuccessResp(resp); | |
204 | - // } catch (ServiceException e){ | |
205 | - // LOGGER.error(String.format("Code=%s,ErrorMessage=%s,UserId=%s", | |
206 | - // e.getCode(), e.getMessage(), req.getUserId()), e); | |
207 | - // sendError(e.getCode(), e.getMessage()); | |
208 | - // } catch (Exception e) { | |
209 | - // LOGGER.error("修改密码:", e); | |
210 | - // super.sendError(e.getMessage()); | |
211 | - // } | |
212 | - // | |
213 | - //} | |
214 | - // | |
215 | - // | |
216 | - ///** | |
217 | - // * 完善用户信息 | |
218 | - // * @createTime 2014年8月24日 下午10:55:03 | |
219 | - // * @author weili | |
220 | - // */ | |
221 | - //@RequestMapping("/completeUserInfo") | |
222 | - //@ResponseBody | |
223 | - //public void completeUserInfo(){ | |
224 | - // CompleteUserInfoReq req = super.getRequest(CompleteUserInfoReq.class); | |
225 | - // try { | |
226 | - // UpdateUserInfoResp resp = userService.completeUserInfo(req); | |
227 | - // super.sendSuccessResp(resp); | |
228 | - // } catch (ServiceException e){ | |
229 | - // LOGGER.error(String.format("Code=%s,ErrorMessage=%s,UserId=%s", | |
230 | - // e.getCode(), e.getMessage(), req.getUserId()), e); | |
231 | - // sendError(e.getCode(), e.getMessage()); | |
232 | - // } catch (Exception e) { | |
233 | - // LOGGER.error("修改密码:", e); | |
234 | - // super.sendError(e.getMessage()); | |
235 | - // } | |
236 | - // | |
237 | - //} | |
238 | 189 | |
239 | 190 | |
240 | 191 | /** |
... | ... | @@ -242,7 +193,7 @@ public class UserController extends BaseApiController { |
242 | 193 | * @createTime 2014年8月24日 下午10:55:03 |
243 | 194 | * @author weili |
244 | 195 | */ |
245 | - @ApiOperation(value = "找回密码-修改用户密码", httpMethod = "POST" ,response = SendVeriCodeResp.class) | |
196 | + @ApiOperation(value = "找回密码-设置用户新密码", httpMethod = "POST" ,response = SendVeriCodeResp.class) | |
246 | 197 | @RequestMapping(value = "/modifyPwd",method = RequestMethod.POST) |
247 | 198 | @ResponseBody |
248 | 199 | public void modifyPwd(@RequestBody ModifyPwdReq temp){ | ... | ... |
mobsite-getway-web/src/main/java/com/diligrp/mobsite/getway/web/api/seller/fund/FundController.java
... | ... | @@ -5,13 +5,11 @@ import com.diligrp.mobsite.getway.domain.protocol.fund.*; |
5 | 5 | import com.diligrp.mobsite.getway.service.seller.FundService; |
6 | 6 | import com.diligrp.mobsite.getway.web.api.base.BaseApiController; |
7 | 7 | import io.swagger.annotations.Api; |
8 | +import io.swagger.annotations.ApiImplicitParam; | |
8 | 9 | import io.swagger.annotations.ApiOperation; |
9 | 10 | import org.apache.log4j.Logger; |
10 | 11 | import org.springframework.stereotype.Controller; |
11 | -import org.springframework.web.bind.annotation.RequestBody; | |
12 | -import org.springframework.web.bind.annotation.RequestMapping; | |
13 | -import org.springframework.web.bind.annotation.RequestMethod; | |
14 | -import org.springframework.web.bind.annotation.ResponseBody; | |
12 | +import org.springframework.web.bind.annotation.*; | |
15 | 13 | |
16 | 14 | import javax.annotation.Resource; |
17 | 15 | |
... | ... | @@ -43,11 +41,9 @@ public class FundController extends BaseApiController{ |
43 | 41 | @ApiOperation(value = "获取储值列表", httpMethod = "POST",response = GetFundsResp.class) |
44 | 42 | @RequestMapping(value = "/getFunds",method = RequestMethod.POST) |
45 | 43 | @ResponseBody |
46 | - public void getFunds() { | |
47 | - | |
48 | - GetFundsReq req = super.getRequest(GetFundsReq.class); | |
44 | + public void getFunds(@ModelAttribute GetFundsReq fundsReq) { | |
49 | 45 | try { |
50 | - GetFundsResp resp = fundService.getFunds(req); | |
46 | + GetFundsResp resp = fundService.getFunds(fundsReq); | |
51 | 47 | super.sendSuccessResp(resp); |
52 | 48 | } catch (ServiceException e) { |
53 | 49 | log.error("获取储值列表出现业务异常", e); |
... | ... | @@ -70,13 +66,14 @@ public class FundController extends BaseApiController{ |
70 | 66 | * @author weili |
71 | 67 | */ |
72 | 68 | @ApiOperation(value = "储值卡操作", httpMethod = "POST",response = FundTradeResp.class) |
73 | - @RequestMapping(value = "/fundTrade",method = RequestMethod.POST) | |
69 | + @ApiImplicitParam(paramType = "query",name = "price",dataType = "Long", required = true, value = "储值金额") | |
70 | + @RequestMapping(value = "/storeValue",method = RequestMethod.POST) | |
74 | 71 | @ResponseBody |
75 | - public void fundTrade(@RequestBody FundTradeReq temp) { | |
72 | + public void storeValue(Long price) { | |
76 | 73 | |
77 | 74 | FundTradeReq req = super.getRequest(FundTradeReq.class); |
78 | 75 | try { |
79 | - FundTradeResp resp = fundService.fundTrade(req); | |
76 | + FundTradeResp resp = fundService.storeValue(price); | |
80 | 77 | super.sendSuccessResp(resp); |
81 | 78 | } catch (ServiceException e) { |
82 | 79 | log.error("获取储值列表出现业务异常", e); | ... | ... |
mobsite-getway-web/src/main/java/com/diligrp/mobsite/getway/web/api/seller/shop/SellerShopController.java
... | ... | @@ -32,16 +32,36 @@ public class SellerShopController extends BaseApiController{ |
32 | 32 | |
33 | 33 | |
34 | 34 | /** |
35 | - * 创建或修改店铺信息 | |
35 | + * 创建店铺 | |
36 | 36 | */ |
37 | - @ApiOperation(value = "创建或修改店铺信息", httpMethod = "POST",response = CreateOrUpdateShopResp.class) | |
38 | - @RequestMapping(value = "/createOrUpdateShop",method = RequestMethod.POST) | |
37 | + @ApiOperation(value = "创建店铺", httpMethod = "POST",response = CreateShopResp.class) | |
38 | + @RequestMapping(value = "/createShop",method = RequestMethod.POST) | |
39 | 39 | @ResponseBody |
40 | - public void createOrUpdateShop(@RequestBody CreateOrUpdateShopReq temp) { | |
41 | - CreateOrUpdateShopReq req = getRequest(CreateOrUpdateShopReq.class); | |
40 | + public void createShop(@RequestBody CreateShopReq temp) { | |
41 | + CreateShopReq req = getRequest(CreateShopReq.class); | |
42 | 42 | try { |
43 | 43 | //BeanValidator.validator(req); |
44 | - CreateOrUpdateShopResp resp = sellerShopService.createShop(req); | |
44 | + CreateShopResp resp = sellerShopService.createShop(req); | |
45 | + sendSuccessResp(resp); | |
46 | + } | |
47 | + catch(Exception e) { | |
48 | + log.error(String.format("ErrorMessage=%s,UserId=%s",e.getMessage(),req.getUserId()), e); | |
49 | + sendError(e.getMessage()); | |
50 | + } | |
51 | + } | |
52 | + | |
53 | + | |
54 | + /** | |
55 | + * 修改店铺信息 | |
56 | + */ | |
57 | + @ApiOperation(value = "修改店铺信息", httpMethod = "POST",response = UpdateShopResp.class) | |
58 | + @RequestMapping(value = "/updateShop",method = RequestMethod.POST) | |
59 | + @ResponseBody | |
60 | + public void updateShop(@RequestBody UpdateShopReq temp) { | |
61 | + UpdateShopReq req = getRequest(UpdateShopReq.class); | |
62 | + try { | |
63 | + //BeanValidator.validator(req); | |
64 | + CreateShopResp resp = sellerShopService.updateShop(req); | |
45 | 65 | sendSuccessResp(resp); |
46 | 66 | } |
47 | 67 | catch(Exception e) { | ... | ... |
mobsite-getway-web/src/main/java/com/diligrp/mobsite/getway/web/api/seller/user/SellerUserController.java
1 | 1 | package com.diligrp.mobsite.getway.web.api.seller.user; |
2 | 2 | |
3 | 3 | import com.diligrp.mobsite.getway.domain.except.ServiceException; |
4 | +import com.diligrp.mobsite.getway.domain.protocol.login.*; | |
5 | +import com.diligrp.mobsite.getway.domain.protocol.register.CheckMobileReq; | |
6 | +import com.diligrp.mobsite.getway.domain.protocol.register.CheckMobileResp; | |
7 | +import com.diligrp.mobsite.getway.domain.protocol.register.SellerRegisterReq; | |
8 | +import com.diligrp.mobsite.getway.domain.protocol.register.SellerRegisterResp; | |
4 | 9 | import com.diligrp.mobsite.getway.domain.protocol.saler.user.SellerLoginReq; |
5 | 10 | import com.diligrp.mobsite.getway.domain.protocol.saler.user.SellerLoginResp; |
11 | +import com.diligrp.mobsite.getway.domain.protocol.user.ModifyPwdReq; | |
12 | +import com.diligrp.mobsite.getway.domain.protocol.user.ModifyPwdResp; | |
6 | 13 | import com.diligrp.mobsite.getway.service.seller.SellerUserService; |
7 | 14 | import com.diligrp.mobsite.getway.web.api.base.BaseApiController; |
15 | +import com.diligrp.mobsite.getway.web.utils.BeanValidator; | |
16 | +import com.diligrp.website.util.security.Validator; | |
8 | 17 | import io.swagger.annotations.Api; |
9 | 18 | import io.swagger.annotations.ApiOperation; |
10 | 19 | import org.apache.log4j.Logger; |
... | ... | @@ -59,4 +68,259 @@ public class SellerUserController extends BaseApiController { |
59 | 68 | } |
60 | 69 | |
61 | 70 | |
71 | + /** | |
72 | + * 加密用户登录(加密) | |
73 | + * @createTime 2014年8月24日 下午10:55:03 | |
74 | + * @author weili | |
75 | + */ | |
76 | + @ApiOperation(value = "卖家登录", httpMethod = "POST",response = SellerLoginResp.class) | |
77 | + @RequestMapping(value = "/sellerLogins",method = RequestMethod.POST) | |
78 | + @ResponseBody | |
79 | + public void sellerLogins(@RequestBody SellerLoginReq temp){ | |
80 | + SellerLoginReq req = super.getRequest(SellerLoginReq.class); | |
81 | + try { | |
82 | + BeanValidator.validator(req); | |
83 | + req.setPassword(decodeStr(req.getPassword())); | |
84 | + SellerLoginResp resp = sellerUserService.login(req); | |
85 | + super.sendSuccessResp(resp); | |
86 | + } catch (ServiceException e){ | |
87 | + log.error(String.format("Code=%s,ErrorMessage=%s,UserId=%s", | |
88 | + e.getCode(), e.getMessage(), req.getUserId()), e); | |
89 | + super.sendError(e.getCode(), e.getMessage()); | |
90 | + } catch (Exception e) { | |
91 | + log.error("用户登录失败:", e); | |
92 | + super.sendError(e.getMessage()); | |
93 | + } | |
94 | + } | |
95 | + | |
96 | + | |
97 | + /** | |
98 | + * 验证手机号是否已经被注册 | |
99 | + * @createTime 2017年1月9日 下午3:41:02 | |
100 | + * @author weili | |
101 | + */ | |
102 | + @ApiOperation(value = "验证手机号是否已经被注册", httpMethod = "POST" ,response = CheckMobileResp.class) | |
103 | + @RequestMapping(value = "/checkMobile",method = RequestMethod.POST) | |
104 | + @ResponseBody | |
105 | + public void checkMobile(@RequestBody CheckMobileReq temp){ | |
106 | + CheckMobileReq req = super.getRequest(CheckMobileReq.class); | |
107 | + CheckMobileResp resp = null; | |
108 | + try { | |
109 | + if(!Validator.isNull(req) && !Validator.isNull(req.getMobile())){ | |
110 | + resp = sellerUserService.checkMobile(req); | |
111 | + } else { | |
112 | + resp = new CheckMobileResp(); | |
113 | + } | |
114 | + super.sendSuccessResp(resp); | |
115 | + } catch (ServiceException e){ | |
116 | + log.error(String.format("Code=%s,ErrorMessage=%s,UserId=%s", | |
117 | + e.getCode(), e.getMessage(), req.getUserId()), e); | |
118 | + sendError(e.getCode(), e.getMessage()); | |
119 | + } catch (Exception e) { | |
120 | + log.error("验证手机失败:", e); | |
121 | + super.sendError(e.getMessage()); | |
122 | + } | |
123 | + } | |
124 | + | |
125 | + /** | |
126 | + * 发送验证码到手机 | |
127 | + * @createTime 2014年8月24日 下午10:55:03 | |
128 | + * @author weili | |
129 | + */ | |
130 | + @ApiOperation(value = "发送验证码到手机", httpMethod = "POST" , notes = "发送验证码到手机",response = SendVeriCodeResp.class) | |
131 | + @RequestMapping(value = "/sendAuthCode",method = RequestMethod.POST) | |
132 | + @ResponseBody | |
133 | + public void sendAuthCode(@RequestBody SendVeriCodeReq temp){ | |
134 | + SendVeriCodeReq req= super.getRequest(SendVeriCodeReq.class); | |
135 | + try { | |
136 | + BeanValidator.validator(req); | |
137 | + SendVeriCodeResp resp = sellerUserService.sendVeriCode(req); | |
138 | + super.sendSuccessResp(resp); | |
139 | + } catch (ServiceException e){ | |
140 | + log.error(String.format("Code=%s,ErrorMessage=%s,UserId=%s", | |
141 | + e.getCode(), e.getMessage(), req.getUserId()), e); | |
142 | + sendError(e.getMessage()); | |
143 | + } catch (Exception e) { | |
144 | + log.error("发送验证码失败:", e); | |
145 | + super.sendError(e.getMessage()); | |
146 | + } | |
147 | + } | |
148 | + | |
149 | + /** | |
150 | + * 忘记密码:验证手机收到的验证码 | |
151 | + * @createTime 2014年8月24日 下午10:55:03 | |
152 | + * @author weili | |
153 | + */ | |
154 | + @ApiOperation(value = "验证手机号和验证码", httpMethod = "POST" , notes = "验证手机收到的验证码",response = CheckVeriCodeResp.class) | |
155 | + @RequestMapping(value = "/checkAuthCode",method = RequestMethod.POST) | |
156 | + @ResponseBody | |
157 | + public void checkAuthCode(@RequestBody CheckVeriCodeReq temp){ | |
158 | + CheckVeriCodeReq req= super.getRequest(CheckVeriCodeReq.class); | |
159 | + try { | |
160 | + BeanValidator.validator(req); | |
161 | + CheckVeriCodeResp resp = sellerUserService.checkVeriCode(req); | |
162 | + super.sendSuccessResp(resp); | |
163 | + } catch (ServiceException e){ | |
164 | + log.error(String.format("Code=%s,ErrorMessage=%s,UserId=%s", | |
165 | + e.getCode(), e.getMessage(), req.getUserId()), e); | |
166 | + sendError(e.getCode(), e.getMessage()); | |
167 | + } catch (Exception e) { | |
168 | + log.error("验证手机收到的验证码:", e); | |
169 | + super.sendError(e.getMessage()); | |
170 | + } | |
171 | + } | |
172 | + | |
173 | + | |
174 | + /** | |
175 | + * 找回密码-修改用户密码 | |
176 | + * @createTime 2014年8月24日 下午10:55:03 | |
177 | + * @author weili | |
178 | + */ | |
179 | + @ApiOperation(value = "找回密码-设置用户新密码", httpMethod = "POST" ,response = SendVeriCodeResp.class) | |
180 | + @RequestMapping(value = "/modifyPwd",method = RequestMethod.POST) | |
181 | + @ResponseBody | |
182 | + public void modifyPwd(@RequestBody ModifyPwdReq temp){ | |
183 | + ModifyPwdReq req = super.getRequest(ModifyPwdReq.class); | |
184 | + ModifyPwdResp resp = null; | |
185 | + try { | |
186 | + BeanValidator.validator(req); | |
187 | + resp = sellerUserService.modifyPwd(req); | |
188 | + super.sendSuccessResp(resp); | |
189 | + } catch (ServiceException e){ | |
190 | + log.error(String.format("Code=%s,ErrorMessage=%s,UserId=%s", | |
191 | + e.getCode(), e.getMessage(), req.getUserId()), e); | |
192 | + sendError(e.getCode(), e.getMessage()); | |
193 | + } catch (Exception e) { | |
194 | + log.error("修改密码:", e); | |
195 | + super.sendError(e.getMessage()); | |
196 | + } | |
197 | + | |
198 | + } | |
199 | + | |
200 | + /** | |
201 | + * 卖家注册 | |
202 | + * @createTime 2014年8月28日 下午3:41:02 | |
203 | + * @author weili | |
204 | + */ | |
205 | + @ApiOperation(value = "卖家注册", httpMethod = "POST" ,response = SellerRegisterResp.class) | |
206 | + @RequestMapping(value = "/sellerRegister",method = RequestMethod.POST) | |
207 | + @ResponseBody | |
208 | + public void sellerRegister(@RequestBody SellerRegisterReq temp){ | |
209 | + SellerRegisterReq req = super.getRequest(SellerRegisterReq.class); | |
210 | + try { | |
211 | + BeanValidator.validator(req); | |
212 | + SellerRegisterResp resp = sellerUserService.sellerRegister(req); | |
213 | + super.sendSuccessResp(resp); | |
214 | + } catch (ServiceException e){ | |
215 | + log.error(String.format("Code=%s,ErrorMessage=%s,UserId=%s", | |
216 | + e.getCode(), e.getMessage(), req.getUserId()), e); | |
217 | + sendError(e.getCode(), e.getMessage()); | |
218 | + } catch (Exception e) { | |
219 | + log.error("用户注册失败:", e); | |
220 | + super.sendError(e.getMessage()); | |
221 | + } | |
222 | + } | |
223 | + | |
224 | + /** | |
225 | + * 卖家注册(加密) | |
226 | + * @createTime 2014年8月28日 下午3:41:02 | |
227 | + * @author weili | |
228 | + */ | |
229 | + @ApiOperation(value = "卖家注册", httpMethod = "POST" ,response = SellerRegisterResp.class) | |
230 | + @RequestMapping(value = "/sellerRegisters",method = RequestMethod.POST) | |
231 | + @ResponseBody | |
232 | + public void sellerRegisters(@RequestBody SellerRegisterReq temp){ | |
233 | + SellerRegisterReq req = super.getRequest(SellerRegisterReq.class); | |
234 | + try { | |
235 | + BeanValidator.validator(req); | |
236 | + req.setPassword(decodeStr(req.getPassword())); | |
237 | + SellerRegisterResp resp = sellerUserService.sellerRegister(req); | |
238 | + super.sendSuccessResp(resp); | |
239 | + } catch (ServiceException e){ | |
240 | + log.error(String.format("Code=%s,ErrorMessage=%s,UserId=%s", | |
241 | + e.getCode(), e.getMessage(), req.getUserId()), e); | |
242 | + sendError(e.getCode(), e.getMessage()); | |
243 | + } catch (Exception e) { | |
244 | + log.error("用户注册失败:", e); | |
245 | + super.sendError(e.getMessage()); | |
246 | + } | |
247 | + } | |
248 | + | |
249 | + /** | |
250 | + * 退出操作 | |
251 | + * | |
252 | + * @createTime 2014年8月29日 上午9:30:10 | |
253 | + * @author weili | |
254 | + */ | |
255 | + @ApiOperation(value = "退出", httpMethod = "POST" ,response = LogoutResp.class) | |
256 | + @RequestMapping(value = "/logout",method = RequestMethod.POST) | |
257 | + @ResponseBody | |
258 | + public void logout(@RequestBody LogoutReq temp){ | |
259 | + LogoutReq req = super.getRequest(LogoutReq.class); | |
260 | + try { | |
261 | + if(Validator.isNull(req) || !Validator.isNumber(req.getUserId()+"")) { | |
262 | + throw new NullPointerException("参数传递错误"); | |
263 | + } | |
264 | + LogoutResp resp = sellerUserService.logout(req); | |
265 | + super.sendSuccessResp(resp); | |
266 | + } catch (ServiceException e){ | |
267 | + log.error(String.format("Code=%s,ErrorMessage=%s,UserId=%s", | |
268 | + e.getCode(), e.getMessage(), req.getUserId()), e); | |
269 | + sendError(e.getCode(), e.getMessage()); | |
270 | + } | |
271 | + catch (Exception e) { | |
272 | + log.error("用户退出失败:", e); | |
273 | + super.sendError(e.getMessage()); | |
274 | + } | |
275 | + } | |
276 | + | |
277 | + ///** | |
278 | + // * 个人信息维护 | |
279 | + // * @createTime 2016年8月24日 下午10:55:03 | |
280 | + // * @author weili | |
281 | + // */ | |
282 | + //@ApiOperation(value = "个人信息维护", httpMethod = "POST" ,response = UpdateUserInfoResp.class) | |
283 | + //@RequestMapping(value = "/updateUserInfo",method = RequestMethod.POST) | |
284 | + //@ResponseBody | |
285 | + //public void updateUserInfo(@RequestBody UpdateUserInfoReq temp){ | |
286 | + // UpdateUserInfoReq req = super.getRequest(UpdateUserInfoReq.class); | |
287 | + // try { | |
288 | + // UpdateUserInfoResp resp = sellerUserService.updateUserInfo(req); | |
289 | + // super.sendSuccessResp(resp); | |
290 | + // } catch (ServiceException e){ | |
291 | + // log.error(String.format("Code=%s,ErrorMessage=%s,UserId=%s", | |
292 | + // e.getCode(), e.getMessage(), req.getUserId()), e); | |
293 | + // sendError(e.getCode(), e.getMessage()); | |
294 | + // } catch (Exception e) { | |
295 | + // log.error("个人信息维护:", e); | |
296 | + // super.sendError(e.getMessage()); | |
297 | + // } | |
298 | + // | |
299 | + //} | |
300 | + | |
301 | + | |
302 | + | |
303 | + // | |
304 | + ///** | |
305 | + // * 查询用户信息 | |
306 | + // * GetUserInfoReq | |
307 | + // */ | |
308 | + //@ApiOperation(value = "查询卖家用户信息", httpMethod = "POST" ,response = GetDepositCardAmountResp.class) | |
309 | + //@RequestMapping(value = "/getsellerInfo",method = RequestMethod.POST) | |
310 | + //@ResponseBody | |
311 | + //public void getsellerInfo() { | |
312 | + // GetUserInfoReq req = getRequest(GetUserInfoReq.class); | |
313 | + // try { | |
314 | + // GetUserInfoResp resp = sellerUserService.getUserIntroduction(req); | |
315 | + // super.sendSuccessResp(resp); | |
316 | + // } catch (ServiceException e){ | |
317 | + // log.error(String.format("Code=%s,ErrorMessage=%s,UserId=%s", | |
318 | + // e.getCode(), e.getMessage(), req.getUserId()), e); | |
319 | + // sendError(e.getCode(), e.getMessage()); | |
320 | + // } catch (Exception e) { | |
321 | + // log.error(String.format("ErrorMessage=%s,UserId=%s", e.getMessage(), req.getUserId()), e); | |
322 | + // sendError(e.getMessage()); | |
323 | + // } | |
324 | + //} | |
325 | + | |
62 | 326 | } | ... | ... |
mobsite-getway-web/src/main/resources/hbase-site.xml deleted
100644 → 0
1 | -<?xml version="1.0"?> | |
2 | -<?xml-stylesheet type="text/xsl" href="configuration.xsl"?> | |
3 | -<!-- /** * * Licensed to the Apache Software Foundation (ASF) under one * | |
4 | - or more contributor license agreements. See the NOTICE file * distributed | |
5 | - with this work for additional information * regarding copyright ownership. | |
6 | - The ASF licenses this file * to you under the Apache License, Version 2.0 | |
7 | - (the * "License"); you may not use this file except in compliance * with | |
8 | - the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 | |
9 | - * * Unless required by applicable law or agreed to in writing, software * | |
10 | - distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT | |
11 | - WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the | |
12 | - License for the specific language governing permissions and * limitations | |
13 | - under the License. */ --> | |
14 | -<configuration> | |
15 | - | |
16 | - <property> | |
17 | - <name>hbase.master</name> | |
18 | - <value>node1</value> | |
19 | - </property> | |
20 | - | |
21 | - <property> | |
22 | - <name>hbase.master.port</name> | |
23 | - <value>60000</value> | |
24 | - </property> | |
25 | - | |
26 | - <property> | |
27 | - <name>hbase.zookeeper.property.clientPort</name> | |
28 | - <value>2181</value> | |
29 | - </property> | |
30 | - | |
31 | - <property> | |
32 | - <name>hbase.rootdir</name> | |
33 | - <value>hdfs://mycluster/hbase</value> | |
34 | - </property> | |
35 | - | |
36 | - <property> | |
37 | - <name>hbase.zookeeper.quorum</name> | |
38 | - <value>node2,node3,node4</value> | |
39 | - </property> | |
40 | -</configuration> |
mobsite-getway-web/src/main/resources/monitor.xml deleted
100644 → 0
1 | -<?xml version="1.0" encoding="UTF-8" ?> | |
2 | -<!DOCTYPE log4j:configuration PUBLIC | |
3 | - "-//APACHE//DTD LOG4J 1.2//EN" "http://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/xml/doc-files/log4j.dtd"> | |
4 | -<log4j:configuration> | |
5 | - | |
6 | - <appender name="MONITOR_LOG" class="org.apache.log4j.DailyRollingFileAppender"> | |
7 | - <param name="Encoding" value="UTF-8"/> | |
8 | - <param name="Append" value="true" /> | |
9 | - <param name="File" value="${catalina.base}/logs/monitor/monitor.log"/> | |
10 | - <!-- <param name="File" value="/diliapp/servers/apache-tomcat-6.0.43/monitor/monitor.log"/>--> | |
11 | - <!--<param name="File" value="/home/tomcat/monitor/mobapi-gateway/monitor.log"/>--> | |
12 | - | |
13 | - <param name="DatePattern" value="'.'yyyy-MM-dd" /> | |
14 | - <layout class="org.apache.log4j.PatternLayout"> | |
15 | - <param name="ConversionPattern" value="[%p] [%d] [%r] [%c] - %m %n"/> | |
16 | - </layout> | |
17 | - </appender> | |
18 | - | |
19 | - <category name="MONITOR_LOG" additivity="false"> | |
20 | - <priority value="INFO"/> | |
21 | - <appender-ref ref="MONITOR_LOG"/> | |
22 | - </category> | |
23 | - | |
24 | -</log4j:configuration> | |
25 | 0 | \ No newline at end of file |
mobsite-getway-web/src/main/resources/spring-rpc.xml
... | ... | @@ -33,7 +33,7 @@ |
33 | 33 | </bean> |
34 | 34 | |
35 | 35 | <bean id="passportRPC" |
36 | - class="com.diligrp.mobsite.getway.rpc.buyer.impl.PassportRPCImpl"> | |
36 | + class="com.diligrp.mobsite.getway.rpc.impl.PassportRPCImpl"> | |
37 | 37 | <constructor-arg name="token" value="${website.passport.token}"/> |
38 | 38 | <constructor-arg name="baseUrl" value="${website.passport.baseUrl}"/> |
39 | 39 | </bean> |
... | ... | @@ -49,13 +49,13 @@ |
49 | 49 | |
50 | 50 | |
51 | 51 | |
52 | - <bean id="imageUploadService" class="com.dili.imageserver.sdk.service.ImageUploadService"> | |
53 | - <property name="IMAGE_UPLOAD_URL_PREFIX" value="${project.imageserver.prefix}"/> | |
54 | - <property name="AUTH_TOKEN" value="LeaDOqaef8mo4G6bSq8o2bh7lEPlViRU"/> | |
55 | - <property name="ENCODING" value="UTF-8"></property> | |
56 | - <property name="DEFAULT_MAX_PER_ROUTE" value="20"></property> | |
57 | - <property name="MAX_TOTAL" value="100"></property> | |
58 | - </bean> | |
52 | + <!--<bean id="imageUploadService" class="com.dili.imageserver.sdk.service.ImageUploadService">--> | |
53 | + <!--<property name="IMAGE_UPLOAD_URL_PREFIX" value="${project.imageserver.prefix}"/>--> | |
54 | + <!--<property name="AUTH_TOKEN" value="LeaDOqaef8mo4G6bSq8o2bh7lEPlViRU"/>--> | |
55 | + <!--<property name="ENCODING" value="UTF-8"></property>--> | |
56 | + <!--<property name="DEFAULT_MAX_PER_ROUTE" value="20"></property>--> | |
57 | + <!--<property name="MAX_TOTAL" value="100"></property>--> | |
58 | + <!--</bean>--> | |
59 | 59 | <bean id="dataStoredConfig" class="com.dili.dataStored.sdk.common.DataStoredConfig"> |
60 | 60 | <property name="trackercount" value="${project.fastdfs.trackercount}"/> |
61 | 61 | <property name="connectTimeout" value="${project.fastdfs.connectTimeout}"/> |
... | ... | @@ -96,7 +96,7 @@ |
96 | 96 | |
97 | 97 | |
98 | 98 | <bean id="stationMsgRPC" |
99 | - class="com.diligrp.mobsite.getway.rpc.buyer.impl.StationMsgRPCImpl"> | |
99 | + class="com.diligrp.mobsite.getway.rpc.impl.StationMsgRPCImpl"> | |
100 | 100 | <constructor-arg name="token" value="${website.stationmsg.token}"/> |
101 | 101 | <constructor-arg name="baseUrl" value="${website.stationmsg.baseUrl}"/> |
102 | 102 | </bean> | ... | ... |