Helius
2021-06-16 5728be2af515b2200e782aa201ca5d4d67d9ea47
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
package com.ibeetl.admin.console.api;
 
import cn.hutool.core.lang.Snowflake;
import cn.hutool.core.util.IdUtil;
import com.fasterxml.jackson.databind.DeserializationFeature;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.ibeetl.admin.console.model.*;
import com.ibeetl.admin.console.service.*;
import com.ibeetl.admin.console.util.DateUtil;
import com.ibeetl.admin.core.entity.*;
import com.ibeetl.admin.core.service.CorePlatformService;
import com.ibeetl.admin.core.web.JsonResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
 
import java.math.BigDecimal;
import java.text.SimpleDateFormat;
import java.util.*;
 
/**
 * 售后服务类
 */
@RestController
@Api(value = "合伙人接口")
public class CityPartnerApi {
 
private static final String MODEL = "/admin/front/cityPartner";
    private final Logger log = LoggerFactory.getLogger(this.getClass());
    SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
 
    @Autowired
    XzxCityPartnerService service;
    @Autowired
    XzxPartnerFenceService pfService;
    @Autowired
    CorePlatformService platformService;
    @Autowired
    XzxPartnerBankService bankService;
    @Autowired
    XzxPayRequestInfoService payRequestInfoService;
    @Autowired
    CuserConsoleService userService;
    Snowflake snowflake = IdUtil.getSnowflake(0, 3);
 
    @PostMapping(MODEL + "/getCityPartnerName.json")
    @ResponseBody
    @ApiOperation(value="生成合伙人账号", notes="test: 仅0有正确返回")
    public JsonResult<String> getCityPartnerName(){
        String id="ZH"+snowflake.nextIdStr();
        return JsonResult.success(id);
    }
 
    private String checkSamePartnerName(XzxCityPartnerModel model,List<AreaModel> areaModelList,String mobile){
        String key = model.getPartnerKeys();
        if(model.getPartnerType().equals("1")){
            if(null==key&&"".equals(model.getPartnerKeys())){
                return " 添加失败,合伙人key不能为空!";
            }
        }
        if(model.getPartnerType().equals("1")) {
            if(null==areaModelList&&areaModelList.size()==0){
                return " 添加失败,合伙人地区不能为空!";
            }
        }
        //判断是否有该合伙人手机号
        if(null!=mobile&&!"".equals(mobile)){
            List<XzxCityPartner> list = service.queryPartnerByMobile(model);
            if(null!=list&&list.size()>0){
                return " 添加失败,手机号码、合伙人或打包站名称不能重复!";
            }
        }
        return null;
    }
    @PostMapping(MODEL + "/addCityPartner.json")
    @ResponseBody
    @ApiOperation(value="添加合伙人", notes="test: 仅0有正确返回")
    public JsonResult<String> addCityPartner(@RequestBody XzxCityPartnerModel model){
        //判断是否有分配key
        List<String> partnerIds1 = service.queryPartnerByCurrent();
        if(null!=partnerIds1&&partnerIds1.size()>0){
            if(model.getPartnerType().equals("1")){
                return JsonResult.failMessage("不允许新建下级合伙人!");
 
            }
        }
        //不能添加重复区域的合伙人
        if(model.getPartnerType().equals("1")){
            int num = service.queryPartnerGaode(model.getAreaList());
            if(num>0){
                return JsonResult.failMessage("该区域已经存在合伙人!");
 
            }
        }
           List<AreaModel> areaModelList = model.getAreaList();
           String mobile = model.getMobilePhone();
           String res = checkSamePartnerName(model,areaModelList,mobile);
           if(null!=res){
               return JsonResult.failMessage(res);
           }
        model.setDelFlag(0);
        model.setCreateTime(sdf.format(new Date()));
        ObjectMapper objectMapper = new ObjectMapper();
        objectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
        XzxCityPartner info = objectMapper.convertValue(model, XzxCityPartner.class);
        info.setDelFlag(0);
        Snowflake snowflake1 = IdUtil.getSnowflake(1, 3);
        String userId = "USER"+snowflake1.nextIdStr();
        info.setUserId(userId);
        if(model.getPartnerType().equals("1")){
            if(null==info.getOrgId()){
                info.setOrgId(Long.parseLong("9"));
            }
            info.setState("S1");
        }else{
            if(null==info.getOrgId()){
                info.setOrgId(Long.parseLong("16"));
            }
            info.setState("S1");
            //判断是否合伙人登陆
            List<String> partnerIds = service.queryPartnerByCurrent();
            if(null!=partnerIds&&partnerIds.size()>0){
                info.setPackingStation(partnerIds.get(0));
            }else{
                //根据区域查询合伙人Id
                String townName = model.getTownName();
                String townIdPackage = service.queryAreaTownList(townName);
                String packingStation = service.queryGaodeByTownId(townIdPackage);
                info.setPackingStation(packingStation);
            }
        }
        if(service.save(info)){
            //创建服务
            if(model.getPartnerType().equals("1")){
                String result = service.createServiceByKey(info);
                String partnerId = service.queryCityPartnerByPhone(mobile);
                insertGaodeTown(areaModelList,partnerId,model.getPartnerKeys());
                info.setId(Long.parseLong(partnerId));
                insertUserOther(info,userId);
                pfService.addAccountInfo(info.getMobilePhone(),userId,model.getAccountNo(),info.getId(),model.getRoleId(),info.getOrgId());
 
            }else{
                areaModelList = new ArrayList<>();
                String cityPackage = model.getCityName();
                String cityIdPackage = service.queryAreaCityList(cityPackage);
                AreaModel areaModel = new AreaModel();
                areaModel.setCityId(Long.parseLong(cityIdPackage));
                areaModel.setCityName(cityPackage);
                areaModel.setProvinceName(model.getProvinceName());
                areaModel.setTownName(model.getTownName());
                areaModelList.add(areaModel);
                insertGaodeTown(areaModelList,info.getId()+"",info.getId()+"");
                insertUserOtherPackage(info,userId,cityPackage,cityIdPackage);
                pfService.addAccountByPackage(info.getMobilePhone(),userId,model.getAccountNo(),info.getId(),model.getRoleId());
            }
             return JsonResult.success("添加成功!");
        }else{
            return JsonResult.failMessage("添加合伙人失败!");
        }
    }
 
