张延森 3 лет назад
Родитель
Сommit
645b71a84d
49 измененных файлов: 1102 добавлений и 125 удалений
  1. 5
    0
      src/main/java/com/yunzhi/shigongli/common/Constants.java
  2. 53
    0
      src/main/java/com/yunzhi/shigongli/common/excelConverter/LocalDateTimeConverter.java
  3. 53
    0
      src/main/java/com/yunzhi/shigongli/common/excelConverter/LocalDayConverter.java
  4. 66
    0
      src/main/java/com/yunzhi/shigongli/common/excelConverter/PersonRoleConverter.java
  5. 63
    0
      src/main/java/com/yunzhi/shigongli/common/excelConverter/RecommendTypeConverter.java
  6. 64
    0
      src/main/java/com/yunzhi/shigongli/common/excelConverter/ShopStatusConverter.java
  7. 34
    5
      src/main/java/com/yunzhi/shigongli/controller/TaFeedbackController.java
  8. 21
    4
      src/main/java/com/yunzhi/shigongli/controller/TaHotWordController.java
  9. 20
    1
      src/main/java/com/yunzhi/shigongli/controller/TaHotelController.java
  10. 22
    6
      src/main/java/com/yunzhi/shigongli/controller/TaNotificationController.java
  11. 22
    4
      src/main/java/com/yunzhi/shigongli/controller/TaPersonController.java
  12. 22
    6
      src/main/java/com/yunzhi/shigongli/controller/TaRoomController.java
  13. 56
    1
      src/main/java/com/yunzhi/shigongli/controller/TaShopController.java
  14. 18
    1
      src/main/java/com/yunzhi/shigongli/controller/TaShopPackageController.java
  15. 21
    0
      src/main/java/com/yunzhi/shigongli/controller/TaTouristController.java
  16. 19
    1
      src/main/java/com/yunzhi/shigongli/entity/TaFeedback.java
  17. 13
    0
      src/main/java/com/yunzhi/shigongli/entity/TaHotWord.java
  18. 14
    1
      src/main/java/com/yunzhi/shigongli/entity/TaNotification.java
  19. 25
    0
      src/main/java/com/yunzhi/shigongli/entity/TaPerson.java
  20. 36
    1
      src/main/java/com/yunzhi/shigongli/entity/TaTourist.java
  21. 3
    0
      src/main/java/com/yunzhi/shigongli/mapper/TaFeedbackMapper.java
  22. 3
    1
      src/main/java/com/yunzhi/shigongli/mapper/TaHotelMapper.java
  23. 3
    1
      src/main/java/com/yunzhi/shigongli/mapper/TaRoomMapper.java
  24. 8
    1
      src/main/java/com/yunzhi/shigongli/mapper/TaShopAccountLogMapper.java
  25. 2
    0
      src/main/java/com/yunzhi/shigongli/mapper/TaShopMapper.java
  26. 5
    0
      src/main/java/com/yunzhi/shigongli/mapper/TaShopPackageMapper.java
  27. 4
    0
      src/main/java/com/yunzhi/shigongli/mapper/TaTouristMapper.java
  28. 1
    1
      src/main/java/com/yunzhi/shigongli/service/ITaHotelService.java
  29. 1
    1
      src/main/java/com/yunzhi/shigongli/service/ITaRoomService.java
  30. 2
    0
      src/main/java/com/yunzhi/shigongli/service/ITaShopPackageService.java
  31. 10
    1
      src/main/java/com/yunzhi/shigongli/service/impl/TaFeedbackServiceImpl.java
  32. 10
    2
      src/main/java/com/yunzhi/shigongli/service/impl/TaHotelServiceImpl.java
  33. 10
    2
      src/main/java/com/yunzhi/shigongli/service/impl/TaRoomServiceImpl.java
  34. 16
    1
      src/main/java/com/yunzhi/shigongli/service/impl/TaShopPackageServiceImpl.java
  35. 17
    2
      src/main/java/com/yunzhi/shigongli/service/impl/TaShopServiceImpl.java
  36. 11
    1
      src/main/java/com/yunzhi/shigongli/service/impl/TaTouristServiceImpl.java
  37. 13
    2
      src/main/java/com/yunzhi/shigongli/vo/HotelListVO.java
  38. 16
    6
      src/main/java/com/yunzhi/shigongli/vo/OrderSubListVO.java
  39. 64
    1
      src/main/java/com/yunzhi/shigongli/vo/RoomListVO.java
  40. 24
    0
      src/main/java/com/yunzhi/shigongli/vo/ShopCommissionVO.java
  41. 22
    5
      src/main/java/com/yunzhi/shigongli/vo/ShopListVO.java
  42. 86
    1
      src/main/java/com/yunzhi/shigongli/vo/ShopPackageVO.java
  43. 16
    8
      src/main/resources/mapper/TaFeedbackMapper.xml
  44. 13
    5
      src/main/resources/mapper/TaHotelMapper.xml
  45. 21
    14
      src/main/resources/mapper/TaRoomMapper.xml
  46. 21
    13
      src/main/resources/mapper/TaShopAccountLogMapper.xml
  47. 17
    8
      src/main/resources/mapper/TaShopMapper.xml
  48. 21
    9
      src/main/resources/mapper/TaShopPackageMapper.xml
  49. 15
    8
      src/main/resources/mapper/TaTouristMapper.xml

+ 5
- 0
src/main/java/com/yunzhi/shigongli/common/Constants.java Просмотреть файл

