Commit 7cd7c324563b879311c5cebfc45c891746e8d3d1

Authored by weiliwhereareyou@163.com
1 parent e2b6c603

初始化工程-接口定义

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/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/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
... ... @@ -10,7 +10,7 @@ import io.swagger.annotations.ApiModelProperty;
10 10 * <B>Company</B> 地利集团
11 11 * @author wujiaqiang
12 12 */
13   -public class CreateOrUpdateShopResp extends BaseResp {
  13 +public class CreateShopResp extends BaseResp {
14 14  
15 15  
16 16 /**
... ...
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-domain/src/main/java/com/diligrp/mobsite/getway/domain/protocol/shop/UpdateShopResp.java 0 → 100644
  1 +package com.diligrp.mobsite.getway.domain.protocol.shop;
  2 +
  3 +import com.diligrp.mobsite.getway.domain.protocol.BaseResp;
  4 +
  5 +/**
  6 + * <B>Description</B> 路线管理-获取线路信息 <br />
  7 + * <B>Copyright</B> Copyright (c) 2014 www.diligrp.com All rights reserved. <br />
  8 + * 本软件源代码版权归地利集团,未经许可不得任意复制与传播.<br />
  9 + * <B>Company</B> 地利集团
  10 + * @author wujiaqiang
  11 + */
  12 +public class UpdateShopResp extends BaseResp {
  13 +
  14 +
  15 + }
... ...
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/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-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
... ... @@ -2,14 +2,17 @@ package com.diligrp.mobsite.getway.web.api.seller.user;
2 2  
3 3 import com.diligrp.mobsite.getway.domain.except.ServiceException;
4 4 import com.diligrp.mobsite.getway.domain.protocol.login.*;
5   -import com.diligrp.mobsite.getway.domain.protocol.register.*;
  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;
6 9 import com.diligrp.mobsite.getway.domain.protocol.saler.user.SellerLoginReq;
7 10 import com.diligrp.mobsite.getway.domain.protocol.saler.user.SellerLoginResp;
8   -import com.diligrp.mobsite.getway.domain.protocol.user.*;
  11 +import com.diligrp.mobsite.getway.domain.protocol.user.ModifyPwdReq;
  12 +import com.diligrp.mobsite.getway.domain.protocol.user.ModifyPwdResp;
9 13 import com.diligrp.mobsite.getway.service.seller.SellerUserService;
10 14 import com.diligrp.mobsite.getway.web.api.base.BaseApiController;
11 15 import com.diligrp.mobsite.getway.web.utils.BeanValidator;
12   -import com.diligrp.mobsite.getway.web.utils.DiligrpEndpoint;
13 16 import com.diligrp.website.util.security.Validator;
14 17 import io.swagger.annotations.Api;
15 18 import io.swagger.annotations.ApiOperation;
... ... @@ -93,13 +96,13 @@ public class SellerUserController extends BaseApiController {
93 96  
94 97 /**
95 98 * 验证手机号是否已经被注册
96   - * @createTime 2014年8月28日 下午3:41:02
97   - * @author zhangshirui
  99 + * @createTime 2017年1月9日 下午3:41:02
  100 + * @author weili
98 101 */
99   - @RequestMapping("/checkMobile")
  102 + @ApiOperation(value = "验证手机号是否已经被注册", httpMethod = "POST" ,response = CheckMobileResp.class)
  103 + @RequestMapping(value = "/checkMobile",method = RequestMethod.POST)
100 104 @ResponseBody
101   - @DiligrpEndpoint(req = CheckMobileReq.class, resp=CheckMobileResp.class,group = "手机端个人中心",desc = "验证指定手机号是否已被注册")
102   - public void checkMobile(){
  105 + public void checkMobile(@RequestBody CheckMobileReq temp){
103 106 CheckMobileReq req = super.getRequest(CheckMobileReq.class);
104 107 CheckMobileResp resp = null;
105 108 try {
... ... @@ -148,7 +151,7 @@ public class SellerUserController extends BaseApiController {
148 151 * @createTime 2014年8月24日 下午10:55:03
149 152 * @author weili
150 153 */
151   - @ApiOperation(value = "忘记密码:验证手机号和验证码", httpMethod = "POST" , notes = "验证手机收到的验证码",response = CheckVeriCodeResp.class)
  154 + @ApiOperation(value = "验证手机号和验证码", httpMethod = "POST" , notes = "验证手机收到的验证码",response = CheckVeriCodeResp.class)
152 155 @RequestMapping(value = "/checkAuthCode",method = RequestMethod.POST)
153 156 @ResponseBody
154 157 public void checkAuthCode(@RequestBody CheckVeriCodeReq temp){
... ... @@ -271,53 +274,53 @@ public class SellerUserController extends BaseApiController {
271 274 }
272 275 }
273 276  
274   - /**
275   - * 个人信息维护
276   - * @createTime 2016年8月24日 下午10:55:03
277   - * @author weili
278   - */
279   - @ApiOperation(value = "个人信息维护", httpMethod = "POST" ,response = UpdateUserInfoResp.class)
280   - @RequestMapping(value = "/updateUserInfo",method = RequestMethod.POST)
281   - @ResponseBody
282   - public void updateUserInfo(@RequestBody UpdateUserInfoReq temp){
283   - UpdateUserInfoReq req = super.getRequest(UpdateUserInfoReq.class);
284   - try {
285   - UpdateUserInfoResp resp = sellerUserService.updateUserInfo(req);
286   - super.sendSuccessResp(resp);
287   - } catch (ServiceException e){
288   - log.error(String.format("Code=%s,ErrorMessage=%s,UserId=%s",
289   - e.getCode(), e.getMessage(), req.getUserId()), e);
290   - sendError(e.getCode(), e.getMessage());
291   - } catch (Exception e) {
292   - log.error("个人信息维护:", e);
293   - super.sendError(e.getMessage());
294   - }
  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 + //}
295 300  
296   - }
297 301  
298 302  
299   -
300   -
301   - /**
302   - * 查询用户信息
303   - * GetUserInfoReq
304   - */
305   - @ApiOperation(value = "查询卖家用户信息", httpMethod = "POST" ,response = GetDepositCardAmountResp.class)
306   - @RequestMapping(value = "/getsellerInfo",method = RequestMethod.POST)
307   - @ResponseBody
308   - public void getsellerInfo() {
309   - GetUserInfoReq req = getRequest(GetUserInfoReq.class);
310   - try {
311   - GetUserInfoResp resp = sellerUserService.getUserIntroduction(req);
312   - super.sendSuccessResp(resp);
313   - } catch (ServiceException e){
314   - log.error(String.format("Code=%s,ErrorMessage=%s,UserId=%s",
315   - e.getCode(), e.getMessage(), req.getUserId()), e);
316   - sendError(e.getCode(), e.getMessage());
317   - } catch (Exception e) {
318   - log.error(String.format("ErrorMessage=%s,UserId=%s", e.getMessage(), req.getUserId()), e);
319   - sendError(e.getMessage());
320   - }
321   - }
  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 + //}
322 325  
323 326 }
... ...