Commit e3f391363a4e5d7c090f06c1912f1bf14157991c
1 parent
5f944c8a
update rpc pickinfo
Showing
5 changed files
with
10 additions
and
11 deletions
mobsite-getway-domain/src/main/java/com/diligrp/mobsite/getway/domain/protocol/pickinfo/SetDefaultPickInfoReq.java renamed to mobsite-getway-domain/src/main/java/com/diligrp/mobsite/getway/domain/protocol/pickinfo/SetDefaultReq.java
... | ... | @@ -13,7 +13,7 @@ import io.swagger.annotations.ApiModelProperty; |
13 | 13 | * @createTime 2014/8/28 16:23 |
14 | 14 | */ |
15 | 15 | @SuppressWarnings("serial") |
16 | -public class SetDefaultPickInfoReq extends BaseReq { | |
16 | +public class SetDefaultReq extends BaseReq { | |
17 | 17 | /** |
18 | 18 | * 提货人信息Id |
19 | 19 | */ | ... | ... |
mobsite-getway-domain/src/main/java/com/diligrp/mobsite/getway/domain/protocol/pickinfo/SetDefaultPickInfoResp.java renamed to mobsite-getway-domain/src/main/java/com/diligrp/mobsite/getway/domain/protocol/pickinfo/SetDefaultResp.java
mobsite-getway-service/src/main/java/com/diligrp/mobsite/getway/service/buyer/pickinfo/PickInfoService.java
mobsite-getway-service/src/main/java/com/diligrp/mobsite/getway/service/buyer/pickinfo/impl/PickInfoServiceImpl.java
... | ... | @@ -156,11 +156,12 @@ public class PickInfoServiceImpl implements PickInfoService{ |
156 | 156 | * @return |
157 | 157 | */ |
158 | 158 | @Override |
159 | - public SetDefaultPickInfoResp setDefault(Long consigneeId, Long userId) { | |
160 | - SetDefaultPickInfoResp resp = new SetDefaultPickInfoResp(); | |
159 | + public SetDefaultResp setDefault(Long consigneeId, Long userId) { | |
160 | + SetDefaultResp resp = new SetDefaultResp(); | |
161 | 161 | PickingInfoUpdateInput pickingInfoUpdateInput = new PickingInfoUpdateInput(); |
162 | 162 | pickingInfoUpdateInput.setId(consigneeId); |
163 | 163 | pickingInfoUpdateInput.setBuyerId(userId); |
164 | + pickingInfoUpdateInput.setDef(2); | |
164 | 165 | if(!pickInfoRPC.modify(pickingInfoUpdateInput)){ |
165 | 166 | resp.setCode(ResultCode.BUSINESS_FAILED); |
166 | 167 | } | ... | ... |
mobsite-getway-web/src/main/java/com/diligrp/mobsite/getway/web/api/buyer/home/PickInfoController.java
... | ... | @@ -15,8 +15,6 @@ import org.springframework.web.bind.annotation.RequestMapping; |
15 | 15 | import org.springframework.web.bind.annotation.RequestMethod; |
16 | 16 | import org.springframework.web.bind.annotation.ResponseBody; |
17 | 17 | |
18 | -import javax.annotation.Resource; | |
19 | - | |
20 | 18 | /** |
21 | 19 | * <B>Description</B> 提货人相关操作接口 <br /> |
22 | 20 | * <B>Copyright</B> Copyright (c) 2014 www.diligrp.com All rights reserved. <br /> |
... | ... | @@ -158,13 +156,13 @@ public class PickInfoController extends BaseApiController { |
158 | 156 | /** |
159 | 157 | * 设置默认提货人 |
160 | 158 | */ |
161 | - @ApiOperation(value = "设置默认收货人", httpMethod = "POST",response = SetDefaultPickInfoReq.class) | |
159 | + @ApiOperation(value = "设置默认收货人", httpMethod = "POST",response = SetDefaultResp.class) | |
162 | 160 | @RequestMapping(value = "/setDefault",method = RequestMethod.POST) |
163 | 161 | @ResponseBody |
164 | - public void setDefault(@RequestBody SetDefaultPickInfoReq temp) { | |
165 | - SetDefaultPickInfoReq req = getRequest(SetDefaultPickInfoReq.class); | |
162 | + public void setDefault(@RequestBody SetDefaultReq temp) { | |
163 | + SetDefaultReq req = getRequest(SetDefaultReq.class); | |
166 | 164 | try { |
167 | - SetDefaultPickInfoResp resp = pickInfoService.setDefault(req.getId(),req.getUserId()); | |
165 | + SetDefaultResp resp = pickInfoService.setDefault(req.getId(),req.getUserId()); | |
168 | 166 | sendSuccessResp(resp); |
169 | 167 | } catch (Exception e) { |
170 | 168 | log.error(String.format("ErrorMessage=%s,UserId=%s",e.getMessage(),req.getUserId()), e); | ... | ... |