@@ -51,6 +51,11 @@ public class Constants {
51 51
     public final static String PACKAGE_NORMAL = "normal";           // 普通套餐
52 52
     public final static String PACKAGE_CASH = "cash_coupon";        // 现金抵用券
53 53
 
54
+    // 人员角色
55
+    public final static String PERSON_NORMAL = "normal";        // 普通游客
56
+    public final static String PERSON_HOTEL = "hotel";          // 民宿老板
57
+    public final static String PERSON_SHOP = "shop";            // 店铺老板
58
+
54 59
     // 推荐人类型
55 60
     public final static String RECOMMEND_SHOP = "shop";     // 商铺
56 61
     public final static String RECOMMEND_HOTEL = "hotel";   // 民宿

+ 53
- 0
src/main/java/com/yunzhi/shigongli/common/excelConverter/LocalDateTimeConverter.java Просмотреть файл

@@ -0,0 +1,53 @@
1
+package com.yunzhi.shigongli.common.excelConverter;
2
+
3
+import com.alibaba.excel.converters.Converter;
4
+import com.alibaba.excel.enums.CellDataTypeEnum;
5
+import com.alibaba.excel.metadata.CellData;
6
+import com.alibaba.excel.metadata.GlobalConfiguration;
7
+import com.alibaba.excel.metadata.property.ExcelContentProperty;
8
+import com.yunzhi.shigongli.common.DateUtils;
9
+
10
+import java.time.LocalDateTime;
11
+
12
+public class LocalDateTimeConverter implements Converter<LocalDateTime> {
13
+    @Override
14
+    public Class supportJavaTypeKey() {
15
+        return LocalDateTime.class;
16
+    }
17
+
18
+    @Override
19
+    public CellDataTypeEnum supportExcelTypeKey() {
20
+        return CellDataTypeEnum.STRING;
21
+    }
22
+
23
+    /**
24
+     * 读 Excel
25
+     * @param cellData
26
+     * @param contentProperty
27
+     * @param globalConfiguration
28
+     * @return
29
+     * @throws Exception
30
+     */
31
+    @Override
32
+    public LocalDateTime convertToJavaData(CellData cellData, ExcelContentProperty contentProperty, GlobalConfiguration globalConfiguration) throws Exception {
33
+        // 暂时没这个业务
34
+        return null;
35
+    }
36
+
37
+    /**
38
+     * 写 Excel
39
+     * @param value
40
+     * @param contentProperty
41
+     * @param globalConfiguration
42
+     * @return
43
+     * @throws Exception
44
+     */
45
+    @Override
46
+    public CellData convertToExcelData(LocalDateTime value, ExcelContentProperty contentProperty, GlobalConfiguration globalConfiguration) throws Exception {
47
+        if (null == value) return null;
48
+
49
+        String val = DateUtils.toString(value, "yyyy-MM-dd HH:mm:ss");
50
+
51
+        return new CellData(val);
52
+    }
53
+}

+ 53
- 0
src/main/java/com/yunzhi/shigongli/common/excelConverter/LocalDayConverter.java Просмотреть файл

@@ -0,0 +1,53 @@
1
+package com.yunzhi.shigongli.common.excelConverter;
2
+
3
+import com.alibaba.excel.converters.Converter;
4
+import com.alibaba.excel.enums.CellDataTypeEnum;
5
+import com.alibaba.excel.metadata.CellData;
6
+import com.alibaba.excel.metadata.GlobalConfiguration;
7
+import com.alibaba.excel.metadata.property.ExcelContentProperty;
8
+import com.yunzhi.shigongli.common.DateUtils;
9
+
10
+import java.time.LocalDateTime;
11
+
12
+public class LocalDayConverter implements Converter<LocalDateTime> {
13
+    @Override
14
+    public Class supportJavaTypeKey() {
15
+        return LocalDateTime.class;
16
+    }
17
+
18
+    @Override
19
+    public CellDataTypeEnum supportExcelTypeKey() {
20
+        return CellDataTypeEnum.STRING;
21
+    }
22
+
23
+    /**
24
+     * 读 Excel
25
+     * @param cellData
26
+     * @param contentProperty
27
+     * @param globalConfiguration
28
+     * @return
29
+     * @throws Exception
30
+     */
31
+    @Override
32
+    public LocalDateTime convertToJavaData(CellData cellData, ExcelContentProperty contentProperty, GlobalConfiguration globalConfiguration) throws Exception {
33
+        // 暂时没这个业务
34
+        return null;
35
+    }
36
+
37
+    /**
38
+     * 写 Excel
39
+     * @param value
40
+     * @param contentProperty
41
+     * @param globalConfiguration
42
+     * @return
43
+     * @throws Exception
44
+     */
45
+    @Override
46
+    public CellData convertToExcelData(LocalDateTime value, ExcelContentProperty contentProperty, GlobalConfiguration globalConfiguration) throws Exception {
47
+        if (null == value) return null;
48
+
49
+        String val = DateUtils.toString(value, "yyyy-MM-dd");
50
+
51
+        return new CellData(val);
52
+    }
53
+}

+ 66
- 0
src/main/java/com/yunzhi/shigongli/common/excelConverter/PersonRoleConverter.java Просмотреть файл

@@ -0,0 +1,66 @@
1
+package com.yunzhi.shigongli.common.excelConverter;
2
+
3
+import com.alibaba.excel.converters.Converter;
4
+import com.alibaba.excel.enums.CellDataTypeEnum;
5
+import com.alibaba.excel.metadata.CellData;
6
+import com.alibaba.excel.metadata.GlobalConfiguration;
7
+import com.alibaba.excel.metadata.property.ExcelContentProperty;
8
+import com.yunzhi.shigongli.common.Constants;
9
+
10
+public class PersonRoleConverter implements Converter<String> {
11
+    @Override
12
+    public Class supportJavaTypeKey() {
13
+        return String.class;
14
+    }
15
+
16
+    @Override
17
+    public CellDataTypeEnum supportExcelTypeKey() {
18
+        return CellDataTypeEnum.STRING;
19
+    }
20
+
21
+    /**
22
+     * 读 Excel
23
+     * @param cellData
24
+     * @param contentProperty
25
+     * @param globalConfiguration
26
+     * @return
27
+     * @throws Exception
28
+     */
29
+    @Override
30
+    public String convertToJavaData(CellData cellData, ExcelContentProperty contentProperty, GlobalConfiguration globalConfiguration) throws Exception {
31
+        // 暂时没这个业务
32
+        return null;
33
+    }
34
+
35
+    /**
36
+     * 写 Excel
37
+     * @param value
38
+     * @param contentProperty
39
+     * @param globalConfiguration
40
+     * @return
41
+     * @throws Exception
42
+     */
43
+    @Override
44
+    public CellData convertToExcelData(String value, ExcelContentProperty contentProperty, GlobalConfiguration globalConfiguration) throws Exception {
45
+        if (null == value) return null;
46
+
47
+        String val;
48
+
49
+        switch (value) {
50
+            case Constants.PERSON_NORMAL:
51
+                val = "游客";
52
+                break;
53
+            case Constants.PERSON_HOTEL:
54
+                val = "民宿老板";
55
+                break;
56
+            case Constants.PERSON_SHOP:
57
+                val = "商铺老板";
58
+                break;
59
+            default:
60
+                val = "未知";
61
+                break;
62
+        }
63
+
64
+        return new CellData(val);
65
+    }
66
+}

+ 63
- 0
src/main/java/com/yunzhi/shigongli/common/excelConverter/RecommendTypeConverter.java Просмотреть файл

@@ -0,0 +1,63 @@
1
+package com.yunzhi.shigongli.common.excelConverter;
2
+
3
+import com.alibaba.excel.converters.Converter;
4
+import com.alibaba.excel.enums.CellDataTypeEnum;
5
+import com.alibaba.excel.metadata.CellData;
6
+import com.alibaba.excel.metadata.GlobalConfiguration;
7
+import com.alibaba.excel.metadata.property.ExcelContentProperty;
8
+import com.yunzhi.shigongli.common.Constants;
9
+
10
+public class RecommendTypeConverter implements Converter<String> {
11
+    @Override
12
+    public Class supportJavaTypeKey() {
13
+        return String.class;
14
+    }
15
+
16
+    @Override
17
+    public CellDataTypeEnum supportExcelTypeKey() {
18
+        return CellDataTypeEnum.STRING;
19
+    }
20
+
21
+    /**
22
+     * 读 Excel
23
+     * @param cellData
24
+     * @param contentProperty
25
+     * @param globalConfiguration
26
+     * @return
27
+     * @throws Exception
28
+     */
29
+    @Override
30
+    public String convertToJavaData(CellData cellData, ExcelContentProperty contentProperty, GlobalConfiguration globalConfiguration) throws Exception {
31
+        // 暂时没这个业务
32
+        return null;
33
+    }
34
+
35
+    /**
36
+     * 写 Excel
37
+     * @param value
38
+     * @param contentProperty
39
+     * @param globalConfiguration
40
+     * @return
41
+     * @throws Exception
42
+     */
43
+    @Override
44
+    public CellData convertToExcelData(String value, ExcelContentProperty contentProperty, GlobalConfiguration globalConfiguration) throws Exception {
45
+        if (null == value) return null;
46
+
47
+        String val;
48
+
49
+        switch (value) {
50
+            case Constants.RECOMMEND_HOTEL:
51
+                val = "民宿分享";
52
+                break;
53
+            case Constants.RECOMMEND_SHOP:
54
+                val = "店铺分享";
55
+                break;
56
+            default:
57
+                val = "自主注册";
58
+                break;
59
+        }
60
+
61
+        return new CellData(val);
62
+    }
63
+}

+ 64
- 0
src/main/java/com/yunzhi/shigongli/common/excelConverter/ShopStatusConverter.java Просмотреть файл

@@ -0,0 +1,64 @@
1
+package com.yunzhi.shigongli.common.excelConverter;
2
+
3
+import com.alibaba.excel.converters.Converter;
4
+import com.alibaba.excel.enums.CellDataTypeEnum;
5
+import com.alibaba.excel.metadata.CellData;
6
+import com.alibaba.excel.metadata.GlobalConfiguration;
7
+import com.alibaba.excel.metadata.property.ExcelContentProperty;
8
+import com.yunzhi.shigongli.common.Constants;
9
+
10
+public class ShopStatusConverter implements Converter<Integer> {
11
+    @Override
12
+    public Class supportJavaTypeKey() {
13
+        return Integer.class;
14
+    }
15
+
16
+    @Override
17
+    public CellDataTypeEnum supportExcelTypeKey() {
18
+        return CellDataTypeEnum.STRING;
19
+    }
20
+
21
+    /**
22
+     * 读 Excel
23
+     * @param cellData
24
+     * @param contentProperty
25
+     * @param globalConfiguration
26
+     * @return
27
+     * @throws Exception
28
+     */
29
+    @Override
30
+    public Integer convertToJavaData(CellData cellData, ExcelContentProperty contentProperty, GlobalConfiguration globalConfiguration) throws Exception {
31
+        // 暂时没这业务
32
+        return cellData.getNumberValue().intValue();
33
+    }
34
+
35
+    /**
36
+     * 写 excel
37
+     * @param value
38
+     * @param contentProperty
39
+     * @param globalConfiguration
40
+     * @return
41
+     * @throws Exception
42
+     */
43
+    @Override
44
+    public CellData convertToExcelData(Integer value, ExcelContentProperty contentProperty, GlobalConfiguration globalConfiguration) throws Exception {
45
+        String result = null;
46
+        if (null == value) return null;
47
+
48
+        final int on = 1;
49
+        final int off = 0;
50
+
51
+        switch (value) {
52
+            case on:
53
+                result = "营业";
54
+                break;
55
+            case off:
56
+                result = "关闭";
57
+                break;
58
+            default:
59
+                break;
60
+        }
61
+
62
+        return new CellData(result);
63
+    }
64
+}

+ 34
- 5
src/main/java/com/yunzhi/shigongli/controller/TaFeedbackController.java Просмотреть файл

@@ -3,10 +3,7 @@ package com.yunzhi.shigongli.controller;
3 3
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
4 4
 import com.baomidou.mybatisplus.core.metadata.IPage;
5 5
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
6
-import com.yunzhi.shigongli.common.BaseController;
7
-import com.yunzhi.shigongli.common.DateUtils;
8
-import com.yunzhi.shigongli.common.ResponseBean;
9
-import com.yunzhi.shigongli.common.StringUtils;
6
+import com.yunzhi.shigongli.common.*;
10 7
 import com.yunzhi.shigongli.entity.TaPerson;
11 8
 import com.yunzhi.shigongli.service.ITaPersonService;
12 9
 import io.swagger.annotations.Api;
@@ -24,6 +21,7 @@ import com.yunzhi.shigongli.service.ITaFeedbackService;
24 21
 import com.yunzhi.shigongli.entity.TaFeedback;
25 22
 import org.springframework.web.bind.annotation.RestController;
26 23
 
24
+import javax.servlet.http.HttpServletResponse;
27 25
 import java.time.LocalDateTime;
28 26
 
29 27
 /**
@@ -56,7 +54,7 @@ public class TaFeedbackController extends BaseController {
56 54
      * @return
57 55
      */
58 56
     @RequestMapping(value="/admin/taFeedback",method= RequestMethod.GET)
59
-    @ApiOperation(value="列表", notes = "列表", httpMethod = "GET", response = ResponseBean.class)
57
+    @ApiOperation(value="列表", notes = "列表", httpMethod = "GET", response = TaFeedback.class)
60 58
     public ResponseBean taFeedbackList(@ApiParam("页码") @RequestParam(value ="pageNum",defaultValue = "1") Integer pageNum,
61 59
                                        @ApiParam("单页数据量") @RequestParam(value ="pageSize",defaultValue = "10") Integer pageSize,
62 60
                                        @ApiParam(value = "开始时间", example = "2021-09-01") @RequestParam(value ="start", required = false) String start,
@@ -81,6 +79,37 @@ public class TaFeedbackController extends BaseController {
81 79
         return ResponseBean.success(result);
82 80
     }
83 81
 
82
+
83
+
84
+    /**
85
+     * 导出联系我们列表
86
+     * @return
87
+     */
88
+    @RequestMapping(value="/admin/taFeedback/export",method= RequestMethod.GET)
89
+    @ApiOperation(value="导出联系我们列表", notes = "导出联系我们列表", httpMethod = "GET", response = TaFeedback.class)
90
+    public void expFeedbackList(@ApiParam(value = "开始时间", example = "2021-09-01") @RequestParam(value ="start", required = false) String start,
91
+                                @ApiParam(value = "结束时间", example = "2021-09-30") @RequestParam(value ="end", required = false) String end,
92
+                                HttpServletResponse response) throws Exception{
93
+
94
+        QueryWrapper<TaFeedback> queryWrapper = new QueryWrapper<>();
95
+        queryWrapper.orderByDesc("create_date");
96
+
97
+        LocalDateTime startDate = null;
98
+        LocalDateTime endDate = null;
99
+
100
+        if (!StringUtils.isEmpty(start)) {
101
+            startDate = DateUtils.from(start + " 00:00:00", "yyyy-MM-dd HH:mm:ss");
102
+        }
103
+
104
+        if (!StringUtils.isEmpty(end)) {
105
+            endDate = DateUtils.from(end + " 23:59:59", "yyyy-MM-dd HH:mm:ss");
106
+        }
107
+
108
+        IPage<TaFeedback> result = iTaFeedbackService.getProfilePage(null, startDate, endDate);
109
+
110
+        ExcelUtils.flush(response, TaFeedback.class, result.getRecords(), "联系我们");
111
+    }
112
+
84 113
     /**
85 114
      * 保存对象
86 115
      * @param taFeedback 实体对象

+ 21
- 4
src/main/java/com/yunzhi/shigongli/controller/TaHotWordController.java Просмотреть файл

@@ -3,10 +3,7 @@ package com.yunzhi.shigongli.controller;
3 3
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
4 4
 import com.baomidou.mybatisplus.core.metadata.IPage;
5 5
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
6
-import com.yunzhi.shigongli.common.BaseController;
7
-import com.yunzhi.shigongli.common.Constants;
8
-import com.yunzhi.shigongli.common.ResponseBean;
9
-import com.yunzhi.shigongli.common.StringUtils;
6
+import com.yunzhi.shigongli.common.*;
10 7
 import com.yunzhi.shigongli.entity.TaHotWord;
11 8
 import com.yunzhi.shigongli.service.ITaHotWordService;
12 9
 import io.swagger.annotations.Api;
@@ -17,6 +14,7 @@ import org.slf4j.LoggerFactory;
17 14
 import org.springframework.beans.factory.annotation.Autowired;
18 15
 import org.springframework.web.bind.annotation.*;
19 16
 
17
+import javax.servlet.http.HttpServletResponse;
20 18
 import java.time.LocalDateTime;
21 19
 import java.util.List;
22 20
 
@@ -61,6 +59,25 @@ public class TaHotWordController extends BaseController {
61 59
         return ResponseBean.success(result);
62 60
     }
63 61
 
62
+
63
+    /**
64
+     * 导出热词
65
+     * @return
66
+     */
67
+    @RequestMapping(value="/admin/hot-word/export",method= RequestMethod.GET)
68
+    @ApiOperation(value="导出热词", notes = "导出热词", httpMethod = "GET", response = TaHotWord.class)
69
+    public void expHotWordList(HttpServletResponse response) throws Exception{
70
+
71
+        QueryWrapper<TaHotWord> queryWrapper = new QueryWrapper<>();
72
+        queryWrapper.gt("status", Constants.STATUS_DELETED);
73
+        queryWrapper.orderByAsc("search_num");
74
+        queryWrapper.orderByAsc("weight");
75
+
76
+        List<TaHotWord> result = iTaHotWordService.list(queryWrapper);
77
+
78
+        ExcelUtils.flush(response, TaHotWord.class, result, "热门搜索");
79
+    }
80
+
64 81
     @GetMapping("/wx/hot-word")
65 82
     @ApiOperation(value="小程序端热词列表", notes = "小程序端热词列表", httpMethod = "GET", response = TaHotWord.class)
66 83
     public ResponseBean getWxList() throws Exception{

+ 20
- 1
src/main/java/com/yunzhi/shigongli/controller/TaHotelController.java Просмотреть файл

@@ -68,11 +68,26 @@ public class TaHotelController extends BaseController {
68 68
                                     @ApiParam("名称") @RequestParam(value = "hotelName",required = false) String hotelName) throws Exception{
69 69
 
70 70
 
71
-        IPage<TaHotel> pg = new Page<>(pageNum, pageSize);
71
+        IPage<HotelListVO> pg = new Page<>(pageNum, pageSize);
72 72
         IPage<HotelListVO> result = iTaHotelService.getVOListBy(pg, hotelName);
73 73
         return ResponseBean.success(result);
74 74
     }
75 75
 
76
+    /**
77
+     * 导出民宿列表
78
+     * @return
79
+     */
80
+    @RequestMapping(value="/{plat}/taHotel/export",method= RequestMethod.GET)
81
+    @ApiOperation(value="导出民宿列表", notes = "导出民宿列表", httpMethod = "GET", response = HotelListVO.class)
82
+    public void exportHotelList(@ApiParam("名称") @RequestParam(value = "hotelName",required = false) String hotelName,
83
+                                HttpServletResponse response) throws Exception{
84
+
85
+        IPage<HotelListVO> result = iTaHotelService.getVOListBy(null, hotelName);
86
+
87
+        ExcelUtils.flush(response, HotelListVO.class, result.getRecords(), "民宿列表");
88
+    }
89
+
90
+
76 91
     /**
77 92
      * 保存对象
78 93
      * @param taHotel 实体对象
@@ -82,6 +97,10 @@ public class TaHotelController extends BaseController {
82 97
     @ApiOperation(value="保存", notes = "保存", httpMethod = "POST", response = ResponseBean.class)
83 98
     public ResponseBean taHotelAdd(@ApiParam("保存内容") @RequestBody TaHotel taHotel) throws Exception{
84 99
 
100
+        if (null == taHotel.getStatus()) {
101
+            taHotel.setStatus(Constants.STATUS_READY);
102
+        }
103
+
85 104
         if (iTaHotelService.createNew(taHotel)){
86 105
             return ResponseBean.success(taHotel);
87 106
         }else {

+ 22
- 6
src/main/java/com/yunzhi/shigongli/controller/TaNotificationController.java Просмотреть файл

@@ -3,10 +3,7 @@ package com.yunzhi.shigongli.controller;
3 3
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
4 4
 import com.baomidou.mybatisplus.core.metadata.IPage;
5 5
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
6
-import com.yunzhi.shigongli.common.BaseController;
7
-import com.yunzhi.shigongli.common.Constants;
8
-import com.yunzhi.shigongli.common.ResponseBean;
9
-import com.yunzhi.shigongli.common.StringUtils;
6
+import com.yunzhi.shigongli.common.*;
10 7
 import com.yunzhi.shigongli.entity.TaNotification;
11 8
 import com.yunzhi.shigongli.service.ITaNotificationService;
12 9
 import io.swagger.annotations.Api;
@@ -17,6 +14,9 @@ import org.slf4j.LoggerFactory;
17 14
 import org.springframework.beans.factory.annotation.Autowired;
18 15
 import org.springframework.web.bind.annotation.*;
19 16
 
17
+import javax.servlet.http.HttpServletResponse;
18
+import java.util.List;
19
+
20 20
 /**
21 21
  * <p>
22 22
     * 通知公告 前端控制器
@@ -44,8 +44,8 @@ public class TaNotificationController extends BaseController {
44 44
      * @return
45 45
      */
46 46
     @RequestMapping(value="/{plat}/notification",method= RequestMethod.GET)
47
-    @ApiOperation(value="列表", notes = "列表", httpMethod = "GET", response = ResponseBean.class)
48
-    public ResponseBean taPvList(@ApiParam(value = "客户端", allowableValues = "wx,admin") @PathVariable String plat,
47
+    @ApiOperation(value="列表", notes = "列表", httpMethod = "GET", response = TaNotification.class)
48
+    public ResponseBean taNotificationList(@ApiParam(value = "客户端", allowableValues = "wx,admin") @PathVariable String plat,
49 49
                                  @ApiParam("页码") @RequestParam(value ="pageNum",defaultValue = "1") Integer pageNum,
50 50
                                  @ApiParam("单页数据量") @RequestParam(value ="pageSize",defaultValue = "10") Integer pageSize,
51 51
                                  @ApiParam(value = "发布状态") @RequestParam(value ="status", required = false) Integer status) throws Exception{
@@ -62,6 +62,22 @@ public class TaNotificationController extends BaseController {
62 62
         return ResponseBean.success(result);
63 63
     }
64 64
 
65
+    /**
66
+     * Tips导出
67
+     * @return
68
+     */
69
+    @RequestMapping(value="/admin/notification/export",method= RequestMethod.GET)
70
+    @ApiOperation(value="Tips导出", notes = "Tips导出", httpMethod = "GET", response = TaNotification.class)
71
+    public void exportNotification(HttpServletResponse response) throws Exception{
72
+        QueryWrapper<TaNotification> queryWrapper = new QueryWrapper<>();
73
+        queryWrapper.gt("status", Constants.STATUS_DELETED);
74
+        queryWrapper.orderByDesc("weight");
75
+        queryWrapper.orderByDesc("create_date");
76
+
77
+        List<TaNotification> result = iTaNotificationService.list(queryWrapper) ;
78
+        ExcelUtils.flush(response, TaNotification.class, result, "Tips列表");
79
+    }
80
+
65 81
     /**
66 82
      * 保存对象
67 83
      * @param taNotification 实体对象

+ 22
- 4
src/main/java/com/yunzhi/shigongli/controller/TaPersonController.java Просмотреть файл

@@ -3,10 +3,7 @@ package com.yunzhi.shigongli.controller;
3 3
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
4 4
 import com.baomidou.mybatisplus.core.metadata.IPage;
5 5
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
6
-import com.yunzhi.shigongli.common.BaseController;
7
-import com.yunzhi.shigongli.common.Constants;
8
-import com.yunzhi.shigongli.common.ResponseBean;
9
-import com.yunzhi.shigongli.common.StringUtils;
6
+import com.yunzhi.shigongli.common.*;
10 7
 import com.yunzhi.shigongli.entity.TaHotelWorker;
11 8
 import com.yunzhi.shigongli.entity.TaPersonRole;
12 9
 import com.yunzhi.shigongli.entity.TaShopWorker;
@@ -25,6 +22,7 @@ import org.springframework.web.bind.annotation.RequestParam;
25 22
 import com.yunzhi.shigongli.entity.TaPerson;
26 23
 import org.springframework.web.bind.annotation.RestController;
27 24
 
25
+import javax.servlet.http.HttpServletResponse;
28 26
 import java.util.ArrayList;
29 27
 import java.util.List;
30 28
 
@@ -82,6 +80,26 @@ public class TaPersonController extends BaseController {
82 80
         return ResponseBean.success(result);
83 81
     }
84 82
 
83
+    /**
84
+     * 用户列表导出
85
+     * @return
86
+     */
87
+    @RequestMapping(value="/admin/taPerson/export",method= RequestMethod.GET)
88
+    @ApiOperation(value="用户列表导出", notes = "用户列表导出", httpMethod = "GET", response = ResponseBean.class)
89
+    public void exportPersonList(@ApiParam("昵称") @RequestParam(value ="nickName", required = false) String nickName,
90
+                                         @ApiParam("手机号") @RequestParam(value ="phone", required = false) String phone,
91
+                                         @ApiParam("用户类型") @RequestParam(value ="personRole", required = false) String personRole,
92
+                                         HttpServletResponse response) throws Exception{
93
+
94
+        QueryWrapper<TaPerson> queryWrapper = new QueryWrapper<>();
95
+        queryWrapper.like(!StringUtils.isEmpty(nickName), "nick_name", "%"+nickName+"%");
96
+        queryWrapper.like(!StringUtils.isEmpty(phone), "phone", "%"+phone+"%");
97
+        queryWrapper.eq(!StringUtils.isEmpty(personRole), "person_role", personRole);
98
+        queryWrapper.orderByDesc("create_date");
99
+
100
+        List<TaPerson> result = iTaPersonService.list(queryWrapper);
101
+        ExcelUtils.flush(response, TaPerson.class, result, "用户列表");
102
+    }
85 103
 
86 104
     /**
87 105
      * 绑定人员身份

+ 22
- 6
src/main/java/com/yunzhi/shigongli/controller/TaRoomController.java Просмотреть файл

@@ -3,10 +3,7 @@ package com.yunzhi.shigongli.controller;
3 3
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
4 4
 import com.baomidou.mybatisplus.core.metadata.IPage;
5 5
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
6
-import com.yunzhi.shigongli.common.BaseController;
7
-import com.yunzhi.shigongli.common.Constants;
8
-import com.yunzhi.shigongli.common.ResponseBean;
9
-import com.yunzhi.shigongli.common.StringUtils;
6
+import com.yunzhi.shigongli.common.*;
10 7
 import com.yunzhi.shigongli.entity.TaPerson;
11 8
 import com.yunzhi.shigongli.entity.TaShopWorker;
12 9
 import com.yunzhi.shigongli.vo.RoomListVO;
@@ -25,6 +22,8 @@ import com.yunzhi.shigongli.service.ITaRoomService;
25 22
 import com.yunzhi.shigongli.entity.TaRoom;
26 23
 import org.springframework.web.bind.annotation.RestController;
27 24
 
25
+import javax.servlet.http.HttpServletResponse;
26
+
28 27
 /**
29 28
  * <p>
30 29
     * 房源 前端控制器
@@ -52,7 +51,7 @@ public class TaRoomController extends BaseController {
52 51
      * @return
53 52
      */
54 53
     @RequestMapping(value="/{plat}/taRoom",method= RequestMethod.GET)
55
-    @ApiOperation(value="列表", notes = "列表", httpMethod = "GET", response = ResponseBean.class)
54
+    @ApiOperation(value="列表", notes = "列表", httpMethod = "GET", response = RoomListVO.class)
56 55
     public ResponseBean taRoomList(@ApiParam(value = "客户端", allowableValues = "wx,admin") @PathVariable String plat,
57 56
                                    @ApiParam("页码") @RequestParam(value ="pageNum",defaultValue = "1") Integer pageNum,
58 57
                                    @ApiParam("单页数据量") @RequestParam(value ="pageSize",defaultValue = "10") Integer pageSize,
@@ -63,11 +62,28 @@ public class TaRoomController extends BaseController {
63 62
             return ResponseBean.error("未找到有效的民宿ID", ResponseBean.ERROR_ILLEGAL_PARAMS);
64 63
         }
65 64
 
66
-        IPage<TaRoom> pg = new Page<>(pageNum, pageSize);
65
+        IPage<RoomListVO> pg = new Page<>(pageNum, pageSize);
67 66
         IPage<RoomListVO> result = iTaRoomService.getPageListBy(pg, plat, hotelId, roomName);
68 67
         return ResponseBean.success(result);
69 68
     }
70 69
 
70
+
71
+
72
+    /**
73
+     * 导出房源列表
74
+     * @return
75
+     */
76
+    @RequestMapping(value="/admin/taRoom/export",method= RequestMethod.GET)
77
+    @ApiOperation(value="导出房源列表", notes = "导出房源列表", httpMethod = "GET", response = RoomListVO.class)
78
+    public void expRoomList(@ApiParam("民宿ID") @RequestParam(value ="hotelId", required = false) String hotelId,
79
+                            @ApiParam("民宿ID") @RequestParam(value ="roomName", required = false) String roomName,
80
+                            HttpServletResponse response) throws Exception{
81
+
82
+        IPage<RoomListVO> result = iTaRoomService.getPageListBy(null, "admin", hotelId, roomName);
83
+
84
+        ExcelUtils.flush(response, RoomListVO.class, result.getRecords(), "房源列表");
85
+    }
86
+
71 87
     /**
72 88
      * 保存对象
73 89
      * @param taRoom 实体对象

+ 56
- 1
src/main/java/com/yunzhi/shigongli/controller/TaShopController.java Просмотреть файл

@@ -68,6 +68,9 @@ public class TaShopController extends BaseController {
68 68
     @Autowired
69 69
     public ITaMiniappQrcodeService iTaMiniappQrcodeService;
70 70
 
71
+    @Autowired
72
+    public ITaShopPackageService iTaShopPackageService;
73
+
71 74
     @Value("${sysBiz.miniapp.shopPage}")
72 75
     public String shopPage;
73 76
 
@@ -78,7 +81,7 @@ public class TaShopController extends BaseController {
78 81
      * @return
79 82
      */
80 83
     @RequestMapping(value="/admin/taShop",method= RequestMethod.GET)
81
-    @ApiOperation(value="列表", notes = "列表", httpMethod = "GET", response = ResponseBean.class)
84
+    @ApiOperation(value="列表", notes = "列表", httpMethod = "GET", response = ShopListVO.class)
82 85
     public ResponseBean taShopList(@ApiParam("页码") @RequestParam(value ="pageNum",defaultValue = "1") Integer pageNum,
83 86
                                    @ApiParam("单页数据量") @RequestParam(value ="pageSize",defaultValue = "10") Integer pageSize,
84 87
                                    @ApiParam("店铺名称") @RequestParam(value = "shopName", required = false) String shopName,
@@ -89,6 +92,20 @@ public class TaShopController extends BaseController {
89 92
             return ResponseBean.success(result);
90 93
     }
91 94
 
95
+    /**
96
+     * 导出商铺列表
97
+     * @return
98
+     */
99
+    @RequestMapping(value="/admin/taShop/export",method= RequestMethod.GET)
100
+    @ApiOperation(value="导出商铺列表", notes = "导出商铺列表", httpMethod = "GET", response = ShopListVO.class)
101
+    public void exportShopList(@ApiParam("店铺名称") @RequestParam(value = "shopName", required = false) String shopName,
102
+                                       @ApiParam("手机号") @RequestParam(value = "phone", required = false) String phone,
103
+                                       HttpServletResponse response) throws Exception{
104
+
105
+        IPage<ShopListVO> result = iTaShopService.getPageListBy(null, shopName, phone);
106
+        ExcelUtils.flush(response, ShopListVO.class, result.getRecords(), "商铺列表");
107
+    }
108
+
92 109
     /**
93 110
      * 保存对象
94 111
      * @param taShop 实体对象
@@ -98,6 +115,10 @@ public class TaShopController extends BaseController {
98 115
     @ApiOperation(value="保存", notes = "保存", httpMethod = "POST", response = ResponseBean.class)
99 116
     public ResponseBean taShopAdd(@ApiParam("保存内容") @RequestBody TaShop taShop) throws Exception {
100 117
 
118
+        if (null == taShop.getStatus()) {
119
+            taShop.setStatus(Constants.STATUS_READY);
120
+        }
121
+
101 122
         try {
102 123
             iTaShopService.createNew(taShop);
103 124
             shopImagesService.updateImages(Constants.TARGET_SHOP, taShop.getShopId(), taShop.getImageList());
@@ -118,6 +139,7 @@ public class TaShopController extends BaseController {
118 139
     public ResponseBean taShopDelete(@ApiParam("对象ID") @PathVariable String id) throws Exception{
119 140
         if(iTaShopService.removeLogicById(id)){
120 141
             taResourceService.removeBy(Constants.TARGET_SHOP, id);
142
+            iTaShopPackageService.removeByShop(id);
121 143
             return ResponseBean.success("success");
122 144
         }else {
123 145
             return ResponseBean.error("删除失败, 请重试", ResponseBean.ERROR_UNAVAILABLE);
@@ -397,4 +419,37 @@ public class TaShopController extends BaseController {
397 419
 
398 420
         return ResponseBean.success(result);
399 421
     }
422
+
423
+
424
+
425
+    /**
426
+     * 商铺推广列表
427
+     * @param shopName
428
+     * @param description
429
+     * @param start
430
+     * @param end
431
+     * @return
432
+     * @throws Exception
433
+     */
434
+    @RequestMapping(value="/admin/taShop/commission/export",method= RequestMethod.GET)
435
+    @ApiOperation(value="商铺推广列表", notes = "商铺推广列表", httpMethod = "GET", response = ResponseBean.class)
436
+    public void exportShopCommissionList(@ApiParam("店铺名称") @RequestParam(value = "shopName", required = false) String shopName,
437
+                                         @ApiParam("套餐名称") @RequestParam(value = "description", required = false) String description,
438
+                                         @ApiParam(value = "开始时间", example = "2021-09-01") @RequestParam(value = "start", required = false) String start,
439
+                                         @ApiParam(value = "结束时间", example = "2021-09-30") @RequestParam(value = "end", required = false) String end,
440
+                                         HttpServletResponse response) throws Exception {
441
+
442
+        LocalDateTime startDate = null;
443
+        LocalDateTime endDate = null;
444
+        if (!StringUtils.isEmpty(start)) {
445
+            startDate = DateUtils.from(start + " 00:00:00", "yyyy-MM-dd HH:mm:ss");
446
+        }
447
+        if (!StringUtils.isEmpty(end)) {
448
+            endDate = DateUtils.from(end + " 23:59:59", "yyyy-MM-dd HH:mm:ss");
449
+        }
450
+
451
+        IPage<ShopCommissionVO> result = iTaShopService.getCommissionList(null, shopName, description, startDate, endDate);
452
+
453
+        ExcelUtils.flush(response, ShopCommissionVO.class, result.getRecords(), "商铺推广收入");
454
+    }
400 455
 }

+ 18
- 1
src/main/java/com/yunzhi/shigongli/controller/TaShopPackageController.java Просмотреть файл

@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
5 5
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
6 6
 import com.yunzhi.shigongli.common.BaseController;
7 7
 import com.yunzhi.shigongli.common.Constants;
8
+import com.yunzhi.shigongli.common.ExcelUtils;
8 9
 import com.yunzhi.shigongli.common.ResponseBean;
9 10
 import com.yunzhi.shigongli.entity.TaExtendContent;
10 11
 import com.yunzhi.shigongli.entity.TaShopPackageSetting;
@@ -26,6 +27,7 @@ import com.yunzhi.shigongli.service.ITaShopPackageService;
26 27
 import com.yunzhi.shigongli.entity.TaShopPackage;
27 28
 import org.springframework.web.bind.annotation.RestController;
28 29
 
30
+import javax.servlet.http.HttpServletResponse;
29 31
 import java.util.List;
30 32
 
31 33
 /**
@@ -55,7 +57,7 @@ public class TaShopPackageController extends BaseController {
55 57
      * @return
56 58
      */
57 59
     @RequestMapping(value="/admin/taShopPackage",method= RequestMethod.GET)
58
-    @ApiOperation(value="列表", notes = "列表", httpMethod = "GET", response = ResponseBean.class)
60
+    @ApiOperation(value="列表", notes = "列表", httpMethod = "GET", response = ShopPackageVO.class)
59 61
     public ResponseBean taShopPackageList(@ApiParam("页码") @RequestParam(value ="pageNum",defaultValue = "1") Integer pageNum,
60 62
                                           @ApiParam("单页数据量") @RequestParam(value ="pageSize",defaultValue = "10") Integer pageSize,
61 63
                                           @ApiParam("商铺") @RequestParam(value ="shopId", required = false) String shopId,
@@ -66,6 +68,21 @@ public class TaShopPackageController extends BaseController {
66 68
         return ResponseBean.success(result);
67 69
     }
68 70
 
71
+    /**
72
+     * 导出商铺套餐列表
73
+     * @return
74
+     */
75
+    @RequestMapping(value="/admin/taShopPackage/export",method= RequestMethod.GET)
76
+    @ApiOperation(value="导出商铺套餐列表", notes = "导出商铺套餐列表", httpMethod = "GET", response = ShopPackageVO.class)
77
+    public void exportShopPackageList(@ApiParam("商铺") @RequestParam(value ="shopId", required = false) String shopId,
78
+                                              @ApiParam("套餐名称") @RequestParam(value = "description", required = false) String description,
79
+                                              HttpServletResponse response) throws Exception{
80
+
81
+        IPage<ShopPackageVO> result = iTaShopPackageService.getProfilePage(null, shopId, description);
82
+
83
+        ExcelUtils.flush(response, ShopPackageVO.class, result.getRecords(), "商铺套餐列表");
84
+    }
85
+
69 86
     /**
70 87
      * 保存对象
71 88
      * @param shopPackageVO 实体对象

+ 21
- 0
src/main/java/com/yunzhi/shigongli/controller/TaTouristController.java Просмотреть файл

@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
5 5
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
6 6
 import com.yunzhi.shigongli.common.BaseController;
7 7
 import com.yunzhi.shigongli.common.Constants;
8
+import com.yunzhi.shigongli.common.ExcelUtils;
8 9
 import com.yunzhi.shigongli.common.ResponseBean;
9 10
 import com.yunzhi.shigongli.entity.TaLike;
10 11
 import com.yunzhi.shigongli.entity.TaResource;
@@ -26,6 +27,8 @@ import org.springframework.web.bind.annotation.RequestParam;
26 27
 import com.yunzhi.shigongli.entity.TaTourist;
27 28
 import org.springframework.web.bind.annotation.RestController;
28 29
 
30
+import javax.servlet.http.HttpServletResponse;
31
+
29 32
 /**
30 33
  * <p>
31 34
     * 旅游景点 前端控制器
@@ -83,6 +86,24 @@ public class TaTouristController extends BaseController {
83 86
         return ResponseBean.success(result);
84 87
     }
85 88
 
89
+    /**
90
+     * 导出景点列表
91
+     * @return
92
+     */
93
+    @RequestMapping(value="/admin/taTourist/export",method= RequestMethod.GET)
94
+    @ApiOperation(value="导出景点列表", notes = "导出景点列表", httpMethod = "GET", response = ResponseBean.class)
95
+    public void exportTouristList(@ApiParam("景点名称") @RequestParam(value ="touristName", required = false) String touristName,
96
+                                          @ApiParam("区位") @RequestParam(value ="areaId", required = false) String areaId,
97
+                                          HttpServletResponse response) throws Exception{
98
+
99
+        QueryWrapper<TaTourist> queryWrapper = new QueryWrapper<>();
100
+        queryWrapper.orderByDesc("weight");
101
+        queryWrapper.orderByDesc("create_date");
102
+
103
+        IPage<TaTourist> result = iTaTouristService.getPagedBy(null, touristName, areaId);
104
+        ExcelUtils.flush(response, TaTourist.class, result.getRecords(), "景点列表");
105
+    }
106
+
86 107
     /**
87 108
      * 保存对象
88 109
      * @param taTourist 实体对象

+ 19
- 1
src/main/java/com/yunzhi/shigongli/entity/TaFeedback.java Просмотреть файл

@@ -1,10 +1,15 @@
1 1
 package com.yunzhi.shigongli.entity;
2 2
 
3
+import com.alibaba.excel.annotation.ExcelIgnore;
4
+import com.alibaba.excel.annotation.ExcelProperty;
5
+import com.alibaba.excel.annotation.write.style.ColumnWidth;
3 6
 import com.baomidou.mybatisplus.annotation.IdType;
4 7
 import com.baomidou.mybatisplus.annotation.TableField;
5 8
 import com.baomidou.mybatisplus.annotation.TableId;
6 9
 import java.time.LocalDateTime;
7 10
 import java.io.Serializable;
11
+
12
+import com.yunzhi.shigongli.common.excelConverter.LocalDateTimeConverter;
8 13
 import io.swagger.annotations.ApiModel;
9 14
 import io.swagger.annotations.ApiModelProperty;
10 15
 import lombok.Data;
@@ -25,36 +30,49 @@ import lombok.experimental.Accessors;
25 30
 @ApiModel(value="TaFeedback对象", description="意见反馈")
26 31
 public class TaFeedback implements Serializable {
27 32
 
33
+    @ExcelIgnore
28 34
     private static final long serialVersionUID = 1L;
29 35
 
36
+    @ExcelProperty(value = "序号", index = 0)
30 37
     @ApiModelProperty(value = "反馈ID")
31 38
     @TableId(value = "feedback_id", type = IdType.AUTO)
32 39
     private Integer feedbackId;
33 40
 
41
+    @ExcelProperty(value = "反馈内容", index = 3)
42
+    @ColumnWidth(40)
34 43
     @ApiModelProperty(value = "反馈内容")
35 44
     private String content;
36 45
 
46
+    @ExcelIgnore
37 47
     @ApiModelProperty(value = "反馈人")
38 48
     private String personId;
39 49
 
50
+    @ExcelProperty(value = "反馈人", index = 1)
51
+    @ColumnWidth(20)
40 52
     @ApiModelProperty(value = "反馈人昵称")
41 53
     @TableField(exist = false)
42 54
     private String nickName;
43 55
 
56
+    @ExcelProperty(value = "反馈时间", converter = LocalDateTimeConverter.class, index = 4)
57
+    @ColumnWidth(30)
44 58
     @ApiModelProperty(value = "时间")
45 59
     private LocalDateTime createDate;
46 60
 
61
+    @ExcelIgnore
47 62
     @ApiModelProperty(value = "是否已读")
48 63
     private Boolean isReaded;
49 64
 
65
+    @ExcelIgnore
50 66
     @ApiModelProperty(value = "读取时间")
51 67
     private LocalDateTime readDate;
52 68
 
69
+    @ExcelProperty(value = "手机号", index = 2)
70
+    @ColumnWidth(20)
53 71
     @ApiModelProperty(value = "手机号码")
54 72
     @TableField(exist = false)
55 73
     private String phone;
56 74
 
57
-
75
+    @ExcelIgnore
58 76
     @ApiModelProperty(value = "反馈人详情")
59 77
     @TableField(exist = false)
60 78
     private TaPerson taPerson;

+ 13
- 0
src/main/java/com/yunzhi/shigongli/entity/TaHotWord.java Просмотреть файл

@@ -1,7 +1,11 @@
1 1
 package com.yunzhi.shigongli.entity;
2 2
 
3
+import com.alibaba.excel.annotation.ExcelIgnore;
4
+import com.alibaba.excel.annotation.ExcelProperty;
5
+import com.alibaba.excel.annotation.write.style.ColumnWidth;
3 6
 import com.baomidou.mybatisplus.annotation.IdType;
4 7
 import com.baomidou.mybatisplus.annotation.TableId;
8
+import com.yunzhi.shigongli.common.excelConverter.LocalDateTimeConverter;
5 9
 import io.swagger.annotations.ApiModel;
6 10
 import io.swagger.annotations.ApiModelProperty;
7 11
 import lombok.Data;
@@ -25,24 +29,33 @@ import java.time.LocalDateTime;
25 29
 @ApiModel(value="TaHotWord对象", description="热词")
26 30
 public class TaHotWord implements Serializable {
27 31
 
32
+    @ExcelIgnore
28 33
     private static final long serialVersionUID = 1L;
29 34
 
35
+    @ExcelIgnore
30 36
     @ApiModelProperty(value = "热词ID")
31 37
     @TableId(value = "word_id", type = IdType.UUID)
32 38
     private String wordId;
33 39
 
40
+    @ExcelProperty(value = "热词", index = 0)
34 41
     @ApiModelProperty(value = "热词")
35 42
     private String word;
36 43
 
44
+    @ExcelProperty(value = "搜索次数", index = 1)
45
+    @ColumnWidth(20)
37 46
     @ApiModelProperty(value = "搜索次数")
38 47
     private Integer searchNum;
39 48
 
49
+    @ExcelProperty(value = "权重", index = 2)
40 50
     @ApiModelProperty(value = "权重")
41 51
     private Integer weight;
42 52
 
53
+    @ExcelIgnore
43 54
     @ApiModelProperty(value = "状态")
44 55
     private Integer status;
45 56
 
57
+    @ExcelProperty(value = "操作时间", converter = LocalDateTimeConverter.class, index = 3)
58
+    @ColumnWidth(30)
46 59
     @ApiModelProperty(value = "访问时间")
47 60
     private LocalDateTime createDate;
48 61
 

+ 14
- 1
src/main/java/com/yunzhi/shigongli/entity/TaNotification.java Просмотреть файл

@@ -1,8 +1,12 @@
1 1
 package com.yunzhi.shigongli.entity;
2 2
 
3
+import com.alibaba.excel.annotation.ExcelIgnore;
4
+import com.alibaba.excel.annotation.ExcelProperty;
5
+import com.alibaba.excel.annotation.write.style.ColumnWidth;
3 6
 import com.baomidou.mybatisplus.annotation.IdType;
4 7
 import com.baomidou.mybatisplus.annotation.TableField;
5 8
 import com.baomidou.mybatisplus.annotation.TableId;
9
+import com.yunzhi.shigongli.common.excelConverter.LocalDateTimeConverter;
6 10
 import io.swagger.annotations.ApiModel;
7 11
 import io.swagger.annotations.ApiModelProperty;
8 12
 import lombok.Data;
@@ -25,29 +29,38 @@ import java.time.LocalDateTime;
25 29
 @Accessors(chain = true)
26 30
 @ApiModel(value="TaNotification对象", description="通知公告")
27 31
 public class TaNotification implements Serializable {
28
-
32
+    @ExcelIgnore
29 33
     private static final long serialVersionUID = 1L;
30 34
 
35
+    @ExcelIgnore
31 36
     @ApiModelProperty(value = "搜索ID")
32 37
     @TableId(value = "notice_id", type = IdType.UUID)
33 38
     private String noticeId;
34 39
 
40
+    @ExcelIgnore
35 41
     @ApiModelProperty(value = "发布人")
36 42
     private String createPerson;
37 43
 
44
+    @ExcelProperty(value = "创建时间", converter = LocalDateTimeConverter.class, index = 1)
45
+    @ColumnWidth(30)
38 46
     @ApiModelProperty(value = "发布时间")
39 47
     private LocalDateTime createDate;
40 48
 
49
+    @ExcelIgnore
41 50
     @ApiModelProperty(value = "通知类型")
42 51
     private String noticeType;
43 52
 
53
+    @ExcelProperty(value = "Tips", index = 0)
54
+    @ColumnWidth(100)
44 55
     @ApiModelProperty(value = "通知内容")
45 56
     private String content;
46 57
 
58
+    @ExcelIgnore
47 59
     @ApiModelProperty(value = "状态")
48 60
     @TableField("`status`")
49 61
     private Integer status;
50 62
 
63
+    @ExcelIgnore
51 64
     @ApiModelProperty(value = "权重")
52 65
     private Integer weight;
53 66
 }

+ 25
- 0
src/main/java/com/yunzhi/shigongli/entity/TaPerson.java Просмотреть файл

@@ -1,9 +1,16 @@
1 1
 package com.yunzhi.shigongli.entity;
2 2
 
3
+import com.alibaba.excel.annotation.ExcelIgnore;
4
+import com.alibaba.excel.annotation.ExcelProperty;
5
+import com.alibaba.excel.annotation.write.style.ColumnWidth;
3 6
 import com.baomidou.mybatisplus.annotation.IdType;
4 7
 import java.time.LocalDateTime;
5 8
 import com.baomidou.mybatisplus.annotation.TableId;
6 9
 import java.io.Serializable;
10
+
11
+import com.yunzhi.shigongli.common.excelConverter.LocalDateTimeConverter;
12
+import com.yunzhi.shigongli.common.excelConverter.PersonRoleConverter;
13
+import com.yunzhi.shigongli.common.excelConverter.RecommendTypeConverter;
7 14
 import io.swagger.annotations.ApiModel;
8 15
 import io.swagger.annotations.ApiModelProperty;
9 16
 import lombok.Data;
@@ -24,42 +31,60 @@ import lombok.experimental.Accessors;
24 31
 @ApiModel(value="TaPerson对象", description="小程序人员表")
25 32
 public class TaPerson implements Serializable {
26 33
 
34
+    @ExcelIgnore
27 35
     private static final long serialVersionUID = 1L;
28 36
 
37
+    @ExcelIgnore
29 38
     @ApiModelProperty(value = "人员ID")
30 39
     @TableId(value = "person_id", type = IdType.UUID)
31 40
     private String personId;
32 41
 
42
+    @ExcelIgnore
33 43
     @ApiModelProperty(value = "openid")
34 44
     private String openid;
35 45
 
46
+    @ExcelIgnore
36 47
     @ApiModelProperty(value = "unionid")
37 48
     private String unionid;
38 49
 
50
+    @ExcelIgnore
39 51
     @ApiModelProperty(value = "性别")
40 52
     private Integer sex;
41 53
 
54
+    @ExcelProperty(value = "用户昵称", index = 0)
55
+    @ColumnWidth(20)
42 56
     @ApiModelProperty(value = "昵称")
43 57
     private String nickName;
44 58
 
59
+    @ExcelIgnore
45 60
     @ApiModelProperty(value = "头像")
46 61
     private String avatar;
47 62
 
63
+    @ExcelProperty(value = "手机号码", index = 1)
64
+    @ColumnWidth(20)
48 65
     @ApiModelProperty(value = "手机")
49 66
     private String phone;
50 67
 
68
+    @ExcelProperty(value = "用户类型", converter = PersonRoleConverter.class, index = 2)
69
+    @ColumnWidth(20)
51 70
     @ApiModelProperty(value = "当前角色")
52 71
     private String personRole;
53 72
 
73
+    @ExcelIgnore
54 74
     @ApiModelProperty(value = "状态")
55 75
     private Integer status;
56 76
 
77
+    @ExcelProperty(value = "注册时间", converter = LocalDateTimeConverter.class, index = 4)
78
+    @ColumnWidth(30)
57 79
     @ApiModelProperty(value = "创建时间")
58 80
     private LocalDateTime createDate;
59 81
 
82
+    @ExcelProperty(value = "用户来源", converter = RecommendTypeConverter.class, index = 3)
83
+    @ColumnWidth(20)
60 84
     @ApiModelProperty(value = "来源类型")
61 85
     private String fromType;
62 86
 
87
+    @ExcelIgnore
63 88
     @ApiModelProperty(value = "推广ID")
64 89
     private String recommender;
65 90
 

+ 36
- 1
src/main/java/com/yunzhi/shigongli/entity/TaTourist.java Просмотреть файл

@@ -1,5 +1,8 @@
1 1
 package com.yunzhi.shigongli.entity;
2 2
 
3
+import com.alibaba.excel.annotation.ExcelIgnore;
4
+import com.alibaba.excel.annotation.ExcelProperty;
5
+import com.alibaba.excel.annotation.write.style.ColumnWidth;
3 6
 import com.baomidou.mybatisplus.annotation.IdType;
4 7
 import java.time.LocalDateTime;
5 8
 
@@ -28,87 +31,119 @@ import lombok.experimental.Accessors;
28 31
 @ApiModel(value="TaTourist对象", description="旅游景点")
29 32
 public class TaTourist implements Serializable {
30 33
 
34
+    @ExcelIgnore
31 35
     private static final long serialVersionUID = 1L;
32 36
 
37
+    @ExcelIgnore
33 38
     @ApiModelProperty(value = "景区ID")
34 39
     @TableId(value = "tourist_id", type = IdType.UUID)
35 40
     private String touristId;
36 41
 
42
+    @ExcelProperty(value = "景点名称", index = 0)
43
+    @ColumnWidth(30)
37 44
     @ApiModelProperty(value = "景区名称")
38 45
     private String touristName;
39 46
 
47
+    @ExcelIgnore
40 48
     @ApiModelProperty(value = "宣传文案")
41 49
     private String title;
42 50
 
43
-    @ApiModelProperty(value = "简介")
51
+    @ExcelProperty(value = "景点简介", index = 1)
52
+    @ColumnWidth(30)
53
+    @ApiModelProperty(value = "景点简介")
44 54
     private String description;
45 55
 
56
+    @ExcelIgnore
46 57
     @ApiModelProperty(value = "主图")
47 58
     private String poster;
48 59
 
60
+    @ExcelIgnore
49 61
     @ApiModelProperty(value = "人均消费")
50 62
     private Integer averagePrice;
51 63
 
64
+    @ExcelIgnore
52 65
     @ApiModelProperty(value = "logo")
53 66
     private String logo;
54 67
 
68
+    @ExcelIgnore
55 69
     @ApiModelProperty(value = "所属区")
56 70
     private String cityId;
57 71
 
72
+    @ExcelIgnore
58 73
     @ApiModelProperty(value = "定位")
59 74
     private String locaton;
60 75
 
76
+    @ExcelIgnore
61 77
     @ApiModelProperty(value = "地址")
62 78
     private String address;
63 79
 
80
+    @ExcelProperty(value = "权重", index = 4)
81
+    @ColumnWidth(20)
64 82
     @ApiModelProperty(value = "权重")
65 83
     private Integer weight;
66 84
 
85
+
86
+    @ExcelProperty(value = "推荐等级", index = 5)
87
+    @ColumnWidth(20)
67 88
     @ApiModelProperty(value = "推荐等级")
68 89
     private String strategyLevel;
69 90
 
91
+    @ExcelIgnore
70 92
     @ApiModelProperty(value = "状态")
71 93
     private Integer status;
72 94
 
95
+    @ExcelIgnore
73 96
     @ApiModelProperty(value = "创建时间")
74 97
     private LocalDateTime createDate;
75 98
 
99
+    @ExcelIgnore
76 100
     @ApiModelProperty(value = "收藏数")
77 101
     @TableField(exist = false)
78 102
     private Integer saveNum;
79 103
 
104
+    @ExcelIgnore
80 105
     @ApiModelProperty(value = "点赞数")
81 106
     @TableField(exist = false)
82 107
     private Integer likeNum;
83 108
 
109
+    @ExcelProperty(value = "浏览次数", index = 3)
110
+    @ColumnWidth(20)
84 111
     @ApiModelProperty(value = "浏览量")
85 112
     @TableField(exist = false)
86 113
     private Integer pvNum;
87 114
 
115
+    @ExcelIgnore
88 116
     @ApiModelProperty(value = "用户数")
89 117
     @TableField(exist = false)
90 118
     private Integer uvNum;
91 119
 
120
+    @ExcelProperty(value = "区位", index = 2)
121
+    @ColumnWidth(20)
92 122
     @ApiModelProperty(value = "所属区位名称")
93 123
     @TableField(exist = false)
94 124
     private String areaName;
95 125
 
126
+    @ExcelIgnore
96 127
     @ApiModelProperty(value = "图片列表")
97 128
     @TableField(exist = false)
98 129
     private List<TaImage> imageList;
99 130
 
131
+    @ExcelIgnore
100 132
     @ApiModelProperty(value = "分类标签")
101 133
     @TableField(exist = false)
102 134
     private List<TaTargetType> typeList;
103 135
 
136
+    @ExcelIgnore
104 137
     @ApiModelProperty(value = "是否收藏")
105 138
     @TableField(exist = false)
106 139
     private Integer isSaved;
107 140
 
141
+    @ExcelIgnore
108 142
     @ApiModelProperty(value = "是否点赞")
109 143
     @TableField(exist = false)
110 144
     private Integer isLike;
111 145
 
146
+    @ExcelIgnore
112 147
     @ApiModelProperty(value = "距离")
113 148
     @TableField(exist = false)
114 149
     private Integer distance;

+ 3
- 0
src/main/java/com/yunzhi/shigongli/mapper/TaFeedbackMapper.java Просмотреть файл

@@ -7,6 +7,7 @@ import org.apache.ibatis.annotations.Mapper;
7 7
 import org.apache.ibatis.annotations.Param;
8 8
 
9 9
 import java.time.LocalDateTime;
10
+import java.util.List;
10 11
 
11 12
 /**
12 13
  * <p>
@@ -22,4 +23,6 @@ public interface TaFeedbackMapper extends BaseMapper<TaFeedback> {
22 23
     TaFeedback getProfileById(Integer id);
23 24
 
24 25
     IPage<TaFeedback> getProfilePage(IPage<TaFeedback> pg, @Param("startDate") LocalDateTime startDate, @Param("endDate") LocalDateTime endDate);
26
+
27
+    List<TaFeedback> getProfileList(@Param("startDate") LocalDateTime startDate, @Param("endDate") LocalDateTime endDate);
25 28
 }

+ 3
- 1
src/main/java/com/yunzhi/shigongli/mapper/TaHotelMapper.java Просмотреть файл

@@ -22,7 +22,9 @@ import java.util.List;
22 22
 @Mapper
23 23
 public interface TaHotelMapper extends BaseMapper<TaHotel> {
24 24
 
25
-    IPage<HotelListVO> getVOListBy(IPage<TaHotel> pg, @Param("hotelName") String hotelName);
25
+    IPage<HotelListVO> getVOPageBy(IPage<HotelListVO> pg, @Param("hotelName") String hotelName);
26
+
27
+    List<HotelListVO> getVOListBy(@Param("hotelName") String hotelName);
26 28
 
27 29
     List<TaHotel> getListByPerson(@Param("personId") String personId);
28 30
 

+ 3
- 1
src/main/java/com/yunzhi/shigongli/mapper/TaRoomMapper.java Просмотреть файл

@@ -22,7 +22,9 @@ import java.util.List;
22 22
 @Mapper
23 23
 public interface TaRoomMapper extends BaseMapper<TaRoom> {
24 24
 
25
-    IPage<RoomListVO> getPageListBy(IPage<TaRoom> pg, @Param("plat") String plat, @Param("hotelId") String hotelId, @Param("roomName") String roomName);
25
+    IPage<RoomListVO> getPageListBy(IPage<RoomListVO> pg, @Param("plat") String plat, @Param("hotelId") String hotelId, @Param("roomName") String roomName);
26 26
 
27 27
     List<TaHotelWorker> getRoomOwners(@Param("roomId") String roomId, @Param("personId") String personId);
28
+
29
+    List<RoomListVO> getPureListBy(@Param("plat") String plat, @Param("hotelId") String hotelId, @Param("roomName") String roomName);
28 30
 }

+ 8
- 1
src/main/java/com/yunzhi/shigongli/mapper/TaShopAccountLogMapper.java Просмотреть файл

@@ -9,6 +9,7 @@ import org.apache.ibatis.annotations.Mapper;
9 9
 import org.apache.ibatis.annotations.Param;
10 10
 
11 11
 import java.time.LocalDateTime;
12
+import java.util.List;
12 13
 
13 14
 /**
14 15
  * <p>
@@ -26,10 +27,16 @@ public interface TaShopAccountLogMapper extends BaseMapper<TaShopAccountLog> {
26 27
                             @Param("start") LocalDateTime start,
27 28
                             @Param("end") LocalDateTime end);
28 29
 
29
-    IPage<ShopCommissionVO> getShopAccountList(IPage<ShopCommissionVO> pg,
30
+    IPage<ShopCommissionVO> getShopAccountPage(IPage<ShopCommissionVO> pg,
30 31
                                           @Param("amountType") String amountType,
31 32
                                           @Param("shopName") String shopName,
32 33
                                           @Param("description") String description,
33 34
                                           @Param("startDate") LocalDateTime startDate,
34 35
                                           @Param("endDate") LocalDateTime endDate);
36
+
37
+    List<ShopCommissionVO> getShopAccountList(@Param("amountType") String amountType,
38
+                                              @Param("shopName") String shopName,
39
+                                              @Param("description") String description,
40
+                                              @Param("startDate") LocalDateTime startDate,
41
+                                              @Param("endDate") LocalDateTime endDate);
35 42
 }

+ 2
- 0
src/main/java/com/yunzhi/shigongli/mapper/TaShopMapper.java Просмотреть файл

@@ -35,4 +35,6 @@ public interface TaShopMapper extends BaseMapper<TaShop> {
35 35
                         @Param("id") String id,
36 36
                         @Param("personId") String personId,
37 37
                         @Param("location") String location);
38
+
39
+    List<ShopListVO> getListBy(@Param("shopName") String shopName, @Param("phone") String phone);
38 40
 }

+ 5
- 0
src/main/java/com/yunzhi/shigongli/mapper/TaShopPackageMapper.java Просмотреть файл

@@ -34,4 +34,9 @@ public interface TaShopPackageMapper extends BaseMapper<TaShopPackage> {
34 34
                                                   @Param("location") String location,
35 35
                                                   @Param("personId") String personId,
36 36
                                                   @Param("limit") Integer limit);
37
+
38
+    int removeByShop(@Param("shopId") String shopId);
39
+
40
+    List<ShopPackageVO> getProfileList(@Param("shopId") String shopId,
41
+                                       @Param("description") String description);
37 42
 }

+ 4
- 0
src/main/java/com/yunzhi/shigongli/mapper/TaTouristMapper.java Просмотреть файл

@@ -6,6 +6,8 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
6 6
 import org.apache.ibatis.annotations.Mapper;
7 7
 import org.apache.ibatis.annotations.Param;
8 8
 
9
+import java.util.List;
10
+
9 11
 /**
10 12
  * <p>
11 13
  * 旅游景点 Mapper 接口
@@ -20,4 +22,6 @@ public interface TaTouristMapper extends BaseMapper<TaTourist> {
20 22
     IPage<TaTourist> getPagedBy(IPage<TaTourist> pg, @Param("targetTourist") String targetTourist, @Param("touristName") String touristName, @Param("cityId") String cityId);
21 23
 
22 24
     TaTourist getProfileBy(@Param("targetTourist") String targetTourist, @Param("id") String id, @Param("personId") String personId, @Param("location") String location);
25
+
26
+    List<TaTourist> getListBy(@Param("targetTourist") String targetTourist, @Param("touristName") String touristName, @Param("cityId") String cityId);
23 27
 }

+ 1
- 1
src/main/java/com/yunzhi/shigongli/service/ITaHotelService.java Просмотреть файл

@@ -23,7 +23,7 @@ public interface ITaHotelService extends IBaseService<TaHotel> {
23 23
 
24 24
     boolean createNew(TaHotel taHotel) throws Exception;
25 25
 
26
-    IPage<HotelListVO> getVOListBy(IPage<TaHotel> pg, String hotelName);
26
+    IPage<HotelListVO> getVOListBy(IPage<HotelListVO> pg, String hotelName);
27 27
 
28 28
     List<TaHotel> getListByPerson(TaPerson taPerson);
29 29
 

+ 1
- 1
src/main/java/com/yunzhi/shigongli/service/ITaRoomService.java Просмотреть файл

@@ -15,7 +15,7 @@ import com.yunzhi.shigongli.vo.RoomListVO;
15 15
  */
16 16
 public interface ITaRoomService extends IBaseService<TaRoom> {
17 17
 
18
-    IPage<RoomListVO> getPageListBy(IPage<TaRoom> pg, String plat, String hotelId, String roomName);
18
+    IPage<RoomListVO> getPageListBy(IPage<RoomListVO> pg, String plat, String hotelId, String roomName);
19 19
 
20 20
     boolean getIsExistKeeper(String roomId, String personId);
21 21
 }

+ 2
- 0
src/main/java/com/yunzhi/shigongli/service/ITaShopPackageService.java Просмотреть файл

@@ -30,4 +30,6 @@ public interface ITaShopPackageService extends IBaseService<TaShopPackage> {
30 30
     IPage<TaShopPackage> getWxPackageList(IPage<TaShopPackage> page, String shopId, TaPerson currentPerson);
31 31
 
32 32
     List<ShopPackageRecommend> getWxRecommendList(String location, TaPerson taPerson) throws Exception ;
33
+
34
+    boolean removeByShop(String id);
33 35
 }

+ 10
- 1
src/main/java/com/yunzhi/shigongli/service/impl/TaFeedbackServiceImpl.java Просмотреть файл

@@ -1,6 +1,7 @@
1 1
 package com.yunzhi.shigongli.service.impl;
2 2
 
3 3
 import com.baomidou.mybatisplus.core.metadata.IPage;
4
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
4 5
 import com.yunzhi.shigongli.entity.TaFeedback;
5 6
 import com.yunzhi.shigongli.mapper.TaFeedbackMapper;
6 7
 import com.yunzhi.shigongli.service.ITaFeedbackService;
@@ -8,6 +9,7 @@ import com.yunzhi.shigongli.service.ITaFeedbackService;
8 9
 import org.springframework.stereotype.Service;
9 10
 
10 11
 import java.time.LocalDateTime;
12
+import java.util.List;
11 13
 
12 14
 /**
13 15
  * <p>
@@ -27,6 +29,13 @@ public class TaFeedbackServiceImpl extends BaseServiceImpl<TaFeedbackMapper, TaF
27 29
 
28 30
     @Override
29 31
     public IPage<TaFeedback> getProfilePage(IPage<TaFeedback> pg, LocalDateTime startDate, LocalDateTime endDate) {
30
-        return baseMapper.getProfilePage(pg, startDate, endDate);
32
+        if (null != pg) {
33
+            return baseMapper.getProfilePage(pg, startDate, endDate);
34
+        } else {
35
+            IPage<TaFeedback> result = new Page<>();
36
+            List<TaFeedback> list = baseMapper.getProfileList(startDate, endDate);
37
+            result.setRecords(list);
38
+            return result;
39
+        }
31 40
     }
32 41
 }

+ 10
- 2
src/main/java/com/yunzhi/shigongli/service/impl/TaHotelServiceImpl.java Просмотреть файл

@@ -59,8 +59,16 @@ public class TaHotelServiceImpl extends BaseServiceImpl<TaHotelMapper, TaHotel>
59 59
     }
60 60
 
61 61
     @Override
62
-    public IPage<HotelListVO> getVOListBy(IPage<TaHotel> pg, String hotelName) {
63
-        return hotelMapper.getVOListBy(pg, hotelName);
62
+    public IPage<HotelListVO> getVOListBy(IPage<HotelListVO> pg, String hotelName) {
63
+        if (null != pg) {
64
+            return hotelMapper.getVOPageBy(pg, hotelName);
65
+        } else {
66
+            List<HotelListVO> list = baseMapper.getVOListBy(hotelName);
67
+            IPage<HotelListVO> result = new Page<>();
68
+            result.setRecords(list);
69
+            return result;
70
+        }
71
+
64 72
     }
65 73
 
66 74
     @Override

+ 10
- 2
src/main/java/com/yunzhi/shigongli/service/impl/TaRoomServiceImpl.java Просмотреть файл

@@ -1,6 +1,7 @@
1 1
 package com.yunzhi.shigongli.service.impl;
2 2
 
3 3
 import com.baomidou.mybatisplus.core.metadata.IPage;
4
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
4 5
 import com.yunzhi.shigongli.entity.TaHotelWorker;
5 6
 import com.yunzhi.shigongli.entity.TaRoom;
6 7
 import com.yunzhi.shigongli.entity.TaShopWorker;
@@ -28,8 +29,15 @@ public class TaRoomServiceImpl extends BaseServiceImpl<TaRoomMapper, TaRoom> imp
28 29
     TaRoomMapper taRoomMapper;
29 30
 
30 31
     @Override
31
-    public IPage<RoomListVO> getPageListBy(IPage<TaRoom> pg, String plat, String hotelId, String roomName) {
32
-        return taRoomMapper.getPageListBy(pg, plat, hotelId, roomName);
32
+    public IPage<RoomListVO> getPageListBy(IPage<RoomListVO> pg, String plat, String hotelId, String roomName) {
33
+        if (null != pg) {
34
+            return taRoomMapper.getPageListBy(pg, plat, hotelId, roomName);
35
+        } else {
36
+            IPage<RoomListVO> result = new Page<>();
37
+            List<RoomListVO> list = baseMapper.getPureListBy(plat, hotelId, roomName);
38
+            result.setRecords(list);
39
+            return result;
40
+        }
33 41
     }
34 42
 
35 43
     @Override

+ 16
- 1
src/main/java/com/yunzhi/shigongli/service/impl/TaShopPackageServiceImpl.java Просмотреть файл

@@ -2,6 +2,7 @@ package com.yunzhi.shigongli.service.impl;
2 2
 
3 3
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
4 4
 import com.baomidou.mybatisplus.core.metadata.IPage;
5
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
5 6
 import com.yunzhi.shigongli.common.Constants;
6 7
 import com.yunzhi.shigongli.entity.TaPerson;
7 8
 import com.yunzhi.shigongli.entity.TaShopPackage;
@@ -143,7 +144,15 @@ public class TaShopPackageServiceImpl extends BaseServiceImpl<TaShopPackageMappe
143 144
 
144 145
     @Override
145 146
     public IPage<ShopPackageVO> getProfilePage(IPage<TaShopPackage> pg, String shopId, String description) {
146
-        return baseMapper.getProfilePage(pg, shopId, description);
147
+        if (null != pg) {
148
+            return baseMapper.getProfilePage(pg, shopId, description);
149
+        } else {
150
+            IPage<ShopPackageVO> result = new Page<>();
151
+            List <ShopPackageVO> list = baseMapper.getProfileList(shopId, description);
152
+            result.setRecords(list);
153
+            return result;
154
+        }
155
+
147 156
     }
148 157
 
149 158
     @Override
@@ -157,4 +166,10 @@ public class TaShopPackageServiceImpl extends BaseServiceImpl<TaShopPackageMappe
157 166
         Integer limit = 3;
158 167
         return baseMapper.getWxRecommendList(Constants.TARGET_SHOP_PACKAGE, location, taPerson.getPersonId(), limit);
159 168
     }
169
+
170
+    @Override
171
+    public boolean removeByShop(String id) {
172
+        baseMapper.removeByShop(id);
173
+        return true;
174
+    }
160 175
 }

+ 17
- 2
src/main/java/com/yunzhi/shigongli/service/impl/TaShopServiceImpl.java Просмотреть файл

@@ -57,7 +57,14 @@ public class TaShopServiceImpl extends BaseServiceImpl<TaShopMapper, TaShop> imp
57 57
 
58 58
     @Override
59 59
     public IPage<ShopListVO> getPageListBy(IPage<ShopListVO> pg, String shopName, String phone) {
60
-        return taShopMapper.getPageListBy(pg, shopName, phone);
60
+        if (null != pg) {
61
+            return taShopMapper.getPageListBy(pg, shopName, phone);
62
+        } else {
63
+            IPage<ShopListVO> result = new Page<>();
64
+            List<ShopListVO> list = baseMapper.getListBy(shopName, phone);
65
+            result.setRecords(list);
66
+            return result;
67
+        }
61 68
     }
62 69
 
63 70
     @Transactional(rollbackFor = Exception.class)
@@ -142,7 +149,15 @@ public class TaShopServiceImpl extends BaseServiceImpl<TaShopMapper, TaShop> imp
142 149
 
143 150
     @Override
144 151
     public IPage<ShopCommissionVO> getCommissionList(IPage<ShopCommissionVO> pg, String shopName, String description, LocalDateTime startDate, LocalDateTime endDate) {
145
-        return shopAccountLogMapper.getShopAccountList(pg, Constants.ACCOUNT_COMMISSION, shopName, description, startDate, endDate);
152
+        if (null != pg) {
153
+            return shopAccountLogMapper.getShopAccountPage(pg, Constants.ACCOUNT_COMMISSION, shopName, description, startDate, endDate);
154
+        } else {
155
+            IPage<ShopCommissionVO> result = new Page<>();
156
+            List<ShopCommissionVO> list = shopAccountLogMapper.getShopAccountList(Constants.ACCOUNT_COMMISSION, shopName, description, startDate, endDate);
157
+            result.setRecords(list);
158
+            return result;
159
+        }
160
+
146 161
     }
147 162
 
148 163
     @Override

+ 11
- 1
src/main/java/com/yunzhi/shigongli/service/impl/TaTouristServiceImpl.java Просмотреть файл

@@ -1,6 +1,7 @@
1 1
 package com.yunzhi.shigongli.service.impl;
2 2
 
3 3
 import com.baomidou.mybatisplus.core.metadata.IPage;
4
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
4 5
 import com.yunzhi.shigongli.common.Constants;
5 6
 import com.yunzhi.shigongli.common.StringUtils;
6 7
 import com.yunzhi.shigongli.entity.*;
@@ -16,6 +17,8 @@ import org.springframework.beans.factory.annotation.Autowired;
16 17
 import org.springframework.stereotype.Service;
17 18
 import org.springframework.transaction.annotation.Transactional;
18 19
 
20
+import java.util.List;
21
+
19 22
 /**
20 23
  * <p>
21 24
  * 旅游景点 服务实现类
@@ -38,7 +41,14 @@ public class TaTouristServiceImpl extends BaseServiceImpl<TaTouristMapper, TaTou
38 41
 
39 42
     @Override
40 43
     public IPage<TaTourist> getPagedBy(IPage<TaTourist> pg, String touristName, String cityId) {
41
-        return baseMapper.getPagedBy(pg, Constants.TARGET_TOURIST, touristName, cityId);
44
+        if (null != pg) {
45
+            return baseMapper.getPagedBy(pg, Constants.TARGET_TOURIST, touristName, cityId);
46
+        } else {
47
+            List<TaTourist> list = baseMapper.getListBy(Constants.TARGET_TOURIST, touristName, cityId);
48
+            IPage<TaTourist> result = new Page<>();
49
+            result.setRecords(list);
50
+            return result;
51
+        }
42 52
     }
43 53
 
44 54
     @Transactional(rollbackFor = Exception.class)

+ 13
- 2
src/main/java/com/yunzhi/shigongli/vo/HotelListVO.java Просмотреть файл

@@ -1,6 +1,9 @@
1 1
 package com.yunzhi.shigongli.vo;
2 2
 
3
+import com.alibaba.excel.annotation.ExcelIgnore;
3 4
 import com.alibaba.excel.annotation.ExcelProperty;
5
+import com.alibaba.excel.annotation.write.style.ColumnWidth;
6
+import com.yunzhi.shigongli.common.excelConverter.MoneyConverter;
4 7
 import io.swagger.annotations.ApiModel;
5 8
 import io.swagger.annotations.ApiModelProperty;
6 9
 import lombok.Data;
@@ -9,32 +12,40 @@ import lombok.Data;
9 12
 @Data
10 13
 public class HotelListVO {
11 14
 
15
+    @ExcelIgnore
12 16
     @ApiModelProperty(value = "民宿ID")
13 17
     private String hotelId;
14 18
 
15 19
     @ExcelProperty(value = "民宿名称", index = 0)
20
+    @ColumnWidth(30)
16 21
     @ApiModelProperty(value = "民宿名称")
17 22
     private String hotelName;
18 23
 
24
+    @ExcelIgnore
19 25
     @ApiModelProperty(value = "logo")
20 26
     private String logo;
21 27
 
22 28
     @ExcelProperty(value = "员工数量", index = 1)
29
+    @ColumnWidth(20)
23 30
     @ApiModelProperty("员工数量")
24 31
     private Integer workerNum;
25 32
 
26 33
     @ExcelProperty(value = "房源数", index = 2)
34
+    @ColumnWidth(20)
27 35
     @ApiModelProperty("房源数")
28 36
     private Integer roomNum;
29 37
 
30
-    @ExcelProperty(value = "佣金金额/单价分", index = 3)
38
+    @ExcelProperty(value = "佣金金额", converter = MoneyConverter.class, index = 3)
39
+    @ColumnWidth(20)
31 40
     @ApiModelProperty("佣金金额")
32 41
     private Integer brokerageCharges;
33 42
 
34
-    @ExcelProperty(value = "已结算佣金/单价分", index = 4)
43
+    @ExcelProperty(value = "已结算佣金", converter = MoneyConverter.class, index = 4)
44
+    @ColumnWidth(20)
35 45
     @ApiModelProperty("已结算佣金")
36 46
     private Integer paidCharges;
37 47
 
48
+    @ExcelIgnore
38 49
     @ApiModelProperty("状态")
39 50
     private Integer status;
40 51
 }

+ 16
- 6
src/main/java/com/yunzhi/shigongli/vo/OrderSubListVO.java Просмотреть файл

@@ -6,6 +6,7 @@ import com.alibaba.excel.annotation.ExcelProperty;
6 6
 import com.alibaba.excel.annotation.write.style.ColumnWidth;
7 7
 import com.baomidou.mybatisplus.annotation.IdType;
8 8
 import com.baomidou.mybatisplus.annotation.TableId;
9
+import com.yunzhi.shigongli.common.excelConverter.LocalDateTimeConverter;
9 10
 import com.yunzhi.shigongli.common.excelConverter.MoneyConverter;
10 11
 import com.yunzhi.shigongli.common.excelConverter.OrderStatusConverter;
11 12
 import com.yunzhi.shigongli.entity.TaOrderSub;
@@ -36,41 +37,48 @@ public class OrderSubListVO {
36 37
     @ApiModelProperty(value = "套餐ID")
37 38
     private String packageId;
38 39
 
39
-    @ExcelProperty(value = "标题", index = 3)
40
+    @ExcelProperty(value = "标题", index = 2)
40 41
     @ColumnWidth(30)
41 42
     @ApiModelProperty(value = "子订单描述")
42 43
     private String description;
43 44
 
44
-    @ExcelProperty(value = "订单金额", converter = MoneyConverter.class, index = 2)
45
+    @ExcelProperty(value = "订单金额", converter = MoneyConverter.class, index = 4)
45 46
     @ColumnWidth(20)
46 47
     @ApiModelProperty(value = "总金额;单位分")
47 48
     private Integer charges;
48 49
 
50
+    @ExcelProperty(value = "数量", converter = MoneyConverter.class, index = 3)
51
+    @ColumnWidth(20)
49 52
     @ApiModelProperty(value = "数量")
50 53
     private Integer amount;
51 54
 
55
+    @ExcelIgnore
52 56
     @ApiModelProperty(value = "单价;单位分")
53 57
     private Integer unitPrice;
54 58
 
59
+    @ExcelIgnore
55 60
     @ApiModelProperty(value = "抽成;单位分")
56 61
     private Integer commissionCharge;
57 62
 
63
+    @ExcelIgnore
58 64
     @ApiModelProperty(value = "返现金额;单位分")
59 65
     private Integer cashback;
60 66
 
67
+    @ExcelIgnore
61 68
     @ApiModelProperty(value = "是否核销")
62 69
     private Boolean isVerified;
63 70
 
64
-    @ExcelProperty(value = "状态", converter = OrderStatusConverter.class, index = 7)
71
+    @ExcelProperty(value = "状态", converter = OrderStatusConverter.class, index = 8)
65 72
     @ColumnWidth(20)
66 73
     @ApiModelProperty(value = "状态")
67 74
     private Integer status;
68 75
 
69
-    @ExcelProperty(value = "下单时间", index = 6)
76
+    @ExcelProperty(value = "下单时间", converter = LocalDateTimeConverter.class, index = 7)
70 77
     @ColumnWidth(30)
71 78
     @ApiModelProperty(value = "创建时间")
72 79
     private LocalDateTime createDate;
73 80
 
81
+    @ExcelIgnore
74 82
     @ApiModelProperty(value = "核销时间")
75 83
     private LocalDateTime verifiedDate;
76 84
 
@@ -79,18 +87,20 @@ public class OrderSubListVO {
79 87
     @ApiModelProperty("所属商家")
80 88
     private String shopName;
81 89
 
90
+    @ExcelIgnore
82 91
     @ApiModelProperty("图片")
83 92
     private String poster;
84 93
 
94
+    @ExcelIgnore
85 95
     @ApiModelProperty("用户ID")
86 96
     private String personId;
87 97
 
88
-    @ExcelProperty(value = "标题", index = 4)
98
+    @ExcelProperty(value = "标题", index = 5)
89 99
     @ColumnWidth(30)
90 100
     @ApiModelProperty("用户昵称")
91 101
     private String nickName;
92 102
 
93
-    @ExcelProperty(value = "标题", index = 5)
103
+    @ExcelProperty(value = "用户手机", index = 6)
94 104
     @ColumnWidth(20)
95 105
     @ApiModelProperty("用户手机")
96 106
     private String phone;

+ 64
- 1
src/main/java/com/yunzhi/shigongli/vo/RoomListVO.java Просмотреть файл

@@ -1,16 +1,79 @@
1 1
 package com.yunzhi.shigongli.vo;
2 2
 
3
+import com.alibaba.excel.annotation.ExcelIgnore;
4
+import com.alibaba.excel.annotation.ExcelProperty;
5
+import com.alibaba.excel.annotation.write.style.ColumnWidth;
6
+import com.baomidou.mybatisplus.annotation.IdType;
7
+import com.baomidou.mybatisplus.annotation.TableId;
3 8
 import com.yunzhi.shigongli.entity.TaRoom;
4 9
 import io.swagger.annotations.ApiModel;
5 10
 import io.swagger.annotations.ApiModelProperty;
6 11
 import lombok.Data;
7 12
 
13
+import java.time.LocalDateTime;
14
+
8 15
 
9 16
 @ApiModel(description = "修改密码参数")
10 17
 @Data
11
-public class RoomListVO extends TaRoom {
18
+public class RoomListVO {
19
+
20
+    @ExcelIgnore
21
+    @ApiModelProperty(value = "房源ID")
22
+    @TableId(value = "room_id", type = IdType.UUID)
23
+    private String roomId;
24
+
25
+    @ExcelProperty(value = "房屋名称", index = 1)
26
+    @ColumnWidth(30)
27
+    @ApiModelProperty(value = "房源名称")
28
+    private String roomName;
29
+
30
+    @ExcelIgnore
31
+    @ApiModelProperty(value = "民宿ID")
32
+    private String hotelId;
33
+
34
+    @ExcelIgnore
35
+    @ApiModelProperty(value = "主图")
36
+    private String poster;
37
+
38
+    @ExcelIgnore
39
+    @ApiModelProperty(value = "定位")
40
+    private String location;
41
+
42
+    @ExcelProperty(value = "位置信息", index = 2)
43
+    @ColumnWidth(30)
44
+    @ApiModelProperty(value = "地址")
45
+    private String address;
46
+
47
+    @ExcelIgnore
48
+    @ApiModelProperty(value = "停车场定位")
49
+    private String parkingLocation;
50
+
51
+    @ExcelIgnore
52
+    @ApiModelProperty(value = "停车场位置")
53
+    private String parkingAddress;
54
+
55
+    @ExcelIgnore
56
+    @ApiModelProperty(value = "WIFI名称")
57
+    private String wifiName;
58
+
59
+    @ExcelIgnore
60
+    @ApiModelProperty(value = "WIFI密码")
61
+    private String wifiPassword;
62
+
63
+    @ExcelProperty(value = "权重", index = 3)
64
+    @ApiModelProperty(value = "权重")
65
+    private Integer weight;
66
+
67
+    @ExcelIgnore
68
+    @ApiModelProperty(value = "状态")
69
+    private Integer status;
12 70
 
71
+    @ExcelIgnore
72
+    @ApiModelProperty(value = "创建时间")
73
+    private LocalDateTime createDate;
13 74
 
75
+    @ExcelProperty(value = "民宿名称", index = 0)
76
+    @ColumnWidth(30)
14 77
     @ApiModelProperty("民宿名称")
15 78
     String hotelName;
16 79
 }

+ 24
- 0
src/main/java/com/yunzhi/shigongli/vo/ShopCommissionVO.java Просмотреть файл

@@ -1,6 +1,11 @@
1 1
 package com.yunzhi.shigongli.vo;
2 2
 
3 3
 
4
+import com.alibaba.excel.annotation.ExcelIgnore;
5
+import com.alibaba.excel.annotation.ExcelProperty;
6
+import com.alibaba.excel.annotation.write.style.ColumnWidth;
7
+import com.yunzhi.shigongli.common.excelConverter.LocalDateTimeConverter;
8
+import com.yunzhi.shigongli.common.excelConverter.MoneyConverter;
4 9
 import io.swagger.annotations.ApiModel;
5 10
 import io.swagger.annotations.ApiModelProperty;
6 11
 import lombok.Data;
@@ -11,42 +16,61 @@ import java.time.LocalDateTime;
11 16
 @Data
12 17
 public class ShopCommissionVO {
13 18
 
19
+    @ExcelIgnore
14 20
     @ApiModelProperty(value = "日志ID")
15 21
     private Integer logId;
16 22
 
23
+    @ExcelIgnore
17 24
     @ApiModelProperty(value = "店铺ID")
18 25
     private String shopId;
19 26
 
27
+    @ExcelProperty(value = "推广店铺", index = 4)
28
+    @ColumnWidth(30)
20 29
     @ApiModelProperty(value = "店铺名称")
21 30
     private String shopName;
22 31
 
32
+    @ExcelProperty(value = "订单号", index = 1)
33
+    @ColumnWidth(30)
23 34
     @ApiModelProperty(value = "订单ID")
24 35
     private String orderId;
25 36
 
37
+    @ExcelIgnore
26 38
     @ApiModelProperty(value = "子订单ID")
27 39
     private String subOrderId;
28 40
 
41
+    @ExcelIgnore
29 42
     @ApiModelProperty(value = "套餐ID")
30 43
     private String packageId;
31 44
 
45
+    @ExcelIgnore
32 46
     @ApiModelProperty(value = "套餐名称")
33 47
     private String description;
34 48
 
49
+    @ExcelIgnore
35 50
     @ApiModelProperty(value = "人员ID")
36 51
     private String personId;
37 52
 
53
+    @ExcelProperty(value = "下单人", index = 3)
54
+    @ColumnWidth(20)
38 55
     @ApiModelProperty(value = "人员昵称")
39 56
     private String nickName;
40 57
 
58
+    @ExcelIgnore
41 59
     @ApiModelProperty(value = "人员手机号")
42 60
     private String phone;
43 61
 
62
+    @ExcelProperty(value = "订单金额", converter = MoneyConverter.class, index = 2)
63
+    @ColumnWidth(20)
44 64
     @ApiModelProperty(value = "订单金额")
45 65
     private Integer charges;
46 66
 
67
+    @ExcelProperty(value = "推广收入", converter = MoneyConverter.class, index = 5)
68
+    @ColumnWidth(20)
47 69
     @ApiModelProperty(value = "推广收入")
48 70
     private Integer commissionCharge;
49 71
 
72
+    @ExcelProperty(value = "日期", converter = LocalDateTimeConverter.class, index = 0)
73
+    @ColumnWidth(30)
50 74
     @ApiModelProperty(value = "创建时间")
51 75
     private LocalDateTime createDate;
52 76
 }

+ 22
- 5
src/main/java/com/yunzhi/shigongli/vo/ShopListVO.java Просмотреть файл

@@ -1,7 +1,11 @@
1 1
 package com.yunzhi.shigongli.vo;
2 2
 
3 3
 
4
+import com.alibaba.excel.annotation.ExcelIgnore;
4 5
 import com.alibaba.excel.annotation.ExcelProperty;
6
+import com.alibaba.excel.annotation.write.style.ColumnWidth;
7
+import com.yunzhi.shigongli.common.excelConverter.MoneyConverter;
8
+import com.yunzhi.shigongli.common.excelConverter.ShopStatusConverter;
5 9
 import io.swagger.annotations.ApiModel;
6 10
 import io.swagger.annotations.ApiModelProperty;
7 11
 import lombok.Data;
@@ -10,54 +14,67 @@ import lombok.Data;
10 14
 @Data
11 15
 public class ShopListVO {
12 16
 
17
+    @ExcelIgnore
13 18
     @ApiModelProperty(value = "店铺ID")
14 19
     private String shopId;
15 20
 
16 21
     @ExcelProperty(value = "店铺名称", index = 0)
22
+    @ColumnWidth(30)
17 23
     @ApiModelProperty(value = "店铺名称")
18 24
     private String shopName;
19 25
 
20 26
     @ExcelProperty(value = "联系电话", index = 1)
27
+    @ColumnWidth(20)
21 28
     @ApiModelProperty(value = "联系电话")
22 29
     private String phone;
23 30
 
24 31
     @ExcelProperty(value = "位置信息", index = 2)
32
+    @ColumnWidth(30)
25 33
     @ApiModelProperty(value = "位置信息")
26 34
     private String address;
27 35
 
28 36
     @ExcelProperty(value = "人员数量", index = 3)
37
+    @ColumnWidth(20)
29 38
     @ApiModelProperty(value = "人员数量")
30 39
     private Integer workerNum;
31 40
 
32
-    @ExcelProperty(value = "营业额/单位分", index = 4)
41
+    @ExcelProperty(value = "营业额", converter = MoneyConverter.class, index = 4)
42
+    @ColumnWidth(20)
33 43
     @ApiModelProperty(value = "营业额")
34 44
     private Integer salesCharges;
35 45
 
36 46
     @ExcelProperty(value = "浏览次数", index = 5)
47
+    @ColumnWidth(20)
37 48
     @ApiModelProperty(value = "浏览次数")
38 49
     private Integer pvNum;
39 50
 
40 51
     @ExcelProperty(value = "订单数量", index = 6)
52
+    @ColumnWidth(20)
41 53
     @ApiModelProperty(value = "订单数量")
42 54
     private Integer orderSubNum;
43 55
 
44
-    @ExcelProperty(value = "推广佣金/单位分", index = 7)
56
+    @ExcelProperty(value = "推广佣金", converter = MoneyConverter.class, index = 7)
57
+    @ColumnWidth(20)
45 58
     @ApiModelProperty(value = "推广佣金")
46 59
     private Integer brokerageCharges;
47 60
 
48
-    @ExcelProperty(value = "已结算/单位分", index = 8)
61
+    @ExcelProperty(value = "已结算", converter = MoneyConverter.class, index = 8)
62
+    @ColumnWidth(20)
49 63
     @ApiModelProperty(value = "已结算")
50 64
     private Integer paidCharges;
51 65
 
52
-    @ExcelProperty(value = "待结算/单位分", index = 9)
66
+    @ExcelProperty(value = "待结算", converter = MoneyConverter.class, index = 9)
67
+    @ColumnWidth(20)
53 68
     @ApiModelProperty(value = "待结算")
54 69
     private Integer unpaidCharges;
55 70
 
56 71
     @ExcelProperty(value = "权重", index = 10)
72
+    @ColumnWidth(20)
57 73
     @ApiModelProperty(value = "权重")
58 74
     private Integer weight;
59 75
 
60
-    @ExcelProperty(value = "状态(1营业0关闭)", index = 11)
76
+    @ExcelProperty(value = "状态", converter = ShopStatusConverter.class, index = 11)
77
+    @ColumnWidth(20)
61 78
     @ApiModelProperty(value = "状态")
62 79
     private Integer status;
63 80
 }

+ 86
- 1
src/main/java/com/yunzhi/shigongli/vo/ShopPackageVO.java Просмотреть файл

@@ -1,33 +1,118 @@
1 1
 package com.yunzhi.shigongli.vo;
2 2
 
3
+import com.alibaba.excel.annotation.ExcelIgnore;
4
+import com.alibaba.excel.annotation.ExcelProperty;
5
+import com.alibaba.excel.annotation.write.style.ColumnWidth;
6
+import com.baomidou.mybatisplus.annotation.IdType;
7
+import com.baomidou.mybatisplus.annotation.TableField;
8
+import com.baomidou.mybatisplus.annotation.TableId;
9
+import com.yunzhi.shigongli.common.excelConverter.LocalDateTimeConverter;
10
+import com.yunzhi.shigongli.common.excelConverter.LocalDayConverter;
11
+import com.yunzhi.shigongli.common.excelConverter.MoneyConverter;
3 12
 import com.yunzhi.shigongli.entity.TaShopPackage;
4 13
 import com.yunzhi.shigongli.entity.TaTargetDietMark;
5 14
 import io.swagger.annotations.ApiModel;
6 15
 import io.swagger.annotations.ApiModelProperty;
7 16
 import lombok.Data;
8 17
 
18
+import java.time.LocalDateTime;
9 19
 import java.util.List;
10 20
 
11 21
 
12 22
 @ApiModel(description = "商品套餐全字段")
13 23
 @Data
14
-public class ShopPackageVO extends TaShopPackage {
24
+public class ShopPackageVO {
15 25
 
26
+    @ExcelIgnore
27
+    @ApiModelProperty(value = "套餐ID")
28
+    @TableId(value = "package_id", type = IdType.UUID)
29
+    private String packageId;
30
+
31
+    @ExcelIgnore
32
+    @ApiModelProperty(value = "商铺ID")
33
+    private String shopId;
34
+
35
+    @ExcelIgnore
36
+    @ApiModelProperty(value = "类型")
37
+    private String packageCategory;
38
+
39
+    @ExcelProperty(value = "套餐描述", index = 1)
40
+    @ColumnWidth(30)
41
+    @ApiModelProperty(value = "描述")
42
+    private String description;
43
+
44
+    @ExcelProperty(value = "适用人数", index = 2)
45
+    @ColumnWidth(20)
46
+    @ApiModelProperty(value = "适用人数")
47
+    private Integer personNum;
48
+
49
+    @ExcelIgnore
50
+    @ApiModelProperty(value = "主图")
51
+    private String poster;
52
+
53
+    @ExcelProperty(value = "门市价格", converter = MoneyConverter.class, index = 3)
54
+    @ColumnWidth(20)
55
+    @ApiModelProperty(value = "门市价格,单位分")
56
+    private Integer standardPrice;
57
+
58
+    @ExcelProperty(value = "实售价格", converter = MoneyConverter.class, index = 4)
59
+    @ColumnWidth(20)
60
+    @ApiModelProperty(value = "实售价格,单位分")
61
+    private Integer actualPrice;
62
+
63
+    @ExcelIgnore
64
+    @ApiModelProperty(value = "返现,单位分")
65
+    private Integer cashback;
66
+
67
+    @ExcelIgnore
68
+    @ApiModelProperty(value = "有效期始")
69
+    private LocalDateTime startTime;
70
+
71
+    @ExcelProperty(value = "有效期止", converter = LocalDayConverter.class, index = 5)
72
+    @ColumnWidth(20)
73
+    @ApiModelProperty(value = "有效期止")
74
+    private LocalDateTime endTime;
75
+
76
+    @ExcelIgnore
77
+    @ApiModelProperty(value = "权重")
78
+    private Integer weight;
79
+
80
+    @ExcelIgnore
81
+    @ApiModelProperty(value = "状态")
82
+    private Integer status;
83
+
84
+    @ExcelIgnore
85
+    @ApiModelProperty(value = "创建时间")
86
+    private LocalDateTime createDate;
87
+
88
+    @ExcelIgnore
89
+    @ApiModelProperty(value = "是否收藏")
90
+    @TableField(exist = false)
91
+    private Integer isSaved;
92
+
93
+    @ExcelProperty(value = "商铺名称", index = 0)
94
+    @ColumnWidth(30)
16 95
     @ApiModelProperty(value = "商铺名称")
17 96
     private String shopName;
18 97
 
98
+    @ExcelIgnore
19 99
     @ApiModelProperty(value = "引流分成;单位千分之一")
20 100
     private Integer trafficRate;
21 101
 
102
+    @ExcelIgnore
22 103
     @ApiModelProperty(value = "平台分成;单位千分之一")
23 104
     private Integer platformRate;
24 105
 
106
+    @ExcelIgnore
25 107
     @ApiModelProperty(value = "参与攻略")
26 108
     private Boolean isStrategy;
27 109
 
110
+    @ExcelProperty(value = "推荐级别", index = 6)
111
+    @ColumnWidth(20)
28 112
     @ApiModelProperty(value = "推荐等级")
29 113
     private String strategyLevel;
30 114
 
115
+    @ExcelIgnore
31 116
     @ApiModelProperty(value = "类别")
32 117
     private List<TaTargetDietMark> dietMarkList;
33 118
 

+ 16
- 8
src/main/resources/mapper/TaFeedbackMapper.xml Просмотреть файл

@@ -12,21 +12,29 @@
12 12
         WHERE
13 13
             t.feedback_id = #{id}
14 14
     </select>
15
-    <select id="getProfilePage" resultType="com.yunzhi.shigongli.entity.TaFeedback">
15
+
16
+    <sql id="queryFeedBack">
16 17
         SELECT
17 18
             t.*,
18 19
             s.phone,
19 20
             s.nick_name
20 21
         FROM
21 22
             ta_feedback t
22
-                INNER JOIN ta_person s ON s.person_id = t.person_id
23
+            INNER JOIN ta_person s ON s.person_id = t.person_id
23 24
         WHERE 1 = 1
24
-          <if test="startDate != null">
25
-              AND t.create_date &gt;= #{startDate}
26
-          </if>
27
-          <if test="endDate != null">
28
-              AND t.create_date &lt;= #{endDate}
29
-          </if>
25
+            <if test="startDate != null">
26
+                AND t.create_date &gt;= #{startDate}
27
+            </if>
28
+            <if test="endDate != null">
29
+                AND t.create_date &lt;= #{endDate}
30
+            </if>
30 31
         ORDER BY t.create_date DESC
32
+    </sql>
33
+
34
+    <select id="getProfilePage" resultType="com.yunzhi.shigongli.entity.TaFeedback">
35
+        <include refid="queryFeedBack"></include>
36
+    </select>
37
+    <select id="getProfileList" resultType="com.yunzhi.shigongli.entity.TaFeedback">
38
+        <include refid="queryFeedBack"></include>
31 39
     </select>
32 40
 </mapper>

+ 13
- 5
src/main/resources/mapper/TaHotelMapper.xml Просмотреть файл

@@ -2,7 +2,7 @@
2 2
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
3 3
 <mapper namespace="com.yunzhi.shigongli.mapper.TaHotelMapper">
4 4
 
5
-    <select id="getVOListBy" resultType="com.yunzhi.shigongli.vo.HotelListVO">
5
+    <sql id="queryHotelList">
6 6
         SELECT
7 7
             t.*,
8 8
             s.brokerage_charges,
@@ -11,14 +11,22 @@
11 11
             ( SELECT count( * ) FROM ta_room b WHERE b.hotel_id = t.hotel_id AND b.`status` &gt; - 1 ) AS room_num
12 12
         FROM
13 13
             ta_hotel t
14
-                INNER JOIN ta_hotel_account s ON t.hotel_id = s.hotel_id
14
+            INNER JOIN ta_hotel_account s ON t.hotel_id = s.hotel_id
15 15
         WHERE 1 = 1
16
-          <if test="hotelName != null and hotelName != ''">
17
-              AND t.hotel_name LIKE CONCAT( '%', #{hotelName}, '%' )
18
-          </if>
16
+            <if test="hotelName != null and hotelName != ''">
17
+                AND t.hotel_name LIKE CONCAT( '%', #{hotelName}, '%' )
18
+            </if>
19 19
             AND t.`status` &gt; - 1
20 20
         ORDER BY
21 21
             t.create_date DESC
22
+    </sql>
23
+
24
+    <select id="getVOPageBy" resultType="com.yunzhi.shigongli.vo.HotelListVO">
25
+        <include refid="queryHotelList"></include>
26
+    </select>
27
+
28
+    <select id="getVOListBy" resultType="com.yunzhi.shigongli.vo.HotelListVO">
29
+        <include refid="queryHotelList"></include>
22 30
     </select>
23 31
     <select id="getListByPerson" resultType="com.yunzhi.shigongli.entity.TaHotel">
24 32
         SELECT

+ 21
- 14
src/main/resources/mapper/TaRoomMapper.xml Просмотреть файл

@@ -2,29 +2,33 @@
2 2
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
3 3
 <mapper namespace="com.yunzhi.shigongli.mapper.TaRoomMapper">
4 4
 
5
-    <select id="getPageListBy" resultType="com.yunzhi.shigongli.vo.RoomListVO">
5
+    <sql id="queryRoom">
6 6
         SELECT
7 7
             t.*,
8 8
             s.hotel_name
9 9
         FROM
10 10
             ta_room t
11
-            INNER JOIN ta_hotel s ON t.hotel_id = s.hotel_id
11
+            INNER JOIN ta_hotel s ON t.hotel_id = s.hotel_id AND s.`status` &gt; -1
12 12
         WHERE 1=1
13
-        <if test="hotelId != null and hotelId != ''">
14
-            AND t.hotel_id = #{hotelId}
15
-        </if>
16
-        <if test="roomName != null and roomName != ''">
17
-          AND t.room_name LIKE CONCAT( '%', #{roomName}, '%' )
18
-        </if>
19
-        <if test="plat == 'admin'">
20
-          AND t.`status` &gt; -1
21
-        </if>
22
-        <if test="plat == 'wx'">
23
-          AND t.`status` = 1
24
-        </if>
13
+            <if test="hotelId != null and hotelId != ''">
14
+                AND t.hotel_id = #{hotelId}
15
+            </if>
16
+            <if test="roomName != null and roomName != ''">
17
+                AND t.room_name LIKE CONCAT( '%', #{roomName}, '%' )
18
+            </if>
19
+            <if test="plat == 'admin'">
20
+                AND t.`status` &gt; -1
21
+            </if>
22
+            <if test="plat == 'wx'">
23
+                AND t.`status` = 1
24
+            </if>
25 25
         ORDER BY
26 26
             t.weight DESC,
27 27
             t.create_date DESC
28
+    </sql>
29
+
30
+    <select id="getPageListBy" resultType="com.yunzhi.shigongli.vo.RoomListVO">
31
+        <include refid="queryRoom"></include>
28 32
     </select>
29 33
     <select id="getRoomOwners" resultType="com.yunzhi.shigongli.entity.TaHotelWorker">
30 34
         SELECT DISTINCT
@@ -38,4 +42,7 @@
38 42
           AND s.`status` &gt; - 1
39 43
           AND t.`status` &gt; -1
40 44
     </select>
45
+    <select id="getPureListBy" resultType="com.yunzhi.shigongli.vo.RoomListVO">
46
+        <include refid="queryRoom"></include>
47
+    </select>
41 48
 </mapper>

+ 21
- 13
src/main/resources/mapper/TaShopAccountLogMapper.xml Просмотреть файл

@@ -12,7 +12,8 @@
12 12
           AND t.amount_type = #{amountType}
13 13
           AND t.create_date BETWEEN #{start} AND #{end}
14 14
     </select>
15
-    <select id="getShopAccountList" resultType="com.yunzhi.shigongli.vo.ShopCommissionVO">
15
+
16
+    <sql id="queryShopAccount">
16 17
         SELECT
17 18
             t.log_id,
18 19
             t.shop_id,
@@ -35,19 +36,26 @@
35 36
             INNER JOIN ta_person p ON p.person_id = n.person_id
36 37
         WHERE
37 38
             t.amount_type = #{amountType}
38
-          <if test="shopName != null and shopName != ''">
39
-              AND m.shop_name LIKE CONCAT( '%', #{shopName}, '%' )
40
-          </if>
41
-          <if test="description != null and description != ''">
42
-              AND s.description LIKE CONCAT( '%', #{description}, '%' )
43
-          </if>
44
-          <if test="startDate != null">
45
-              AND t.create_date &gt;= #{startDate}
46
-          </if>
47
-          <if test="endDate != null">
48
-              AND t.create_date &lt;= #{endDate}
49
-          </if>
39
+            <if test="shopName != null and shopName != ''">
40
+                AND m.shop_name LIKE CONCAT( '%', #{shopName}, '%' )
41
+            </if>
42
+            <if test="description != null and description != ''">
43
+                AND s.description LIKE CONCAT( '%', #{description}, '%' )
44
+            </if>
45
+            <if test="startDate != null">
46
+                AND t.create_date &gt;= #{startDate}
47
+            </if>
48
+            <if test="endDate != null">
49
+                AND t.create_date &lt;= #{endDate}
50
+            </if>
50 51
         ORDER BY
51 52
             t.create_date DESC
53
+    </sql>
54
+
55
+    <select id="getShopAccountPage" resultType="com.yunzhi.shigongli.vo.ShopCommissionVO">
56
+        <include refid="queryShopAccount"></include>
57
+    </select>
58
+    <select id="getShopAccountList" resultType="com.yunzhi.shigongli.vo.ShopCommissionVO">
59
+        <include refid="queryShopAccount"></include>
52 60
     </select>
53 61
 </mapper>

+ 17
- 8
src/main/resources/mapper/TaShopMapper.xml Просмотреть файл

@@ -29,7 +29,7 @@
29 29
             SET t.${field} = score
30 30
     </update>
31 31
 
32
-    <select id="getPageListBy" resultType="com.yunzhi.shigongli.vo.ShopListVO">
32
+    <sql id="queryShop">
33 33
         SELECT
34 34
             t.*,
35 35
             ( SELECT COUNT(1) FROM ta_shop_worker a WHERE a.shop_id = t.shop_id AND a.`status` &gt; -1 ) as worker_num,
@@ -41,20 +41,24 @@
41 41
             ( SELECT count( 1 ) FROM ta_order_sub c WHERE c.shop_id = t.shop_id AND c.`status` &gt; -1 ) AS order_sub_num
42 42
         FROM
43 43
             ta_shop t
44
-                INNER JOIN ta_shop_account s ON t.shop_id = s.shop_id
44
+            INNER JOIN ta_shop_account s ON t.shop_id = s.shop_id
45
+            --                 LEFT JOIN ta_shop_worker m ON t.shop_id = m.shop_id
46
+            --                 AND m.is_manager = 1
45 47
         WHERE
46 48
             t.`status` &gt; - 1
47
-          <if test="shopName != null and shopName != ''">
48
-              AND t.shop_name LIKE CONCAT( '%', #{shopName}, '%' )
49
-          </if>
50
-          <if test="phone != null and phone != ''">
51
-              AND t.phone LIKE CONCAT( '%', #{phone}, '%' )
52
-          </if>
49
+            <if test="shopName != null and shopName != ''">
50
+                AND t.shop_name LIKE CONCAT( '%', #{shopName}, '%' )
51
+            </if>
52
+            <if test="phone != null and phone != ''">
53
+                AND t.phone LIKE CONCAT( '%', #{phone}, '%' )
54
+            </if>
53 55
         ORDER BY
54 56
             t.weight DESC,
55 57
             t.create_date DESC
58
+    </sql>
59
+
60
+    <select id="getPageListBy" resultType="com.yunzhi.shigongli.vo.ShopListVO">
61
+        <include refid="queryShop"></include>
56 62
     </select>
57 63
     <select id="getListByPerson" resultType="com.yunzhi.shigongli.entity.TaShop">
58 64
         SELECT
@@ -106,4 +110,7 @@
106 110
         WHERE
107 111
             t.shop_id = #{id}
108 112
     </select>
113
+    <select id="getListBy" resultType="com.yunzhi.shigongli.vo.ShopListVO">
114
+        <include refid="queryShop"></include>
115
+    </select>
109 116
 </mapper>

+ 21
- 9
src/main/resources/mapper/TaShopPackageMapper.xml Просмотреть файл

@@ -1,8 +1,13 @@
1 1
 <?xml version="1.0" encoding="UTF-8"?>
2 2
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
3 3
 <mapper namespace="com.yunzhi.shigongli.mapper.TaShopPackageMapper">
4
+    <update id="removeByShop">
5
+        update ta_shop_package t
6
+        set t.`status` = -1
7
+        where t.shop_id = #{shopId}
8
+    </update>
4 9
 
5
-    <select id="getProfilePage" resultType="com.yunzhi.shigongli.vo.ShopPackageVO">
10
+    <sql id="queryShopPackage">
6 11
         SELECT
7 12
             t.*,
8 13
             m.shop_name,
@@ -12,19 +17,23 @@
12 17
             s.strategy_level
13 18
         FROM
14 19
             ta_shop_package t
15
-                INNER JOIN ta_shop_package_setting s ON t.package_id = s.package_id
16
-                INNER JOIN ta_shop m on m.shop_id = t.shop_id
20
+            INNER JOIN ta_shop_package_setting s ON t.package_id = s.package_id
21
+            INNER JOIN ta_shop m on m.shop_id = t.shop_id
17 22
         WHERE
18 23
             t.`status` &gt; - 1
19
-          <if test="shopId != null and shopId != ''">
20
-              AND t.shop_id = #{shopId}
21
-          </if>
22
-          <if test="description != null and description != ''">
23
-              AND t.description like CONCAT('%', #{description}, '%')
24
-          </if>
24
+            <if test="shopId != null and shopId != ''">
25
+                AND t.shop_id = #{shopId}
26
+            </if>
27
+            <if test="description != null and description != ''">
28
+                AND t.description like CONCAT('%', #{description}, '%')
29
+            </if>
25 30
         ORDER BY
26 31
             t.weight DESC,
27 32
             t.create_date DESC
33
+    </sql>
34
+
35
+    <select id="getProfilePage" resultType="com.yunzhi.shigongli.vo.ShopPackageVO">
36
+        <include refid="queryShopPackage"></include>
28 37
     </select>
29 38
     <select id="getWxPackageList" resultType="com.yunzhi.shigongli.entity.TaShopPackage">
30 39
         SELECT
@@ -72,4 +81,7 @@
72 81
             a.weight DESC
73 82
         LIMIT #{limit}
74 83
     </select>
84
+    <select id="getProfileList" resultType="com.yunzhi.shigongli.vo.ShopPackageVO">
85
+        <include refid="queryShopPackage"></include>
86
+    </select>
75 87
 </mapper>

+ 15
- 8
src/main/resources/mapper/TaTouristMapper.xml Просмотреть файл

@@ -2,7 +2,7 @@
2 2
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
3 3
 <mapper namespace="com.yunzhi.shigongli.mapper.TaTouristMapper">
4 4
 
5
-    <select id="getPagedBy" resultType="com.yunzhi.shigongli.entity.TaTourist">
5
+    <sql id="queryTourist">
6 6
         SELECT
7 7
             t.*,
8 8
             s.like_num,
@@ -13,19 +13,23 @@
13 13
         FROM
14 14
             ta_tourist t
15 15
             LEFT JOIN ta_resource s ON s.target_type = #{targetTourist}
16
-                AND s.target_id = t.tourist_id
16
+            AND s.target_id = t.tourist_id
17 17
             LEFT JOIN td_city m on m.area_id = t.city_id
18 18
         WHERE
19 19
             t.`status` &gt; - 1
20
-          <if test="touristName != null and touristName != ''">
21
-              AND t.tourist_name LIKE CONCAT( '%', #{touristName}, '%' )
22
-          </if>
23
-          <if test="cityId != null and cityId != ''">
24
-              AND t.city_id = #{cityId}
25
-          </if>
20
+            <if test="touristName != null and touristName != ''">
21
+                AND t.tourist_name LIKE CONCAT( '%', #{touristName}, '%' )
22
+            </if>
23
+            <if test="cityId != null and cityId != ''">
24
+                AND t.city_id = #{cityId}
25
+            </if>
26 26
         ORDER BY
27 27
             t.weight DESC,
28 28
             t.create_date DESC
29
+    </sql>
30
+
31
+    <select id="getPagedBy" resultType="com.yunzhi.shigongli.entity.TaTourist">
32
+        <include refid="queryTourist"></include>
29 33
     </select>
30 34
     <select id="getProfileBy" resultType="com.yunzhi.shigongli.entity.TaTourist">
31 35
         SELECT
@@ -64,4 +68,7 @@
64 68
         WHERE
65 69
             t.tourist_id = #{id}
66 70
     </select>
71
+    <select id="getListBy" resultType="com.yunzhi.shigongli.entity.TaTourist">
72
+        <include refid="queryTourist"></include>
73
+    </select>
67 74
 </mapper>