Commit 940b19088b5922940b06894c907a4d365fb56f8d

Authored by alexyang
2 parents f9def13d 246f7b3a

Merge remote-tracking branch 'origin/dev' into dev

Showing 25 changed files with 428 additions and 179 deletions
mobsite-getway-domain/pom.xml
... ... @@ -66,7 +66,7 @@
66 66 <dependency>
67 67 <groupId>com.b2c.orders</groupId>
68 68 <artifactId>b2c-orders-client</artifactId>
69   - <version>0.0.2-SNAPSHOT</version>
  69 + <version>0.0.4-SNAPSHOT</version>
70 70 <scope>provided</scope>
71 71 </dependency>
72 72  
... ...
mobsite-getway-domain/src/main/java/com/diligrp/mobsite/getway/domain/common/ErrorMessage.java
... ... @@ -49,6 +49,7 @@ public final class ErrorMessage {
49 49 public static final String USER_PASSWORD_WRONG = "原始密码输入错误,请重新输入";
50 50 public static final String USER_MOBILE_EXIST = "手机号码已经存在,请重新输入";
51 51 public static final String USER_MOBILE_NOT_EXIST = "用户不存在,请重新输入";
  52 + public static final String USER_UPDATE_INFO = "更新用户信息失败";
52 53 public static final String USER_CONSIGNEE_SET_DEFAULT_FAILED = "设置默认提货人失败";
53 54 public static final String USER_AUTH_USER_PASS = "您提交的身份证号已经被认证";
54 55 public static final String USER_AUTH_ENTERPRISE_PASS = "每个企业仅能注册一次";
... ...
mobsite-getway-domain/src/main/java/com/diligrp/mobsite/getway/domain/protocol/Order.java
1 1 package com.diligrp.mobsite.getway.domain.protocol;
2 2  
3 3 import java.io.Serializable;
  4 +import java.math.BigDecimal;
4 5  
5 6 /**
6 7 * <B>Description</B> 订单 <br />
... ... @@ -45,7 +46,7 @@ public class Order implements Serializable {
45 46 /** 支付类型 */
46 47 private Integer payType;
47 48 /** 总金额 */
48   - private Long totalPrice;
  49 + private BigDecimal totalPrice;
49 50 /**
50 51 * 接单后修改的价格
51 52 */
... ... @@ -139,11 +140,11 @@ public class Order implements Serializable {
139 140 this.payType = payType;
140 141 }
141 142  
142   - public Long getTotalPrice() {
  143 + public BigDecimal getTotalPrice() {
143 144 return totalPrice;
144 145 }
145 146  
146   - public void setTotalPrice(Long totalPrice) {
  147 + public void setTotalPrice(BigDecimal totalPrice) {
147 148 this.totalPrice = totalPrice;
148 149 }
149 150  
... ...
mobsite-getway-domain/src/main/java/com/diligrp/mobsite/getway/domain/protocol/OrderItem.java
1 1 package com.diligrp.mobsite.getway.domain.protocol;
2 2  
  3 +import java.math.BigDecimal;
  4 +
3 5 import javax.validation.constraints.NotNull;
4 6  
  7 +import io.swagger.annotations.ApiModelProperty;
5 8 import io.swagger.annotations.ApiParam;
6 9  
7 10 /**
... ... @@ -21,7 +24,9 @@ public class OrderItem {
21 24 private String sku;
22 25 @ApiParam("购买数量")
23 26 @NotNull(message = "购买数量不能为空")
24   - private Integer amount;
  27 + private BigDecimal amount;
  28 + @ApiModelProperty("sku价格")
  29 + private Long skuPrice;
25 30  
26 31 public String getSku() {
27 32 return sku;
... ... @@ -31,11 +36,20 @@ public class OrderItem {
31 36 this.sku = sku;
32 37 }
33 38  
34   - public Integer getAmount() {
  39 + public BigDecimal getAmount() {
35 40 return amount;
36 41 }
37 42  
38   - public void setAmount(Integer amount) {
  43 + public void setAmount(BigDecimal amount) {
39 44 this.amount = amount;
40 45 }
  46 +
  47 + public Long getSkuPrice() {
  48 + return skuPrice;
  49 + }
  50 +
  51 + public void setSkuPrice(Long skuPrice) {
  52 + this.skuPrice = skuPrice;
  53 + }
  54 +
41 55 }
... ...
mobsite-getway-domain/src/main/java/com/diligrp/mobsite/getway/domain/protocol/cart/ModifyAmountReq.java
1 1 package com.diligrp.mobsite.getway.domain.protocol.cart;
2 2  
  3 +import java.math.BigDecimal;
  4 +
3 5 import com.diligrp.mobsite.getway.domain.protocol.BaseReq;
4 6 import io.swagger.annotations.ApiModelProperty;
5 7  
... ... @@ -25,7 +27,7 @@ public class ModifyAmountReq extends BaseReq {
25 27 * 数量
26 28 */
27 29 @ApiModelProperty(value = "数量",required = true)
28   - private Integer amount;
  30 + private BigDecimal amount;
29 31  
30 32  
31 33 /**
... ... @@ -34,7 +36,7 @@ public class ModifyAmountReq extends BaseReq {
34 36 * @createTime 2014年10月28日 下午6:33:55
35 37 * @author zhangshirui
36 38 */
37   - public Integer getAmount() {
  39 + public BigDecimal getAmount() {
38 40 return amount;
39 41 }
40 42  
... ... @@ -45,7 +47,7 @@ public class ModifyAmountReq extends BaseReq {
45 47 * @createTime 2014年10月28日 下午6:33:55
46 48 * @author zhangshirui
47 49 */
48   - public void setAmount(Integer amount) {
  50 + public void setAmount(BigDecimal amount) {
49 51 this.amount = amount;
50 52 }
51 53  
... ...
mobsite-getway-domain/src/main/java/com/diligrp/mobsite/getway/domain/protocol/login/SendVeriCodeReq.java
... ... @@ -37,7 +37,7 @@ public class SendVeriCodeReq extends BaseReq {
37 37 /**
38 38 * 消息类型
39 39 */
40   - @ApiModelProperty(value = "消息类型:1验证码登录,2注册,3找回密码",required = true)
  40 + @ApiModelProperty(value = "消息类型:1验证码登录,2注册,3找回密码 ,4买家修改手机号",required = true)
41 41 private Integer msgType;
42 42  
43 43  
... ...
mobsite-getway-domain/src/main/java/com/diligrp/mobsite/getway/domain/protocol/user/UpdateMobileReq.java
1 1 package com.diligrp.mobsite.getway.domain.protocol.user;
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 />
... ... @@ -14,14 +15,55 @@ import com.diligrp.mobsite.getway.domain.protocol.BaseReq;
14 15 @SuppressWarnings("serial")
15 16 public class UpdateMobileReq extends BaseReq{
16 17 /**
17   - * 新手机号
  18 + * 手机验证
18 19 */
  20 + @ApiModelProperty(value = "验证码",required = true)
  21 + private String veriCode;
  22 + /**
  23 + * 手机号码
  24 + */
  25 + @ApiModelProperty(value = "新手机号码",required = true)
19 26 private String mobile;
20 27  
  28 +
  29 + /**
  30 + * get value of CheckVeriCodeReq.veriCode
  31 + * @return the veriCode
  32 + * @createTime Aug 12, 2014 8:06:20 PM
  33 + * @author wujianjun
  34 + */
  35 + public String getVeriCode() {
  36 + return veriCode;
  37 + }
  38 +
  39 + /**
  40 + * set value of CheckVeriCodeReq.veriCode
  41 + * @param veriCode the veriCode to set
  42 + * @createTime Aug 12, 2014 8:06:20 PM
  43 + * @author wujianjun
  44 + */
  45 + public void setVeriCode(String veriCode) {
  46 + this.veriCode = veriCode;
  47 + }
  48 +
  49 +
  50 + /**
  51 + * get value of CheckVeriCodeReq.mobile
  52 + * @return the mobile
  53 + * @createTime 2014年8月28日 下午5:39:56
  54 + * @author zhangshirui
  55 + */
21 56 public String getMobile() {
22 57 return mobile;
23 58 }
24 59  
  60 +
  61 + /**
  62 + * set value of CheckVeriCodeReq.mobile
  63 + * @param mobile the mobile to set
  64 + * @createTime 2014年8月28日 下午5:39:56
  65 + * @author zhangshirui
  66 + */
25 67 public void setMobile(String mobile) {
26 68 this.mobile = mobile;
27 69 }
... ...
mobsite-getway-domain/src/main/java/com/diligrp/mobsite/getway/domain/protocol/user/UpdateSellerInfoReq.java 0 → 100644
  1 +package com.diligrp.mobsite.getway.domain.protocol.user;
  2 +
  3 +import com.diligrp.mobsite.getway.domain.protocol.BaseReq;
  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 8:07:31 PM
  13 + * @author wujianjun
  14 + */
  15 +@SuppressWarnings("serial")
  16 +public class UpdateSellerInfoReq extends BaseReq {
  17 +
  18 + /**
  19 + * 原密码
  20 + */
  21 + @ApiModelProperty(value = "原密码")
  22 + private String oldPassword;
  23 + /**
  24 + * 新的密码
  25 + */
  26 + @ApiModelProperty(value = "新密码")
  27 + private String password;
  28 +
  29 +
  30 + public String getOldPassword() {
  31 + return oldPassword;
  32 + }
  33 +
  34 + public void setOldPassword(String oldPassword) {
  35 + this.oldPassword = oldPassword;
  36 + }
  37 +
  38 + public String getPassword() {
  39 + return password;
  40 + }
  41 +
  42 + public void setPassword(String password) {
  43 + this.password = password;
  44 + }
  45 +}
... ...
mobsite-getway-domain/src/main/java/com/diligrp/mobsite/getway/domain/protocol/user/UpdateSellerInfoResp.java 0 → 100644
  1 +package com.diligrp.mobsite.getway.domain.protocol.user;
  2 +
  3 +import com.diligrp.mobsite.getway.domain.protocol.BaseResp;
  4 +
  5 +
  6 +/**
  7 + * <B>Description</B> 修改密码响应 <br />
  8 + * <B>Copyright</B> Copyright (c) 2014 www.diligrp.com All rights reserved. <br />
  9 + * 本软件源代码版权归地利集团,未经许可不得任意复制与传播.<br />
  10 + * <B>Company</B> 地利集团
  11 + * @createTime Aug 12, 2014 8:09:21 PM
  12 + * @author wujianjun
  13 + */
  14 +@SuppressWarnings("serial")
  15 +public class UpdateSellerInfoResp extends BaseResp {
  16 +
  17 + /**
  18 + * 更新成功
  19 + */
  20 + public static final Integer RESULT_FLAG_SUCCESS=1;
  21 +
  22 + /**
  23 + * 更新失败
  24 + */
  25 + public static final Integer RESULT_FLAG_FAILED=2;
  26 +
  27 + /**
  28 + * 更新结果
  29 + */
  30 +
  31 + private Integer resultFlag = RESULT_FLAG_SUCCESS;
  32 +
  33 +
  34 + /**
  35 + * get value of UpdatePasswordResp.resultFlag
  36 + * @return the resultFlag
  37 + * @createTime 2014年8月28日 下午3:12:31
  38 + * @author zhangshirui
  39 + */
  40 + public Integer getResultFlag() {
  41 + return resultFlag;
  42 + }
  43 +
  44 +
  45 + /**
  46 + * set value of UpdatePasswordResp.resultFlag
  47 + * @param resultFlag the resultFlag to set
  48 + * @createTime 2014年8月28日 下午3:12:31
  49 + * @author zhangshirui
  50 + */
  51 + public void setResultFlag(Integer resultFlag) {
  52 + this.resultFlag = resultFlag;
  53 + }
  54 +
  55 +
  56 +}
... ...
mobsite-getway-domain/src/main/java/com/diligrp/mobsite/getway/domain/protocol/user/UpdateUserInfoReq.java
... ... @@ -19,11 +19,11 @@ public class UpdateUserInfoReq extends BaseReq {
19 19 */
20 20 @ApiModelProperty(value = "新密码")
21 21 private String password;
22   - /**
23   - * 再次输入密码
24   - */
25   - @ApiModelProperty(value = "再次输入新密码")
26   - private String oldPassword;
  22 + ///**
  23 + // * 再次输入密码
  24 + // */
  25 + //@ApiModelProperty(value = "再次输入新密码")
  26 + //private String oldPassword;
27 27 /**
28 28 * 性别
29 29 */
... ... @@ -59,14 +59,6 @@ public class UpdateUserInfoReq extends BaseReq {
59 59 this.password = password;
60 60 }
61 61  
62   - public String getOldPassword() {
63   - return oldPassword;
64   - }
65   -
66   - public void setOldPassword(String oldPassword) {
67   - this.oldPassword = oldPassword;
68   - }
69   -
70 62 public Integer getGender() {
71 63 return gender;
72 64 }
... ...
mobsite-getway-rpc/src/main/java/com/diligrp/mobsite/getway/rpc/PassportRPC.java
... ... @@ -7,6 +7,7 @@ import com.diligrp.mobsite.getway.domain.protocol.login.LoginReq;
7 7 import com.diligrp.mobsite.getway.domain.protocol.register.SellerRegisterReq;
8 8 import com.diligrp.mobsite.getway.domain.protocol.register.UserRegisterReq;
9 9 import com.diligrp.mobsite.getway.domain.protocol.user.ModifyPwdReq;
  10 +import com.diligrp.mobsite.getway.domain.protocol.user.UpdateMobileReq;
10 11 import com.diligrp.mobsite.getway.rpc.base.BaseOutput;
11 12 import com.diligrp.mobsite.getway.rpc.base.BaseService;
12 13  
... ... @@ -38,8 +39,13 @@ public interface PassportRPC extends BaseService {
38 39  
39 40 boolean verifySellerSmsCode(String mobile, String veriCode);
40 41  
  42 + boolean verifyOldMobileAuthCode(String mobile, String veriCode);
  43 +
  44 +
41 45 boolean verifyBuyerSmsCode(String mobile, String veriCode);
42 46  
43 47  
44 48 BuyerInfoOutput authlogin(AuthLoginReq req);
  49 +
  50 + void updateMobile(UpdateMobileReq req);
45 51 }
... ...
mobsite-getway-rpc/src/main/java/com/diligrp/mobsite/getway/rpc/SellerRPC.java
1 1 package com.diligrp.mobsite.getway.rpc;
2 2  
  3 +import com.b2c.myapp.common.api.sellerInfo.input.SellerInfoUpdateInput;
3 4 import com.b2c.myapp.common.api.sellerInfo.output.SellerInfoOutput;
4 5  
5 6  
... ... @@ -46,6 +47,8 @@ public interface SellerRPC {
46 47  
47 48 SellerInfoOutput getSellerByMobile(String accountName);
48 49  
  50 + Boolean updateSellerInfo(SellerInfoUpdateInput input);
  51 +
49 52 //ShopOutput getShopBySellerId(Long id);
50 53 //
51 54 //ShopOutput getShopById(Long id);
... ...
mobsite-getway-rpc/src/main/java/com/diligrp/mobsite/getway/rpc/UserRPC.java
1 1 package com.diligrp.mobsite.getway.rpc;
2 2  
  3 +import com.b2c.myapp.common.api.buyerInfo.input.BuyerInfoUpdateInput;
3 4 import com.b2c.myapp.common.api.buyerInfo.output.BuyerInfoOutput;
4 5 import com.b2c.myapp.common.api.shopBuyer.output.ShopBuyerOutput;
5   -import com.diligrp.mobsite.getway.domain.protocol.AddCartProduct;
6   -import com.diligrp.mobsite.getway.domain.protocol.cart.ModifyAmountReq;
7   -
8   -import java.util.List;
9 6  
10 7  
11 8 /**
... ... @@ -19,28 +16,10 @@ import java.util.List;
19 16 */
20 17 public interface UserRPC {
21 18  
22   - boolean addShoppingCart(List<AddCartProduct> cartProducts, Long userId);
23 19  
24   - /**
25   - * 删除
26   - * @param userId
27   - * @param ids
28   - * @return
29   - * @createTime 2015年3月4日 下午6:46:54
30   - * @author zhangshirui
31   - */
32   - boolean delCartByIds(Long userId, List<String> ids);
33 20  
34 21  
35   - /**
36   - * 验证用户名或者邮箱是否存在
37   - *
38   - * @param accountName
39   - * @return
40   - * @createTime 2014年8月27日 下午2:30:45
41   - * @author zhangshirui
42   - */
43   - boolean checkAccountName(String accountName);
  22 +
44 23  
45 24 /**
46 25 * 验证电话号码是否存在
... ... @@ -56,14 +35,7 @@ public interface UserRPC {
56 35 BuyerInfoOutput checkMobile(String mobile);
57 36  
58 37  
59   - /**
60   - * 修改进货单数量
61   - * @param req
62   - * @return
63   - * @createTime 2015年3月9日 下午2:49:27
64   - * @author zhangshirui
65   - */
66   - boolean modifyAmount(ModifyAmountReq req);
  38 +
67 39  
68 40 /**
69 41 * 修改密码
... ... @@ -75,29 +47,12 @@ public interface UserRPC {
75 47 */
76 48 boolean modifyPwd(String accountName, String newPassword);
77 49  
78   - /**
79   - * 密码加密
80   - * @param pwd
81   - * @return
82   - * @createTime 2014年9月19日 上午10:04:35
83   - * @author zhangshirui
84   - */
85   - String getEncryptPwd(String pwd);
86   -
87   -
88   -
89   - /**
90   - * 验证用户密码
91   - * @param userId
92   - * @param password
93   - * @return
94   - * @createTime 2015年6月24日 下午1:45:53
95   - * @author zhangshirui
96   - */
97   - boolean checkPassword(Long userId, String password);
  50 + Boolean updateUserInfo(BuyerInfoUpdateInput input);
98 51  
99 52  
100 53 BuyerInfoOutput getUserByMobile(String accountName);
101 54  
102 55 ShopBuyerOutput getDepositCardAmount(Long shopBuyerId,Long buyerId);
  56 +
  57 +
103 58 }
... ...
mobsite-getway-rpc/src/main/java/com/diligrp/mobsite/getway/rpc/impl/OrderRPCImpl.java
... ... @@ -235,6 +235,7 @@ public class OrderRPCImpl implements OrderRPC {
235 235 OrderItemDto dto = new OrderItemDto();
236 236 dto.setAmount(item.getAmount());
237 237 dto.setSku(item.getSku());
  238 + dto.setSkuPrice(item.getSkuPrice());
238 239 orderItems.add(dto);
239 240 }
240 241 request.setOrderItems(orderItems);
... ...
mobsite-getway-rpc/src/main/java/com/diligrp/mobsite/getway/rpc/impl/PassportRPCImpl.java
... ... @@ -12,6 +12,7 @@ import com.diligrp.mobsite.getway.domain.protocol.login.SendVeriCodeReq;
12 12 import com.diligrp.mobsite.getway.domain.protocol.register.SellerRegisterReq;
13 13 import com.diligrp.mobsite.getway.domain.protocol.register.UserRegisterReq;
14 14 import com.diligrp.mobsite.getway.domain.protocol.user.ModifyPwdReq;
  15 +import com.diligrp.mobsite.getway.domain.protocol.user.UpdateMobileReq;
15 16 import com.diligrp.mobsite.getway.rpc.PassportRPC;
16 17 import com.diligrp.mobsite.getway.rpc.base.BaseOutput;
17 18 import com.diligrp.mobsite.getway.rpc.base.impl.BaseServiceImpl;
... ... @@ -251,6 +252,9 @@ public class PassportRPCImpl extends BaseServiceImpl implements PassportRPC {
251 252 if (msgType== SendVeriCodeReq.MSG_TYPE_RETRIEVE_PASSWORD){
252 253 output = super.httpGet("/api/forgot/sendBuyerForgotPasswordSMS/"+mobile, null, new TypeReference<BaseOutput<String>>(){});
253 254 }
  255 + if (msgType== SendVeriCodeReq.MSG_TYPE_MODIFY_NEW_MOBILE){
  256 + output = super.httpGet("/api/user/sendBuyerSMS/"+mobile, null, new TypeReference<BaseOutput<String>>(){});
  257 + }
254 258 } catch (Exception e) {
255 259  
256 260 if (msgType== SendVeriCodeReq.MSG_TYPE_LOGIN){
... ... @@ -262,6 +266,9 @@ public class PassportRPCImpl extends BaseServiceImpl implements PassportRPC {
262 266 if (msgType== SendVeriCodeReq.MSG_TYPE_RETRIEVE_PASSWORD){
263 267 log.error("error:调用passport买家忘记密码发送验证码短信失败",e);
264 268 }
  269 + if (msgType== SendVeriCodeReq.MSG_TYPE_MODIFY_NEW_MOBILE){
  270 + log.error("error:调用passport买家修改手机号发送验证码短信失败",e);
  271 + }
265 272 throw new ServiceException();
266 273 }
267 274  
... ... @@ -276,7 +283,9 @@ public class PassportRPCImpl extends BaseServiceImpl implements PassportRPC {
276 283 if (msgType== SendVeriCodeReq.MSG_TYPE_RETRIEVE_PASSWORD){
277 284 log.error("error:调用passport买家忘记密码发送验证码短信失败[mobile=,code,msg=]",new Object[]{mobile,output.getCode(),output.getResult()});
278 285 }
279   -
  286 + if (msgType== SendVeriCodeReq.MSG_TYPE_MODIFY_NEW_MOBILE){
  287 + log.error("error:调用passport买家修改手机号发送验证码短信失败[mobile=,code,msg=]",new Object[]{mobile,output.getCode(),output.getResult()});
  288 + }
280 289 throw new ServiceException(output.getCode(),output.getResult());
281 290 }
282 291  
... ... @@ -307,6 +316,27 @@ public class PassportRPCImpl extends BaseServiceImpl implements PassportRPC {
307 316  
308 317  
309 318 @Override
  319 + public boolean verifyOldMobileAuthCode(String mobile, String veriCode) {
  320 + BaseOutput<String> output = null;
  321 + Map<String,String> params = new HashMap<String, String>();
  322 + params.put("phoneNumber", mobile);
  323 + params.put("code", veriCode);
  324 + try {
  325 + output = super.httpPost("/api/user/verifyBuyerSmsCode", params, null);
  326 + } catch (Exception e) {
  327 + log.error("error:买家修改手机号-校验短信验证码失败",e);
  328 + throw new ServiceException();
  329 + }
  330 +
  331 + if (output.getCode()!= 200){
  332 + log.error("error:买家修改手机号-校验短信验证码失败[mobile=,msg=]",mobile,output.getResult());
  333 + throw new ServiceException(output.getCode(),output.getResult());
  334 + }
  335 +
  336 + return output.getCode().equals(com.b2c.myapp.common.utils.ResultCode.OK);
  337 + }
  338 +
  339 + @Override
310 340 public boolean verifyBuyerSmsCode(String mobile, String veriCode) {
311 341 BaseOutput<String> output = null;
312 342 Map<String,String> params = new HashMap<String, String>();
... ... @@ -352,4 +382,25 @@ public class PassportRPCImpl extends BaseServiceImpl implements PassportRPC {
352 382 return buyerInfo;
353 383  
354 384 }
  385 +
  386 + @Override
  387 + public void updateMobile(UpdateMobileReq req) {
  388 + Map<String,String> params = new HashMap<>();
  389 + params.put("userId", req.getUserId()+"");
  390 + params.put("newPhoneNumber", req.getMobile());
  391 + params.put("code", req.getVeriCode());
  392 + BaseOutput<String > output = null;
  393 + try {
  394 + output = super.httpPost("/api/user/updateBuyerPhoneNumber", params, new TypeReference<BaseOutput<String>>(){});
  395 + } catch (Exception e) {
  396 + log.error("error:调用passport修改买家手机号接口失败",e);
  397 + throw new ServiceException();
  398 + }
  399 + if (output.getCode()!=ResultCode.SUCCESS){
  400 + log.error("error:调用passport修改买家手机号失败[mobile=,code=,msg=]",new Object[]{req.getMobile(),output.getCode(),output.getResult()});
  401 + throw new ServiceException(ResultCode.BUSINESS_FAILED,output.getResult());
  402 + }
  403 +
  404 +
  405 + }
355 406 }
... ...
mobsite-getway-rpc/src/main/java/com/diligrp/mobsite/getway/rpc/impl/SellerRPCImpl.java
1 1 package com.diligrp.mobsite.getway.rpc.impl;
2 2  
  3 +import com.b2c.myapp.common.api.sellerInfo.input.SellerInfoUpdateInput;
3 4 import com.b2c.myapp.common.api.sellerInfo.output.SellerInfoOutput;
4 5 import com.b2c.myapp.common.utils.BaseOutput;
5 6 import com.b2c.myapp.sdk.MyAppClient;
... ... @@ -34,7 +35,7 @@ public class SellerRPCImpl implements SellerRPC {
34 35 @Resource
35 36 private RedisUtil redisUtil;
36 37 @Resource
37   - private MyAppClient userClient;
  38 + private MyAppClient myAppClient;
38 39 @Resource
39 40 private WebsiteClient websiteClient;
40 41 @Resource
... ... @@ -49,7 +50,7 @@ public class SellerRPCImpl implements SellerRPC {
49 50 public SellerInfoOutput checkMobile(String mobile) {
50 51 BaseOutput<SellerInfoOutput> output = null;
51 52 try {
52   - output = userClient.getSellerInfoService().getSellerInfoByMobilePhone(mobile);
  53 + output = myAppClient.getSellerInfoService().getSellerInfoByMobilePhone(mobile);
53 54 } catch (Exception e) {
54 55 logger.error("检测电话号码接口挂掉:msg={}",e.getMessage());
55 56 throw new ServiceException();
... ... @@ -78,7 +79,7 @@ public class SellerRPCImpl implements SellerRPC {
78 79 BaseOutput<SellerInfoOutput> output = null;
79 80 boolean flag = false;
80 81 try {
81   - output = userClient.getSellerInfoService().getSellerInfoByMobilePhone(accountName);
  82 + output = myAppClient.getSellerInfoService().getSellerInfoByMobilePhone(accountName);
82 83 } catch (Exception e) {
83 84 logger.error("调用手机号查询卖家接口挂掉:msg={}",e.getMessage());
84 85 throw new ServiceException();
... ... @@ -96,6 +97,23 @@ public class SellerRPCImpl implements SellerRPC {
96 97 return output.getData();
97 98 }
98 99  
  100 + @Override
  101 + public Boolean updateSellerInfo(SellerInfoUpdateInput input) {
  102 + BaseOutput<Boolean> output = null;
  103 + try {
  104 + output = myAppClient.getSellerInfoService().modify(input);
  105 + } catch (Exception e) {
  106 + logger.error("更新买家信息接口挂掉:msg={}",e.getMessage());
  107 + throw new ServiceException();
  108 + }
  109 +
  110 + if (output==null||!output.getCode().equals(com.b2c.myapp.common.utils.ResultCode.OK)){
  111 + logger.error("更新买家信息失败:[userId={},code={},result={}]",new Object[]{input.getAccountName(),output.getCode(),output.getResult()});
  112 + throw new ServiceException(ResultCode.BUSINESS_FAILED, ErrorMessage.USER_UPDATE_INFO);
  113 + }
  114 + return output.getData();
  115 + }
  116 +
99 117 //@Override
100 118 //public ShopOutput getShopBySellerId(Long id) {
101 119 // BaseOutput<ShopOutput> output = null;
... ...
mobsite-getway-rpc/src/main/java/com/diligrp/mobsite/getway/rpc/impl/ShoppingCartRPCImpl.java
... ... @@ -115,7 +115,7 @@ public class ShoppingCartRPCImpl implements ShoppingCartRPC {
115 115 @Override
116 116 public ModifyAmountResp modifyAmount(ModifyAmountReq req) {
117 117 ShoppingCartUpdateInput input = new ShoppingCartUpdateInput();
118   - input.setQuantity(req.getAmount().longValue());
  118 + input.setQuantity(req.getAmount());
119 119 input.setShopBuyerId(req.getUserId());
120 120 input.setSku(req.getSku());
121 121 BaseOutput<Boolean> response = this.cartService.modifyCart(input);
... ... @@ -134,7 +134,6 @@ public class ShoppingCartRPCImpl implements ShoppingCartRPC {
134 134  
135 135 @Override
136 136 public ConfirmCartResp confirmCartInfo(ConfirmCartReq req) {
137   - GetCartByUserReq cartReq = new GetCartByUserReq();
138 137 ShoppingCartListInput input = new ShoppingCartListInput();
139 138 input.setShopBuyerId(req.getShopBuyerId());
140 139 input.setSkus(req.getSkus().toArray(new String[req.getSkus().size()]));
... ...
mobsite-getway-rpc/src/main/java/com/diligrp/mobsite/getway/rpc/impl/UserRPCImpl.java
1 1 package com.diligrp.mobsite.getway.rpc.impl;
2 2  
  3 +import com.b2c.myapp.common.api.buyerInfo.input.BuyerInfoUpdateInput;
3 4 import com.b2c.myapp.common.api.buyerInfo.output.BuyerInfoOutput;
4 5 import com.b2c.myapp.common.api.shopBuyer.output.ShopBuyerOutput;
5 6 import com.b2c.myapp.common.utils.BaseOutput;
... ... @@ -7,8 +8,6 @@ import com.b2c.myapp.sdk.MyAppClient;
7 8 import com.diligrp.mobsite.getway.domain.common.ErrorMessage;
8 9 import com.diligrp.mobsite.getway.domain.common.ResultCode;
9 10 import com.diligrp.mobsite.getway.domain.except.ServiceException;
10   -import com.diligrp.mobsite.getway.domain.protocol.AddCartProduct;
11   -import com.diligrp.mobsite.getway.domain.protocol.cart.ModifyAmountReq;
12 11 import com.diligrp.mobsite.getway.rpc.UserRPC;
13 12 import com.diligrp.website.util.security.Validator;
14 13 import org.slf4j.Logger;
... ... @@ -16,7 +15,6 @@ import org.slf4j.LoggerFactory;
16 15 import org.springframework.stereotype.Service;
17 16  
18 17 import javax.annotation.Resource;
19   -import java.util.List;
20 18  
21 19  
22 20 /**
... ... @@ -39,20 +37,6 @@ public class UserRPCImpl implements UserRPC {
39 37  
40 38 private static final Logger logger = LoggerFactory.getLogger(UserRPCImpl.class);
41 39  
42   - @Override
43   - public boolean addShoppingCart(List<AddCartProduct> cartProducts, Long userId) {
44   - return false;
45   - }
46   -
47   - @Override
48   - public boolean delCartByIds(Long userId, List<String> ids) {
49   - return false;
50   - }
51   -
52   - @Override
53   - public boolean checkAccountName(String accountName) {
54   - return false;
55   - }
56 40  
57 41 @Override
58 42 public BuyerInfoOutput checkMobile(String mobile) {
... ... @@ -72,10 +56,6 @@ public class UserRPCImpl implements UserRPC {
72 56 return output.getData();
73 57 }
74 58  
75   - @Override
76   - public boolean modifyAmount(ModifyAmountReq req) {
77   - return false;
78   - }
79 59  
80 60  
81 61 @Override
... ... @@ -113,7 +93,7 @@ public class UserRPCImpl implements UserRPC {
113 93  
114 94 if (output==null||!output.getCode().equals(com.b2c.myapp.common.utils.ResultCode.OK)){
115 95 logger.error("买家查询储值卡余额失败:[userId={},code={},result={}]",new Object[]{buyerId,output.getCode(),output.getResult()});
116   - throw new ServiceException();
  96 + throw new ServiceException(ResultCode.BUSINESS_FAILED,output.getResult());
117 97 }
118 98 return output.getData();
119 99 }
... ... @@ -124,13 +104,20 @@ public class UserRPCImpl implements UserRPC {
124 104 }
125 105  
126 106 @Override
127   - public String getEncryptPwd(String pwd) {
128   - return null;
129   - }
  107 + public Boolean updateUserInfo(BuyerInfoUpdateInput input) {
  108 + BaseOutput<Boolean> output = null;
  109 + try {
  110 + output = myAppClient.getBuyerInfoService().modify(input);
  111 + } catch (Exception e) {
  112 + logger.error("更新买家信息接口挂掉:msg={}",e.getMessage());
  113 + throw new ServiceException();
  114 + }
130 115  
131   - @Override
132   - public boolean checkPassword(Long userId, String password) {
133   - return false;
  116 + if (output==null||!output.getCode().equals(com.b2c.myapp.common.utils.ResultCode.OK)){
  117 + logger.error("更新买家信息失败:[userId={},code={},result={}]",new Object[]{input.getAccountName(),output.getCode(),output.getResult()});
  118 + throw new ServiceException(ResultCode.BUSINESS_FAILED, ErrorMessage.USER_UPDATE_INFO);
  119 + }
  120 + return output.getData();
134 121 }
135 122  
136 123  
... ...
mobsite-getway-service/src/main/java/com/diligrp/mobsite/getway/service/buyer/user/UserService.java
... ... @@ -110,4 +110,8 @@ public interface UserService {
110 110 * @return
111 111 */
112 112 GetDeliveryAddressResp getDeliveryAddresses(GetDeliveryAddressReq req);
  113 +
  114 + CheckVeriCodeResp checkOldMobileAuthCode(CheckVeriCodeReq req);
  115 +
  116 + UpdateMobileResp updateMobile(UpdateMobileReq req);
113 117 }
... ...
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 java.util.ArrayList;
4   -import java.util.HashMap;
5   -import java.util.List;
6   -import java.util.Map;
7   -
8   -import javax.annotation.Resource;
9   -
10   -import org.slf4j.Logger;
11   -import org.slf4j.LoggerFactory;
12   -import org.springframework.beans.factory.annotation.Autowired;
13   -import org.springframework.beans.factory.annotation.Value;
14   -import org.springframework.stereotype.Service;
15   -
  3 +import com.b2c.myapp.common.api.buyerInfo.input.BuyerInfoUpdateInput;
16 4 import com.b2c.myapp.common.api.buyerInfo.output.BuyerInfoOutput;
17 5 import com.b2c.myapp.common.api.pickingInfo.output.PickingInfoOutput;
18 6 import com.b2c.myapp.common.api.shopBuyer.output.ShopBuyerOutput;
... ... @@ -23,33 +11,10 @@ import com.diligrp.mobsite.getway.domain.common.RedisKey;
23 11 import com.diligrp.mobsite.getway.domain.common.ResultCode;
24 12 import com.diligrp.mobsite.getway.domain.except.ServiceException;
25 13 import com.diligrp.mobsite.getway.domain.protocol.PickInfo;
26   -import com.diligrp.mobsite.getway.domain.protocol.login.AuthLoginReq;
27   -import com.diligrp.mobsite.getway.domain.protocol.login.CheckVeriCodeReq;
28   -import com.diligrp.mobsite.getway.domain.protocol.login.CheckVeriCodeResp;
29   -import com.diligrp.mobsite.getway.domain.protocol.login.LoginReq;
30   -import com.diligrp.mobsite.getway.domain.protocol.login.LoginResp;
31   -import com.diligrp.mobsite.getway.domain.protocol.login.LogoutReq;
32   -import com.diligrp.mobsite.getway.domain.protocol.login.LogoutResp;
33   -import com.diligrp.mobsite.getway.domain.protocol.login.SendVeriCodeReq;
34   -import com.diligrp.mobsite.getway.domain.protocol.login.SendVeriCodeResp;
  14 +import com.diligrp.mobsite.getway.domain.protocol.login.*;
35 15 import com.diligrp.mobsite.getway.domain.protocol.register.UserRegisterReq;
36 16 import com.diligrp.mobsite.getway.domain.protocol.register.UserRegisterResp;
37   -import com.diligrp.mobsite.getway.domain.protocol.user.GetDeliveryAddressReq;
38   -import com.diligrp.mobsite.getway.domain.protocol.user.GetDeliveryAddressResp;
39   -import com.diligrp.mobsite.getway.domain.protocol.user.GetDepositCardAmountReq;
40   -import com.diligrp.mobsite.getway.domain.protocol.user.GetDepositCardAmountResp;
41   -import com.diligrp.mobsite.getway.domain.protocol.user.GetRegisterNoReq;
42   -import com.diligrp.mobsite.getway.domain.protocol.user.GetRegisterNoResp;
43   -import com.diligrp.mobsite.getway.domain.protocol.user.GetRegisterNobyUidsReq;
44   -import com.diligrp.mobsite.getway.domain.protocol.user.GetRegisterNobyUidsResp;
45   -import com.diligrp.mobsite.getway.domain.protocol.user.GetUserInfoReq;
46   -import com.diligrp.mobsite.getway.domain.protocol.user.GetUserInfoResp;
47   -import com.diligrp.mobsite.getway.domain.protocol.user.ModifyPwdReq;
48   -import com.diligrp.mobsite.getway.domain.protocol.user.ModifyPwdResp;
49   -import com.diligrp.mobsite.getway.domain.protocol.user.SearchUserInfoReq;
50   -import com.diligrp.mobsite.getway.domain.protocol.user.SearchUserInfoResp;
51   -import com.diligrp.mobsite.getway.domain.protocol.user.UpdateUserInfoReq;
52   -import com.diligrp.mobsite.getway.domain.protocol.user.UpdateUserInfoResp;
  17 +import com.diligrp.mobsite.getway.domain.protocol.user.*;
53 18 import com.diligrp.mobsite.getway.domain.protocol.user.model.RegisterNoPlatform;
54 19 import com.diligrp.mobsite.getway.manager.common.RegisterNoMapperManager;
55 20 import com.diligrp.mobsite.getway.rpc.PassportRPC;
... ... @@ -57,8 +22,17 @@ import com.diligrp.mobsite.getway.rpc.PickInfoRPC;
57 22 import com.diligrp.mobsite.getway.rpc.UserRPC;
58 23 import com.diligrp.mobsite.getway.rpc.base.BaseOutput;
59 24 import com.diligrp.mobsite.getway.service.buyer.user.UserService;
  25 +import com.diligrp.mobsite.getway.service.common.utils.DateUtils;
60 26 import com.diligrp.website.util.redis.impl.RedisUtilImpl;
61 27 import com.diligrp.website.util.security.Validator;
  28 +import org.slf4j.Logger;
  29 +import org.slf4j.LoggerFactory;
  30 +import org.springframework.beans.factory.annotation.Autowired;
  31 +import org.springframework.beans.factory.annotation.Value;
  32 +import org.springframework.stereotype.Service;
  33 +
  34 +import javax.annotation.Resource;
  35 +import java.util.*;
62 36  
63 37 /**
64 38 * <B>Description</B> 用户 服务层 <br />
... ... @@ -241,7 +215,32 @@ public class UserServiceImpl implements UserService {
241 215  
242 216 @Override
243 217 public UpdateUserInfoResp updateUserInfo(UpdateUserInfoReq req) {
244   - return null;
  218 + BuyerInfoUpdateInput input = new BuyerInfoUpdateInput();
  219 + input.setId(req.getUserId());
  220 + input.setMobilePhone(req.getMobile());
  221 + if (!Validator.isNull(req.getNickname())){
  222 + input.setAccountName(req.getNickname());
  223 + }
  224 + if (!Validator.isNull(req.getPassword())){
  225 + input.setAccountPwd(req.getPassword());
  226 + }
  227 +
  228 + if (!Validator.isNull(req.getBirth())){
  229 + try {
  230 + input.setBirthday(DateUtils.parseDate(req.getBirth(),DateUtils.DATE_FORMAT ));
  231 + } catch (Exception e) {
  232 + logger.error("日期转换错误",e);
  233 + throw new ServiceException();
  234 + }
  235 + }
  236 + if (!Validator.isNull(req.getGender())){
  237 + input.setSex(req.getGender());
  238 + }
  239 + if (!Validator.isNull(req.getHeadImg())){
  240 + input.setFace(req.getHeadImg());
  241 + }
  242 + userRPC.updateUserInfo(input);
  243 + return new UpdateUserInfoResp();
245 244 }
246 245  
247 246 @Override
... ... @@ -454,4 +453,18 @@ public class UserServiceImpl implements UserService {
454 453 resp.setPickInfo(pickInfo);
455 454 return resp;
456 455 }
  456 +
  457 + @Override
  458 + public CheckVeriCodeResp checkOldMobileAuthCode(CheckVeriCodeReq req) {
  459 + passportRPC.verifyOldMobileAuthCode(req.getMobile(), req.getVeriCode());
  460 +
  461 + return new CheckVeriCodeResp();
  462 + }
  463 +
  464 + @Override
  465 + public UpdateMobileResp updateMobile(UpdateMobileReq req) {
  466 + passportRPC.updateMobile(req);
  467 +
  468 + return new UpdateMobileResp();
  469 + }
457 470 }
... ...
mobsite-getway-service/src/main/java/com/diligrp/mobsite/getway/service/seller/SellerUserService.java
... ... @@ -45,4 +45,5 @@ public interface SellerUserService {
45 45 LogoutResp logout(LogoutReq req);
46 46  
47 47  
  48 + UpdateSellerInfoResp updateUserInfo(UpdateSellerInfoReq req);
48 49 }
... ...
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.b2c.myapp.common.api.sellerInfo.input.SellerInfoUpdateInput;
3 4 import com.b2c.myapp.common.api.sellerInfo.output.SellerInfoOutput;
4 5 import com.b2c.myapp.common.api.shop.output.ShopOutput;
5 6 import com.diligrp.mobsite.getway.domain.RegisterNoMapper;
... ... @@ -12,9 +13,7 @@ import com.diligrp.mobsite.getway.domain.protocol.login.*;
12 13 import com.diligrp.mobsite.getway.domain.protocol.register.*;
13 14 import com.diligrp.mobsite.getway.domain.protocol.saler.user.SellerLoginReq;
14 15 import com.diligrp.mobsite.getway.domain.protocol.saler.user.SellerLoginResp;
15   -import com.diligrp.mobsite.getway.domain.protocol.user.GetRegisterNoResp;
16   -import com.diligrp.mobsite.getway.domain.protocol.user.ModifyPwdReq;
17   -import com.diligrp.mobsite.getway.domain.protocol.user.ModifyPwdResp;
  16 +import com.diligrp.mobsite.getway.domain.protocol.user.*;
18 17 import com.diligrp.mobsite.getway.manager.common.RegisterNoMapperManager;
19 18 import com.diligrp.mobsite.getway.rpc.PassportRPC;
20 19 import com.diligrp.mobsite.getway.rpc.SellerRPC;
... ... @@ -294,7 +293,14 @@ public class SellerUserServiceImpl implements SellerUserService {
294 293 return resp;
295 294 }
296 295  
297   -
  296 + @Override
  297 + public UpdateSellerInfoResp updateUserInfo(UpdateSellerInfoReq req) {
  298 + SellerInfoUpdateInput input = new SellerInfoUpdateInput();
  299 + input.setId(req.getUserId());
  300 + input.setMobilePhone(req.getPassword());
  301 + sellerRPC.updateSellerInfo(input);
  302 + return new UpdateSellerInfoResp();
  303 + }
298 304  
299 305  
300 306 }
... ...
mobsite-getway-web/src/main/java/com/diligrp/mobsite/getway/web/api/buyer/user/UserController.java
... ... @@ -227,6 +227,59 @@ public class UserController extends BaseApiController {
227 227 }
228 228  
229 229 /**
  230 + * 修改买家手机号:验证旧手机号验证码
  231 + *
  232 + * @createTime 2017年2月24日 下午10:55:03
  233 + * @author weili
  234 + */
  235 + @ApiOperation(value = "修改手机号:验证旧手机号验证码", httpMethod = "POST", notes = "验证手机收到的验证码", response = CheckVeriCodeResp.class)
  236 + @RequestMapping(value = "/checkOldMobileAuthCode", method = RequestMethod.POST)
  237 + @ResponseBody
  238 + public void checkOldMobileAuthCode(@RequestBody CheckVeriCodeReq temp) {
  239 + CheckVeriCodeReq req = super.getRequest(CheckVeriCodeReq.class);
  240 + try {
  241 + BeanValidator.validator(req);
  242 + CheckVeriCodeResp resp = userService.checkOldMobileAuthCode(req);
  243 + super.sendSuccessResp(resp);
  244 + } catch (ServiceException e) {
  245 + LOGGER.error(
  246 + String.format("Code=%s,ErrorMessage=%s,UserId=%s", e.getCode(), e.getMessage(), req.getUserId()),
  247 + e);
  248 + sendError(e.getCode(), e.getMessage());
  249 + } catch (Exception e) {
  250 + LOGGER.error("验证手机收到的验证码:", e);
  251 + super.sendError(e.getMessage());
  252 + }
  253 + }
  254 +
  255 +
  256 + /**
  257 + * 修改买家手机号
  258 + * @createTime 2017年2月24日 下午10:55:03
  259 + * @author weili
  260 + */
  261 + @ApiOperation(value = "修改买家手机号", httpMethod = "POST", notes = "验证手机收到的验证码", response = CheckVeriCodeResp.class)
  262 + @RequestMapping(value = "/updateMobile", method = RequestMethod.POST)
  263 + @ResponseBody
  264 + public void updateMobile (@RequestBody UpdateMobileReq temp) {
  265 + UpdateMobileReq req = super.getRequest(UpdateMobileReq.class);
  266 + try {
  267 + //BeanValidator.validator(req);
  268 + UpdateMobileResp resp = userService.updateMobile(req);
  269 + super.sendSuccessResp(resp);
  270 + } catch (ServiceException e) {
  271 + LOGGER.error(
  272 + String.format("Code=%s,ErrorMessage=%s,UserId=%s", e.getCode(), e.getMessage(), req.getUserId()),
  273 + e);
  274 + sendError(e.getCode(), e.getMessage());
  275 + } catch (Exception e) {
  276 + LOGGER.error("验证手机收到的验证码:", e);
  277 + super.sendError(e.getMessage());
  278 + }
  279 + }
  280 +
  281 +
  282 + /**
230 283 * 买家注册
231 284 *
232 285 * @createTime 2014年8月28日 下午3:41:02
... ...
mobsite-getway-web/src/main/java/com/diligrp/mobsite/getway/web/api/seller/user/SellerUserController.java
... ... @@ -8,8 +8,7 @@ import com.diligrp.mobsite.getway.domain.protocol.register.SellerRegisterReq;
8 8 import com.diligrp.mobsite.getway.domain.protocol.register.SellerRegisterResp;
9 9 import com.diligrp.mobsite.getway.domain.protocol.saler.user.SellerLoginReq;
10 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;
  11 +import com.diligrp.mobsite.getway.domain.protocol.user.*;
13 12 import com.diligrp.mobsite.getway.service.seller.SellerUserService;
14 13 import com.diligrp.mobsite.getway.web.api.base.BaseApiController;
15 14 import com.diligrp.mobsite.getway.web.utils.BeanValidator;
... ... @@ -270,29 +269,29 @@ public class SellerUserController extends BaseApiController {
270 269 }
271 270 }
272 271  
273   - ///**
274   - // * 个人信息维护
275   - // * @createTime 2016年8月24日 下午10:55:03
276   - // * @author weili
277   - // */
278   - //@ApiOperation(value = "个人信息维护", httpMethod = "POST" ,response = UpdateUserInfoResp.class)
279   - //@RequestMapping(value = "/updateUserInfo",method = RequestMethod.POST)
280   - //@ResponseBody
281   - //public void updateUserInfo(@RequestBody UpdateUserInfoReq temp){
282   - // UpdateUserInfoReq req = super.getRequest(UpdateUserInfoReq.class);
283   - // try {
284   - // UpdateUserInfoResp resp = sellerUserService.updateUserInfo(req);
285   - // super.sendSuccessResp(resp);
286   - // } catch (ServiceException e){
287   - // log.error(String.format("Code=%s,ErrorMessage=%s,UserId=%s",
288   - // e.getCode(), e.getMessage(), req.getUserId()), e);
289   - // sendError(e.getCode(), e.getMessage());
290   - // } catch (Exception e) {
291   - // log.error("个人信息维护:", e);
292   - // super.sendError(e.getMessage());
293   - // }
294   - //
295   - //}
  272 + /**
  273 + * 卖家信息维护
  274 + * @createTime 2016年8月24日 下午10:55:03
  275 + * @author weili
  276 + */
  277 + @ApiOperation(value = "卖家信息维护", httpMethod = "POST" ,response = UpdateUserInfoResp.class)
  278 + @RequestMapping(value = "/updateSellerInfo",method = RequestMethod.POST)
  279 + @ResponseBody
  280 + public void updateSellerInfo(@RequestBody UpdateSellerInfoReq temp){
  281 + UpdateSellerInfoReq req = super.getRequest(UpdateSellerInfoReq.class);
  282 + try {
  283 + UpdateSellerInfoResp resp = sellerUserService.updateUserInfo(req);
  284 + super.sendSuccessResp(resp);
  285 + } catch (ServiceException e){
  286 + log.error(String.format("Code=%s,ErrorMessage=%s,UserId=%s",
  287 + e.getCode(), e.getMessage(), req.getUserId()), e);
  288 + sendError(e.getCode(), e.getMessage());
  289 + } catch (Exception e) {
  290 + log.error("个人信息维护:", e);
  291 + super.sendError(e.getMessage());
  292 + }
  293 +
  294 + }
296 295  
297 296  
298 297  
... ...
... ... @@ -356,7 +356,7 @@
356 356 <dependency>
357 357 <groupId>com.b2c.orders</groupId>
358 358 <artifactId>b2c-orders-client</artifactId>
359   - <version>0.0.3-SNAPSHOT</version>
  359 + <version>0.0.4-SNAPSHOT</version>
360 360 </dependency>
361 361  
362 362 <!--商品库sdk-->
... ...