admin
2019-07-24 c8a99ed8218fe034e9c33236969fcbec9eac75bb
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
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
package com.yeshi.fanli.controller.apph5;
 
import java.io.PrintWriter;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;
 
import javax.annotation.Resource;
 
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.yeshi.utils.JsonUtil;
import org.yeshi.utils.taobao.TbImgUtil;
 
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.yeshi.fanli.entity.accept.AcceptData;
import com.yeshi.fanli.entity.bus.lable.MergeClass;
import com.yeshi.fanli.entity.bus.lable.QualityFactory;
import com.yeshi.fanli.entity.goods.CollectionGoodsV2;
import com.yeshi.fanli.entity.taobao.TaoBaoGoodsBrief;
import com.yeshi.fanli.entity.taobao.TaoBaoGoodsBriefExtra;
import com.yeshi.fanli.entity.taobao.TaoBaoHongBaoInfo;
import com.yeshi.fanli.entity.taobao.TaobaoMeterial;
import com.yeshi.fanli.entity.taobao.dataoke.DaTaoKeDetail;
import com.yeshi.fanli.exception.taobao.TaoKeApiException;
import com.yeshi.fanli.exception.taobao.TaobaoGoodsDownException;
import com.yeshi.fanli.log.LogHelper;
import com.yeshi.fanli.service.inter.config.ConfigService;
import com.yeshi.fanli.service.inter.goods.CollectionGoodsV2Service;
import com.yeshi.fanli.service.inter.goods.GoodsClassService;
import com.yeshi.fanli.service.inter.goods.TaoBaoClassService;
import com.yeshi.fanli.service.inter.goods.TaoBaoGoodsBriefService;
import com.yeshi.fanli.service.inter.hongbao.HongBaoManageService;
import com.yeshi.fanli.service.inter.lable.LabelService;
import com.yeshi.fanli.service.inter.lable.MergeClassService;
import com.yeshi.fanli.service.inter.lable.QualityFactoryService;
import com.yeshi.fanli.service.inter.lable.QualityFlashSaleService;
import com.yeshi.fanli.service.inter.lable.QualityGoodsService;
import com.yeshi.fanli.service.inter.lable.TaoKeGoodsService;
import com.yeshi.fanli.service.inter.taobao.TaoBaoGoodsActivityService;
import com.yeshi.fanli.service.inter.taobao.TaobaoMeterialService;
import com.yeshi.fanli.service.inter.taobao.dataoke.DaTaoKeGoodsDetailService;
import com.yeshi.fanli.util.Constant;
import com.yeshi.fanli.util.StringUtil;
import com.yeshi.fanli.util.TimeUtil;
import com.yeshi.fanli.util.taobao.TaoBaoUtil;
import com.yeshi.fanli.util.taobao.TaoKeApiUtil;
 
import net.sf.json.JSONArray;
import net.sf.json.JSONObject;
 
@Controller
@RequestMapping("api/apph5/v1/quality")
public class AppH5QualityGoodsController {
 
    @Resource
    private LabelService labelService;
 
    @Resource
    private QualityFactoryService selectionGoodsService;
 
    @Resource
    private TaoBaoGoodsBriefService taoBaoGoodsBriefService;
 
    @Resource
    private TaobaoMeterialService taobaoMeterialService;
 
    @Resource
    private TaoKeGoodsService taoKeGoodsService;
 
    @Resource
    private GoodsClassService goodsClassService;
 
    @Resource
    private HongBaoManageService manageService;
 
    @Resource
    private MergeClassService mergeClassService;
 
    @Resource
    private TaoBaoClassService taoBaoClassService;
 
    @Resource
    private QualityGoodsService qualityGoodsService;
 
    @Resource
    private QualityFlashSaleService qualityFlashSaleService;
 
    @Resource
    private CollectionGoodsV2Service collectionGoodsV2Service;
 
    @Resource
    private HongBaoManageService hongBaoManageService;
 
    @Resource
    private ConfigService configService;
 
    @Resource
    private TaoBaoGoodsActivityService taoBaoGoodsActivityService;
 
    @Resource
    private DaTaoKeGoodsDetailService daTaoKeGoodsDetailService;
 
    /**
     * 9.9商品
     * 
     * @param pageIndex
     * @param out
     */
    @RequestMapping(value = "get9k9")
    public void get9k9(String callback, Integer page, Long mcid, PrintWriter out) {
        get9k9ClassGoods(callback, out, page, 500, new BigDecimal(209.9), new BigDecimal(0), new BigDecimal(9.9), mcid);
 
    }
 
    /**
     * 19.9商品
     * 
     * @param pageIndex
     * @param out
     */
    @RequestMapping(value = "get19k9")
    public void get19k9(String callback, Integer page, Long mcid, PrintWriter out) {
        get9k9ClassGoods(callback, out, page, 500, new BigDecimal(319.9), new BigDecimal(9.9), new BigDecimal(19.9),
                mcid);
 
    }
 
    /**
     * 29.9商品
     * 
     * @param pageIndex
     * @param out
     */
    @RequestMapping(value = "get29k9")
    public void get29k9(String callback, Integer page, Long mcid, PrintWriter out) {
        get9k9ClassGoods(callback, out, page, 500, new BigDecimal(429.9), new BigDecimal(19.9), new BigDecimal(29.9),
                mcid);
 
    }
 
