Commit 713cde388ac4abe3783c06580fa479fefd6b0d7f
1 parent
61a58cbc
获取店铺买家信息接口 update
Showing
3 changed files
with
33 additions
and
0 deletions
myapp-sdk/src/main/java/com/b2c/myapp/sdk/service/ShopBuyerService.java
... | ... | @@ -45,4 +45,11 @@ public interface ShopBuyerService { |
45 | 45 | * @return |
46 | 46 | */ |
47 | 47 | BaseOutput<Boolean> modifyShopRemarkName(Long shopBuyerId,String remarkName); |
48 | + | |
49 | + /** | |
50 | + * 根据shopBuyerId查询店铺买家信息 | |
51 | + * @param shopBuyerId | |
52 | + * @return | |
53 | + */ | |
54 | + BaseOutput<ShopBuyerOutput> getShopBuyerById(Long shopBuyerId); | |
48 | 55 | } |
... | ... |
myapp-sdk/src/main/java/com/b2c/myapp/sdk/service/impl/ShopBuyerServiceImpl.java
... | ... | @@ -71,6 +71,19 @@ public class ShopBuyerServiceImpl extends BaseServiceImpl implements ShopBuyerSe |
71 | 71 | return this.httpPost("/api/shopBuyer/modifyShopRemarkName", paramMap, new TypeReference<BaseOutput<Boolean>>(){}); |
72 | 72 | } |
73 | 73 | |
74 | + /** | |
75 | + * 根据shopBuyerId查询店铺买家信息 | |
76 | + * | |
77 | + * @param shopBuyerId | |
78 | + * @return | |
79 | + */ | |
80 | + @Override | |
81 | + public BaseOutput<ShopBuyerOutput> getShopBuyerById(Long shopBuyerId) { | |
82 | + Map<String,Object> paramMap = Maps.newHashMap(); | |
83 | + paramMap.put("shopBuyerId",shopBuyerId); | |
84 | + return this.httpPost("/api/shopBuyer/getShopBuyerById", paramMap, new TypeReference<BaseOutput<ShopBuyerOutput>>(){}); | |
85 | + } | |
86 | + | |
74 | 87 | public static void main(String[] args) { |
75 | 88 | ShopBuyerServiceImpl shopBuyerService = new ShopBuyerServiceImpl(""); |
76 | 89 | shopBuyerService.getShopBuyerKeys(1l); |
... | ... |
myapp-web/src/main/java/com/b2c/myapp/api/ShopBuyerApi.java
... | ... | @@ -51,6 +51,19 @@ public class ShopBuyerApi extends BaseRestFulApi { |
51 | 51 | } |
52 | 52 | return output; |
53 | 53 | } |
54 | + @ApiOperation(value ="获取店铺买家信息", notes = "获取店铺买家信息") | |
55 | + @ApiImplicitParam(paramType = "query",name = "shopBuyerId",dataType = "Long", required = true, value = "店铺买家唯一标识") | |
56 | + @RequestMapping(value="/getShopBuyerById", method = RequestMethod.POST) | |
57 | + @ResponseBody | |
58 | + public BaseOutput<ShopBuyerOutput> getShopBuyerById(Long shopBuyerId) { | |
59 | + BaseOutput<ShopBuyerOutput> output = BaseOutput.success(); | |
60 | + try { | |
61 | + output.setData(BeanConver.copeBean(shopBuyerService.get(shopBuyerId),ShopBuyerOutput.class)); | |
62 | + } catch (Exception e) { | |
63 | + handleException(output, e); | |
64 | + } | |
65 | + return output; | |
66 | + } | |
54 | 67 | |
55 | 68 | @ApiOperation(value ="绑定并激活", notes = "查询买家是否绑定相关店铺,未绑定直接绑定,已绑定直接激活") |
56 | 69 | @RequestMapping(value="/bindAndActivate", method = RequestMethod.POST) |
... | ... |