|
@@ -9,10 +9,14 @@ import java.util.List;
|
9
|
9
|
import java.util.Map;
|
10
|
10
|
|
11
|
11
|
import com.ydw.yunbuyer.common.base.enums.TimeEnum;
|
|
12
|
+import io.swagger.annotations.Api;
|
|
13
|
+import io.swagger.annotations.ApiOperation;
|
12
|
14
|
import org.apache.http.client.ClientProtocolException;
|
13
|
15
|
import org.springframework.beans.factory.annotation.Autowired;
|
14
|
16
|
import org.springframework.context.annotation.Scope;
|
15
|
17
|
import org.springframework.util.StringUtils;
|
|
18
|
+import org.springframework.web.bind.annotation.GetMapping;
|
|
19
|
+import org.springframework.web.bind.annotation.PostMapping;
|
16
|
20
|
import org.springframework.web.bind.annotation.RequestMapping;
|
17
|
21
|
import org.springframework.web.bind.annotation.RestController;
|
18
|
22
|
import org.tmsps.ne4spring.utils.ChkUtil;
|
|
@@ -59,6 +63,7 @@ import com.ydw.yunbuyer.web.pm.web.WebTools;
|
59
|
63
|
* @author 吴思凡
|
60
|
64
|
*
|
61
|
65
|
*/
|
|
66
|
+@Api(tags = "WxPmController")
|
62
|
67
|
@RestController
|
63
|
68
|
@Scope("prototype")
|
64
|
69
|
@RequestMapping("/wx/pm")
|
|
@@ -108,7 +113,8 @@ public class WxPmController extends ProjBaseAction {
|
108
|
113
|
* @param mobile
|
109
|
114
|
* @return
|
110
|
115
|
*/
|
111
|
|
- @RequestMapping(value = "/send_mobile_wx")
|
|
116
|
+ @ApiOperation("发送短信")
|
|
117
|
+ @PostMapping(value = "/send_mobile_wx")
|
112
|
118
|
public String send_mobile_wx(String mobile) {
|
113
|
119
|
if (persionApi.check_mobile(mobile)) {
|
114
|
120
|
String random = ((int) ((Math.random() * 9 + 1) * 1000)) + "";
|
|
@@ -132,7 +138,8 @@ public class WxPmController extends ProjBaseAction {
|
132
|
138
|
* @param code
|
133
|
139
|
* @return
|
134
|
140
|
*/
|
135
|
|
- @RequestMapping(value = "/check_mobile_and_code_wx")
|
|
141
|
+ @ApiOperation("检测手机号")
|
|
142
|
+ @PostMapping(value = "/check_mobile_and_code_wx")
|
136
|
143
|
public String check_mobile_and_code_wx(String mobile, String code) {
|
137
|
144
|
Object m = WebTools.getSession().getAttribute(mobile);
|
138
|
145
|
if (ChkTools.isNull(m)) {
|
|
@@ -156,7 +163,8 @@ public class WxPmController extends ProjBaseAction {
|
156
|
163
|
*
|
157
|
164
|
* @return
|
158
|
165
|
*/
|
159
|
|
- @RequestMapping(value = "/list_item_classify")
|
|
166
|
+ @ApiOperation("查询分类")
|
|
167
|
+ @GetMapping(value = "/list_item_classify")
|
160
|
168
|
public String list_item_classify() {
|
161
|
169
|
List<Map<String, Object>> list = pmItemService.list_item_classify();
|
162
|
170
|
LinkedList<Map<String, Object>> list1 = new LinkedList<Map<String, Object>>();
|
|
@@ -194,7 +202,8 @@ public class WxPmController extends ProjBaseAction {
|
194
|
202
|
* @param userinfo
|
195
|
203
|
* @return
|
196
|
204
|
*/
|
197
|
|
- @RequestMapping(value = "/update_userinfo")
|
|
205
|
+ @ApiOperation("更新用户信息")
|
|
206
|
+ @PostMapping(value = "/update_userinfo")
|
198
|
207
|
public String update_userinfo(String userinfo) {
|
199
|
208
|
JSONObject json1 = sessionWxService.getCurrentLoginPersion();
|
200
|
209
|
JSONObject json = JsonUtil.jsonStrToJsonObject(userinfo);
|
|
@@ -223,7 +232,8 @@ public class WxPmController extends ProjBaseAction {
|
223
|
232
|
*
|
224
|
233
|
* @return
|
225
|
234
|
*/
|
226
|
|
- @RequestMapping(value = "/get_bidderinfo")
|
|
235
|
+ @ApiOperation("获取我的中拍信息")
|
|
236
|
+ @GetMapping(value = "/get_bidderinfo")
|
227
|
237
|
public String get_bidderinfo() {
|
228
|
238
|
JSONObject json = sessionWxService.getCurrentLoginPersion();
|
229
|
239
|
String persion_id = json.getString("kid");
|
|
@@ -246,7 +256,8 @@ public class WxPmController extends ProjBaseAction {
|
246
|
256
|
* @param item_kid
|
247
|
257
|
* @return
|
248
|
258
|
*/
|
249
|
|
- @RequestMapping("/apply")
|
|
259
|
+ @ApiOperation("去支付保证金")
|
|
260
|
+ @PostMapping("/apply")
|
250
|
261
|
public String apply(String item_kid) {
|
251
|
262
|
|
252
|
263
|
JSONObject persion = sessionWxService.getCurrentLoginPersion();
|
|
@@ -266,7 +277,8 @@ public class WxPmController extends ProjBaseAction {
|
266
|
277
|
* @param item_kid
|
267
|
278
|
* @return
|
268
|
279
|
*/
|
269
|
|
- @RequestMapping("/payment")
|
|
280
|
+ @ApiOperation("去支付成交价")
|
|
281
|
+ @PostMapping("/payment")
|
270
|
282
|
public String payment(String item_kid, String address_id, String message, BigDecimal red_pack_balance) {
|
271
|
283
|
JSONObject persion = sessionWxService.getCurrentLoginPersion();
|
272
|
284
|
String persion_kid = persion.getString("kid");
|
|
@@ -288,7 +300,8 @@ public class WxPmController extends ProjBaseAction {
|
288
|
300
|
*
|
289
|
301
|
* @return
|
290
|
302
|
*/
|
291
|
|
- @RequestMapping("/list_item")
|
|
303
|
+ @ApiOperation("查询全部已开拍和未开拍的")
|
|
304
|
+ @GetMapping("/list_item")
|
292
|
305
|
public String list_item() {
|
293
|
306
|
List<Map<String, Object>> list = ChkTools.getFileId(pmItemService.list_all_open());
|
294
|
307
|
if (list.size() > 0) {
|
|
@@ -313,7 +326,8 @@ public class WxPmController extends ProjBaseAction {
|
313
|
326
|
* @param kid
|
314
|
327
|
* @return
|
315
|
328
|
*/
|
316
|
|
- @RequestMapping("/add_circusee_num")
|
|
329
|
+ @ApiOperation("增加围观人数")
|
|
330
|
+ @PostMapping("/add_circusee_num")
|
317
|
331
|
public String add_circusee_num(String kid) {
|
318
|
332
|
pmItemService.add_circusee_num(kid);// 增加围观次数
|
319
|
333
|
return result.toJSONString();
|
|
@@ -325,7 +339,8 @@ public class WxPmController extends ProjBaseAction {
|
325
|
339
|
* @param kid
|
326
|
340
|
* @return
|
327
|
341
|
*/
|
328
|
|
- @RequestMapping("/select_list")
|
|
342
|
+ @ApiOperation("详情页")
|
|
343
|
+ @PostMapping("/select_list")
|
329
|
344
|
public String select_list(String kid) {
|
330
|
345
|
if (ChkUtil.isNull(kid)) {
|
331
|
346
|
super.setTipMsg(false, "商品不存在", Tip.Type.error);
|
|
@@ -398,7 +413,8 @@ public class WxPmController extends ProjBaseAction {
|
398
|
413
|
* @param price_bidder
|
399
|
414
|
* @return
|
400
|
415
|
*/
|
401
|
|
- @RequestMapping("/compete_price")
|
|
416
|
+ @ApiOperation("竞价")
|
|
417
|
+ @PostMapping("/compete_price")
|
402
|
418
|
public String compete_price(String pm_item_id, BigDecimal price_bidder) {
|
403
|
419
|
JSONObject persion = sessionWxService.getCurrentLoginPersion();
|
404
|
420
|
String pm_user_id = persion.getString("kid");
|
|
@@ -457,7 +473,8 @@ public class WxPmController extends ProjBaseAction {
|
457
|
473
|
*
|
458
|
474
|
* @return
|
459
|
475
|
*/
|
460
|
|
- @RequestMapping("/wait_pay_money")
|
|
476
|
+ @ApiOperation("待付款")
|
|
477
|
+ @GetMapping("/wait_pay_money")
|
461
|
478
|
public String wait_pay_money() {
|
462
|
479
|
JSONObject persion = sessionWxService.getCurrentLoginPersion();
|
463
|
480
|
String persion_id = persion.getString("kid");
|
|
@@ -476,7 +493,8 @@ public class WxPmController extends ProjBaseAction {
|
476
|
493
|
*
|
477
|
494
|
* @return
|
478
|
495
|
*/
|
479
|
|
- @RequestMapping("/wait_receive")
|
|
496
|
+ @ApiOperation("待收货")
|
|
497
|
+ @GetMapping("/wait_receive")
|
480
|
498
|
public String wait_receive() {
|
481
|
499
|
JSONObject persion = sessionWxService.getCurrentLoginPersion();
|
482
|
500
|
String persion_id = persion.getString("kid");
|
|
@@ -496,7 +514,8 @@ public class WxPmController extends ProjBaseAction {
|
496
|
514
|
*
|
497
|
515
|
* @return
|
498
|
516
|
*/
|
499
|
|
- @RequestMapping("/update_address")
|
|
517
|
+ @ApiOperation("修改地址")
|
|
518
|
+ @GetMapping("/update_address")
|
500
|
519
|
public String update_address() {
|
501
|
520
|
JSONObject persion = sessionWxService.getCurrentLoginPersion();
|
502
|
521
|
String persion_id = persion.getString("kid");
|
|
@@ -515,7 +534,8 @@ public class WxPmController extends ProjBaseAction {
|
515
|
534
|
*
|
516
|
535
|
* @return
|
517
|
536
|
*/
|
518
|
|
- @RequestMapping("/verify_receive")
|
|
537
|
+ @ApiOperation("确认收货")
|
|
538
|
+ @PostMapping("/verify_receive")
|
519
|
539
|
public String verify_receive(String item_kid) {
|
520
|
540
|
JSONObject persion = sessionWxService.getCurrentLoginPersion();
|
521
|
541
|
String persion_id = persion.getString("kid");
|
|
@@ -529,7 +549,8 @@ public class WxPmController extends ProjBaseAction {
|
529
|
549
|
*
|
530
|
550
|
* @return
|
531
|
551
|
*/
|
532
|
|
- @RequestMapping("/get_bidding")
|
|
552
|
+ @ApiOperation("获取我正在拍的")
|
|
553
|
+ @GetMapping("/get_bidding")
|
533
|
554
|
public String get_bidding() {
|
534
|
555
|
JSONObject persion = sessionWxService.getCurrentLoginPersion();
|
535
|
556
|
String persion_id = persion.getString("kid");
|
|
@@ -558,7 +579,8 @@ public class WxPmController extends ProjBaseAction {
|
558
|
579
|
*
|
559
|
580
|
* @return
|
560
|
581
|
*/
|
561
|
|
- @RequestMapping("/wait_deliver")
|
|
582
|
+ @ApiOperation("等待发货的列表")
|
|
583
|
+ @GetMapping("/wait_deliver")
|
562
|
584
|
public String wait_deliver() {
|
563
|
585
|
JSONObject persion = sessionWxService.getCurrentLoginPersion();
|
564
|
586
|
String persion_id = persion.getString("kid");
|
|
@@ -578,7 +600,8 @@ public class WxPmController extends ProjBaseAction {
|
578
|
600
|
* @param item_kid
|
579
|
601
|
* @return
|
580
|
602
|
*/
|
581
|
|
- @RequestMapping("/logistics_detail")
|
|
603
|
+ @ApiOperation("物流详情")
|
|
604
|
+ @PostMapping("/logistics_detail")
|
582
|
605
|
public String logistics_detail(String item_kid) {
|
583
|
606
|
|
584
|
607
|
t_pm_item_submit pm_item_submit = pmItemService.logistics_detail(item_kid);
|
|
@@ -597,7 +620,8 @@ public class WxPmController extends ProjBaseAction {
|
597
|
620
|
*
|
598
|
621
|
* @return
|
599
|
622
|
*/
|
600
|
|
- @RequestMapping("/list_live_item")
|
|
623
|
+ @ApiOperation("买家查看的直播间列表")
|
|
624
|
+ @GetMapping("/list_live_item")
|
601
|
625
|
public String list_live_item() {
|
602
|
626
|
/*
|
603
|
627
|
* String url =
|
|
@@ -627,7 +651,8 @@ public class WxPmController extends ProjBaseAction {
|
627
|
651
|
* @param live_room_id
|
628
|
652
|
* @return
|
629
|
653
|
*/
|
630
|
|
- @RequestMapping("/live_item_detail")
|
|
654
|
+ @ApiOperation("进入直播间详情页面 返回直播间信息和直播间下的所有标的物信息、已开拍的标的物信息 买家报名信息,出价次数")
|
|
655
|
+ @PostMapping("/live_item_detail")
|
631
|
656
|
public String live_item_lsit(String live_room_id) {
|
632
|
657
|
List<Map<String, Object>> list = ChkTools.getFileId(pmItemService.live_detail(live_room_id));
|
633
|
658
|
|
|
@@ -651,7 +676,8 @@ public class WxPmController extends ProjBaseAction {
|
651
|
676
|
* @throws IOException
|
652
|
677
|
* @throws ClientProtocolException
|
653
|
678
|
*/
|
654
|
|
- @RequestMapping("/deliver")
|
|
679
|
+ @ApiOperation("发货")
|
|
680
|
+ @PostMapping("/deliver")
|
655
|
681
|
public String deliver(String item_kid, String type_code, long logistics_number, String expressage)
|
656
|
682
|
throws ClientProtocolException, IOException {
|
657
|
683
|
pmProjectItemService.deliver(item_kid, type_code, logistics_number, expressage);
|
|
@@ -691,7 +717,8 @@ public class WxPmController extends ProjBaseAction {
|
691
|
717
|
*
|
692
|
718
|
* @return
|
693
|
719
|
*/
|
694
|
|
- @RequestMapping("/list_express")
|
|
720
|
+ @ApiOperation("查询所有快递")
|
|
721
|
+ @PostMapping("/list_express")
|
695
|
722
|
public String list_express(String pm_item_id) {
|
696
|
723
|
List<Map<String, Object>> list = wxPmService.list_express();
|
697
|
724
|
t_pm_item_submit pm_item_submit = wxPmService.get_address(pm_item_id);
|
|
@@ -704,7 +731,8 @@ public class WxPmController extends ProjBaseAction {
|
704
|
731
|
* 准备付款 跳到订单页面
|
705
|
732
|
*
|
706
|
733
|
*/
|
707
|
|
- @RequestMapping("/prepare_payment")
|
|
734
|
+ @ApiOperation("准备付款 跳到订单页面")
|
|
735
|
+ @PostMapping("/prepare_payment")
|
708
|
736
|
public String prepare_payment(String kid) {
|
709
|
737
|
|
710
|
738
|
JSONObject persion = sessionWxService.getCurrentLoginPersion();
|
|
@@ -744,7 +772,8 @@ public class WxPmController extends ProjBaseAction {
|
744
|
772
|
* @param item_kid
|
745
|
773
|
* @return
|
746
|
774
|
*/
|
747
|
|
- @RequestMapping("/get_bid_man")
|
|
775
|
+ @ApiOperation("获取标的物下的中拍人")
|
|
776
|
+ @PostMapping("/get_bid_man")
|
748
|
777
|
public String get_bid_man(String item_kid) {
|
749
|
778
|
|
750
|
779
|
t_pm_item pm_item = wxPmService.get_bid_man(item_kid);
|
|
@@ -762,7 +791,8 @@ public class WxPmController extends ProjBaseAction {
|
762
|
791
|
*
|
763
|
792
|
* @return
|
764
|
793
|
*/
|
765
|
|
- @RequestMapping("/list_refund")
|
|
794
|
+ @ApiOperation("保证金退还列表")
|
|
795
|
+ @GetMapping("/list_refund")
|
766
|
796
|
public String list_refund() {
|
767
|
797
|
JSONObject persion = sessionWxService.getCurrentLoginPersion();
|
768
|
798
|
String persion_id = persion.getString("kid");
|
|
@@ -799,7 +829,8 @@ public class WxPmController extends ProjBaseAction {
|
799
|
829
|
* @param persion_id
|
800
|
830
|
* @return
|
801
|
831
|
*/
|
802
|
|
- @RequestMapping("/initiate_refund")
|
|
832
|
+ @ApiOperation("发起退款")
|
|
833
|
+ @PostMapping("/initiate_refund")
|
803
|
834
|
public String initiate_refund(String item_kid) {
|
804
|
835
|
|
805
|
836
|
return result.toJSONString();
|
|
@@ -814,7 +845,8 @@ public class WxPmController extends ProjBaseAction {
|
814
|
845
|
* @param chat_time
|
815
|
846
|
* @return
|
816
|
847
|
*/
|
817
|
|
- @RequestMapping("/check_item_status")
|
|
848
|
+ @ApiOperation("查询拍品状态")
|
|
849
|
+ @PostMapping("/check_item_status")
|
818
|
850
|
public String check_item_status(String pm_item_id, BigDecimal price, String live_room_id, long chat_time) {
|
819
|
851
|
List<Map<String, Object>> l1 = pmItemService.select_submit_count(pm_item_id);
|
820
|
852
|
t_pm_item_submit_offer pm_item_submit_offer = pmItemService.get_newbigdecimal(pm_item_id);
|
|
@@ -856,7 +888,8 @@ public class WxPmController extends ProjBaseAction {
|
856
|
888
|
* @param chat_time
|
857
|
889
|
* @return
|
858
|
890
|
*/
|
859
|
|
- @RequestMapping("/check_live_item_status")
|
|
891
|
+ @ApiOperation("查询直播拍品状态")
|
|
892
|
+ @PostMapping("/check_live_item_status")
|
860
|
893
|
public String check_live_item_status(String pm_item_id, BigDecimal price, String live_room_id, long chat_time) {
|
861
|
894
|
|
862
|
895
|
t_pm_item_submit_offer pm_item_submit_offer = pmItemService.get_newbigdecimal(pm_item_id);
|
|
@@ -906,7 +939,8 @@ public class WxPmController extends ProjBaseAction {
|
906
|
939
|
* @param feedback_message
|
907
|
940
|
* @return
|
908
|
941
|
*/
|
909
|
|
- @RequestMapping("/add_feedback_message")
|
|
942
|
+ @ApiOperation("提交意见")
|
|
943
|
+ @PostMapping("/add_feedback_message")
|
910
|
944
|
public String add_feedback_message(String feedback_message) {
|
911
|
945
|
try {
|
912
|
946
|
SensitiveWord sw = new SensitiveWord("src/main/java/CensorWords");
|
|
@@ -929,7 +963,8 @@ public class WxPmController extends ProjBaseAction {
|
929
|
963
|
* @param bid_from
|
930
|
964
|
* @return
|
931
|
965
|
*/
|
932
|
|
- @RequestMapping("/select_item_by_chassify")
|
|
966
|
+ @ApiOperation("根据分类查询拍品")
|
|
967
|
+ @PostMapping("/select_item_by_chassify")
|
933
|
968
|
public String select_item_by_chassify(String bid_type, String bid_from) {
|
934
|
969
|
System.out.println("bid_type:" + bid_type);
|
935
|
970
|
System.out.println("bid_from:" + bid_from);
|
|
@@ -943,7 +978,8 @@ public class WxPmController extends ProjBaseAction {
|
943
|
978
|
*
|
944
|
979
|
* @return
|
945
|
980
|
*/
|
946
|
|
- @RequestMapping("/list_slideshow")
|
|
981
|
+ @ApiOperation("轮播图")
|
|
982
|
+ @GetMapping("/list_slideshow")
|
947
|
983
|
public String list_slideshow() {
|
948
|
984
|
List<Map<String, Object>> list = slideShowService.list_slideshow();
|
949
|
985
|
result.put("data", list);
|
|
@@ -957,7 +993,8 @@ public class WxPmController extends ProjBaseAction {
|
957
|
993
|
* @param form_id
|
958
|
994
|
* @return
|
959
|
995
|
*/
|
960
|
|
- @RequestMapping("/add_collect")
|
|
996
|
+ @ApiOperation("设置收藏")
|
|
997
|
+ @PostMapping("/add_collect")
|
961
|
998
|
public String add_collect(String pm_item_id, String form_id) {
|
962
|
999
|
JSONObject persion = sessionWxService.getCurrentLoginPersion();
|
963
|
1000
|
String pm_user_id = persion.getString("kid");
|
|
@@ -977,7 +1014,7 @@ public class WxPmController extends ProjBaseAction {
|
977
|
1014
|
*
|
978
|
1015
|
* @return
|
979
|
1016
|
*/
|
980
|
|
- @RequestMapping("/select_pay_record_by_persion")
|
|
1017
|
+ @GetMapping("/select_pay_record_by_persion")
|
981
|
1018
|
public String get_pay_record() {
|
982
|
1019
|
// JSONObject persion = sessionWxService.getCurrentLoginPersion();
|
983
|
1020
|
// String pm_user_id = persion.getString("kid");
|
|
@@ -989,7 +1026,8 @@ public class WxPmController extends ProjBaseAction {
|
989
|
1026
|
*
|
990
|
1027
|
* @return
|
991
|
1028
|
*/
|
992
|
|
- @RequestMapping("/select_count")
|
|
1029
|
+ @ApiOperation("查询消息数量")
|
|
1030
|
+ @GetMapping("/select_count")
|
993
|
1031
|
public String select_count() {
|
994
|
1032
|
JSONObject persion = sessionWxService.getCurrentLoginPersion();
|
995
|
1033
|
String persion_id = persion.getString("kid");
|
|
@@ -1007,7 +1045,8 @@ public class WxPmController extends ProjBaseAction {
|
1007
|
1045
|
*
|
1008
|
1046
|
* @return
|
1009
|
1047
|
*/
|
1010
|
|
- @RequestMapping("/select_bidding_record")
|
|
1048
|
+ @ApiOperation("查询中拍记录")
|
|
1049
|
+ @GetMapping("/select_bidding_record")
|
1011
|
1050
|
public String select_bidding_record() {
|
1012
|
1051
|
JSONObject persion = sessionWxService.getCurrentLoginPersion();
|
1013
|
1052
|
String pm_user_id = persion.getString("kid");
|