    private void insertGaodeTown(List<AreaModel> areaModelList,String partnerId,String key){
        List<PartnerGaodeModel>  townCodeList = new ArrayList<>();
 
        for (AreaModel area:areaModelList) {
            String city = area.getCityName();
            String cityId = service.queryAreaCityList(city);
                String cityPackage = area.getCityName();
                String cityIdPackage = service.queryAreaCityList(cityPackage);
                String provinceName = area.getProvinceName();
                String townName = area.getTownName();
                String townIdPackage = service.queryAreaTownList(townName);
                PartnerGaodeModel gaodeModel = new PartnerGaodeModel();
                gaodeModel.setCityId(cityIdPackage);
                if(null!=townName&&!"".equals(townName)){
                    gaodeModel.setAddressArea(provinceName+","+cityPackage+","+townName);
                }else{
                    gaodeModel.setAddressArea(provinceName+","+cityPackage);
 
                }
                gaodeModel.setTownId(townIdPackage);
                gaodeModel.setCityId(cityId);
                gaodeModel.setCreateTime(sdf.format(new Date()));
                gaodeModel.setPartnerId(partnerId);
                gaodeModel.setPartnerKey(key);
                gaodeModel.setDelFlag("0");
                townCodeList.add(gaodeModel);
        }
            service.insertGaodeInfo(townCodeList);
 
    }
 
    private void insertUserOtherPackage(XzxCityPartner info,String userId,String city,String cityId){
        UserModel otherInfo = new UserModel();
        otherInfo.setName(info.getPartnerName());
        otherInfo.setDelFlag("0");
        otherInfo.setMobilePhone(info.getMobilePhone());
        otherInfo.setLoginAccount(userId);
        otherInfo.setRoleIds("6");
        otherInfo.setUserType("7");
        otherInfo.setCityId(cityId);
        otherInfo.setUserId(userId);
        String salt = DateUtil.getRandomNickname(16);
        otherInfo.setSalt(salt);
        String pass = DateUtil.encrypt(salt,"888888");
        otherInfo.setPassword(pass);
        otherInfo.setRegistTime(sdf.format(new Date()));
        otherInfo.setIsProhibit("0");
       /* if(null!=info.getPackingStation()&&!"".equals(info.getPackingStation())){
            otherInfo.setPartnerId(info.getPackingStation());
 
        }else{*/
            otherInfo.setPartnerId(info.getId()+"");
        //}
 
        otherInfo.setAvatar("https://res.cnxzx.com/resource/static/img/icon-loadlogo.png");
        userService.insertUserOtherInfo(otherInfo);
 
    }
    private void insertUserOther(XzxCityPartner info,String userId){
        UserModel otherInfo = new UserModel();
        otherInfo.setName(info.getPartnerName());
        otherInfo.setDelFlag("0");
        otherInfo.setMobilePhone(info.getMobilePhone());
        otherInfo.setLoginAccount(userId);
        otherInfo.setRoleIds("3");
        otherInfo.setUserType("5");
        otherInfo.setUserId(userId);
        String salt = DateUtil.getRandomNickname(16);
        otherInfo.setSalt(salt);
        String pass = DateUtil.encrypt(salt,info.getPassword());
        otherInfo.setPassword(pass);
        otherInfo.setRegistTime(sdf.format(new Date()));
        otherInfo.setIsProhibit("0");
        otherInfo.setPartnerId(info.getId()+"");
        userService.insertUserOtherInfo(otherInfo);
    }
 
    @PostMapping(MODEL + "/queryCityPartnerForOtherUser.json")
    @ResponseBody
    @ApiOperation(value="查询合伙人所有回收员和推广员接口", notes="test: 仅0有正确返回")
    public JsonResult<Map<String, Object>> queryCityPartnerForOtherUser(){
        Map<String, Object> map =  service.queryCityPartnerForOtherUser();
        return JsonResult.success(map);
    }
 
