fuxingfan 3 лет назад
Родитель
Сommit
434ead5171

+ 5
- 0
src/main/java/com/yunzhi/marketing/center/taUser/entity/TaUser.java Просмотреть файл

@@ -114,6 +114,11 @@ public class TaUser implements Serializable {
114 114
     private String photo;
115 115
     private String description;
116 116
 
117
+    /**
118
+     * 工号
119
+     */
120
+    private String jobNumber;
121
+
117 122
     /**
118 123
      * 权重
119 124
      */

+ 7
- 2
src/main/java/com/yunzhi/marketing/controller/TaLiveActivityController.java Просмотреть файл

@@ -11,6 +11,8 @@ import com.yunzhi.marketing.entity.TaLiveActivity;
11 11
 import com.yunzhi.marketing.reportCustomerAop.ReportCustomer;
12 12
 import com.yunzhi.marketing.service.IExtendContentService;
13 13
 import com.yunzhi.marketing.service.ITaLiveActivityService;
14
+import io.swagger.annotations.Api;
15
+import io.swagger.annotations.ApiOperation;
14 16
 import org.slf4j.Logger;
15 17
 import org.slf4j.LoggerFactory;
16 18
 import org.springframework.beans.factory.annotation.Autowired;
@@ -30,6 +32,7 @@ import java.util.List;
30 32
  */
31 33
 @RestController
32 34
 @RequestMapping("/api")
35
+@Api(value = "直播活动", tags = "xlk-直播活动")
33 36
 public class TaLiveActivityController extends BaseController {
34 37
 
35 38
     private final Logger logger = LoggerFactory.getLogger(TaLiveActivityController.class);
@@ -254,6 +257,7 @@ public class TaLiveActivityController extends BaseController {
254 257
      * @param request
255 258
      * @return
256 259
      */
260
+    @ApiOperation(value = "wx-视频直播列表", notes = "admin-视频直播列表")
257 261
     @RequestMapping(value = "/wx/taLiveActivity", method = RequestMethod.GET)
258 262
     public ResponseBean taLiveActivityListForMiniApp(@RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
259 263
                                                      @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize,
@@ -262,13 +266,14 @@ public class TaLiveActivityController extends BaseController {
262 266
                                                      String buildingId,
263 267
                                                      Integer status,
264 268
                                                      @RequestParam(value = "source", defaultValue = "1") Integer source,
269
+                                                     @RequestParam(value = "buildingName", required = false) Integer buildingName,
265 270
                                                      HttpServletRequest request) {
266 271
         ResponseBean responseBean = new ResponseBean();
267 272
         try {
268 273
             status = status == null ? 1 : status;
269 274
             Integer orgId = getOrgId(request);
270
-            IPage<TaLiveActivity> result = iTaLiveActivityService.listLiveActivityByCondition(pageNum, pageSize, orgId,
271
-                    liveActivityTitle, cityId, buildingId, status, null, null, source);
275
+            IPage<TaLiveActivity> result = iTaLiveActivityService.getWxLiveActivityAndVideo(pageNum, pageSize, orgId,
276
+                    liveActivityTitle, cityId, buildingId, status, buildingName, source);
272 277
             responseBean.addSuccess(result);
273 278
 
274 279
         } catch (Exception e) {

+ 9
- 0
src/main/java/com/yunzhi/marketing/mapper/TaLiveActivityMapper.java Просмотреть файл

@@ -48,4 +48,13 @@ public interface TaLiveActivityMapper extends BaseMapper<TaLiveActivity> {
48 48
     void updateLiveActivityStatus(@Param("orgId") Integer orgId, @Param("taLiveActivityList") List<TaLiveActivity> taLiveActivityList);
49 49
 
50 50
     TaLiveActivity getDetailById(@Param("id")Integer id);
51
+
52
+    IPage<TaLiveActivity> getWxLiveActivityAndVideo(IPage<TaLiveActivity> pg,
53
+                                                    @Param("liveActivityTitle")  String liveActivityTitle,
54
+                                                    @Param("cityId") String cityId,
55
+                                                    @Param("buildingId") String buildingId,
56
+                                                    @Param("status") Integer status,
57
+                                                    @Param("orgId") Integer orgId,
58
+                                                    @Param("buildingName") Integer buildingName,
59
+                                                    @Param("source") Integer source);
51 60
 }

+ 15
- 0
src/main/java/com/yunzhi/marketing/service/ITaLiveActivityService.java Просмотреть файл

@@ -63,4 +63,19 @@ public interface ITaLiveActivityService extends IService<TaLiveActivity> {
63 63
     ResponseBean delLiveActivityList(Integer orgId, List<TaLiveActivity> liveActivityList);
64 64
 
65 65
     ResponseBean getDetailById(Integer id);
66
+
67
+    /**
68
+     * 微信小程序查询直播列表
69
+     * @param pageNum
70
+     * @param pageSize
71
+     * @param orgId
72
+     * @param liveActivityTitle
73
+     * @param cityId
74
+     * @param buildingId
75
+     * @param status
76
+     * @param buildingName
77
+     * @param source
78
+     * @return
79
+     */
80
+    IPage<TaLiveActivity> getWxLiveActivityAndVideo(Integer pageNum, Integer pageSize, Integer orgId, String liveActivityTitle, String cityId, String buildingId, Integer status, Integer buildingName, Integer source);
66 81
 }

+ 20
- 0
src/main/java/com/yunzhi/marketing/service/impl/TaLiveActivityServiceImpl.java Просмотреть файл

@@ -196,4 +196,24 @@ public class TaLiveActivityServiceImpl extends ServiceImpl<TaLiveActivityMapper,
196 196
         responseBean.addSuccess(taLiveActivityMapper.getDetailById(id));
197 197
         return responseBean;
198 198
     }
199
+
200
+    /**
201
+     * 微信小程序查询直播列表
202
+     *
203
+     * @param pageNum
204
+     * @param pageSize
205
+     * @param orgId
206
+     * @param liveActivityTitle
207
+     * @param cityId
208
+     * @param buildingId
209
+     * @param status
210
+     * @param buildingName
211
+     * @param source
212
+     * @return
213
+     */
214
+    @Override
215
+    public IPage<TaLiveActivity> getWxLiveActivityAndVideo(Integer pageNum, Integer pageSize, Integer orgId, String liveActivityTitle, String cityId, String buildingId, Integer status, Integer buildingName, Integer source) {
216
+        IPage<TaLiveActivity> pg = new Page<>(pageNum, pageSize);
217
+        return taLiveActivityMapper.getWxLiveActivityAndVideo(pg, liveActivityTitle, cityId, buildingId, status, orgId, buildingName, source);
218
+    }
199 219
 }

+ 5
- 5
src/main/java/com/yunzhi/marketing/xlk/controller/BrandController.java Просмотреть файл

@@ -58,7 +58,7 @@ public class BrandController extends BaseController {
58 58
      * @param pageSize
59 59
      * @return
60 60
      */
61
-    @ApiOperation(value = "品牌开发商表列表", notes = "品牌开发商表列表")
61
+    @ApiOperation(value = "admin-品牌开发商表列表", notes = "admin-品牌开发商表列表")
62 62
     @RequestMapping(value="/admin/brand",method= RequestMethod.GET)
63 63
     public ResponseBean brandList(@RequestParam(value ="pageNum",defaultValue = "1") Integer pageNum,
64 64
                                   @RequestParam(value ="pageSize",defaultValue = "10") Integer pageSize, @RequestHeader("authorization") String token,HttpServletRequest request){
@@ -85,7 +85,7 @@ public class BrandController extends BaseController {
85 85
      * @param brandDTO 实体对象
86 86
      * @return
87 87
      */
88
-    @ApiOperation(value = "添加品牌开发商表", notes = "添加品牌开发商表")
88
+    @ApiOperation(value = "admin-添加品牌开发商表", notes = "admin-添加品牌开发商表")
89 89
     @RequestMapping(value="/admin/brand",method= RequestMethod.POST)
90 90
     public ResponseBean brandAdd(@RequestBody BrandDTO brandDTO, @RequestHeader("authorization") String token, HttpServletRequest request){
91 91
         ResponseBean responseBean = new ResponseBean();
@@ -112,7 +112,7 @@ public class BrandController extends BaseController {
112 112
      * 根据id删除对象
113 113
      * @param id  实体ID
114 114
      */
115
-    @ApiOperation(value = "删除品牌开发商表", notes = "删除品牌开发商表")
115
+    @ApiOperation(value = "admin-删除品牌开发商表", notes = "admin-删除品牌开发商表")
116 116
     @RequestMapping(value="/admin/brand/{id}", method= RequestMethod.DELETE)
117 117
     public ResponseBean brandDelete(@PathVariable String id, @RequestHeader("authorization") String token){
118 118
         ResponseBean responseBean = new ResponseBean();
@@ -144,7 +144,7 @@ public class BrandController extends BaseController {
144 144
      * @param brandDTO 实体对象
145 145
      * @return
146 146
      */
147
-    @ApiOperation(value = "修改品牌开发商表", notes = "修改品牌开发商表")
147
+    @ApiOperation(value = "admin-修改品牌开发商表", notes = "admin-修改品牌开发商表")
148 148
     @RequestMapping(value="/admin/brand/{id}",method= RequestMethod.PUT)
149 149
     public ResponseBean brandUpdate(@PathVariable("id") String id,@RequestBody BrandDTO brandDTO,@RequestHeader("authorization") String token,HttpServletRequest request){
150 150
         ResponseBean responseBean = new ResponseBean();
@@ -179,7 +179,7 @@ public class BrandController extends BaseController {
179 179
      * 根据id查询对象
180 180
      * @param id  实体ID
181 181
      */
182
-    @ApiOperation(value = "获取品牌开发商表详情数据", notes = "获取品牌开发商表详情数据")
182
+    @ApiOperation(value = "admin-获取品牌开发商表详情数据", notes = "admin-获取品牌开发商表详情数据")
183 183
     @RequestMapping(value="/admin/brand/{id}",method= RequestMethod.GET)
184 184
     public ResponseBean brandGet(@PathVariable String id, @RequestHeader("authorization") String token){
185 185
         ResponseBean responseBean = new ResponseBean();

+ 5
- 5
src/main/java/com/yunzhi/marketing/xlk/controller/CurriculumController.java Просмотреть файл

@@ -54,7 +54,7 @@ public class CurriculumController extends BaseController {
54 54
      * @param pageSize
55 55
      * @return
56 56
      */
57
-    @ApiOperation(value = "查询课程表列表", notes = "查询课程表列表")
57
+    @ApiOperation(value = "admin-查询课程表列表", notes = "admin-查询课程表列表")
58 58
     @RequestMapping(value="/admin/curriculum",method= RequestMethod.GET)
59 59
     public ResponseBean curriculumList(@RequestParam(value ="pageNum",defaultValue = "1") Integer pageNum,
60 60
                                        @RequestParam(value ="pageSize",defaultValue = "10") Integer pageSize,
@@ -83,7 +83,7 @@ public class CurriculumController extends BaseController {
83 83
      * @param curriculumDTO 实体对象
84 84
      * @return
85 85
      */
86
-    @ApiOperation(value = "新增课程表", notes = "新增课程表")
86
+    @ApiOperation(value = "admin-新增课程表", notes = "admin-新增课程表")
87 87
     @RequestMapping(value="/admin/curriculum",method= RequestMethod.POST)
88 88
     public ResponseBean curriculumAdd(@RequestBody CurriculumDTO curriculumDTO,
89 89
                                       @RequestHeader("authorization") String token, HttpServletRequest request){
@@ -111,7 +111,7 @@ public class CurriculumController extends BaseController {
111 111
      * 根据id删除对象
112 112
      * @param id  实体ID
113 113
      */
114
-    @ApiOperation(value = "根据id删除课程表", notes = "根据id删除课程表")
114
+    @ApiOperation(value = "admin-根据id删除课程表", notes = "admin-根据id删除课程表")
115 115
     @ResponseBody
116 116
     @RequestMapping(value="/admin/curriculum/{id}", method= RequestMethod.DELETE)
117 117
     public ResponseBean curriculumDelete(@PathVariable String id,
@@ -137,7 +137,7 @@ public class CurriculumController extends BaseController {
137 137
      * @param curriculumDTO 实体对象
138 138
      * @return
139 139
      */
140
-    @ApiOperation(value = "根据id修改课程表", notes = "根据id修改课程表")
140
+    @ApiOperation(value = "admin-根据id修改课程表", notes = "admin-根据id修改课程表")
141 141
     @RequestMapping(value="/admin/curriculum/{id}",method= RequestMethod.PUT)
142 142
     public ResponseBean curriculumUpdate(@PathVariable String id,
143 143
                                         @RequestBody CurriculumDTO curriculumDTO,
@@ -164,7 +164,7 @@ public class CurriculumController extends BaseController {
164 164
      * 根据id查询对象
165 165
      * @param id  实体ID
166 166
      */
167
-    @ApiOperation(value = "根据id查询课程表详情", notes = "根据id查询课程表详情")
167
+    @ApiOperation(value = "admin-根据id查询课程表详情", notes = "admin-根据id查询课程表详情")
168 168
     @RequestMapping(value="/admin/curriculum/{id}",method= RequestMethod.GET)
169 169
     public ResponseBean curriculumGet(@PathVariable String id,
170 170
                                       @RequestHeader("authorization") String token, HttpServletRequest request){

+ 4
- 4
src/main/java/com/yunzhi/marketing/xlk/controller/SearchHouseController.java Просмотреть файл

@@ -59,7 +59,7 @@ public class SearchHouseController extends BaseController {
59 59
      * @param pageSize
60 60
      * @return
61 61
      */
62
-    @ApiOperation(value = "获取帮我找房列表", notes = "获取帮我找房列表")
62
+    @ApiOperation(value = "admin-获取帮我找房列表", notes = "admin-获取帮我找房列表")
63 63
     @RequestMapping(value="/admin/searchHouse",method= RequestMethod.GET)
64 64
     public ResponseBean searchHouseList(@RequestParam(value ="pageNum",defaultValue = "1") Integer pageNum,
65 65
                                         @RequestParam(value ="pageSize",defaultValue = "10") Integer pageSize,
@@ -84,7 +84,7 @@ public class SearchHouseController extends BaseController {
84 84
      * @param searchHouseDTO 实体对象
85 85
      * @return
86 86
      */
87
-    @ApiOperation(value = "保存帮我找房需求", notes = "保存帮我找房需求")
87
+    @ApiOperation(value = "wx-保存帮我找房需求", notes = "wx-保存帮我找房需求")
88 88
     @RequestMapping(value="/wx/searchHouse",method= RequestMethod.POST)
89 89
     public ResponseBean searchHouseAdd(@RequestBody SearchHouseDTO searchHouseDTO, @RequestHeader("authorization") String token, HttpServletRequest request){
90 90
         ResponseBean responseBean = new ResponseBean();
@@ -120,7 +120,7 @@ public class SearchHouseController extends BaseController {
120 120
      * @param searchHouse 实体对象
121 121
      * @return
122 122
      */
123
-    @ApiOperation(value = "修改帮我找房需求", notes = "修改帮我找房需求")
123
+    @ApiOperation(value = "admin-修改帮我找房需求", notes = "admin-修改帮我找房需求")
124 124
     @RequestMapping(value="/admin/searchHouse/{id}",method= RequestMethod.PUT)
125 125
     public ResponseBean searchHouseUpdate(@PathVariable String id,
126 126
                                           @RequestBody SearchHouse searchHouse, @RequestHeader("authorization") String token, HttpServletRequest request){
@@ -144,7 +144,7 @@ public class SearchHouseController extends BaseController {
144 144
      * 根据id查询对象
145 145
      * @param id  实体ID
146 146
      */
147
-    @ApiOperation(value = "根据id查询帮我找房需求详情", notes = "根据id查询帮我找房需求详情")
147
+    @ApiOperation(value = "admin-根据id查询帮我找房需求详情", notes = "admin-根据id查询帮我找房需求详情")
148 148
     @RequestMapping(value="/admin/searchHouse/{id}",method= RequestMethod.GET)
149 149
     public ResponseBean searchHouseGet(@PathVariable String id, @RequestHeader("authorization") String token, HttpServletRequest request){
150 150
         ResponseBean responseBean = new ResponseBean();

+ 32
- 5
src/main/java/com/yunzhi/marketing/xlk/controller/VideoController.java Просмотреть файл

@@ -54,7 +54,7 @@ public class VideoController extends BaseController {
54 54
      * @param pageSize
55 55
      * @return
56 56
      */
57
-    @ApiOperation(value = "视频列表", notes = "视频列表")
57
+    @ApiOperation(value = "admin-视频列表", notes = "admin-视频列表")
58 58
     @RequestMapping(value="/admin/video",method= RequestMethod.GET)
59 59
     public ResponseBean videoList(@RequestParam(value ="pageNum",defaultValue = "1") Integer pageNum,
60 60
                                   @RequestParam(value ="pageSize",defaultValue = "10") Integer pageSize,
@@ -85,7 +85,7 @@ public class VideoController extends BaseController {
85 85
      * @param videoDTO 实体对象
86 86
      * @return
87 87
      */
88
-    @ApiOperation(value = "添加视频", notes = "添加视频")
88
+    @ApiOperation(value = "admin-添加视频", notes = "admin-添加视频")
89 89
     @RequestMapping(value="/admin/video",method= RequestMethod.POST)
90 90
     public ResponseBean videoAdd(@RequestBody VideoDTO videoDTO, @RequestHeader("authorization") String token, HttpServletRequest request){
91 91
         ResponseBean responseBean = new ResponseBean();
@@ -112,7 +112,7 @@ public class VideoController extends BaseController {
112 112
      * 根据id删除对象
113 113
      * @param id  实体ID
114 114
      */
115
-    @ApiOperation(value = "根据id删除视频", notes = "根据id删除视频")
115
+    @ApiOperation(value = "admin-根据id删除视频", notes = "admin-根据id删除视频")
116 116
     @ResponseBody
117 117
     @RequestMapping(value="/admin/video/{id}", method= RequestMethod.DELETE)
118 118
     public ResponseBean videoDelete(@PathVariable String id,@RequestHeader("authorization") String token){
@@ -137,7 +137,7 @@ public class VideoController extends BaseController {
137 137
      * @param videoDTO 实体对象
138 138
      * @return
139 139
      */
140
-    @ApiOperation(value = "根据id修改视频", notes = "根据id修改视频")
140
+    @ApiOperation(value = "admin-根据id修改视频", notes = "admin-根据id修改视频")
141 141
     @RequestMapping(value="/admin/video/{id}",method= RequestMethod.PUT)
142 142
     public ResponseBean videoUpdate(@PathVariable String id,
143 143
                                         @RequestBody VideoDTO videoDTO,@RequestHeader("authorization") String token){
@@ -163,7 +163,7 @@ public class VideoController extends BaseController {
163 163
      * 根据id查询对象
164 164
      * @param id  实体ID
165 165
      */
166
-    @ApiOperation(value = "根据id查询详情", notes = "根据id查询详情")
166
+    @ApiOperation(value = "admin-根据id查询详情", notes = "admin-根据id查询详情")
167 167
     @RequestMapping(value="/admin/video/{id}",method= RequestMethod.GET)
168 168
     public ResponseBean videoGet(@PathVariable String id,@RequestHeader("authorization") String token){
169 169
         ResponseBean responseBean = new ResponseBean();
@@ -176,4 +176,31 @@ public class VideoController extends BaseController {
176 176
         }
177 177
         return responseBean;
178 178
     }
179
+
180
+    /**
181
+     * 修改对象
182
+     * @param id  实体ID
183
+     * @return
184
+     */
185
+    @ApiOperation(value = "admin-根据id发布或取消发布视频", notes = "admin-根据id发布或取消发布视频")
186
+    @RequestMapping(value="/admin/publish/{id}",method= RequestMethod.PUT)
187
+    public ResponseBean publishVideo(@PathVariable String id,@RequestHeader("authorization") String token){
188
+        ResponseBean responseBean = new ResponseBean();
189
+        try {
190
+            Video video = iVideoService.getById(id);
191
+            video.setIsPublish(!video.getIsPublish());
192
+            if (iVideoService.updateById(video)){
193
+                responseBean.addSuccess(video);
194
+            }else {
195
+                responseBean.addError("fail");
196
+            }
197
+        }catch (Exception e){
198
+            e.printStackTrace();
199
+            logger.error("videoUpdate -=- {}",e.toString());
200
+            responseBean.addError(e.getMessage());
201
+        }
202
+        return responseBean;
203
+    }
204
+
205
+
179 206
 }

+ 9
- 0
src/main/java/com/yunzhi/marketing/xlk/entity/Video.java Просмотреть файл

@@ -102,5 +102,14 @@ public class Video implements Serializable {
102 102
     @TableField("WEIGHT")
103 103
     private Integer weight;
104 104
 
105
+    /**
106
+     * 阅读人数
107
+     */
108
+    private Integer lookNum;
109
+
110
+    /**
111
+     * 是否发布
112
+     */
113
+    private Boolean isPublish;
105 114
 
106 115
 }

+ 23
- 0
src/main/resources/mapper/TaLiveActivityMapper.xml Просмотреть файл

@@ -71,4 +71,27 @@
71 71
         where t.live_activity_id = #{id}
72 72
     </select>
73 73
 
74
+    <select id="getWxLiveActivityAndVideo" resultType="com.yunzhi.marketing.entity.TaLiveActivity">
75
+        SELECT
76
+            t.live_activity_title AS title,
77
+            t.live_start_date AS startTime,
78
+            t.live_end_date AS endTime,
79
+            a.building_name,
80
+            b.NAME AS city_name
81
+        FROM
82
+            ta_live_activity t
83
+            LEFT JOIN ta_building a ON t.building_id = a.building_id
84
+            LEFT JOIN td_city b ON t.city_id = b.id UNION
85
+        SELECT
86
+            t.NAME AS title,
87
+            t.CREATED_TIME AS startTime,
88
+            t.CREATED_TIME AS endTime,
89
+            a.building_name,
90
+            b.NAME AS city_name
91
+        FROM
92
+            xlk_video t
93
+            LEFT JOIN ta_building a ON t.building_id = a.building_id
94
+            LEFT JOIN td_city b ON t.city_id = b.id
95
+    </select>
96
+
74 97
 </mapper>