    /**
     * 49.9商品
     * 
     * @param pageIndex
     * @param out
     */
    @RequestMapping(value = "get49k9")
    public void get49k9(String callback, Integer page, Long mcid, PrintWriter out) {
        get9k9ClassGoods(callback, out, page, 500, new BigDecimal(549.9), new BigDecimal(29.9), new BigDecimal(49.9),
                mcid);
    }
 
    /**
     * 9k9类型的商品查询
     * 
     * @param labName
     *            标签名称
     * @param callback
     * @param page
     * @param mcid
     *            对应类目id
     * @param out
     */
    public void get9k9ClassGoods(String callback, PrintWriter out, Integer page, Integer biz30day, BigDecimal zkPrice,
            BigDecimal minQuanPrice, BigDecimal maxQuanPrice, Long mcid) {
        try {
            if (page == null || page <= 0) {
                page = 1;
            }
 
            int pageSize = Constant.PAGE_SIZE;
 
            String mergeCids = null;
            if (mcid != null && (!mcid.equals(0) || mcid != 0)) {
                MergeClass mergeClass = mergeClassService.selectByPrimaryKeyCache(mcid);
                if (mergeClass != null) {
                    // 分类id,隔开
                    mergeCids = mergeClass.getMergeCids();
                }
            }
 
            // 根据标签id 查询数据
            List<QualityFactory> listQuery = qualityGoodsService.get9k9ClassGoods((page - 1) * pageSize, pageSize,
                    biz30day, zkPrice, minQuanPrice, maxQuanPrice, mergeCids);
            if (listQuery == null || listQuery.size() == 0) {
                JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult(2, "没有更多了"));
                return;
            }
 
            // 总条数
            long count = qualityGoodsService.count9k9ClassGoods(biz30day, zkPrice, minQuanPrice, maxQuanPrice,
                    mergeCids);
 
            JSONArray array = new JSONArray();
            Gson gson = JsonUtil.getConvertBigDecimalToStringSubZeroBuilder(new GsonBuilder())
                    .excludeFieldsWithoutExposeAnnotation().setDateFormat("yyyy-MM-dd").create();
 
            BigDecimal proportion = hongBaoManageService.getFanLiRate();
            /* 遍历列表数据 */
            for (QualityFactory selectionGoods : listQuery) {
                TaoBaoGoodsBrief goodsBrief = selectionGoods.getTaoBaoGoodsBrief();
                if (goodsBrief == null) {
                    continue;
                }
                array.add(gson.toJson(TaoBaoUtil.getTaoBaoGoodsBriefExtra(goodsBrief, proportion.toString(), null)));
            }
 
            // 618活动
            if (System.currentTimeMillis() < TimeUtil.convertToTimeTemp("2019-06-19", "yyyy-MM-dd")) {
                if (mcid == null || mcid == 0) {
                    count = taoBaoGoodsActivityService.countByPrice(minQuanPrice,
                            maxQuanPrice.add(new BigDecimal("0.1")));
                    List<TaoBaoGoodsBrief> goodsList = taoBaoGoodsActivityService.listByPrice(minQuanPrice,
                            maxQuanPrice.add(new BigDecimal("0.1")), page, pageSize);
                    if (goodsList != null) {
                        array.clear();
                        for (TaoBaoGoodsBrief goods : goodsList) {
                            array.add(gson
                                    .toJson(TaoBaoUtil.getTaoBaoGoodsBriefExtra(goods, proportion.toString(), null)));
                        }
                    }
                }
            }
 
            JSONObject data = new JSONObject();
            data.put("count", count);
            data.put("result_list", array);
 
            JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult(data));
        } catch (Exception e) {
            JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("查询失败"));
            LogHelper.errorDetailInfo(e);
        }
    }
 
    /**
     * 9.9商品-每日必抢
     * 
     * @param pageIndex
     * @param out
     */
    @RequestMapping(value = "get9k9EverydayRob")
    public void get9k9EverydayRob(String callback, Integer page, Long mcid, PrintWriter out) {
        queryEverydayRob(callback, out, page, new BigDecimal(209.9), new BigDecimal(0), new BigDecimal(9.9));
 
    }
 
    /**
     * 19.9商品-每日必抢
     * 
     * @param pageIndex
     * @param out
     */
    @RequestMapping(value = "get19k9EverydayRob")
    public void get19k9EverydayRob(String callback, Integer page, Long mcid, PrintWriter out) {
        queryEverydayRob(callback, out, page, new BigDecimal(319.9), new BigDecimal(9.9), new BigDecimal(19.9));
    }
 
    /**
     * 29.9商品-每日必抢
     * 
     * @param pageIndex
     * @param out
     */
    @RequestMapping(value = "get29k9EverydayRob")
    public void get29k9EverydayRob(String callback, Integer page, Long mcid, PrintWriter out) {
        queryEverydayRob(callback, out, page, new BigDecimal(429.9), new BigDecimal(19.9), new BigDecimal(29.9));
 
    }
 
    /**
     * 49.9商品-每日必抢
     * 
     * @param pageIndex
     * @param out
     */
    @RequestMapping(value = "get49k9EverydayRob")
    public void get49k9EverydayRob(String callback, Integer page, Long mcid, PrintWriter out) {
        queryEverydayRob(callback, out, page, new BigDecimal(549.9), new BigDecimal(29.9), new BigDecimal(49.9));
 
    }
 
    /**
     * 每日必抢
     * 
     * @param page
     * @param pageSize
     * @param labId
     * @return
     * @throws Exception
     */
    public void queryEverydayRob(String callback, PrintWriter out, Integer page, BigDecimal zkPrice,
            BigDecimal minQuanPrice, BigDecimal maxQuanPrice) {
 
        if (page == null)
            page = 1;
 
        // 20 条一页请求到3页结束今日新品
        if (page > 3) {
            JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult(2, "没有更多了"));
            return;
        }
 
        try {
            int pageSize = Constant.PAGE_SIZE;
            List<QualityFactory> listQuery = qualityGoodsService.listQueryEverydayRob((page - 1) * pageSize, pageSize,
                    zkPrice, minQuanPrice, maxQuanPrice);
            if (listQuery == null || listQuery.size() == 0) {
                JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult(2, "没有更多了"));
                return;
            }
 
            JSONArray array = new JSONArray();
            Gson gson = JsonUtil.getConvertBigDecimalToStringSubZeroBuilder(new GsonBuilder())
                    .excludeFieldsWithoutExposeAnnotation().setDateFormat("yyyy-MM-dd").create();
 
            BigDecimal proportion = manageService.getFanLiRate();
            for (QualityFactory selectionGoods : listQuery) {
                TaoBaoGoodsBrief taoBaoGoodsBrief = selectionGoods.getTaoBaoGoodsBrief();
                if (taoBaoGoodsBrief == null) {
                    continue;
                }
                array.add(gson
                        .toJson(TaoBaoUtil.getTaoBaoGoodsBriefExtra(taoBaoGoodsBrief, proportion.toString(), null)));
            }
 
            long count = qualityGoodsService.countQueryEverydayRob(zkPrice, minQuanPrice, maxQuanPrice);
            if (count < 50) {
                count = listQuery.size();
            } else {
                count = 50;
            }
 
            JSONObject data = new JSONObject();
            data.put("count", count);
            data.put("result_list", array);
            JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult(data));
        } catch (Exception e) {
            JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("查询失败"));
            LogHelper.errorDetailInfo(e);
        }
    }
 
    /**
     * 品牌购 (官方推荐【品牌券】接口)
     * 
     * @param page
     * @param out
     */
    @RequestMapping(value = "getBrandsGoods")
    public void getBrandsGoods(String callback, Integer page, String subName, PrintWriter out) {
 
        try {
 
            List<TaobaoMeterial> list = taobaoMeterialService.selectByClassNameAndSuperNameCache(subName, "品牌券");
 
            if (list == null || list.size() == 0) {
                JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("暂无数据"));
                return;
            }
 
            TaobaoMeterial taobaoMeterial = list.get(0);
            Integer materialId = taobaoMeterial.getMaterialId();
            if (materialId == null) {
                JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("未检索到数据"));
                return;
            }
 
            if (page == null)
                page = 1;
 
            int pageSize = Constant.PAGE_SIZE;
 
            JSONObject jsonObject = taoKeGoodsService.getBrandsGoods(materialId, page, pageSize);
 
            if (jsonObject == null) {
                JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult(2, "没有更多了"));
                return;
            }
 
            JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult(jsonObject));
 
        } catch (Exception e) {
            JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("查询失败"));
            try {
                LogHelper.errorDetailInfo(e);
            } catch (Exception e1) {
                e1.printStackTrace();
            }
        }
    }
 
    /**
     * 品牌购 (官方推荐【品牌券】接口)
     * 
     * @param page
     * @param out
     */
    @RequestMapping(value = "getBrandsShops")
    public void getBrandsShops(String callback, Integer page, PrintWriter out) {
 
        try {
            String subName = "综合";
            List<TaobaoMeterial> list = taobaoMeterialService.selectByClassNameAndSuperNameCache(subName, "品牌券");
 
            if (list == null || list.size() == 0) {
                JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("暂无数据"));
                return;
            }
 
            TaobaoMeterial taobaoMeterial = list.get(0);
            Integer materialId = taobaoMeterial.getMaterialId();
            if (materialId == null) {
                JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("未检索到数据"));
                return;
            }
 
            if (page == null)
                page = 1;
 
            int pageSize = Constant.PAGE_SIZE;
 
            JSONObject jsonObject = taoKeGoodsService.getBrandsShops(materialId, page, pageSize);
 
            if (jsonObject == null) {
                JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult(2, "没有更多了"));
                return;
            }
 
            JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult(jsonObject));
 
        } catch (Exception e) {
            JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("查询失败"));
            try {
                LogHelper.errorDetailInfo(e);
            } catch (Exception e1) {
                e1.printStackTrace();
            }
        }
    }
 
    /**
     * 大额券 (官方推荐中的【特惠】)
     * 
     * @param page
     * @param out
     */
    @RequestMapping(value = "getPreferential", method = RequestMethod.POST)
    public void getPreferential(int page, PrintWriter out) {
 
        try {
 
            List<TaobaoMeterial> taobaoMeterials = taobaoMeterialService.selectByClassNameAndSuperNameCache(null, "特惠");
 
            if (taobaoMeterials == null || taobaoMeterials.size() == 0) {
                out.print(JsonUtil.loadFalseResult("暂无数据"));
                return;
            }
 
            TaobaoMeterial meterial = taobaoMeterials.get(0);
            Integer materialId = meterial.getMaterialId();
            if (materialId == null) {
                out.print(JsonUtil.loadFalseResult("未检索到数据"));
                return;
            }
 
            if (page < 1)
                page = 1;
 
            int pageSize = Constant.PAGE_SIZE;
 
            JSONObject jsonObject = queryMaterialGoods(page, pageSize, materialId);
 
            if (jsonObject == null) {
                out.print(JsonUtil.loadFalseResult(2, "暂无更多数据"));
            }
            out.print(JsonUtil.loadTrueResult(jsonObject));
 
        } catch (Exception e) {
            out.print(JsonUtil.loadFalseResult("查询失败"));
 
            try {
                LogHelper.errorDetailInfo(e);
            } catch (Exception e1) {
                e1.printStackTrace();
            }
        }
    }
 
    /**
     * 超高奖金(官方推荐中的【有好货】)
     * 
     * @param page
     * @param out
     */
    @RequestMapping(value = "getSuperiors", method = RequestMethod.POST)
    public void getSuperiors(int page, PrintWriter out) {
 
        try {
 
            List<TaobaoMeterial> taobaoMeterials = taobaoMeterialService.selectByClassNameAndSuperNameCache(null,
                    "有好货");
 
            if (taobaoMeterials == null || taobaoMeterials.size() == 0) {
                out.print(JsonUtil.loadFalseResult("暂无数据"));
                return;
            }
 
            TaobaoMeterial meterial = taobaoMeterials.get(0);
            Integer materialId = meterial.getMaterialId();
            if (materialId == null) {
                out.print(JsonUtil.loadFalseResult("未检索到数据"));
                return;
            }
 
            if (page < 1)
                page = 1;
 
            int pageSize = Constant.PAGE_SIZE;
 
            JSONObject jsonObject = queryMaterialGoods(page, pageSize, materialId);
 
            if (jsonObject == null) {
                out.print(JsonUtil.loadFalseResult(2, "暂无更多数据"));
            }
            out.print(JsonUtil.loadTrueResult(jsonObject));
 
        } catch (Exception e) {
            out.print(JsonUtil.loadFalseResult("查询失败"));
 
            try {
                LogHelper.errorDetailInfo(e);
            } catch (Exception e1) {
                e1.printStackTrace();
            }
        }
    }
 
    /**
     * 今日新品【(官方推荐【好券直播】接口)
     * 
     * @param page
     * @param subName
     *            子类名称
     */
    @RequestMapping(value = "todayNew")
    public void todayNew(String callback, Integer page, String subName, String uid, PrintWriter out) {
 
        try {
 
            List<TaobaoMeterial> list = taobaoMeterialService.selectByClassNameAndSuperNameCache(subName, "好券直播");
 
            if (list == null || list.size() == 0) {
                JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("暂无数据"));
                return;
            }
 
            TaobaoMeterial taobaoMeterial = list.get(0);
            Integer materialId = taobaoMeterial.getMaterialId();
            if (materialId == null) {
                JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("未检索到数据"));
                return;
            }
 
            if (page == null)
                page = 1;
 
            int pageSize = Constant.PAGE_SIZE;
 
            List<TaoBaoGoodsBrief> listMaterial = taoKeGoodsService.listByMaterial(materialId, page, pageSize);
 
            if (listMaterial == null || listMaterial.size() == 0) {
                JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult(2, "没有更多了"));
                return;
            }
 
            JSONArray array = new JSONArray();
            Gson gson = JsonUtil.getConvertBigDecimalToStringSubZeroBuilder(new GsonBuilder())
                    .excludeFieldsWithoutExposeAnnotation().setDateFormat("yyyy-MM-dd").create();
 
            BigDecimal proportion = manageService.getFanLiRate();
 
            /* 遍历列表数据 */
            for (TaoBaoGoodsBrief taoBaoGoodsBrief : listMaterial) {
 
                int biz30day = taoBaoGoodsBrief.getBiz30day();
                if (biz30day >= 10000) {
                    double sales = biz30day;
                    String salesCountMidea = String.format("%.1f", sales / 10000);
                    taoBaoGoodsBrief.setSalesCount(salesCountMidea + "万");
                } else {
                    taoBaoGoodsBrief.setSalesCount(biz30day + "");
                }
 
                // 改变图片尺寸 大图更清晰
                String pictUrl = taoBaoGoodsBrief.getPictUrl();
                pictUrl = pictUrl.replaceAll("320x320", "640x640");
                taoBaoGoodsBrief.setPictUrl(pictUrl);
 
                int collected = 0;
                // 判断收藏
                if (!StringUtil.isNullOrEmpty(uid)) {
                    CollectionGoodsV2 collectionGoods = collectionGoodsV2Service
                            .findByUidAndAuctionId(Long.parseLong(uid), taoBaoGoodsBrief.getAuctionId());
                    if (collectionGoods != null) {
                        collected = 1;
                    }
                }
 
                TaoBaoGoodsBriefExtra taoBaoGoodsBriefExtra = TaoBaoUtil.getTaoBaoGoodsBriefExtra(taoBaoGoodsBrief,
                        proportion.toString(), null);
                taoBaoGoodsBriefExtra.setCollected(collected);
 
                array.add(gson.toJson(taoBaoGoodsBriefExtra));
            }
 
            JSONObject data = new JSONObject();
            data.put("result_list", array);
            data.put("count", 1000);
 
            JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult(data));
 
        } catch (Exception e) {
            JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("查询失败"));
            try {
                LogHelper.errorDetailInfo(e);
            } catch (Exception e1) {
                e1.printStackTrace();
            }
        }
    }
 
    /**
     * 潮品热卖(官方推荐中的【潮流范】)
     * 
     * @param page
     * @param out
     */
    @RequestMapping(value = "getFashions")
    public void getFashions(String callback, Integer page, PrintWriter out) {
 
        try {
 
            List<TaobaoMeterial> taobaoMeterials = taobaoMeterialService.selectByClassNameAndSuperNameCache(null,
                    "潮流范");
 
            if (taobaoMeterials == null || taobaoMeterials.size() == 0) {
                JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("暂无数据"));
                return;
            }
 
            TaobaoMeterial meterial = taobaoMeterials.get(0);
            Integer materialId = meterial.getMaterialId();
            if (materialId == null) {
                JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("未检索到数据"));
                return;
            }
 
            if (page == null) {
                page = 1;
            }
 
            int pageSize = Constant.PAGE_SIZE;
 
            JSONObject jsonObject = queryMaterialGoods(page, pageSize, materialId);
 
            if (jsonObject == null) {
                JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult(2, "没有更多了"));
                return;
            }
 
            JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult(jsonObject));
 
        } catch (Exception e) {
            JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("查询失败"));
 
            try {
                LogHelper.errorDetailInfo(e);
            } catch (Exception e1) {
                e1.printStackTrace();
            }
        }
    }
 
    /**
     * 母婴精选(官方推荐中的【母婴主题】)
     * 
     * @param page
     * @param out
     */
    @RequestMapping(value = "getPregnantBaby")
    public void getPregnantBaby(AcceptData acceptData, String callback, Integer page, String subName, PrintWriter out) {
 
        try {
 
            List<TaobaoMeterial> taobaoMeterials = taobaoMeterialService.selectByClassNameAndSuperNameCache(subName,
                    "母婴主题");
 
            if (taobaoMeterials == null || taobaoMeterials.size() == 0) {
                JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("暂无数据"));
                return;
            }
 
            TaobaoMeterial meterial = taobaoMeterials.get(0);
            Integer materialId = meterial.getMaterialId();
            if (materialId == null) {
                JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("未检索到数据"));
                return;
            }
 
            if (page == null) {
                page = 1;
            }
            int pageSize = Constant.PAGE_SIZE;
 
            JSONObject jsonObject = queryMaterialGoods(page, pageSize, materialId);
 
            if (jsonObject == null) {
                JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult(2, "没有更多了"));
            }
 
            JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult(jsonObject));
 
        } catch (Exception e) {
            JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("查询失败"));
 
            try {
                LogHelper.errorDetailInfo(e);
            } catch (Exception e1) {
                e1.printStackTrace();
            }
        }
    }
 
    /**
     * 推荐查询接口对接-公用方法
     * 
     * @param page
     * @param pageSize
     * @param materialId
     * @return
     * @throws Exception
     */
    public JSONObject queryMaterialGoods(int page, int pageSize, Integer materialId) throws Exception {
 
        List<TaoBaoGoodsBrief> listBrands = taoKeGoodsService.listByMaterial(materialId, page, pageSize);
 
        if (listBrands == null || listBrands.size() == 0) {
            return null;
        }
 
        JSONArray array = new JSONArray();
        Gson gson = JsonUtil.getConvertBigDecimalToStringSubZeroBuilder(new GsonBuilder())
                .excludeFieldsWithoutExposeAnnotation().setDateFormat("yyyy-MM-dd").create();
 
        BigDecimal proportion = manageService.getFanLiRate();
 
        /* 遍历列表数据 */
        for (TaoBaoGoodsBrief taoBaoGoodsBrief : listBrands) {
 
            int biz30day = taoBaoGoodsBrief.getBiz30day();
            if (biz30day >= 10000) {
                double sales = biz30day;
                String salesCountMidea = String.format("%.1f", sales / 10000);
                taoBaoGoodsBrief.setSalesCount(salesCountMidea + "万");
            } else {
                taoBaoGoodsBrief.setSalesCount(biz30day + "");
            }
 
            // 改变图片尺寸
            String pictUrl = taoBaoGoodsBrief.getPictUrl();
            if (!StringUtil.isNullOrEmpty(pictUrl) && !pictUrl.contains("320x320")) {
                taoBaoGoodsBrief.setPictUrl(TbImgUtil.getTBSize320Img(pictUrl));
            }
 
            array.add(gson.toJson(TaoBaoUtil.getTaoBaoGoodsBriefExtra(taoBaoGoodsBrief, proportion.toString(), null)));
        }
 
        JSONObject data = new JSONObject();
        data.put("result_list", array);
        data.put("count", 1000);
 
        return data;
 
    }
 
    /**
     * 限时抢购
     * 
     * @param callback
     * @param page
     * @param out
     */
    @RequestMapping("getFlashSale")
    public void getFlashSale(String callback, Integer page, Long auctionId, PrintWriter out) {
 
        if (page == null)
            page = 1;
 
        int pageSize = Constant.PAGE_SIZE;
        int type = qualityFlashSaleService.getNowType();
 
        TaoBaoGoodsBrief goodsBrief = null;
        if (page == 1 && auctionId != null) {
            List<TaoBaoGoodsBrief> list = taoBaoGoodsBriefService.queryByAuctionId(auctionId);
            if (list != null && list.size() > 0) {
                goodsBrief = list.get(0);
            }
        }
 
        if (goodsBrief != null) {
            pageSize = pageSize - 1;
        }
 
        List<QualityFactory> listQuery = qualityGoodsService.listQueryByFlashSale((page - 1) * pageSize, pageSize);
 
        // 精选库数据为空
        if (listQuery == null || listQuery.size() == 0) {
            JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult(2, "没有更多了"));
            return;
        }
 
        long count = 3000;
 
        // 精选库数据处理返回 前端
        JSONArray array = new JSONArray();
        Gson gson = JsonUtil.getConvertBigDecimalToStringSubZeroBuilder(new GsonBuilder())
                .excludeFieldsWithoutExposeAnnotation().setDateFormat("yyyy-MM-dd").create();
 
        BigDecimal proportion = manageService.getFanLiRate();
 
        if (goodsBrief != null) {
            array.add(gson.toJson(TaoBaoUtil.getTaoBaoGoodsBriefExtra(goodsBrief, proportion.toString(), null)));
        }
 
        // 遍历列表数据
        for (QualityFactory quality : listQuery) {
 
            TaoBaoGoodsBrief taoBaoGoodsBrief = quality.getTaoBaoGoodsBrief();
            if (taoBaoGoodsBrief == null) {
                continue;
            }
 
            if (goodsBrief != null && auctionId.equals(taoBaoGoodsBrief.getAuctionId())) {
                continue;
            }
 
            int biz30day = taoBaoGoodsBrief.getBiz30day();
            if (biz30day >= 10000) {
                double sales = biz30day;
                String salesCountMidea = String.format("%.1f", sales / 10000);
                taoBaoGoodsBrief.setSalesCount(salesCountMidea + "万");
            } else {
                taoBaoGoodsBrief.setSalesCount(biz30day + "");
            }
 
            // 改变图片尺寸
            String pictUrl = taoBaoGoodsBrief.getPictUrl();
            if (!StringUtil.isNullOrEmpty(pictUrl) && !pictUrl.contains("320x320")) {
                taoBaoGoodsBrief.setPictUrl(TbImgUtil.getTBSize320Img(pictUrl));
            }
 
            array.add(gson.toJson(TaoBaoUtil.getTaoBaoGoodsBriefExtra(taoBaoGoodsBrief, proportion.toString(), null)));
        }
 
        JSONObject data = new JSONObject();
        data.put("count", count);
        data.put("type", type);
        data.put("result_list", array);
 
        JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult(data));
    }
 
    @RequestMapping("getFlashSaleNew")
    public void getFlashSaleNew(String callback, Integer page, Long auctionId, String time, PrintWriter out) {
        List<DaTaoKeDetail> detailList0 = daTaoKeGoodsDetailService.getDingDongQiangData(time);
        if (detailList0 == null)
            detailList0 = new ArrayList<>();
        List<DaTaoKeDetail> detailList = new ArrayList<>();
        detailList.addAll(detailList0);
        JSONArray array = new JSONArray();
        if (page == 1) {
            if (auctionId != null && detailList != null)
                for (int i = 0; i < detailList.size(); i++) {
                    if (detailList.get(i).getGoodsId().longValue() == auctionId) {
                        DaTaoKeDetail goods = detailList.get(i);
                        detailList.remove(i);
                        detailList.add(0, goods);
                        break;
                    }
                }
 
            Gson gson = JsonUtil.getConvertBigDecimalToStringSubZeroBuilder(new GsonBuilder())
                    .excludeFieldsWithoutExposeAnnotation().setDateFormat("yyyy-MM-dd").create();
            if (detailList != null)
                for (DaTaoKeDetail detail : detailList) {
                    array.add(gson.toJson(TaoBaoUtil.getTaoBaoGoodsBriefExtra(TaoBaoUtil.convert(detail),
                            hongBaoManageService.getFanLiRate() + "", null)));
                }
        }
 
        JSONObject data = new JSONObject();
        data.put("count", detailList.size());
        data.put("result_list", array);
        JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult(data));
    }
 
    /**
     * 大额券(券面值范围)
     * 
     * @param callback
     * @param amount
     * @param page
     * @param out
     */
    @RequestMapping("choiceCouponAmount")
    public void choiceCouponAmount(String callback, Integer amount, Integer page, PrintWriter out) {
 
        if (page == null)
            page = 1;
 
        int pageSize = Constant.PAGE_SIZE;
 
        Integer startAmount = null;
        Integer endAmount = null;
 
        if (amount.equals(1)) {
            startAmount = 5;
            endAmount = 10;
        } else if (amount.equals(2)) {
            startAmount = 10;
            endAmount = 30;
        } else if (amount.equals(3)) {
            startAmount = 30;
            endAmount = 50;
        } else if (amount.equals(4)) {
            startAmount = 50;
        }
 
        Integer startPropor = 20;
 
        List<QualityFactory> listQuery = qualityGoodsService.listQueryByCouponAmount((page - 1) * pageSize, pageSize,
                startAmount, endAmount, startPropor);
 
        if (listQuery == null || listQuery.size() == 0) {
            JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult(2, "没有更多了"));
            return;
        }
 
        long count = qualityGoodsService.countQueryByCouponAmount(startAmount, endAmount, startPropor);
 
        // 精选库数据处理返回 前端
        JSONArray array = new JSONArray();
        Gson gson = JsonUtil.getConvertBigDecimalToStringSubZeroBuilder(new GsonBuilder())
                .excludeFieldsWithoutExposeAnnotation().setDateFormat("yyyy-MM-dd").create();
 
        BigDecimal proportion = manageService.getFanLiRate();
        // 遍历列表数据
        for (QualityFactory selectionGoods : listQuery) {
 
            TaoBaoGoodsBrief taoBaoGoodsBrief = selectionGoods.getTaoBaoGoodsBrief();
 
            if (taoBaoGoodsBrief == null) {
                continue;
            }
 
            int biz30day = taoBaoGoodsBrief.getBiz30day();
            if (biz30day >= 10000) {
                double sales = biz30day;
                String salesCountMidea = String.format("%.1f", sales / 10000);
                taoBaoGoodsBrief.setSalesCount(salesCountMidea + "万");
            } else {
                taoBaoGoodsBrief.setSalesCount(biz30day + "");
            }
 
            // 改变图片尺寸
            String pictUrl = taoBaoGoodsBrief.getPictUrl();
            if (!StringUtil.isNullOrEmpty(pictUrl) && !pictUrl.contains("320x320")) {
                taoBaoGoodsBrief.setPictUrl(TbImgUtil.getTBSize320Img(pictUrl));
            }
 
            array.add(gson.toJson(TaoBaoUtil.getTaoBaoGoodsBriefExtra(taoBaoGoodsBrief, proportion.toString(), null)));
        }
 
        JSONObject data = new JSONObject();
        data.put("count", count);
        data.put("result", array);
        JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult(data));
    }
 
    /**
     * 超高奖金
     * 
     * @param callback
     * @param page
     * @param type
     * @param out
     */
    @RequestMapping("choiceRebate")
    public void choiceRebate(String callback, Integer page, Integer type, PrintWriter out) {
 
        if (page == null)
            page = 1;
 
        int pageSize = Constant.PAGE_SIZE;
 
        Integer startAmount = null;
        Integer endAmount = null;
 
        if (type.equals(1)) {
            startAmount = 1;
            endAmount = 5;
        } else if (type.equals(2)) {
            startAmount = 5;
            endAmount = 10;
        } else if (type.equals(3)) {
            startAmount = 10;
            endAmount = 15;
        } else if (type.equals(4)) {
            startAmount = 15;
        }
 
        double tkRate = 20.00;
 
        BigDecimal proportion = manageService.getFanLiRate();
        List<QualityFactory> listQuery = qualityGoodsService.listQueryByRebateAmount((page - 1) * pageSize, pageSize,
                proportion.toString(), startAmount, endAmount, tkRate);
 
        if (listQuery == null || listQuery.size() == 0) {
            JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult(2, "没有更多了"));
            return;
        }
 
        long count = qualityGoodsService.countQueryByRebateAmount(proportion.toString(), startAmount, endAmount,
                tkRate);
 
        // 精选库数据处理返回 前端
        JSONArray array = new JSONArray();
        Gson gson = JsonUtil.getConvertBigDecimalToStringSubZeroBuilder(new GsonBuilder())
                .excludeFieldsWithoutExposeAnnotation().setDateFormat("yyyy-MM-dd").create();
 
        // 遍历列表数据
        for (QualityFactory quality : listQuery) {
 
            TaoBaoGoodsBrief taoBaoGoodsBrief = quality.getTaoBaoGoodsBrief();
 
            if (taoBaoGoodsBrief == null) {
                continue;
            }
 
            int biz30day = taoBaoGoodsBrief.getBiz30day();
            if (biz30day >= 10000) {
                double sales = biz30day;
                String salesCountMidea = String.format("%.1f", sales / 10000);
                taoBaoGoodsBrief.setSalesCount(salesCountMidea + "万");
            } else {
                taoBaoGoodsBrief.setSalesCount(biz30day + "");
            }
 
            // 改变图片尺寸
            String pictUrl = taoBaoGoodsBrief.getPictUrl();
            if (!StringUtil.isNullOrEmpty(pictUrl) && !pictUrl.contains("320x320")) {
                taoBaoGoodsBrief.setPictUrl(TbImgUtil.getTBSize320Img(pictUrl));
            }
 
            array.add(gson.toJson(TaoBaoUtil.getTaoBaoGoodsBriefExtra(taoBaoGoodsBrief, proportion.toString(), null)));
        }
 
        JSONObject data = new JSONObject();
        data.put("count", count);
        data.put("result_list", array);
 
        JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult(data));
    }
 
    /**
     * 超高奖金
     * 
     * @param callback
     * @param page
     * @param type
     * @param out
     */
    @RequestMapping("recommendToIndex")
    public void recommendToIndex(String callback, Integer page, PrintWriter out) {
 
        if (page == null)
            page = 1;
 
        int pageSize = Constant.PAGE_SIZE;
 
        BigDecimal proportion = manageService.getFanLiRate();
        JSONArray array = qualityGoodsService.getRecommendToIndex((page - 1) * pageSize, pageSize,
                proportion.toString());
 
        if (array == null) {
            out.print(JsonUtil.loadFalseResult("没有更多了"));
            return;
        }
 
        long count = qualityGoodsService.countRecommendToIndex(proportion.toString());
 
        JSONObject data = new JSONObject();
        data.put("count", count);
        data.put("result_list", array);
 
        out.print(JsonUtil.loadTrueResult(data));
        return;
    }
 
    /**
     * 超高奖金
     * 
     * @param callback
     * @param page
     * @param type
     * @param out
     */
    @RequestMapping("freeGoods")
    public void freeGoods(String callback, Integer page, PrintWriter out) {
        try {
            if (page == null || page < 1)
                page = 1;
 
            int pageSize = Constant.PAGE_SIZE;
 
            List<QualityFactory> listQuery = qualityGoodsService.listFreeGoods((page - 1) * pageSize, pageSize);
            if (listQuery == null || listQuery.size() == 0) {
                JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult(2, "没有更多了"));
                return;
            }
 
            List<Long> listGid = new ArrayList<Long>();
            for (QualityFactory qualityFactory : listQuery) {
                TaoBaoGoodsBrief taoBaoGoodsBrief = qualityFactory.getTaoBaoGoodsBrief();
 
                if (taoBaoGoodsBrief == null) {
                    continue;
                }
                listGid.add(taoBaoGoodsBrief.getAuctionId());
            }
 
            // API网络接口验证是否在售
            List<TaoBaoGoodsBrief> listTaoKeGoods = null;
            try {
                listTaoKeGoods = TaoKeApiUtil.getBatchGoodsInfo(listGid);
            } catch (TaoKeApiException e) {
                e.printStackTrace();
            } catch (TaobaoGoodsDownException e) {
                e.printStackTrace();
            } catch (Exception e) {
                e.printStackTrace();
            }
 
            JSONArray array = new JSONArray();
            Gson gson = JsonUtil.getConvertBigDecimalToStringSubZeroBuilder(new GsonBuilder())
                    .excludeFieldsWithoutExposeAnnotation().setDateFormat("yyyy-MM-dd").create();
 
            BigDecimal proportion = manageService.getFanLiRate();
            /* 遍历列表数据 */
            for (QualityFactory selectionGoods : listQuery) {
 
                TaoBaoGoodsBrief taoBaoGoodsBrief = selectionGoods.getTaoBaoGoodsBrief();
 
                if (taoBaoGoodsBrief == null) {
                    continue;
                }
 
                if (listTaoKeGoods != null && listTaoKeGoods.size() > 0) {
                    boolean stateSale = false; // 默认停售
                    Long goodsId = taoBaoGoodsBrief.getAuctionId();
                    for (TaoBaoGoodsBrief taoKeGoods : listTaoKeGoods) {
                        Long auctionId = taoKeGoods.getAuctionId();
                        if (goodsId == auctionId || goodsId.equals(auctionId)) {
                            stateSale = true; // 在售
                            break;
                        }
                    }
 
                    if (!stateSale) {
                        continue;
                    }
                }
 
                BigDecimal couplePrice = TaoBaoUtil.getAfterUseCouplePrice(taoBaoGoodsBrief);
                if (couplePrice.compareTo(new BigDecimal("9.9")) == 1) {
                    continue; // 券后价大于10
                }
 
                TaoBaoGoodsBriefExtra extra = TaoBaoUtil.getTaoBaoGoodsBriefExtra(taoBaoGoodsBrief,
                        proportion.toString(), null);
                // 将返利改为券后价
                TaoBaoHongBaoInfo taoBaoHongBaoInfo = extra.getTaoBaoHongBaoInfo();
                if (taoBaoHongBaoInfo != null) {
                    taoBaoHongBaoInfo.setHongbao(extra.getQuanPrice());
                    taoBaoHongBaoInfo.setRate("¥" + extra.getQuanPrice());
                }
 
                array.add(gson.toJson(extra));
            }
 
            long count = qualityGoodsService.countFreeGoods();
 
            JSONObject data = new JSONObject();
            if (page == 1) {
                // 抽奖规则
                String rules = configService.get("free_goods_rule");
                data.put("ruleLink", rules);
            }
 
            data.put("count", count);
            data.put("result_list", array);
            JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult(data));
        } catch (Exception e) {
            JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("数据暂未提供"));
            LogHelper.errorDetailInfo(e);
        }
    }
 
}