    @PostMapping(MODEL + "/queryCityPartner.do")
    @ResponseBody
    @ApiOperation(value="查询合伙人列表(打包站列表 参数看partnerType)", notes="test: 仅0有正确返回")
    @ApiImplicitParams({
            @ApiImplicitParam(paramType="query", name = "page", value = "页码", required = true, dataType = "int"),
            @ApiImplicitParam(paramType="query", name = "limit", value = "每页条数", required = true, dataType = "int"),
            @ApiImplicitParam(paramType="query", name = "startTime", value = "开始时间", required = true, dataType = "String"),
            @ApiImplicitParam(paramType="query", name = "endTime", value = "结束时间", required = true, dataType = "String"),
            @ApiImplicitParam(paramType="query", name = "name", value = "姓名、手机号", required = true, dataType = "String"),
            @ApiImplicitParam(paramType="query", name = "prohibit", value = "是否禁用(1:禁用,0:启用)", required = true, dataType = "Integer"),
            @ApiImplicitParam(paramType="query", name = "partnerType", value = "合伙类型(1:合伙人。2:打包站)", required = true, dataType = "String"),
            @ApiImplicitParam(paramType="query", name = "packingStation", value = "打包站名称", required = true, dataType = "String")
 
    })
    public JsonResult<Map<String, Object>> queryCityPartner(@RequestBody XzxCityPartnerModel model){
        Map<String, Object> map =  service.queryCityPartner(model);
        return JsonResult.success(map);
    }
    @PostMapping(MODEL + "/queryPartnerAccount.json")
    @ResponseBody
    @ApiOperation(value="查询合伙人账户余额", notes="test: 仅0有正确返回")
    @ApiImplicitParams({
            @ApiImplicitParam(paramType="query", name = "id", value = "合伙人ID(如果不传,需要合伙人登陆)", required = true, dataType = "String"),
    })
    public JsonResult<Map<String,Object>> queryPartnerAccount(@RequestBody XzxCityPartnerModel model){
          Map<String,Object> map = new HashMap<>();
 
          if(null!=model){
              if(null!=model.getId()&&!"".equals(model.getId())){
                  map=service.queryPartnerAccount(model.getId());
              }else{
                  CoreUser user = platformService.getCurrentUser();
                  if(user.getId()==1){
                      return JsonResult.success(map);
                  }else{
                      CoreUser user1 = service.queryPartnerAdmin(user.getId());
                      if(user1!=null){
                          return JsonResult.success(map);
                      }
                  }
                  XzxCityPartner partner = service.queryById(user.getId());
                  if(null!=partner){
                      map=service.queryPartnerAccount(partner.getUserId());
                  }else{
                      return JsonResult.success(map);
                  }
 
              }
          }else{
              CoreUser user = platformService.getCurrentUser();
              if(user.getId()==1){
                  return JsonResult.success(map);
              }else{
                  user = service.queryPartnerAdmin(user.getId());
                  if(user!=null){
                      return JsonResult.success(map);
                  }
              }
              map=service.queryPartnerAccount(user.getId().toString());
          }
          return JsonResult.success(map);
    }
 
 
    @PostMapping(MODEL + "/updateCityPartner.json")
    @ResponseBody
    @ApiOperation(value="修改合伙人", notes="test: 仅0有正确返回")
    public JsonResult<String> updateCityPartner(@RequestBody XzxCityPartnerModel model){
        //判断是否有分配key
        String key = model.getPartnerKeys();
        if(model.getPartnerType().equals("1")){
            if(null==key&&"".equals(model.getPartnerKeys())){
                return JsonResult.failMessage(" 修改失败,合伙人key不能为空!");
            }
        }
 
        List<AreaModel> areaModelList = model.getAreaList();
        if(model.getPartnerType().equals("1")) {
            if(null==areaModelList&&areaModelList.size()==0){
                return JsonResult.failMessage(" 添加失败,合伙人地区不能为空!");
            }
        }
 
        model.setDelFlag(0);
        model.setCreateTime(sdf.format(new Date()));
        ObjectMapper objectMapper = new ObjectMapper();
        objectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
        XzxCityPartner info = objectMapper.convertValue(model, XzxCityPartner.class);
        info.setPartnerKey(key);
        if(model.getPartnerType().equals("1")){
            if(null==info.getOrgId()){
                info.setOrgId(Long.parseLong("9"));
            }
            info.setState("S1");
        }else{
            if(null==info.getOrgId()){
                info.setOrgId(Long.parseLong("16"));
            }
            info.setState("S1");
        }
        if(service.update(info)){
            //删除合伙人原有区域
            service.deletePartnerTownCode(info.getId()+"");
            if(info.getPartnerType().equals("1")){
                String result = service.createServiceByKey(info);
            }
            insertGaodeTown(areaModelList,info.getId()+"",model.getPartnerKeys());
            return JsonResult.success("修改成功!");
        }else{
            return JsonResult.failMessage("修改合伙人失败!");
        }
    }
 
    @PostMapping(MODEL + "/queryAllPartnerList.do")
    @ResponseBody
    @ApiOperation(value="查询合伙人和打包站列表", notes="test: 仅0有正确返回")
    public JsonResult<List<XzxCityPartner>> queryAllPartnerList(){
        CoreUser user = platformService.getCurrentUser();
        List<XzxCityPartner> cityPartners = new ArrayList<>();
        if(user.getId()==1){
            cityPartners = service.queryAllCityPartnerList(null);
        }else{
            CoreUser user1 = service.queryPartnerAdmin(user.getId());
            if(user1!=null){
                cityPartners = service.queryAllCityPartnerList(null);
            }else{
                cityPartners = service.queryAllCityPartnerList(user.getId()+"");
                /*XzxCityPartner partner = service.queryById(user.getId());
                cityPartners.add(partner);*/
            }
        }
        return JsonResult.success(cityPartners);
    }
 
 
    @PostMapping(MODEL + "/queryDetailsPresentation.do")
    @ResponseBody
    @ApiOperation(value="查询合伙人提现审核列表", notes="test: 仅0有正确返回")
    @ApiImplicitParams({
            @ApiImplicitParam(paramType="query", name = "page", value = "页码", required = true, dataType = "int"),
            @ApiImplicitParam(paramType="query", name = "limit", value = "每页条数", required = true, dataType = "int"),
            @ApiImplicitParam(paramType="query", name = "startTime", value = "开始时间", required = true, dataType = "String"),
            @ApiImplicitParam(paramType="query", name = "endTime", value = "结束时间", required = true, dataType = "String"),
            @ApiImplicitParam(paramType="query", name = "name", value = "姓名、手机号", required = true, dataType = "String"),
            @ApiImplicitParam(paramType="query", name = "payType", value = "费用类型(1:充值,2:环保金支出,3环保金收入,4提现5现金收入 6现金支出 10分享返利 11阶梯返利 12红包)", required = true, dataType = "String"),
            @ApiImplicitParam(paramType="query", name = "payStatus", value = "状态(1为待支付,2为已支付,3为已审核,4为已提现)", required = true, dataType = "Integer")
    })
    public JsonResult<Map<String, Object>> queryDetailsPresentation(@RequestBody PartnerPayMsgModel model){
        CoreUser user = platformService.getCurrentUser();
        if(user.getId()==1){
            //return JsonResult.success(new HashMap<>());
        }else{
            CoreUser user1 = service.queryPartnerAdmin(user.getId());
            if(user1!=null){
 
            }else{
                XzxCityPartner partner = service.queryById(user.getId());
                if(null!=partner){
                    model.setUserId(partner.getUserId());
                }
            }
        }
 
        Map<String, Object> map =  service.queryDetailsPresentation(model);
        return JsonResult.success(map);
    }
 
