张延森 3 年前
父节点
当前提交
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
     public final static String PACKAGE_NORMAL = "normal";           // 普通套餐
51
     public final static String PACKAGE_NORMAL = "normal";           // 普通套餐
52
     public final static String PACKAGE_CASH = "cash_coupon";        // 现金抵用券
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
     public final static String RECOMMEND_SHOP = "shop";     // 商铺
60
     public final static String RECOMMEND_SHOP = "shop";     // 商铺
56
     public final static String RECOMMEND_HOTEL = "hotel";   // 民宿
61
     public final static String RECOMMEND_HOTEL = "hotel";   // 民宿

+ 53
- 0
src/main/java/com/yunzhi/shigongli/common/excelConverter/LocalDateTimeConverter.java 查看文件

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 查看文件

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 查看文件

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 查看文件

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 查看文件

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
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
3
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
4
 import com.baomidou.mybatisplus.core.metadata.IPage;
4
 import com.baomidou.mybatisplus.core.metadata.IPage;
5
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
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
 import com.yunzhi.shigongli.entity.TaPerson;
7
 import com.yunzhi.shigongli.entity.TaPerson;
11
 import com.yunzhi.shigongli.service.ITaPersonService;
8
 import com.yunzhi.shigongli.service.ITaPersonService;
12
 import io.swagger.annotations.Api;
9
 import io.swagger.annotations.Api;
24
 import com.yunzhi.shigongli.entity.TaFeedback;
21
 import com.yunzhi.shigongli.entity.TaFeedback;
25
 import org.springframework.web.bind.annotation.RestController;
22
 import org.springframework.web.bind.annotation.RestController;
26
 
23
 
24
+import javax.servlet.http.HttpServletResponse;
27
 import java.time.LocalDateTime;
25
 import java.time.LocalDateTime;
28
 
26
 
29
 /**
27
 /**
56
      * @return
54
      * @return
57
      */
55
      */
