Commit 5813fe4cf46b0099e3523faeb05504ea1ba09ea6
1 parent
d56dd93a
update found
Showing
10 changed files
with
178 additions
and
62 deletions
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 | -import com.diligrp.mobsite.getway.domain.protocol.BaseReq; | |
3 | +import com.diligrp.mobsite.getway.domain.base.BaseListReq; | |
4 | 4 | import io.swagger.annotations.ApiModelProperty; |
5 | 5 | |
6 | 6 | /** |
7 | 7 | * Created by xxxzzz on 2017/1/3. |
8 | 8 | */ |
9 | -public class GetFundsReq extends BaseReq { | |
9 | +public class GetFundsReq extends BaseListReq { | |
10 | 10 | @ApiModelProperty(value = "搜索关键词") |
11 | 11 | private String keyword; |
12 | 12 | @ApiModelProperty(value="店铺ID") |
13 | 13 | private Long shopId; |
14 | - @ApiModelProperty(value = "页码") | |
15 | - private Integer pageNum; | |
16 | - | |
17 | 14 | public String getKeyword() { |
18 | 15 | return keyword; |
19 | 16 | } |
... | ... | @@ -29,12 +26,4 @@ public class GetFundsReq extends BaseReq { |
29 | 26 | public void setShopId(Long shopId) { |
30 | 27 | this.shopId = shopId; |
31 | 28 | } |
32 | - | |
33 | - public Integer getPageNum() { | |
34 | - return pageNum; | |
35 | - } | |
36 | - | |
37 | - public void setPageNum(Integer pageNum) { | |
38 | - this.pageNum = pageNum; | |
39 | - } | |
40 | 29 | } | ... | ... |
mobsite-getway-domain/src/main/java/com/diligrp/mobsite/getway/domain/protocol/fund/GetfundTradeRecordResp.java
1 | 1 | package com.diligrp.mobsite.getway.domain.protocol.fund; |
2 | 2 | |
3 | +import com.b2c.orders.commons.utils.DateUtils; | |
3 | 4 | import com.diligrp.mobsite.getway.domain.base.BaseListResp; |
5 | +import com.diligrp.mobsite.getway.domain.protocol.fund.model.FoundTrade; | |
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 GetfundTradeRecordResp extends BaseListResp { |
10 | 14 | |
15 | + private List<FoundTrade> foundTrades; | |
11 | 16 | |
12 | - @ApiModelProperty(value = "储值金额/订单金额" ,required = true) | |
13 | - private Long tradePrice ; | |
14 | - | |
15 | - | |
16 | - @ApiModelProperty(value = "储值时间/消费时间") | |
17 | - private String tradeTime; | |
18 | - | |
19 | - @ApiModelProperty(value = "交易类型") | |
20 | - private Long tradeType; | |
21 | - | |
22 | - //@ApiModelProperty(value = "储值余额/消费时间") | |
23 | - //private Long residueTotalPrice; | |
24 | - | |
25 | - | |
26 | - public Long getTradePrice() { | |
27 | - return tradePrice; | |
28 | - } | |
29 | - | |
30 | - public void setTradePrice(Long tradePrice) { | |
31 | - this.tradePrice = tradePrice; | |
32 | - } | |
33 | - | |
34 | - public String getTradeTime() { | |
35 | - return tradeTime; | |
36 | - } | |
37 | - | |
38 | - public void setTradeTime(String tradeTime) { | |
39 | - this.tradeTime = tradeTime; | |
40 | - } | |
41 | - | |
42 | - public Long getTradeType() { | |
43 | - return tradeType; | |
17 | + public List<FoundTrade> getFoundTrades() { | |
18 | + return foundTrades; | |
44 | 19 | } |
45 | 20 | |
46 | - public void setTradeType(Long tradeType) { | |
47 | - this.tradeType = tradeType; | |
21 | + public void setFoundTrades(List<FoundTrade> foundTrades) { | |
22 | + this.foundTrades = foundTrades; | |
48 | 23 | } |
49 | 24 | } | ... | ... |
mobsite-getway-domain/src/main/java/com/diligrp/mobsite/getway/domain/protocol/fund/ModifyShopRemarkNameReq.java
0 → 100644
1 | +package com.diligrp.mobsite.getway.domain.protocol.fund; | |
2 | + | |
3 | +import com.diligrp.mobsite.getway.domain.protocol.BaseReq; | |
4 | +import io.swagger.annotations.ApiModelProperty; | |
5 | + | |
6 | +/** | |
7 | + * Created by xxxzzz on 2017/1/3. | |
8 | + */ | |
9 | +public class ModifyShopRemarkNameReq extends BaseReq { | |
10 | + @ApiModelProperty(value = "店铺用户ID,绑定的唯一标识") | |
11 | + private Long shopBuyerId; | |
12 | + @ApiModelProperty(value = "备注名称") | |
13 | + private String remarkName; | |
14 | + | |
15 | + public Long getShopBuyerId() { | |
16 | + return shopBuyerId; | |
17 | + } | |
18 | + | |
19 | + public void setShopBuyerId(Long shopBuyerId) { | |
20 | + this.shopBuyerId = shopBuyerId; | |
21 | + } | |
22 | + | |
23 | + public String getRemarkName() { | |
24 | + return remarkName; | |
25 | + } | |
26 | + | |
27 | + public void setRemarkName(String remarkName) { | |
28 | + this.remarkName = remarkName; | |
29 | + } | |
30 | +} | ... | ... |
mobsite-getway-domain/src/main/java/com/diligrp/mobsite/getway/domain/protocol/fund/SignRsponse.java renamed to mobsite-getway-domain/src/main/java/com/diligrp/mobsite/getway/domain/protocol/fund/ModifyShopRemarkNameResp.java
... | ... | @@ -3,7 +3,7 @@ package com.diligrp.mobsite.getway.domain.protocol.fund; |
3 | 3 | import com.diligrp.mobsite.getway.domain.protocol.BaseResp; |
4 | 4 | |
5 | 5 | /** |
6 | - * Created by david on 2015/7/14. | |
6 | + * Created by jiangchengyong on 2017/1/16. | |
7 | 7 | */ |
8 | -public class SignRsponse extends BaseResp { | |
8 | +public class ModifyShopRemarkNameResp extends BaseResp{ | |
9 | 9 | } | ... | ... |
mobsite-getway-domain/src/main/java/com/diligrp/mobsite/getway/domain/protocol/fund/FundTradeReq.java renamed to mobsite-getway-domain/src/main/java/com/diligrp/mobsite/getway/domain/protocol/fund/StoreValueReq.java
mobsite-getway-domain/src/main/java/com/diligrp/mobsite/getway/domain/protocol/fund/FundTradeResp.java renamed to mobsite-getway-domain/src/main/java/com/diligrp/mobsite/getway/domain/protocol/fund/StoreValueResp.java
mobsite-getway-domain/src/main/java/com/diligrp/mobsite/getway/domain/protocol/fund/model/FoundTrade.java
0 → 100644
1 | +package com.diligrp.mobsite.getway.domain.protocol.fund.model; | |
2 | + | |
3 | +import com.b2c.myapp.common.enums.TradeType; | |
4 | +import com.b2c.myapp.common.utils.base.BaseDomain; | |
5 | +import io.swagger.annotations.ApiParam; | |
6 | + | |
7 | +import java.util.Date; | |
8 | + | |
9 | +/** | |
10 | + * <br /> | |
11 | + * @createTime 2016-11-23 17:19:15 | |
12 | + * @author template | |
13 | + */public class FoundTrade{ | |
14 | + | |
15 | + /** | |
16 | + * 订单编号 | |
17 | + */ | |
18 | + private Long orderId; | |
19 | + | |
20 | + /** | |
21 | + * 交易名称 | |
22 | + */ | |
23 | + private String tradeName; | |
24 | + | |
25 | + /** | |
26 | + * 交易金额 | |
27 | + */ | |
28 | + private Long tradePrice; | |
29 | + | |
30 | + /** | |
31 | + * 交易类型(1:充值 2:冻结3:解冻 4:消费) | |
32 | + */ | |
33 | + private Long tradeType; | |
34 | + | |
35 | + /** | |
36 | + * 交易时间 | |
37 | + */ | |
38 | + private Date created; | |
39 | + | |
40 | + public Long getOrderId() { | |
41 | + return orderId; | |
42 | + } | |
43 | + | |
44 | + public void setOrderId(Long orderId) { | |
45 | + this.orderId = orderId; | |
46 | + } | |
47 | + | |
48 | + public String getTradeName() { | |
49 | + return tradeName; | |
50 | + } | |
51 | + | |
52 | + public void setTradeName(String tradeName) { | |
53 | + this.tradeName = tradeName; | |
54 | + } | |
55 | + | |
56 | + public Long getTradePrice() { | |
57 | + return tradePrice; | |
58 | + } | |
59 | + | |
60 | + public void setTradePrice(Long tradePrice) { | |
61 | + this.tradePrice = tradePrice; | |
62 | + } | |
63 | + | |
64 | + public Long getTradeType() { | |
65 | + return tradeType; | |
66 | + } | |
67 | + | |
68 | + public void setTradeType(Long tradeType) { | |
69 | + this.tradeType = tradeType; | |
70 | + } | |
71 | + | |
72 | + public Date getCreated() { | |
73 | + return created; | |
74 | + } | |
75 | + | |
76 | + public void setCreated(Date created) { | |
77 | + this.created = created; | |
78 | + } | |
79 | + | |
80 | + @Override | |
81 | + public String toString() { | |
82 | + return "FoundTrade{" + | |
83 | + ", orderId=" + orderId + | |
84 | + ", tradeName='" + tradeName + '\'' + | |
85 | + ", tradePrice=" + tradePrice + | |
86 | + ", tradeType=" + tradeType + | |
87 | + ", created=" + created + | |
88 | + '}'; | |
89 | + } | |
90 | +} | |
0 | 91 | \ No newline at end of file | ... | ... |
mobsite-getway-service/src/main/java/com/diligrp/mobsite/getway/service/seller/FundService.java
... | ... | @@ -11,7 +11,8 @@ public interface FundService { |
11 | 11 | |
12 | 12 | public GetFundsResp getFunds(GetFundsReq fundsReq) ; |
13 | 13 | |
14 | - FundTradeResp storeValue(Long price); | |
14 | + StoreValueResp storeValue(Long price); | |
15 | 15 | |
16 | 16 | GetfundTradeRecordResp getfundTradeRecord(GetfundTradeRecordReq req); |
17 | + ModifyShopRemarkNameResp modifyShopRemarkName(ModifyShopRemarkNameReq req); | |
17 | 18 | } | ... | ... |
mobsite-getway-service/src/main/java/com/diligrp/mobsite/getway/service/seller/impl/FundServiceImpl.java
... | ... | @@ -2,7 +2,6 @@ package com.diligrp.mobsite.getway.service.seller.impl; |
2 | 2 | |
3 | 3 | import com.b2c.myapp.common.api.shop.output.ShopOutput; |
4 | 4 | import com.b2c.myapp.common.api.shopBuyer.input.ShopBuyerDetail; |
5 | -import com.b2c.myapp.common.api.shopBuyer.input.ShopBuyerListInput; | |
6 | 5 | import com.b2c.myapp.common.api.shopBuyer.output.ShopBuyerDetailOutput; |
7 | 6 | import com.b2c.myapp.common.utils.base.Page; |
8 | 7 | import com.diligrp.mobsite.getway.domain.protocol.fund.*; |
... | ... | @@ -40,7 +39,7 @@ public class FundServiceImpl implements FundService{ |
40 | 39 | } |
41 | 40 | |
42 | 41 | @Override |
43 | - public FundTradeResp storeValue(Long price) { | |
42 | + public StoreValueResp storeValue(Long price) { | |
44 | 43 | |
45 | 44 | return null; |
46 | 45 | } |
... | ... | @@ -49,4 +48,9 @@ public class FundServiceImpl implements FundService{ |
49 | 48 | public GetfundTradeRecordResp getfundTradeRecord(GetfundTradeRecordReq req) { |
50 | 49 | return null; |
51 | 50 | } |
51 | + | |
52 | + @Override | |
53 | + public ModifyShopRemarkNameResp modifyShopRemarkName(ModifyShopRemarkNameReq req) { | |
54 | + return null; | |
55 | + } | |
52 | 56 | } | ... | ... |
mobsite-getway-web/src/main/java/com/diligrp/mobsite/getway/web/api/seller/fund/FundController.java
... | ... | @@ -5,7 +5,6 @@ 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; | |
9 | 8 | import io.swagger.annotations.ApiOperation; |
10 | 9 | import org.apache.log4j.Logger; |
11 | 10 | import org.springframework.stereotype.Controller; |
... | ... | @@ -66,13 +65,13 @@ public class FundController extends BaseApiController{ |
66 | 65 | * @createTime 2017年1月3日 下午5:32:02 |
67 | 66 | * @author weili |
68 | 67 | */ |
69 | - @ApiOperation(value = "储值卡操作", httpMethod = "POST",response = FundTradeResp.class) | |
68 | + @ApiOperation(value = "储值卡操作", httpMethod = "POST",response = StoreValueResp.class) | |
70 | 69 | @RequestMapping(value = "/storeValue",method = RequestMethod.POST) |
71 | 70 | @ResponseBody |
72 | - public void storeValue(@RequestBody FundTradeReq temp) { | |
73 | - FundTradeReq req = super.getRequest(FundTradeReq.class); | |
71 | + public void storeValue(@RequestBody StoreValueReq temp) { | |
72 | + StoreValueReq req = super.getRequest(StoreValueReq.class); | |
74 | 73 | try { |
75 | - FundTradeResp resp = fundService.storeValue(req.getTradePrice()); | |
74 | + StoreValueResp resp = fundService.storeValue(req.getTradePrice()); | |
76 | 75 | super.sendSuccessResp(resp); |
77 | 76 | } catch (ServiceException e) { |
78 | 77 | log.error("获取储值列表出现业务异常", e); |
... | ... | @@ -87,12 +86,12 @@ public class FundController extends BaseApiController{ |
87 | 86 | /** |
88 | 87 | * 储值操作 |
89 | 88 | * <p/> |
90 | - * 请求协议体:GetFundsReq | |
91 | - * 返回协议体:GetFundsResp | |
89 | + * 请求协议体:GetfundTradeRecordReq | |
90 | + * 返回协议体:GetfundTradeRecordResp | |
92 | 91 | * |
93 | 92 | * @return |
94 | 93 | * @createTime 2017年1月3日 下午5:32:02 |
95 | - * @author weili | |
94 | + * @author jcy | |
96 | 95 | */ |
97 | 96 | @ApiOperation(value = "获取储值/交易记录", httpMethod = "POST",response = GetfundTradeRecordResp.class) |
98 | 97 | @RequestMapping(value = "/getfundTradeRecord",method = RequestMethod.POST) |
... | ... | @@ -112,5 +111,33 @@ public class FundController extends BaseApiController{ |
112 | 111 | } |
113 | 112 | } |
114 | 113 | |
114 | + /** | |
115 | + * 修改店铺备注名称 | |
116 | + * <p/> | |
117 | + * 请求协议体:ModifyShopRemarkNameReq | |
118 | + * 返回协议体:ModifyShopRemarkNameResp | |
119 | + * | |
120 | + * @return | |
121 | + * @createTime 2017年1月3日 下午5:32:02 | |
122 | + * @author jcy | |
123 | + */ | |
124 | + @ApiOperation(value = "修改店铺备注名称", httpMethod = "POST",response = ModifyShopRemarkNameResp.class) | |
125 | + @RequestMapping(value = "/modifyShopRemarkName",method = RequestMethod.POST) | |
126 | + @ResponseBody | |
127 | + public void modifyShopRemarkName(@RequestBody ModifyShopRemarkNameReq temp) { | |
128 | + ModifyShopRemarkNameReq req = super.getRequest(ModifyShopRemarkNameReq.class); | |
129 | + try { | |
130 | + ModifyShopRemarkNameResp resp = fundService.modifyShopRemarkName(req); | |
131 | + super.sendSuccessResp(resp); | |
132 | + } catch (ServiceException e) { | |
133 | + log.error("修改店铺备注名称出现业务异常", e); | |
134 | + super.sendError(e.getCode(), e.getMessage()); | |
135 | + } catch (Exception e) { | |
136 | + log.error("修改店铺备注名称失败", e); | |
137 | + super.sendError(e.getMessage()); | |
138 | + } | |
139 | + } | |
140 | + | |
141 | + | |
115 | 142 | |
116 | 143 | } | ... | ... |