    @PostMapping(MODEL + "/queryAreaLongiLati.json")
    @ResponseBody
    @ApiOperation(value="根据地区名称查询经纬度", notes="test: 仅0有正确返回")
    @ApiImplicitParams({
            @ApiImplicitParam(paramType="query", name ="name", value = "地区名称", required = true, dataType = "String")
    })
    public JsonResult<AreaModel> queryAreaLongiLati(@RequestBody AreaModel model){
        AreaModel map = service.queryAreaLongiLati(model);
        return JsonResult.success(map);
    }
 
 
    @PostMapping(MODEL + "/addPayInfoImg.json")
    @ResponseBody
    @ApiOperation(value="添加合伙人充值汇款凭证接口", notes="test: 仅0有正确返回")
    @ApiImplicitParams({
             @ApiImplicitParam(paramType="query", name ="payImg", value = "凭证图片路径", required = true, dataType = "String"),
            @ApiImplicitParam(paramType="query", name = "money", value = "汇款金额", required = true, dataType = "String"),
            @ApiImplicitParam(paramType="query", name = "payType", value = "汇款用途(1)", required = true, dataType = "String"),
            @ApiImplicitParam(paramType="query", name = "payTime", value = "充值时间", required = true, dataType = "String"),
            @ApiImplicitParam(paramType="query", name = "rechargeName", value = "汇款人姓名", required = true, dataType = "String"),
            @ApiImplicitParam(paramType="query", name = "rechargePhone", value = "汇款人手机号码", required = true, dataType = "String"),
            @ApiImplicitParam(paramType="query", name = "company", value = "收款单位", required = true, dataType = "String"),
            @ApiImplicitParam(paramType="query", name = "companyAccount", value = "收款账号", required = true, dataType = "String"),
            @ApiImplicitParam(paramType="query", name = "bankName", value = "收款单位开户行", required = true, dataType = "String"),
            @ApiImplicitParam(paramType="query", name = "partnerType", value = "角色类型(1:合伙人。2:打包站)", required = true, dataType = "String"),
            @ApiImplicitParam(paramType="query", name = "status", value = "0:保存,5:上传审核", required = true, dataType = "String"),
            @ApiImplicitParam(paramType="query", name = "partnerId", value = "合伙人,打包站Id", required = true, dataType = "String")
 
    })
    public JsonResult<String> addPayInfoImg(@RequestBody PayInfoModel model){
        CoreUser user = platformService.getCurrentUser();
        String result = service.addPayInfoImg(model);
        if(result.equals("0")){
            return JsonResult.failMessage("添加汇款记录失败!");
        }else{
            return JsonResult.success(result);
        }
    }
 
    @PostMapping(MODEL + "/updatePayInfoPass.json")
    @ResponseBody
    @ApiOperation(value="后台合伙人充值审核接口", notes="test: 仅0有正确返回")
    @ApiImplicitParams({
            @ApiImplicitParam(paramType="query", name ="payOrderId", value = "充值Id", required = true, dataType = "String"),
            @ApiImplicitParam(paramType="query", name = "createUserId", value = "充值用户Id", required = true, dataType = "String"),
            @ApiImplicitParam(paramType="query", name = "status", value = "支付状态(1为待支付,2为已支付,3为已审核,4为已提现,5待审核,6为审核不通过)", required = true, dataType = "String"),
            @ApiImplicitParam(paramType="query", name = "unpassReason", value = "审核不通过原因", required = true, dataType = "String")
    })
    public JsonResult<String> updatePayInfoPass(@RequestBody PayInfoModel model){
            String result = service.updatePayInfoPass(model);
            return JsonResult.success(result);
    }
 
    private String checkPackageProhibit(XzxCityPartnerModel model){
        //判断是否合伙人身份
        CoreUser user = platformService.getCurrentUser();
        XzxCityPartner partner = service.queryById(user.getId());
        if(null!=partner){
               //查询打包站账户余额是否为0
               String hbb = service.queryAccountByPartnerId(partner.getUserId());
               BigDecimal m = new BigDecimal(hbb);
               if(m.compareTo(BigDecimal.ZERO)==1){
                   return "打包站账户余额不为零,无法关闭打包站!";
               }
        }
        return null;
    }
    @PostMapping(MODEL + "/updatePartnerProhibit.json")
    @ResponseBody
    @ApiOperation(value="后台合伙人是否启用接口", notes="test: 仅0有正确返回")
    @ApiImplicitParams({
            @ApiImplicitParam(paramType="query", name ="id", value = "合伙人Id", required = true, dataType = "String"),
            @ApiImplicitParam(paramType="query", name = "prohibit", value = "是否启用", required = true, dataType = "String")
    })
    public JsonResult<String> updatePartnerProhibit(@RequestBody XzxCityPartnerModel model){
        XzxCityPartner info=service.queryById(model.getId());
        String msg = checkPackageProhibit(model);
        if(null!=msg){
            return JsonResult.failMessage(msg);
        }
        info.setProhibit(model.getProhibit());
        info.setUpdateTime(sdf.format(new Date()));
        service.update(info);
        userService.updateOtherUserById(info.getId()+"");
        return JsonResult.success("修改成功");
    }
 