58
     @RequestMapping(value="/admin/taFeedback",method= RequestMethod.GET)
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
     public ResponseBean taFeedbackList(@ApiParam("页码") @RequestParam(value ="pageNum",defaultValue = "1") Integer pageNum,
58
     public ResponseBean taFeedbackList(@ApiParam("页码") @RequestParam(value ="pageNum",defaultValue = "1") Integer pageNum,
61
                                        @ApiParam("单页数据量") @RequestParam(value ="pageSize",defaultValue = "10") Integer pageSize,
59
                                        @ApiParam("单页数据量") @RequestParam(value ="pageSize",defaultValue = "10") Integer pageSize,
62
                                        @ApiParam(value = "开始时间", example = "2021-09-01") @RequestParam(value ="start", required = false) String start,
60
                                        @ApiParam(value = "开始时间", example = "2021-09-01") @RequestParam(value ="start", required = false) String start,
81
         return ResponseBean.success(result);
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
      * @param taFeedback 实体对象
115
      * @param taFeedback 实体对象

+ 21
- 4
src/main/java/com/yunzhi/shigongli/controller/TaHotWordController.java 查看文件

3
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
3
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
4
 import com.baomidou.mybatisplus.core.metadata.IPage;
4
 import com.baomidou.mybatisplus.core.metadata.IPage;
5
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
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
 import com.yunzhi.shigongli.entity.TaHotWord;
7
 import com.yunzhi.shigongli.entity.TaHotWord;
11
 import com.yunzhi.shigongli.service.ITaHotWordService;
8
 import com.yunzhi.shigongli.service.ITaHotWordService;
12
 import io.swagger.annotations.Api;
9
 import io.swagger.annotations.Api;
17
 import org.springframework.beans.factory.annotation.Autowired;
14
 import org.springframework.beans.factory.annotation.Autowired;
18
 import org.springframework.web.bind.annotation.*;
15
 import org.springframework.web.bind.annotation.*;
19
 
16
 
17
+import javax.servlet.http.HttpServletResponse;
20
 import java.time.LocalDateTime;
18
 import java.time.LocalDateTime;
21
 import java.util.List;
19
 import java.util.List;
22
 
20
 
61
         return ResponseBean.success(result);
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
     @GetMapping("/wx/hot-word")
81
     @GetMapping("/wx/hot-word")
65
     @ApiOperation(value="小程序端热词列表", notes = "小程序端热词列表", httpMethod = "GET", response = TaHotWord.class)
82
     @ApiOperation(value="小程序端热词列表", notes = "小程序端热词列表", httpMethod = "GET", response = TaHotWord.class)
66
     public ResponseBean getWxList() throws Exception{
83
     public ResponseBean getWxList() throws Exception{

+ 20
- 1
src/main/java/com/yunzhi/shigongli/controller/TaHotelController.java 查看文件

68
                                     @ApiParam("名称") @RequestParam(value = "hotelName",required = false) String hotelName) throws Exception{
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
         IPage<HotelListVO> result = iTaHotelService.getVOListBy(pg, hotelName);
72
         IPage<HotelListVO> result = iTaHotelService.getVOListBy(pg, hotelName);
73
         return ResponseBean.success(result);
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
      * @param taHotel 实体对象
93
      * @param taHotel 实体对象
82
     @ApiOperation(value="保存", notes = "保存", httpMethod = "POST", response = ResponseBean.class)
97
     @ApiOperation(value="保存", notes = "保存", httpMethod = "POST", response = ResponseBean.class)
83
     public ResponseBean taHotelAdd(@ApiParam("保存内容") @RequestBody TaHotel taHotel) throws Exception{
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
         if (iTaHotelService.createNew(taHotel)){
104
         if (iTaHotelService.createNew(taHotel)){
86
             return ResponseBean.success(taHotel);
105
             return ResponseBean.success(taHotel);
87
         }else {
106
         }else {

+ 22
- 6
src/main/java/com/yunzhi/shigongli/controller/TaNotificationController.java 查看文件

3
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
3
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
4
 import com.baomidou.mybatisplus.core.metadata.IPage;
4
 import com.baomidou.mybatisplus.core.metadata.IPage;
5
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
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
 import com.yunzhi.shigongli.entity.TaNotification;
7
 import com.yunzhi.shigongli.entity.TaNotification;
11
 import com.yunzhi.shigongli.service.ITaNotificationService;
8
 import com.yunzhi.shigongli.service.ITaNotificationService;
12
 import io.swagger.annotations.Api;
9
 import io.swagger.annotations.Api;
17
 import org.springframework.beans.factory.annotation.Autowired;
14
 import org.springframework.beans.factory.annotation.Autowired;
18
 import org.springframework.web.bind.annotation.*;
15
 import org.springframework.web.bind.annotation.*;
19
 
16
 
17
+import javax.servlet.http.HttpServletResponse;
18
+import java.util.List;
19
+
20
 /**
20
 /**
21
  * <p>
21
  * <p>
22
     * 通知公告 前端控制器
22
     * 通知公告 前端控制器
44
      * @return
44
      * @return
45
      */
45
      */
46
     @RequestMapping(value="/{plat}/notification",method= RequestMethod.GET)
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
                                  @ApiParam("页码") @RequestParam(value ="pageNum",defaultValue = "1") Integer pageNum,
49
                                  @ApiParam("页码") @RequestParam(value ="pageNum",defaultValue = "1") Integer pageNum,
50
                                  @ApiParam("单页数据量") @RequestParam(value ="pageSize",defaultValue = "10") Integer pageSize,
50
                                  @ApiParam("单页数据量") @RequestParam(value ="pageSize",defaultValue = "10") Integer pageSize,
51
                                  @ApiParam(value = "发布状态") @RequestParam(value ="status", required = false) Integer status) throws Exception{
51
                                  @ApiParam(value = "发布状态") @RequestParam(value ="status", required = false) Integer status) throws Exception{
62
         return ResponseBean.success(result);
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
      * @param taNotification 实体对象
83
      * @param taNotification 实体对象

+ 22
- 4
src/main/java/com/yunzhi/shigongli/controller/TaPersonController.java 查看文件

3
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
3
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
4
 import com.baomidou.mybatisplus.core.metadata.IPage;
4
 import com.baomidou.mybatisplus.core.metadata.IPage;
5
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
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
 import com.yunzhi.shigongli.entity.TaHotelWorker;
7
 import com.yunzhi.shigongli.entity.TaHotelWorker;
11
 import com.yunzhi.shigongli.entity.TaPersonRole;
8
 import com.yunzhi.shigongli.entity.TaPersonRole;
12
 import com.yunzhi.shigongli.entity.TaShopWorker;
9
 import com.yunzhi.shigongli.entity.TaShopWorker;
25
 import com.yunzhi.shigongli.entity.TaPerson;
22
 import com.yunzhi.shigongli.entity.TaPerson;
26
 import org.springframework.web.bind.annotation.RestController;
23
 import org.springframework.web.bind.annotation.RestController;
27
 
24
 
25
+import javax.servlet.http.HttpServletResponse;
28
 import java.util.ArrayList;
26
 import java.util.ArrayList;
29
 import java.util.List;
27
 import java.util.List;
30
 
28
 
82
         return ResponseBean.success(result);
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
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
3
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
4
 import com.baomidou.mybatisplus.core.metadata.IPage;
4
 import com.baomidou.mybatisplus.core.metadata.IPage;
5
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
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
 import com.yunzhi.shigongli.entity.TaPerson;
7
 import com.yunzhi.shigongli.entity.TaPerson;
11
 import com.yunzhi.shigongli.entity.TaShopWorker;
8
 import com.yunzhi.shigongli.entity.TaShopWorker;
12
 import com.yunzhi.shigongli.vo.RoomListVO;
9
 import com.yunzhi.shigongli.vo.RoomListVO;
25
 import com.yunzhi.shigongli.entity.TaRoom;
22
 import com.yunzhi.shigongli.entity.TaRoom;
26
 import org.springframework.web.bind.annotation.RestController;
23
 import org.springframework.web.bind.annotation.RestController;
27
 
24
 
25
+import javax.servlet.http.HttpServletResponse;
26
+
28
 /**
27
 /**
29
  * <p>
28
  * <p>
30
     * 房源 前端控制器
29
     * 房源 前端控制器
52
      * @return
51
      * @return
53
      */
52
      */
54
     @RequestMapping(value="/{plat}/taRoom",method= RequestMethod.GET)
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
     public ResponseBean taRoomList(@ApiParam(value = "客户端", allowableValues = "wx,admin") @PathVariable String plat,
55
     public ResponseBean taRoomList(@ApiParam(value = "客户端", allowableValues = "wx,admin") @PathVariable String plat,
57
                                    @ApiParam("页码") @RequestParam(value ="pageNum",defaultValue = "1") Integer pageNum,
56
                                    @ApiParam("页码") @RequestParam(value ="pageNum",defaultValue = "1") Integer pageNum,
58
                                    @ApiParam("单页数据量") @RequestParam(value ="pageSize",defaultValue = "10") Integer pageSize,
57
                                    @ApiParam("单页数据量") @RequestParam(value ="pageSize",defaultValue = "10") Integer pageSize,
63
             return ResponseBean.error("未找到有效的民宿ID", ResponseBean.ERROR_ILLEGAL_PARAMS);
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
         IPage<RoomListVO> result = iTaRoomService.getPageListBy(pg, plat, hotelId, roomName);
66
         IPage<RoomListVO> result = iTaRoomService.getPageListBy(pg, plat, hotelId, roomName);
68
         return ResponseBean.success(result);
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
      * @param taRoom 实体对象
89
      * @param taRoom 实体对象

+ 56
- 1
src/main/java/com/yunzhi/shigongli/controller/TaShopController.java 查看文件

68
     @Autowired
68
     @Autowired
69
     public ITaMiniappQrcodeService iTaMiniappQrcodeService;
69
     public ITaMiniappQrcodeService iTaMiniappQrcodeService;
70
 
70
 
71
+    @Autowired
72
+    public ITaShopPackageService iTaShopPackageService;
73
+
71
     @Value("${sysBiz.miniapp.shopPage}")
74
     @Value("${sysBiz.miniapp.shopPage}")
72
     public String shopPage;
75
     public String shopPage;
73
 
76
 
78
      * @return
81
      * @return
79
      */
82
      */
80
     @RequestMapping(value="/admin/taShop",method= RequestMethod.GET)
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
     public ResponseBean taShopList(@ApiParam("页码") @RequestParam(value ="pageNum",defaultValue = "1") Integer pageNum,
85
     public ResponseBean taShopList(@ApiParam("页码") @RequestParam(value ="pageNum",defaultValue = "1") Integer pageNum,
83
                                    @ApiParam("单页数据量") @RequestParam(value ="pageSize",defaultValue = "10") Integer pageSize,
86
                                    @ApiParam("单页数据量") @RequestParam(value ="pageSize",defaultValue = "10") Integer pageSize,
84
                                    @ApiParam("店铺名称") @RequestParam(value = "shopName", required = false) String shopName,
87
                                    @ApiParam("店铺名称") @RequestParam(value = "shopName", required = false) String shopName,
89
             return ResponseBean.success(result);
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
      * @param taShop 实体对象
111
      * @param taShop 实体对象
98
     @ApiOperation(value="保存", notes = "保存", httpMethod = "POST", response = ResponseBean.class)
115
     @ApiOperation(value="保存", notes = "保存", httpMethod = "POST", response = ResponseBean.class)
99
     public ResponseBean taShopAdd(@ApiParam("保存内容") @RequestBody TaShop taShop) throws Exception {
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
         try {
122
         try {
102
             iTaShopService.createNew(taShop);
123
             iTaShopService.createNew(taShop);
103
             shopImagesService.updateImages(Constants.TARGET_SHOP, taShop.getShopId(), taShop.getImageList());
124
             shopImagesService.updateImages(Constants.TARGET_SHOP, taShop.getShopId(), taShop.getImageList());
118
     public ResponseBean taShopDelete(@ApiParam("对象ID") @PathVariable String id) throws Exception{
139
     public ResponseBean taShopDelete(@ApiParam("对象ID") @PathVariable String id) throws Exception{
119
         if(iTaShopService.removeLogicById(id)){
140
         if(iTaShopService.removeLogicById(id)){
120
             taResourceService.removeBy(Constants.TARGET_SHOP, id);
141
             taResourceService.removeBy(Constants.TARGET_SHOP, id);
142
+            iTaShopPackageService.removeByShop(id);
121
             return ResponseBean.success("success");
143
             return ResponseBean.success("success");
122
         }else {
144
         }else {
123
             return ResponseBean.error("删除失败, 请重试", ResponseBean.ERROR_UNAVAILABLE);
145
             return ResponseBean.error("删除失败, 请重试", ResponseBean.ERROR_UNAVAILABLE);
397
 
419
 
398
         return ResponseBean.success(result);
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
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
5
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
6
 import com.yunzhi.shigongli.common.BaseController;
6
 import com.yunzhi.shigongli.common.BaseController;
7
 import com.yunzhi.shigongli.common.Constants;
7
 import com.yunzhi.shigongli.common.Constants;
8
+import com.yunzhi.shigongli.common.ExcelUtils;
8
 import com.yunzhi.shigongli.common.ResponseBean;
9
 import com.yunzhi.shigongli.common.ResponseBean;
9
 import com.yunzhi.shigongli.entity.TaExtendContent;
10
 import com.yunzhi.shigongli.entity.TaExtendContent;
10
 import com.yunzhi.shigongli.entity.TaShopPackageSetting;
11
 import com.yunzhi.shigongli.entity.TaShopPackageSetting;
26
 import com.yunzhi.shigongli.entity.TaShopPackage;
27
 import com.yunzhi.shigongli.entity.TaShopPackage;
27
 import org.springframework.web.bind.annotation.RestController;
28
 import org.springframework.web.bind.annotation.RestController;
28
 
29
 
30
+import javax.servlet.http.HttpServletResponse;
29
 import java.util.List;
31
 import java.util.List;
30
 
32
 
31
 /**
33
 /**
55
      * @return
57
      * @return
56
      */
58
      */
57
     @RequestMapping(value="/admin/taShopPackage",method= RequestMethod.GET)
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
     public ResponseBean taShopPackageList(@ApiParam("页码") @RequestParam(value ="pageNum",defaultValue = "1") Integer pageNum,
61
     public ResponseBean taShopPackageList(@ApiParam("页码") @RequestParam(value ="pageNum",defaultValue = "1") Integer pageNum,
60
                                           @ApiParam("单页数据量") @RequestParam(value ="pageSize",defaultValue = "10") Integer pageSize,
62
                                           @ApiParam("单页数据量") @RequestParam(value ="pageSize",defaultValue = "10") Integer pageSize,
61
                                           @ApiParam("商铺") @RequestParam(value ="shopId", required = false) String shopId,
63
                                           @ApiParam("商铺") @RequestParam(value ="shopId", required = false) String shopId,
66
         return ResponseBean.success(result);
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
      * @param shopPackageVO 实体对象
88
      * @param shopPackageVO 实体对象

+ 21
- 0
src/main/java/com/yunzhi/shigongli/controller/TaTouristController.java 查看文件

5
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
5
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
6
 import com.yunzhi.shigongli.common.BaseController;
6
 import com.yunzhi.shigongli.common.BaseController;
7
 import com.yunzhi.shigongli.common.Constants;
7
 import com.yunzhi.shigongli.common.Constants;
8
+import com.yunzhi.shigongli.common.ExcelUtils;
8
 import com.yunzhi.shigongli.common.ResponseBean;
9
 import com.yunzhi.shigongli.common.ResponseBean;
9
 import com.yunzhi.shigongli.entity.TaLike;
10
 import com.yunzhi.shigongli.entity.TaLike;
10
 import com.yunzhi.shigongli.entity.TaResource;
11
 import com.yunzhi.shigongli.entity.TaResource;
26
 import com.yunzhi.shigongli.entity.TaTourist;
27
 import com.yunzhi.shigongli.entity.TaTourist;
27
 import org.springframework.web.bind.annotation.RestController;
28
 import org.springframework.web.bind.annotation.RestController;
28
 
29
 
30
+import javax.servlet.http.HttpServletResponse;
31
+
29
 /**
32
 /**
30
  * <p>
33
  * <p>
31
     * 旅游景点 前端控制器
34
     * 旅游景点 前端控制器
83
         return ResponseBean.success(result);
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
      * @param taTourist 实体对象
109
      * @param taTourist 实体对象

+ 19
- 1
src/main/java/com/yunzhi/shigongli/entity/TaFeedback.java 查看文件

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

+ 13
- 0
src/main/java/com/yunzhi/shigongli/entity/TaHotWord.java 查看文件

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

+ 14
- 1
src/main/java/com/yunzhi/shigongli/entity/TaNotification.java 查看文件

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

+ 25
- 0
src/main/java/com/yunzhi/shigongli/entity/TaPerson.java 查看文件

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

+ 36
- 1
src/main/java/com/yunzhi/shigongli/entity/TaTourist.java 查看文件

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

+ 3
- 0
src/main/java/com/yunzhi/shigongli/mapper/TaFeedbackMapper.java 查看文件

7
 import org.apache.ibatis.annotations.Param;
7
 import org.apache.ibatis.annotations.Param;
8
 
8
 
9
 import java.time.LocalDateTime;
9
 import java.time.LocalDateTime;
10
+import java.util.List;
10
 
11
 
11
 /**
12
 /**
12
  * <p>
13
  * <p>
22
     TaFeedback getProfileById(Integer id);
23
     TaFeedback getProfileById(Integer id);
23
 
24
 
24
     IPage<TaFeedback> getProfilePage(IPage<TaFeedback> pg, @Param("startDate") LocalDateTime startDate, @Param("endDate") LocalDateTime endDate);
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
 @Mapper
22
 @Mapper
23
 public interface TaHotelMapper extends BaseMapper<TaHotel> {
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
     List<TaHotel> getListByPerson(@Param("personId") String personId);
29
     List<TaHotel> getListByPerson(@Param("personId") String personId);
28
 
30
 

+ 3
- 1
src/main/java/com/yunzhi/shigongli/mapper/TaRoomMapper.java 查看文件

22
 @Mapper
22
 @Mapper
23
 public interface TaRoomMapper extends BaseMapper<TaRoom> {
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
     List<TaHotelWorker> getRoomOwners(@Param("roomId") String roomId, @Param("personId") String personId);
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
 import org.apache.ibatis.annotations.Param;
9
 import org.apache.ibatis.annotations.Param;
10
 
10
 
11
 import java.time.LocalDateTime;
11
 import java.time.LocalDateTime;
12
+import java.util.List;
12
 
13
 
13
 /**
14
 /**
14
  * <p>
15
  * <p>
26
                             @Param("start") LocalDateTime start,
27
                             @Param("start") LocalDateTime start,
27
                             @Param("end") LocalDateTime end);
28
                             @Param("end") LocalDateTime end);
28
 
29
 
29
-    IPage<ShopCommissionVO> getShopAccountList(IPage<ShopCommissionVO> pg,
30
+    IPage<ShopCommissionVO> getShopAccountPage(IPage<ShopCommissionVO> pg,
30
                                           @Param("amountType") String amountType,
31
                                           @Param("amountType") String amountType,
31
                                           @Param("shopName") String shopName,
32
                                           @Param("shopName") String shopName,
32
                                           @Param("description") String description,
33
                                           @Param("description") String description,
33
                                           @Param("startDate") LocalDateTime startDate,
34
                                           @Param("startDate") LocalDateTime startDate,
34
                                           @Param("endDate") LocalDateTime endDate);
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
                         @Param("id") String id,
35
                         @Param("id") String id,
36
                         @Param("personId") String personId,
36
                         @Param("personId") String personId,
37
                         @Param("location") String location);
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
                                                   @Param("location") String location,
34
                                                   @Param("location") String location,
35
                                                   @Param("personId") String personId,
35
                                                   @Param("personId") String personId,
36
                                                   @Param("limit") Integer limit);
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
 import org.apache.ibatis.annotations.Mapper;
6
 import org.apache.ibatis.annotations.Mapper;
7
 import org.apache.ibatis.annotations.Param;
7
 import org.apache.ibatis.annotations.Param;
8
 
8
 
9
+import java.util.List;
10
+
9
 /**
11
 /**
10
  * <p>
12
  * <p>
11
  * 旅游景点 Mapper 接口
13
  * 旅游景点 Mapper 接口
20
     IPage<TaTourist> getPagedBy(IPage<TaTourist> pg, @Param("targetTourist") String targetTourist, @Param("touristName") String touristName, @Param("cityId") String cityId);
22
     IPage<TaTourist> getPagedBy(IPage<TaTourist> pg, @Param("targetTourist") String targetTourist, @Param("touristName") String touristName, @Param("cityId") String cityId);
21
 
23
 
22
     TaTourist getProfileBy(@Param("targetTourist") String targetTourist, @Param("id") String id, @Param("personId") String personId, @Param("location") String location);
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
 
23
 
24
     boolean createNew(TaHotel taHotel) throws Exception;
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
     List<TaHotel> getListByPerson(TaPerson taPerson);
28
     List<TaHotel> getListByPerson(TaPerson taPerson);
29
 
29
 

+ 1
- 1
src/main/java/com/yunzhi/shigongli/service/ITaRoomService.java 查看文件

15
  */
15
  */
16
 public interface ITaRoomService extends IBaseService<TaRoom> {
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
     boolean getIsExistKeeper(String roomId, String personId);
20
     boolean getIsExistKeeper(String roomId, String personId);
21
 }
21
 }

+ 2
- 0
src/main/java/com/yunzhi/shigongli/service/ITaShopPackageService.java 查看文件

30
     IPage<TaShopPackage> getWxPackageList(IPage<TaShopPackage> page, String shopId, TaPerson currentPerson);
30
     IPage<TaShopPackage> getWxPackageList(IPage<TaShopPackage> page, String shopId, TaPerson currentPerson);
31
 
31
 
32
     List<ShopPackageRecommend> getWxRecommendList(String location, TaPerson taPerson) throws Exception ;
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
 package com.yunzhi.shigongli.service.impl;
1
 package com.yunzhi.shigongli.service.impl;
2
 
2
 
3
 import com.baomidou.mybatisplus.core.metadata.IPage;
3
 import com.baomidou.mybatisplus.core.metadata.IPage;
4
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
4
 import com.yunzhi.shigongli.entity.TaFeedback;
5
 import com.yunzhi.shigongli.entity.TaFeedback;
5
 import com.yunzhi.shigongli.mapper.TaFeedbackMapper;
6
 import com.yunzhi.shigongli.mapper.TaFeedbackMapper;
6
 import com.yunzhi.shigongli.service.ITaFeedbackService;
7
 import com.yunzhi.shigongli.service.ITaFeedbackService;
8
 import org.springframework.stereotype.Service;
9
 import org.springframework.stereotype.Service;
9
 
10
 
10
 import java.time.LocalDateTime;
11
 import java.time.LocalDateTime;
12
+import java.util.List;
11
 
13
 
12
 /**
14
 /**
13
  * <p>
15
  * <p>
27
 
29
 
28
     @Override
30
     @Override
29
     public IPage<TaFeedback> getProfilePage(IPage<TaFeedback> pg, LocalDateTime startDate, LocalDateTime endDate) {
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
     }
59
     }
60
 
60
 
61
     @Override
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
     @Override
74
     @Override

+ 10
- 2
src/main/java/com/yunzhi/shigongli/service/impl/TaRoomServiceImpl.java 查看文件

1
 package com.yunzhi.shigongli.service.impl;
1
 package com.yunzhi.shigongli.service.impl;
2
 
2
 
3
 import com.baomidou.mybatisplus.core.metadata.IPage;
3
 import com.baomidou.mybatisplus.core.metadata.IPage;
4
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
4
 import com.yunzhi.shigongli.entity.TaHotelWorker;
5
 import com.yunzhi.shigongli.entity.TaHotelWorker;
5
 import com.yunzhi.shigongli.entity.TaRoom;
6
 import com.yunzhi.shigongli.entity.TaRoom;
6
 import com.yunzhi.shigongli.entity.TaShopWorker;
7
 import com.yunzhi.shigongli.entity.TaShopWorker;
28
     TaRoomMapper taRoomMapper;
29
     TaRoomMapper taRoomMapper;
29
 
30
 
30
     @Override
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
     @Override
43
     @Override

+ 16
- 1
src/main/java/com/yunzhi/shigongli/service/impl/TaShopPackageServiceImpl.java 查看文件

2
 
2
 
3
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
3
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
4
 import com.baomidou.mybatisplus.core.metadata.IPage;
4
 import com.baomidou.mybatisplus.core.metadata.IPage;
5
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
5
 import com.yunzhi.shigongli.common.Constants;
6
 import com.yunzhi.shigongli.common.Constants;
6
 import com.yunzhi.shigongli.entity.TaPerson;
7
 import com.yunzhi.shigongli.entity.TaPerson;
7
 import com.yunzhi.shigongli.entity.TaShopPackage;
8
 import com.yunzhi.shigongli.entity.TaShopPackage;
143
 
144
 
144
     @Override
145
     @Override
145
     public IPage<ShopPackageVO> getProfilePage(IPage<TaShopPackage> pg, String shopId, String description) {
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
     @Override
158
     @Override
157
         Integer limit = 3;
166
         Integer limit = 3;
158
         return baseMapper.getWxRecommendList(Constants.TARGET_SHOP_PACKAGE, location, taPerson.getPersonId(), limit);
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
 
57
 
58
     @Override
58
     @Override
59
     public IPage<ShopListVO> getPageListBy(IPage<ShopListVO> pg, String shopName, String phone) {
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
     @Transactional(rollbackFor = Exception.class)
70
     @Transactional(rollbackFor = Exception.class)
142
 
149
 
143
     @Override
150
     @Override
144
     public IPage<ShopCommissionVO> getCommissionList(IPage<ShopCommissionVO> pg, String shopName, String description, LocalDateTime startDate, LocalDateTime endDate) {
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
     @Override
163
     @Override

+ 11
- 1
src/main/java/com/yunzhi/shigongli/service/impl/TaTouristServiceImpl.java 查看文件

1
 package com.yunzhi.shigongli.service.impl;
1
 package com.yunzhi.shigongli.service.impl;
2
 
2
 
3
 import com.baomidou.mybatisplus.core.metadata.IPage;
3
 import com.baomidou.mybatisplus.core.metadata.IPage;
4
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
4
 import com.yunzhi.shigongli.common.Constants;
5
 import com.yunzhi.shigongli.common.Constants;
5
 import com.yunzhi.shigongli.common.StringUtils;
6
 import com.yunzhi.shigongli.common.StringUtils;
6
 import com.yunzhi.shigongli.entity.*;
7
 import com.yunzhi.shigongli.entity.*;
16
 import org.springframework.stereotype.Service;
17
 import org.springframework.stereotype.Service;
17
 import org.springframework.transaction.annotation.Transactional;
18
 import org.springframework.transaction.annotation.Transactional;
18
 
19
 
20
+import java.util.List;
21
+
19
 /**
22
 /**
20
  * <p>
23
  * <p>
21
  * 旅游景点 服务实现类
24
  * 旅游景点 服务实现类
38
 
41
 
39
     @Override
42
     @Override
40
     public IPage<TaTourist> getPagedBy(IPage<TaTourist> pg, String touristName, String cityId) {
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
     @Transactional(rollbackFor = Exception.class)
54
     @Transactional(rollbackFor = Exception.class)

+ 13
- 2
src/main/java/com/yunzhi/shigongli/vo/HotelListVO.java 查看文件

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

+ 16
- 6
src/main/java/com/yunzhi/shigongli/vo/OrderSubListVO.java 查看文件

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

+ 64
- 1
src/main/java/com/yunzhi/shigongli/vo/RoomListVO.java 查看文件

1
 package com.yunzhi.shigongli.vo;
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
 import com.yunzhi.shigongli.entity.TaRoom;
8
 import com.yunzhi.shigongli.entity.TaRoom;
4
 import io.swagger.annotations.ApiModel;
9
 import io.swagger.annotations.ApiModel;
5
 import io.swagger.annotations.ApiModelProperty;
10
 import io.swagger.annotations.ApiModelProperty;
6
 import lombok.Data;
11
 import lombok.Data;
7
 
12
 
13
+import java.time.LocalDateTime;
14
+
8
 
15
 
9
 @ApiModel(description = "修改密码参数")
16
 @ApiModel(description = "修改密码参数")
10
 @Data
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
     @ApiModelProperty("民宿名称")
77
     @ApiModelProperty("民宿名称")
15
     String hotelName;
78
     String hotelName;
16
 }
79
 }

+ 24
- 0
src/main/java/com/yunzhi/shigongli/vo/ShopCommissionVO.java 查看文件

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

+ 22
- 5
src/main/java/com/yunzhi/shigongli/vo/ShopListVO.java 查看文件

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

+ 86
- 1
src/main/java/com/yunzhi/shigongli/vo/ShopPackageVO.java 查看文件

1
 package com.yunzhi.shigongli.vo;
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
 import com.yunzhi.shigongli.entity.TaShopPackage;
12
 import com.yunzhi.shigongli.entity.TaShopPackage;
4
 import com.yunzhi.shigongli.entity.TaTargetDietMark;
13
 import com.yunzhi.shigongli.entity.TaTargetDietMark;
5
 import io.swagger.annotations.ApiModel;
14
 import io.swagger.annotations.ApiModel;
6
 import io.swagger.annotations.ApiModelProperty;
15
 import io.swagger.annotations.ApiModelProperty;
7
 import lombok.Data;
16
 import lombok.Data;
8
 
17
 
18
+import java.time.LocalDateTime;
9
 import java.util.List;
19
 import java.util.List;
10
 
20
 
11
 
21
 
12
 @ApiModel(description = "商品套餐全字段")
22
 @ApiModel(description = "商品套餐全字段")
13
 @Data
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
     @ApiModelProperty(value = "商铺名称")
95
     @ApiModelProperty(value = "商铺名称")
17
     private String shopName;
96
     private String shopName;
18
 
97
 
98
+    @ExcelIgnore
19
     @ApiModelProperty(value = "引流分成;单位千分之一")
99
     @ApiModelProperty(value = "引流分成;单位千分之一")
20
     private Integer trafficRate;
100
     private Integer trafficRate;
21
 
101
 
102
+    @ExcelIgnore
22
     @ApiModelProperty(value = "平台分成;单位千分之一")
103
     @ApiModelProperty(value = "平台分成;单位千分之一")
23
     private Integer platformRate;
104
     private Integer platformRate;
24
 
105
 
106
+    @ExcelIgnore
25
     @ApiModelProperty(value = "参与攻略")
107
     @ApiModelProperty(value = "参与攻略")
26
     private Boolean isStrategy;
108
     private Boolean isStrategy;
27
 
109
 
110
+    @ExcelProperty(value = "推荐级别", index = 6)
111
+    @ColumnWidth(20)
28
     @ApiModelProperty(value = "推荐等级")
112
     @ApiModelProperty(value = "推荐等级")
29
     private String strategyLevel;
113
     private String strategyLevel;
30
 
114
 
115
+    @ExcelIgnore
31
     @ApiModelProperty(value = "类别")
116
     @ApiModelProperty(value = "类别")
32
     private List<TaTargetDietMark> dietMarkList;
117
     private List<TaTargetDietMark> dietMarkList;
33
 
118
 

+ 16
- 8
src/main/resources/mapper/TaFeedbackMapper.xml 查看文件

12
         WHERE
12
         WHERE
13
             t.feedback_id = #{id}
13
             t.feedback_id = #{id}
14
     </select>
14
     </select>
15
-    <select id="getProfilePage" resultType="com.yunzhi.shigongli.entity.TaFeedback">
15
+
16
+    <sql id="queryFeedBack">
16
         SELECT
17
         SELECT
17
             t.*,
18
             t.*,
18
             s.phone,
19
             s.phone,
19
             s.nick_name
20
             s.nick_name
20
         FROM
21
         FROM
21
             ta_feedback t
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
         WHERE 1 = 1
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
         ORDER BY t.create_date DESC
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
     </select>
39
     </select>
32
 </mapper>
40
 </mapper>

+ 13
- 5
src/main/resources/mapper/TaHotelMapper.xml 查看文件

2
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
2
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
3
 <mapper namespace="com.yunzhi.shigongli.mapper.TaHotelMapper">
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
         SELECT
6
         SELECT
7
             t.*,
7
             t.*,
8
             s.brokerage_charges,
8
             s.brokerage_charges,
11
             ( SELECT count( * ) FROM ta_room b WHERE b.hotel_id = t.hotel_id AND b.`status` &gt; - 1 ) AS room_num
11
             ( SELECT count( * ) FROM ta_room b WHERE b.hotel_id = t.hotel_id AND b.`status` &gt; - 1 ) AS room_num
12
         FROM
12
         FROM
13
             ta_hotel t
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
         WHERE 1 = 1
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
             AND t.`status` &gt; - 1
19
             AND t.`status` &gt; - 1
20
         ORDER BY
20
         ORDER BY
21
             t.create_date DESC
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
     </select>
30
     </select>
23
     <select id="getListByPerson" resultType="com.yunzhi.shigongli.entity.TaHotel">
31
     <select id="getListByPerson" resultType="com.yunzhi.shigongli.entity.TaHotel">
24
         SELECT
32
         SELECT

+ 21
- 14
src/main/resources/mapper/TaRoomMapper.xml 查看文件

2
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
2
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
3
 <mapper namespace="com.yunzhi.shigongli.mapper.TaRoomMapper">
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
         SELECT
6
         SELECT
7
             t.*,
7
             t.*,
8
             s.hotel_name
8
             s.hotel_name
9
         FROM
9
         FROM
10
             ta_room t
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
         WHERE 1=1
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
         ORDER BY
25
         ORDER BY
26
             t.weight DESC,
26
             t.weight DESC,
27
             t.create_date DESC
27
             t.create_date DESC
28
+    </sql>
29
+
30
+    <select id="getPageListBy" resultType="com.yunzhi.shigongli.vo.RoomListVO">
31
+        <include refid="queryRoom"></include>
28
     </select>
32
     </select>
29
     <select id="getRoomOwners" resultType="com.yunzhi.shigongli.entity.TaHotelWorker">
33
     <select id="getRoomOwners" resultType="com.yunzhi.shigongli.entity.TaHotelWorker">
30
         SELECT DISTINCT
34
         SELECT DISTINCT
38
           AND s.`status` &gt; - 1
42
           AND s.`status` &gt; - 1
39
           AND t.`status` &gt; -1
43
           AND t.`status` &gt; -1
40
     </select>
44
     </select>
45
+    <select id="getPureListBy" resultType="com.yunzhi.shigongli.vo.RoomListVO">
46
+        <include refid="queryRoom"></include>
47
+    </select>
41
 </mapper>
48
 </mapper>

+ 21
- 13
src/main/resources/mapper/TaShopAccountLogMapper.xml 查看文件

12
           AND t.amount_type = #{amountType}
12
           AND t.amount_type = #{amountType}
13
           AND t.create_date BETWEEN #{start} AND #{end}
13
           AND t.create_date BETWEEN #{start} AND #{end}
14
     </select>
14
     </select>
15
-    <select id="getShopAccountList" resultType="com.yunzhi.shigongli.vo.ShopCommissionVO">
15
+
16
+    <sql id="queryShopAccount">
16
         SELECT
17
         SELECT
17
             t.log_id,
18
             t.log_id,
18
             t.shop_id,
19
             t.shop_id,
35
             INNER JOIN ta_person p ON p.person_id = n.person_id
36
             INNER JOIN ta_person p ON p.person_id = n.person_id
36
         WHERE
37
         WHERE
37
             t.amount_type = #{amountType}
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
         ORDER BY
51
         ORDER BY
51
             t.create_date DESC
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
     </select>
60
     </select>
53
 </mapper>
61
 </mapper>

+ 17
- 8
src/main/resources/mapper/TaShopMapper.xml 查看文件

29
             SET t.${field} = score
29
             SET t.${field} = score
30
     </update>
30
     </update>
31
 
31
 
32
-    <select id="getPageListBy" resultType="com.yunzhi.shigongli.vo.ShopListVO">
32
+    <sql id="queryShop">
33
         SELECT
33
         SELECT
34
             t.*,
34
             t.*,
35
             ( SELECT COUNT(1) FROM ta_shop_worker a WHERE a.shop_id = t.shop_id AND a.`status` &gt; -1 ) as worker_num,
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
             ( SELECT count( 1 ) FROM ta_order_sub c WHERE c.shop_id = t.shop_id AND c.`status` &gt; -1 ) AS order_sub_num
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
         FROM
42
         FROM
43
             ta_shop t
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
         WHERE
47
         WHERE
46
             t.`status` &gt; - 1
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
         ORDER BY
55
         ORDER BY
54
             t.weight DESC,
56
             t.weight DESC,
55
             t.create_date DESC
57
             t.create_date DESC
58
+    </sql>
59
+
60
+    <select id="getPageListBy" resultType="com.yunzhi.shigongli.vo.ShopListVO">
61
+        <include refid="queryShop"></include>
56
     </select>
62
     </select>
57
     <select id="getListByPerson" resultType="com.yunzhi.shigongli.entity.TaShop">
63
     <select id="getListByPerson" resultType="com.yunzhi.shigongli.entity.TaShop">
58
         SELECT
64
         SELECT
106
         WHERE
110
         WHERE
107
             t.shop_id = #{id}
111
             t.shop_id = #{id}
108
     </select>
112
     </select>
113
+    <select id="getListBy" resultType="com.yunzhi.shigongli.vo.ShopListVO">
114
+        <include refid="queryShop"></include>
115
+    </select>
109
 </mapper>
116
 </mapper>

+ 21
- 9
src/main/resources/mapper/TaShopPackageMapper.xml 查看文件

1
 <?xml version="1.0" encoding="UTF-8"?>
1
 <?xml version="1.0" encoding="UTF-8"?>
2
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
2
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
3
 <mapper namespace="com.yunzhi.shigongli.mapper.TaShopPackageMapper">
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
         SELECT
11
         SELECT
7
             t.*,
12
             t.*,
8
             m.shop_name,
13
             m.shop_name,
12
             s.strategy_level
17
             s.strategy_level
13
         FROM
18
         FROM
14
             ta_shop_package t
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
         WHERE
22
         WHERE
18
             t.`status` &gt; - 1
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
         ORDER BY
30
         ORDER BY
26
             t.weight DESC,
31
             t.weight DESC,
27
             t.create_date DESC
32
             t.create_date DESC
33
+    </sql>
34
+
35
+    <select id="getProfilePage" resultType="com.yunzhi.shigongli.vo.ShopPackageVO">
36
+        <include refid="queryShopPackage"></include>
28
     </select>
37
     </select>
29
     <select id="getWxPackageList" resultType="com.yunzhi.shigongli.entity.TaShopPackage">
38
     <select id="getWxPackageList" resultType="com.yunzhi.shigongli.entity.TaShopPackage">
30
         SELECT
39
         SELECT
72
             a.weight DESC
81
             a.weight DESC
73
         LIMIT #{limit}
82
         LIMIT #{limit}
74
     </select>
83
     </select>
84
+    <select id="getProfileList" resultType="com.yunzhi.shigongli.vo.ShopPackageVO">
85
+        <include refid="queryShopPackage"></include>
86
+    </select>
75
 </mapper>
87
 </mapper>

+ 15
- 8
src/main/resources/mapper/TaTouristMapper.xml 查看文件

2
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
2
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
3
 <mapper namespace="com.yunzhi.shigongli.mapper.TaTouristMapper">
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
         SELECT
6
         SELECT
7
             t.*,
7
             t.*,
8
             s.like_num,
8
             s.like_num,
13
         FROM
13
         FROM
14
             ta_tourist t
14
             ta_tourist t
15
             LEFT JOIN ta_resource s ON s.target_type = #{targetTourist}
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
             LEFT JOIN td_city m on m.area_id = t.city_id
17
             LEFT JOIN td_city m on m.area_id = t.city_id
18
         WHERE
18
         WHERE
19
             t.`status` &gt; - 1
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
         ORDER BY
26
         ORDER BY
27
             t.weight DESC,
27
             t.weight DESC,
28
             t.create_date DESC
28
             t.create_date DESC
29
+    </sql>
30
+
31
+    <select id="getPagedBy" resultType="com.yunzhi.shigongli.entity.TaTourist">
32
+        <include refid="queryTourist"></include>
29
     </select>
33
     </select>
30
     <select id="getProfileBy" resultType="com.yunzhi.shigongli.entity.TaTourist">
34
     <select id="getProfileBy" resultType="com.yunzhi.shigongli.entity.TaTourist">
31
         SELECT
35
         SELECT
64
         WHERE
68
         WHERE
65
             t.tourist_id = #{id}
69
             t.tourist_id = #{id}
66
     </select>
70
     </select>
71
+    <select id="getListBy" resultType="com.yunzhi.shigongli.entity.TaTourist">
72
+        <include refid="queryTourist"></include>
73
+    </select>
67
 </mapper>
74
 </mapper>