    @PostMapping(MODEL + "/queryPartnerFenceList.do")
    @ResponseBody
    @ApiOperation(value="新增合伙人-查询所有未绑定的电子围栏", notes="test: 仅0有正确返回")
    @ApiImplicitParams({
            @ApiImplicitParam(paramType="query", name ="id", value = "合伙人Id", required = true, dataType = "String")
    })
    public JsonResult<List<XzxElectronicFenceModel>> queryPartnerFenceList(@RequestBody XzxCityPartnerModel model){
        List<XzxElectronicFenceModel> list =  service.queryPartnerFenceList(model);
        return JsonResult.success(list);
    }
 
    @PostMapping(MODEL + "/queryPartnerFenceListByUser.do")
    @ResponseBody
    @ApiOperation(value="回收员绑定的电子围栏", notes="test: 仅0有正确返回")
    @ApiImplicitParams({
            @ApiImplicitParam(paramType="query", name ="id", value = "合伙人Id", required = true, dataType = "String")
    })
    public JsonResult<List<XzxElectronicFenceModel>> queryPartnerFenceListByUser(@RequestBody XzxCityPartnerModel model){
        List<XzxElectronicFenceModel> list =  service.queryPartnerFenceListByUser(model);
        return JsonResult.success(list);
    }
 
 
    @PostMapping(MODEL + "/deleteBankCard.json")
    @ResponseBody
    @ApiOperation(value="删除合伙人银行账户信息", notes="test: 仅0有正确返回")
    @ApiImplicitParams({
            @ApiImplicitParam(paramType="query", name ="id", value = "银行卡Id主键", required = true, dataType = "int")
    })
    public JsonResult<String> deleteBankCard(@RequestBody XzxPartnerBankModel model){
        CoreUser user = platformService.getCurrentUser();
        if(user.getId()==1){
            return JsonResult.failMessage("超管不能删除合伙人银行账户信息!");
        }
        ObjectMapper objectMapper = new ObjectMapper();
        objectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
        XzxPartnerBank bank = objectMapper.convertValue(model, XzxPartnerBank.class);
        bank = bankService.queryById(bank.getId());
        bank.setDelFlag("1");
        bank.setUpdateTime(sdf.format(new Date()));
 
            if(!bankService.update(bank)){
                return JsonResult.failMessage("删除失败");
            }else{
                return  JsonResult.success("删除成功");
            }
 
    }
 
    @PostMapping(MODEL + "/updateBankCard.json")
    @ResponseBody
    @ApiOperation(value="修改合伙人银行账户信息", notes="test: 仅0有正确返回")
    @ApiImplicitParams({
            @ApiImplicitParam(paramType="query", name ="id", value = "银行卡Id主键", required = true, dataType = "int"),
            @ApiImplicitParam(paramType="query", name ="bankNo", value = "银行账号", required = true, dataType = "String"),
            @ApiImplicitParam(paramType="query", name = "bankName", value = "银行名称", required = true, dataType = "String"),
            @ApiImplicitParam(paramType="query", name = "openName", value = "开户人名称", required = true, dataType = "String"),
            @ApiImplicitParam(paramType="query", name = "idCard", value = "证件号码", required = true, dataType = "String"),
            @ApiImplicitParam(paramType="query", name = "mobilePhone", value = "预留手机号", required = true, dataType = "String"),
            @ApiImplicitParam(paramType="query", name = "partnerId", value = "合伙人Id", required = true, dataType = "String")
    })
    public JsonResult<String> updateBankCard(@RequestBody XzxPartnerBankModel model){
        CoreUser user = platformService.getCurrentUser();
        if(user.getId()==1){
            return JsonResult.failMessage("超管不能修改合伙人银行账户信息!");
        }
        ObjectMapper objectMapper = new ObjectMapper();
        objectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
        XzxPartnerBank bank = objectMapper.convertValue(model, XzxPartnerBank.class);
        bank.setDelFlag("0");
        bank.setUpdateTime(sdf.format(new Date()));
        //CoreUser user = platformService.getCurrentUser();
        bank.setPartnerId(user.getId()+"");
        //银行账号相同,直接返回失败
        String oldBankNo =bankService.queryByBankNo(bank.getBankNo(),model.getId()+"");
        if(null!=oldBankNo&&!"".equals(oldBankNo)){
            return JsonResult.failMessage("银行账号不能相同!");
        }else{
            if(!bankService.update(bank)){
                return JsonResult.failMessage("修改失败");
            }else{
                return  JsonResult.success("修改成功");
            }
        }
    }
 
    @PostMapping(MODEL + "/addBankCard.json")
    @ResponseBody
    @ApiOperation(value="添加合伙人银行账户信息", notes="test: 仅0有正确返回")
    @ApiImplicitParams({
            @ApiImplicitParam(paramType="query", name ="bankNo", value = "银行账号", required = true, dataType = "String"),
            @ApiImplicitParam(paramType="query", name = "bankName", value = "银行名称", required = true, dataType = "String"),
            @ApiImplicitParam(paramType="query", name = "openName", value = "开户人名称", required = true, dataType = "String"),
            @ApiImplicitParam(paramType="query", name = "idCard", value = "证件号码", required = true, dataType = "String"),
            @ApiImplicitParam(paramType="query", name = "mobilePhone", value = "预留手机号", required = true, dataType = "String"),
            @ApiImplicitParam(paramType="query", name = "partnerId", value = "合伙人Id", required = true, dataType = "String")
    })
    public JsonResult<String> addBankCard(@RequestBody XzxPartnerBankModel model){
        CoreUser user = platformService.getCurrentUser();
        if(user.getId()==1){
            return JsonResult.failMessage("超管不能添加合伙人银行账户信息!");
        }
        ObjectMapper objectMapper = new ObjectMapper();
        objectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
        XzxPartnerBank bank = objectMapper.convertValue(model, XzxPartnerBank.class);
        bank.setDelFlag("0");
        bank.setCreateTime(sdf.format(new Date()));
        //CoreUser user = platformService.getCurrentUser();
        bank.setPartnerId(user.getId()+"");
        //银行账号相同,直接返回失败
        String oldBankNo =bankService.queryByBankNo(bank.getBankNo(),null);
        if(null!=oldBankNo&&!"".equals(oldBankNo)){
            return JsonResult.failMessage("银行账号不能相同!");
        }else{
            if(!bankService.save(bank)){
                return JsonResult.failMessage("保存失败");
            }else{
                return  JsonResult.success("保存成功");
            }
        }
    }
 
    @PostMapping(MODEL + "/addPayRequestInfo.json")
    @ResponseBody
    @ApiOperation(value="添加合伙人提现申请", notes="test: 仅0有正确返回")
    @ApiImplicitParams({
            @ApiImplicitParam(paramType="query", name ="money", value = "提现金额", required = true, dataType = "String"),
            @ApiImplicitParam(paramType="query", name ="bankAccountId", value = "银行账号Id", required = true, dataType = "String"),
            @ApiImplicitParam(paramType="query", name ="accountMoney", value = "账户余额", required = true, dataType = "String")
    })
    public JsonResult<String> addPayRequestInfo(@RequestBody PayRequestInfoModel model){
        CoreUser user = platformService.getCurrentUser();
        if(user.getId()==1){
            return JsonResult.failMessage("超管不能添加合伙人提现申请!");
        }
        BigDecimal decimal = new BigDecimal("0");
        decimal = new BigDecimal(model.getMoney()).subtract(new BigDecimal(model.getAccountMoney()));
        if(decimal.compareTo(BigDecimal.ZERO)==1){
            return JsonResult.failMessage("账号余额不能小于提现金额");
        }else{
            //单笔限额小于1万元
            BigDecimal flagAmount = new BigDecimal(model.getMoney()).subtract(new BigDecimal("10000"));
            if(flagAmount.compareTo(BigDecimal.ZERO)==1){
                return JsonResult.failMessage("单笔提现额度必须小于1万元");
            }
            //CoreUser user = platformService.getCurrentUser();
            XzxCityPartner partner = service.queryById(user.getId());
 
            ObjectMapper objectMapper = new ObjectMapper();
            objectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
            XzxPayRequestInfo info = objectMapper.convertValue(model, XzxPayRequestInfo.class);
            //UserAccountModel accountModel=service.queryPartnerAccountByUserId(partner.getUserId());
            info.setAccountId(model.getBankAccountId());
            info.setAccountBindId(Long.parseLong(model.getBankAccountId()));
            info.setCreateTime(sdf.format(new Date()));
            info.setCreateUserId(partner.getUserId());
            info.setPayType("4");
            info.setStatus("1");
            info.setPayFlag(1);
            Snowflake snowflake = IdUtil.getSnowflake(0, 3);
            String payOrderId = "ZF"+snowflake.nextIdStr();
            info.setPayOrderId(payOrderId);
            if(payRequestInfoService.insertPayRequestInfo(info)>0){
                return JsonResult.success("保存成功");
            }else{
                return JsonResult.failMessage("保存失败");
            }
 
        }
    }
 
    @PostMapping(MODEL + "/queryBankCard.json")
    @ResponseBody
    @ApiOperation(value="查询银行账户信息", notes="test: 仅0有正确返回")
    public JsonResult<List<XzxPartnerBankModel>> queryBankCard(@RequestBody XzxPartnerBankModel model){
        List<XzxPartnerBankModel> list = bankService.queryByBankList();
        return JsonResult.success(list);
    }
 
    @PostMapping(MODEL + "/queryBankCardById.json")
    @ResponseBody
    @ApiOperation(value="查询审批信息", notes="test: 仅0有正确返回")
    @ApiImplicitParams({
            @ApiImplicitParam(paramType="query", name ="payOrderId", value = "提现申请id", required = true, dataType = "String")
    })
    public JsonResult<XzxPartnerBankModel> queryBankCardById(@RequestBody XzxPartnerBankModel model){
        XzxPartnerBankModel obj = bankService.queryBankCardById(model);
        return JsonResult.success(obj);
    }
 
    @PostMapping(MODEL + "/queryGaodeByUserId.json")
    @ResponseBody
    @ApiOperation(value="查询轨迹接口", notes="test: 仅0有正确返回")
    @ApiImplicitParams({
            @ApiImplicitParam(paramType="query", name ="userId", value = "用户Id", required = true, dataType = "String"),
            @ApiImplicitParam(paramType="query", name ="orderId", value = "订单Id", required = true, dataType = "String"),
            @ApiImplicitParam(paramType="query", name ="dayTime", value = "日期", required = true, dataType = "String"),
            @ApiImplicitParam(paramType="query", name ="dateTime", value = "时间段", required = true, dataType = "String")
 
    })
    public JsonResult<List<Map<String,Object>>> queryGaodeByUserId(@RequestBody XzxCityPartnerModel model){
 
        List<Map<String,Object>> list =  service.queryGaodeByUserId(model);
        return JsonResult.success(list);
    }
 
 
    @PostMapping(MODEL + "/queryOrderByHsy.json")
    @ResponseBody
    @ApiOperation(value="查询回收员所有订单", notes="test: 仅0有正确返回")
    @ApiImplicitParams({
            @ApiImplicitParam(paramType="query", name ="userId", value = "用户Id", required = true, dataType = "String"),
            @ApiImplicitParam(paramType="query", name ="dayTime", value = "日期", required = true, dataType = "String"),
            @ApiImplicitParam(paramType="query", name = "startTime", value = "开始时间", required = true, dataType = "String"),
            @ApiImplicitParam(paramType="query", name = "endTime", value = "结束时间", required = true, dataType = "String")
    })
    public JsonResult<List<Map<String,String>>> queryOrderByHsy(@RequestBody XzxCityPartnerModel model){
 
        List<Map<String,String>> list =  service.queryOrderByHsy(model);
        return JsonResult.success(list);
    }
 
    @PostMapping(MODEL + "/queryPartnerAccountLog.json")
    @ResponseBody
    @ApiOperation(value="后台账户资金流转接口", notes="test: 仅0有正确返回")
    @ApiImplicitParams({
            @ApiImplicitParam(paramType="query", name ="approverStatus", value = "审核状态(1为待审核,2为已审核,3为审核不通过)", required = true, dataType = "String"),
            @ApiImplicitParam(paramType="query", name = "page", value = "页码", required = true, dataType = "int"),
            @ApiImplicitParam(paramType="query", name = "limit", value = "数量", required = true, dataType = "int"),
            @ApiImplicitParam(paramType="query", name = "type", value = "类型", required = true, dataType = "String"),
            @ApiImplicitParam(paramType="query", name = "startTime", value = "开始时间", required = true, dataType = "String"),
            @ApiImplicitParam(paramType="query", name = "endTime", value = "结束时间", required = true, dataType = "String")
    })
    public JsonResult<Map<String,Object>> queryPartnerAccountLog(@RequestBody PartnerAccountLogModel model){
        Map<String,Object> map = service.queryPartnerAccountLog(model);
        return JsonResult.success(map);
    }
 
 
    @PostMapping(MODEL + "/queryUserAccountLog.json")
    @ResponseBody
    @ApiOperation(value="账户管理优化", notes="test: 仅0有正确返回")
    @ApiImplicitParams({
            @ApiImplicitParam(paramType="query", name ="szType", value = "收支类型(空为全部,1:收2:支出)", required = true, dataType = "String"),
            @ApiImplicitParam(paramType="query", name = "page", value = "页码", required = true, dataType = "int"),
            @ApiImplicitParam(paramType="query", name = "limit", value = "数量", required = true, dataType = "int"),
            @ApiImplicitParam(paramType="query", name = "channelType", value = "操作渠道1:充值 2:提现 3:回收 4入库 5红包 6分享返利 7重量达标返利8额度申请 9 额度恢复 10 推广返利 11垫付合伙人", required = true, dataType = "String"),
            @ApiImplicitParam(paramType="query", name = "startTime", value = "开始时间", required = true, dataType = "String"),
            @ApiImplicitParam(paramType="query", name = "endTime", value = "结束时间", required = true, dataType = "String"),
            @ApiImplicitParam(paramType="query", name = "userName", value = "姓名手机号", required = true, dataType = "String"),
            @ApiImplicitParam(paramType="query", name = "roleType", value = "角色类型", required = true, dataType = "int")
 
    })
    public JsonResult<Map<String,Object>> queryUserAccountLog(@RequestBody AccountLogModel model){
        Map<String,Object> map = service.queryUserAccountLog(model);
        return JsonResult.success(map);
    }
    @PostMapping(MODEL + "/queryPartnerCityById.json")
    @ResponseBody
    @ApiOperation(value="账户管理优化(查询回收人所属城市)", notes="test: 仅0有正确返回")
    public JsonResult<Map<String,Object>> queryPartnerCityById(){
        CoreUser currentUser = platformService.getCurrentUser();
        XzxCityPartner partner = service.queryById(currentUser.getId());
        List<Map<String,String>> list = service.queryPartnerCityById(partner);
        Map<String,Object> map = new HashMap<>();
        map.put("data",list);
        map.put("code",0);
        return JsonResult.success(map);
    }
 
    @PostMapping(MODEL + "/queryAreaObj.json")
    @ResponseBody
    @ApiOperation(value="账户管理优化(查询回收人所属城市)", notes="test: 仅0有正确返回")
    public JsonResult<Map<String,Object>> queryAreaObj(){
        CoreUser currentUser = platformService.getCurrentUser();
        XzxCityPartner partner = service.queryById(currentUser.getId());
        List<Map<String,Object>> list = service.queryAreaObj(partner);
        Map<String,Object> map = new HashMap<>();
        map.put("data",list);
        map.put("code",0);
        return JsonResult.success(map);
    }
 
    @PostMapping(MODEL + "/queryPartnerName.json")
    @ResponseBody
    @ApiOperation(value="查询合伙人姓名", notes="test: 仅0有正确返回")
    public JsonResult<Map<String,Object>> queryPartnerName(){
        List<String> partnerIds = service.queryPartnerByCurrent();
        List<XzxCityPartner> list = service.queryPartnerName(partnerIds);
        Map<String,Object> map = new HashMap<>();
        map.put("data",list);
        map.put("code",0);
        return JsonResult.success(map);
    }
 
    @PostMapping(MODEL + "/queryAccountMoney.json")
    @ResponseBody
    @ApiOperation(value="账户余额", notes="test: 仅0有正确返回")
    @ApiImplicitParams({
            @ApiImplicitParam(paramType="query", name = "page", value = "页码", required = true, dataType = "int"),
            @ApiImplicitParam(paramType="query", name = "limit", value = "数量", required = true, dataType = "int"),
            @ApiImplicitParam(paramType="query", name = "isProhibit", value = "冻结状态", required = true, dataType = "String"),
            @ApiImplicitParam(paramType="query", name = "roleType", value = "角色Type", required = true, dataType = "String"),
            @ApiImplicitParam(paramType="query", name = "partnerId", value = "合伙人ID", required = true, dataType = "String"),
            @ApiImplicitParam(paramType="query", name = "userName", value = "姓名手机号", required = true, dataType = "String")
    })
    public JsonResult<Map<String,Object>> queryAccountMoney(@RequestBody AccountMoneyModel model){
 
        List<String> partnerIds = service.queryPartnerByCurrent();
        if(null!=model.getPartnerId()&&!"".equals(model.getPartnerId())){
            if(null==partnerIds){
                partnerIds= new ArrayList<>();
            }
            partnerIds.add(model.getPartnerId());
        }
        List<UserModel> userIds = new ArrayList<>();
        List<String> allUserIds = new ArrayList<>();
        if(null!=partnerIds&&!"".equals(partnerIds)){
            //查询合伙人所有打包站的Id
            if(null!=model.getRoleType()&&!"".equals(model.getRoleType())){
                if(model.getRoleType().equals("1")){
                    List<String> townIds = service.queryTownIdsByPartnerId(partnerIds.get(0));
                    model.setTownIds(townIds);
                     userIds = service.queryUserNormal(model);
                }else{
                    List<String> packageStationList = service.queryPackageIdList(partnerIds.get(0));
                    userIds = service.queryOtherUserByPid(partnerIds.get(0),model,packageStationList);
                }
            }else{
                List<String> packageStationList = service.queryPackageIdList(partnerIds.get(0));
                userIds = service.queryOtherUserByPid(partnerIds.get(0),model,packageStationList);
                //查询合伙人区域列表
                List<String> townIds = service.queryTownIdsByPartnerId(partnerIds.get(0));
                model.setTownIds(townIds);
                List<UserModel> nomalUserIds = service.queryUserNormal(model);
                userIds.addAll(nomalUserIds);
            }
 
        }else{
            if(null!=model.getRoleType()&&!"".equals(model.getRoleType())){
                if(model.getRoleType().equals("1")){
                    userIds = service.queryUserNormal(model);
                }else{
                    userIds = service.queryOtherUserByPid(null,model,null);
                }
            }else{
                if(null!=model.getUserName()&&!"".equals(model.getUserName())){
                    userIds = service.queryUserNormal(model);
                }
            }
        }
 
        List<String> uid = new ArrayList<>();
        if(null!=userIds&&userIds.size()>0){
            for (UserModel mm:userIds) {
                uid.add(mm.getUserId());
            }
        }else{
            if(model.getRoleType().equals("8")){
                uid.add("0");
            }else{
                uid = null;
            }
 
        }
 
        model.setUserIds(uid);
 
        List<AccountMoneyModel> list = service.queryAccountByUserIds(model);
        Map<String,Object> map = new HashMap<>();
        map.put("data",list);
        map.put("count",service.queryAccountByUserIdsCount(model));
        map.put("code",0);
        return JsonResult.success(map);
    }
 
    @PostMapping(MODEL + "/updateAccountLimit.json")
    @ResponseBody
    @ApiOperation(value="调整额度", notes="test: 仅0有正确返回")
    @ApiImplicitParams({
            @ApiImplicitParam(paramType="query", name ="accountId", value = "账户Id", required = true, dataType = "String"),
            @ApiImplicitParam(paramType="query", name = "fixedLimit", value = "固定额度", required = true, dataType = "int")
    })
    public JsonResult<String> updateAccountLimit(@RequestBody AccountMoneyModel model){
        int num = service.updateAccountLimit(model);
        if(num>0){
            return JsonResult.success("修改成功!");
        }else if(num==-1) {
            return JsonResult.failMessage("可用额度不足,调额失败!");
        }else{
                return JsonResult.failMessage("额度必须由合伙人修改,所以修改失败!");
        }
 
 
    }
 
    @PostMapping(MODEL + "/queryPackageByPartner.json")
    @ResponseBody
    @ApiOperation(value="查询打包站", notes="test: 仅0有正确返回")
    public JsonResult<Map<String,Object>> queryPackageByPartner(){
        List<String> partnerIds = service.queryPartnerByCurrent();
        List<XzxCityPartner> list = service.queryPackageByPartner(partnerIds);
        Map<String,Object> map = new HashMap<>();
        map.put("data",list);
        map.put("code",0);
        return JsonResult.success(map);
    }
 
    @PostMapping(MODEL + "/updateAccountType.json")
    @ResponseBody
    @ApiOperation(value="修改账户冻结状态", notes="test: 仅0有正确返回")
    @ApiImplicitParams({
            @ApiImplicitParam(paramType="query", name ="accountId", value = "账户Id", required = true, dataType = "String"),
            @ApiImplicitParam(paramType="query", name = "isProhibit", value = "冻结状态 0:未冻结,1:冻结", required = true, dataType = "int")
    })
    public JsonResult<String> updateAccountType(@RequestBody AccountMoneyModel model){
        int num = service.updateAccountType(model);
        if(num>0){
            return JsonResult.success("修改成功");
        }else{
            return JsonResult.success("修改失败");
        }
    }
}