Commit cce9aac5b052c7a00929536ef5df82fee81b32cc

Authored by 王言钊
1 parent 101d9ed7

优化了项目中所有Controller+Service接口,将零散的参数数据封装成DTO对象

Showing 38 changed files with 1092 additions and 974 deletions
src/main/java/com/cnlive/shenhe/controller/AudioController.java
@@ -69,45 +69,33 @@ public class AudioController extends BaseController { @@ -69,45 +69,33 @@ public class AudioController extends BaseController {
69 * 音频数据分页获取 69 * 音频数据分页获取
70 * 70 *
71 * @param model 71 * @param model
72 - * @param video_title  
73 - * @param start_date  
74 - * @param end_date  
75 - * @param state  
76 - * @param receive  
77 - * @param page  
78 - * @param pageSize  
79 - * @param video_priority  
80 - * @param orderByClause  
81 - * @param sp_desc  
82 - * @param sp_Id 72 + * @param audioDTO
83 * @param session 73 * @param session
84 * @return 74 * @return
85 */ 75 */
86 @GetMapping("/page") 76 @GetMapping("/page")
87 public Object getListVideos(Model model, AudioDTO audioDTO, HttpSession session) { 77 public Object getListVideos(Model model, AudioDTO audioDTO, HttpSession session) {
88 - //, String video_title, String start_date, String end_date, Integer state, Integer receive, Integer page, Integer pageSize, String video_priority, String orderByClause, String sp_desc, String sp_Id  
89 SessionUser sessionUser = (SessionUser) session.getAttribute(SessionUser.getSessionKey()); 78 SessionUser sessionUser = (SessionUser) session.getAttribute(SessionUser.getSessionKey());
90 if (CommonUtils.isNull(sessionUser)) { 79 if (CommonUtils.isNull(sessionUser)) {
91 return "redirect:/users/login"; 80 return "redirect:/users/login";
92 } 81 }
93 Integer spid = sessionUser.getSpid(); 82 Integer spid = sessionUser.getSpid();
  83 + audioDTO.setSpid(spid);
94 logger.info("sp_Id:{},spid:{}", audioDTO.getSp_Id(), spid); 84 logger.info("sp_Id:{},spid:{}", audioDTO.getSp_Id(), spid);
95 String userId = sessionUser.getUserId(); 85 String userId = sessionUser.getUserId();
96 - //if (CommonUtils.isNull(audioDTO.getPage())) {page = 1;}  
97 - //if (CommonUtils.isNull(audioDTO.getPageSize())) {pageSize = 10;} 86 + audioDTO.setUserId(userId);
98 if (CommonUtils.isNotEmpty(audioDTO.getSp_desc()) && spid == 0) { 87 if (CommonUtils.isNotEmpty(audioDTO.getSp_desc()) && spid == 0) {
99 ShySites shySite = sitesService.findspidBySpdesc(audioDTO.getSp_desc()); 88 ShySites shySite = sitesService.findspidBySpdesc(audioDTO.getSp_desc());
100 if (CommonUtils.isNotNull(shySite)) { 89 if (CommonUtils.isNotNull(shySite)) {
101 - spid = shySite.getSpid(); 90 + audioDTO.setSpid(shySite.getSpid());
102 } else { 91 } else {
103 setmodelSite(model); 92 setmodelSite(model);
104 return "error.html"; 93 return "error.html";
105 } 94 }
106 } else if (CommonUtils.isEmpty(audioDTO.getSp_desc()) && spid == 0) { 95 } else if (CommonUtils.isEmpty(audioDTO.getSp_desc()) && spid == 0) {
107 - spid = null; 96 + audioDTO.setSpid(null);
108 } 97 }
109 - //video_title, start_date, end_date, state, receive, page, pageSize, video_priority, orderByClause, spid, userId, sp_Id  
110 - PageInfo<ShyAudio> audioPage = audioService.getListContent(audioDTO.getVideo_title(), audioDTO.getStart_date(), audioDTO.getEnd_date(), audioDTO.getState(), audioDTO.getReceive(), audioDTO.getPage(), audioDTO.getPageSize(), audioDTO.getVideo_priority(), audioDTO.getOrderByClause(), spid, userId, audioDTO.getSp_Id()); 98 + PageInfo<ShyAudio> audioPage = audioService.getListContent(audioDTO);
111 if (audioPage != null && audioPage.getSize() > 0) { 99 if (audioPage != null && audioPage.getSize() > 0) {
112 List<ShyAudio> list = audioPage.getList(); 100 List<ShyAudio> list = audioPage.getList();
113 if (list != null && list.size() > 0) { 101 if (list != null && list.size() > 0) {
@@ -142,7 +130,7 @@ public class AudioController extends BaseController { @@ -142,7 +130,7 @@ public class AudioController extends BaseController {
142 String state1 = audioDTO.getState() == null ? "" : audioDTO.getState().toString(); 130 String state1 = audioDTO.getState() == null ? "" : audioDTO.getState().toString();
143 String receive1 = ""; 131 String receive1 = "";
144 if (CommonUtils.isNotNull(audioDTO.getReceive())) { 132 if (CommonUtils.isNotNull(audioDTO.getReceive())) {
145 - receive1 = audioDTO.getReceive() == CommonConst.RECEIVE_AFTER ? "true" : "false"; 133 + receive1 = audioDTO.getReceive().equals(CommonConst.RECEIVE_AFTER) ? "true" : "false";
146 } else { 134 } else {
147 receive1 = ""; 135 receive1 = "";
148 } 136 }
@@ -174,7 +162,7 @@ public class AudioController extends BaseController { @@ -174,7 +162,7 @@ public class AudioController extends BaseController {
174 for (String cid : cids) { 162 for (String cid : cids) {
175 ShyAudio shyAudio = audioService.selectByPrimaryKey(Integer.parseInt(cid)); 163 ShyAudio shyAudio = audioService.selectByPrimaryKey(Integer.parseInt(cid));
176 if (CommonUtils.isNotNull(shyAudio)) { 164 if (CommonUtils.isNotNull(shyAudio)) {
177 - if (shyAudio.getState() != CommonConst.AUDIT_INTT || shyAudio.getReceive() == CommonConst.RECEIVE_AFTER) { 165 + if (!shyAudio.getState().equals(CommonConst.AUDIT_INTT) || shyAudio.getReceive().equals(CommonConst.RECEIVE_AFTER)) {
178 return new ResponseBean(ErrorEnum.ERROR.getErrorCode(), "您领取的内容中有已被领取或者已经被审核,请检查并重试"); 166 return new ResponseBean(ErrorEnum.ERROR.getErrorCode(), "您领取的内容中有已被领取或者已经被审核,请检查并重试");
179 } 167 }
180 } else { 168 } else {
@@ -204,7 +192,7 @@ public class AudioController extends BaseController { @@ -204,7 +192,7 @@ public class AudioController extends BaseController {
204 String[] cids = ids.split(","); 192 String[] cids = ids.split(",");
205 for (String cid : cids) { 193 for (String cid : cids) {
206 ShyAudio shyAudio = audioService.selectByPrimaryKey(Integer.parseInt(cid)); 194 ShyAudio shyAudio = audioService.selectByPrimaryKey(Integer.parseInt(cid));
207 - if (shyAudio.getState() != CommonConst.AUDIT_INTT || shyAudio.getReceive() == CommonConst.RECEIVE_BEFORE || !shyAudio.getReceive_user_id().equals(userId)) { 195 + if (!shyAudio.getState() .equals( CommonConst.AUDIT_INTT )|| shyAudio.getReceive() .equals(CommonConst.RECEIVE_BEFORE) || !shyAudio.getReceive_user_id().equals(userId)) {
208 return new ResponseBean(ErrorEnum.ERROR.getErrorCode(), "退领失败,您选中的内容包含已退领的或已经审核的"); 196 return new ResponseBean(ErrorEnum.ERROR.getErrorCode(), "退领失败,您选中的内容包含已退领的或已经审核的");
209 } 197 }
210 } 198 }
@@ -252,9 +240,9 @@ public class AudioController extends BaseController { @@ -252,9 +240,9 @@ public class AudioController extends BaseController {
252 240
253 String yuming = ""; 241 String yuming = "";
254 Integer plat = shyAudio.getBucketType(); 242 Integer plat = shyAudio.getBucketType();
255 - if (plat == CommonConst.QINIU_PLAT) { 243 + if (plat .equals( CommonConst.QINIU_PLAT)) {
256 yuming = qn_domain + "/"; 244 yuming = qn_domain + "/";
257 - } else if (plat == CommonConst.KS_PLAT) { 245 + } else if (plat .equals( CommonConst.KS_PLAT)) {
258 yuming = ks_domain + "/"; 246 yuming = ks_domain + "/";
259 } 247 }
260 shyAudio.setAttr_tags(CommonUtils.isEmpty(shyAudio.getAttr_tags()) ? "" : shyAudio.getAttr_tags()); 248 shyAudio.setAttr_tags(CommonUtils.isEmpty(shyAudio.getAttr_tags()) ? "" : shyAudio.getAttr_tags());
@@ -267,25 +255,21 @@ public class AudioController extends BaseController { @@ -267,25 +255,21 @@ public class AudioController extends BaseController {
267 /** 255 /**
268 * 根据条件导出excel 256 * 根据条件导出excel
269 * 257 *
270 - * @param video_title  
271 - * @param start_date  
272 - * @param end_date  
273 - * @param state  
274 - * @param receive  
275 - * @param video_priority  
276 - * @param orderByClause 258 + * @param audioDTO
277 * @param session 259 * @param session
278 * @param response 260 * @param response
279 */ 261 */
280 @GetMapping("excel") 262 @GetMapping("excel")
281 public void getExcel(AudioDTO audioDTO, HttpSession session, HttpServletResponse response) { 263 public void getExcel(AudioDTO audioDTO, HttpSession session, HttpServletResponse response) {
282 - //String video_title, String start_date, String end_date, Integer state, Integer receive, String video_priority, String orderByClause  
283 SessionUser sessionUser = (SessionUser) session.getAttribute(SessionUser.getSessionKey()); 264 SessionUser sessionUser = (SessionUser) session.getAttribute(SessionUser.getSessionKey());
284 Integer spid = sessionUser.getSpid(); 265 Integer spid = sessionUser.getSpid();
285 String userId = sessionUser.getUserId(); 266 String userId = sessionUser.getUserId();
286 - if (spid == 0) spid = null;  
287 - List<ShyAudio> shyAudioList = audioService.findByCondition(audioDTO.getVideo_title(),audioDTO.getStart_date(),audioDTO.getEnd_date(),audioDTO.getState(),audioDTO.getReceive(),audioDTO.getVideo_priority(),audioDTO.getOrderByClause(), spid, userId);  
288 - //video_title, start_date, end_date, state, receive, video_priority, orderByClause 267 + audioDTO.setSpid(spid);
  268 + audioDTO.setUserId(userId);
  269 + if (spid == 0) {
  270 + audioDTO.setSpid(null);
  271 + }
  272 + List<ShyAudio> shyAudioList = audioService.findByCondition(audioDTO);
289 String fileName = "音频数据"; 273 String fileName = "音频数据";
290 String updater = "";//审核员名字 274 String updater = "";//审核员名字
291 String state1 = "";//审核状态 1已审核 2审核拒绝 0未审核 275 String state1 = "";//审核状态 1已审核 2审核拒绝 0未审核
@@ -345,7 +329,7 @@ public class AudioController extends BaseController { @@ -345,7 +329,7 @@ public class AudioController extends BaseController {
345 cell.setCellValue(shyAudioList.get(i).getAudioTag()); 329 cell.setCellValue(shyAudioList.get(i).getAudioTag());
346 cell = row.createCell(5);//列 330 cell = row.createCell(5);//列
347 //审核员需要做处理 331 //审核员需要做处理
348 - if (shyAudioList.get(i).getState() != CommonConst.AUDIT_INTT) { 332 + if (!shyAudioList.get(i).getState().equals(CommonConst.AUDIT_INTT)) {
349 updater = CommonUtils.isEmpty(shyAudioList.get(i).getUploader()) || "null".equals(shyAudioList.get(i).getUploader()) ? "白名单" : shyAudioList.get(i).getUploader(); 333 updater = CommonUtils.isEmpty(shyAudioList.get(i).getUploader()) || "null".equals(shyAudioList.get(i).getUploader()) ? "白名单" : shyAudioList.get(i).getUploader();
350 String auditor_id = shyAudioList.get(i).getAuditor_id(); 334 String auditor_id = shyAudioList.get(i).getAuditor_id();
351 if (CommonUtils.isNotEmpty(auditor_id)) { 335 if (CommonUtils.isNotEmpty(auditor_id)) {
@@ -412,19 +396,23 @@ public class AudioController extends BaseController { @@ -412,19 +396,23 @@ public class AudioController extends BaseController {
412 } catch (final Exception e) { 396 } catch (final Exception e) {
413 e.printStackTrace(); 397 e.printStackTrace();
414 try { 398 try {
415 - if (bis != null) 399 + if (bis != null) {
416 bis.close(); 400 bis.close();
417 - if (bos != null) 401 + }
  402 + if (bos != null) {
418 bos.close(); 403 bos.close();
  404 + }
419 } catch (Exception e1) { 405 } catch (Exception e1) {
420 e1.printStackTrace(); 406 e1.printStackTrace();
421 } 407 }
422 } finally { 408 } finally {
423 try { 409 try {
424 - if (bis != null) 410 + if (bis != null) {
425 bis.close(); 411 bis.close();
426 - if (bos != null) 412 + }
  413 + if (bos != null) {
427 bos.close(); 414 bos.close();
  415 + }
428 } catch (Exception e2) { 416 } catch (Exception e2) {
429 e2.printStackTrace(); 417 e2.printStackTrace();
430 } 418 }
src/main/java/com/cnlive/shenhe/controller/ChannelController.java
@@ -51,55 +51,45 @@ public class ChannelController extends BaseController { @@ -51,55 +51,45 @@ public class ChannelController extends BaseController {
51 * 评论列表页 51 * 评论列表页
52 * 52 *
53 * @param model 53 * @param model
54 - * @param start_date  
55 - * @param end_date  
56 - * @param sp_desc  
57 - * @param page  
58 - * @param pageSize  
59 - * @param orderByClause 54 + * @param channelDTO
60 * @param session 55 * @param session
61 * @return 56 * @return
62 */ 57 */
63 @GetMapping("/page") 58 @GetMapping("/page")
64 public String getPage(Model model, ChannelDTO channelDTO, HttpSession session) { 59 public String getPage(Model model, ChannelDTO channelDTO, HttpSession session) {
65 - //String channel_id, String channel_name, Integer receive,  
66 - // String start_date, String end_date, Integer shenhe_status, String sp_desc,  
67 - // Integer page, Integer pageSize, String orderByClause,  
68 SessionUser sessionUser = (SessionUser) session.getAttribute(SessionUser.getSessionKey()); 60 SessionUser sessionUser = (SessionUser) session.getAttribute(SessionUser.getSessionKey());
69 if (CommonUtils.isNull(sessionUser)) { 61 if (CommonUtils.isNull(sessionUser)) {
70 return "redirect:/users/login"; 62 return "redirect:/users/login";
71 } 63 }
72 Integer spid = sessionUser.getSpid(); 64 Integer spid = sessionUser.getSpid();
  65 + channelDTO.setSpid(spid);
73 String userId = sessionUser.getUserId(); 66 String userId = sessionUser.getUserId();
74 - //if (CommonUtils.isNull(page)) page = 1;  
75 - //if (CommonUtils.isNull(pageSize)) pageSize = 10; 67 + channelDTO.setUserId(userId);
76 if (CommonUtils.isNotEmpty(channelDTO.getSp_desc()) && spid == 0) { 68 if (CommonUtils.isNotEmpty(channelDTO.getSp_desc()) && spid == 0) {
77 ShySites shySite = sitesService.findspidBySpdesc(channelDTO.getSp_desc()); 69 ShySites shySite = sitesService.findspidBySpdesc(channelDTO.getSp_desc());
78 if (CommonUtils.isNotNull(shySite)) { 70 if (CommonUtils.isNotNull(shySite)) {
79 - spid = shySite.getSpid(); 71 + channelDTO.setSpid(shySite.getSpid());
80 } else { 72 } else {
81 setmodelSite(model); 73 setmodelSite(model);
82 return "error.html"; 74 return "error.html";
83 } 75 }
84 } else if (CommonUtils.isEmpty(channelDTO.getSp_desc()) && spid == 0) { 76 } else if (CommonUtils.isEmpty(channelDTO.getSp_desc()) && spid == 0) {
85 - spid = null; 77 + channelDTO.setSpid(null);
86 } 78 }
87 - Date sDate = null;  
88 - Date eDate = null;  
89 79
90 - if (CommonUtils.isNotEmpty(channelDTO.getStart_date())) { 80 + if (CommonUtils.isNotEmpty(channelDTO.getsDate())) {
91 try { 81 try {
92 - sDate = CommonUtils.parseDate(channelDTO.getStart_date(), "yyyy-MM-dd"); 82 + channelDTO.setsDate(String.valueOf(CommonUtils.parseDate(channelDTO.getsDate(), "yyyy-MM-dd")));
93 } catch (Exception e) { 83 } catch (Exception e) {
94 } 84 }
95 } 85 }
96 - if (CommonUtils.isNotEmpty(channelDTO.getEnd_date())) { 86 + if (CommonUtils.isNotEmpty(channelDTO.geteDate())) {
97 try { 87 try {
98 - eDate = CommonUtils.parseDate(channelDTO.getEnd_date(), "yyyy-MM-dd"); 88 + channelDTO.seteDate(String.valueOf(CommonUtils.parseDate(channelDTO.geteDate(), "yyyy-MM-dd")));
99 } catch (Exception e) { 89 } catch (Exception e) {
100 } 90 }
101 } 91 }
102 - PageInfo<ShyChannel> channelPage = channelService.getPage(channelDTO.getChannel_id(), channelDTO.getChannel_name(), channelDTO.getReceive(), sDate, eDate, channelDTO.getShenhe_status(), null, channelDTO.getPage(), channelDTO.getPageSize(), channelDTO.getOrderByClause(), spid, userId); 92 + PageInfo<ShyChannel> channelPage = channelService.getPage(channelDTO);
103 List<ShyChannel> list = channelPage.getList(); 93 List<ShyChannel> list = channelPage.getList();
104 if (!list.isEmpty()) { 94 if (!list.isEmpty()) {
105 for (ShyChannel channel : list) { 95 for (ShyChannel channel : list) {
src/main/java/com/cnlive/shenhe/controller/CommentsController.java
@@ -9,7 +9,6 @@ import com.cnlive.shenhe.entity.ShyComments; @@ -9,7 +9,6 @@ import com.cnlive.shenhe.entity.ShyComments;
9 import com.cnlive.shenhe.entity.ShyContent; 9 import com.cnlive.shenhe.entity.ShyContent;
10 import com.cnlive.shenhe.entity.ShySites; 10 import com.cnlive.shenhe.entity.ShySites;
11 import com.cnlive.shenhe.entity.ShyUsers; 11 import com.cnlive.shenhe.entity.ShyUsers;
12 -import com.cnlive.shenhe.entity.ShyVideos;  
13 import com.cnlive.shenhe.serviceImpl.CommentsServiceImpl; 12 import com.cnlive.shenhe.serviceImpl.CommentsServiceImpl;
14 import com.cnlive.shenhe.serviceImpl.ContentServiceImpl; 13 import com.cnlive.shenhe.serviceImpl.ContentServiceImpl;
15 import com.cnlive.shenhe.serviceImpl.SitesServiceImpl; 14 import com.cnlive.shenhe.serviceImpl.SitesServiceImpl;
@@ -65,52 +64,41 @@ public class CommentsController extends BaseController { @@ -65,52 +64,41 @@ public class CommentsController extends BaseController {
65 /** 64 /**
66 * 评论列表页 65 * 评论列表页
67 * 66 *
68 - * @param activity_id  
69 - * @param content  
70 - * @param is_hot  
71 - * @param start_date  
72 - * @param end_date  
73 - * @param state  
74 - * @param page  
75 - * @param pageSize  
76 - * @param orderByClause 67 + * @param commentsDTO
77 * @return 68 * @return
78 */ 69 */
79 @GetMapping("/page") 70 @GetMapping("/page")
80 public String getPage(Model model, CommentsDTO commentsDTO, HttpSession session) { 71 public String getPage(Model model, CommentsDTO commentsDTO, HttpSession session) {
81 - //String activity_id, String content, Integer is_hot,  
82 - // String start_date, String end_date, Integer state, Integer receive,  
83 - // Integer page, Integer pageSize, String orderByClause, Integer type, Integer comment_user_id 72 +
84 SessionUser sessionUser = (SessionUser) session.getAttribute(SessionUser.getSessionKey()); 73 SessionUser sessionUser = (SessionUser) session.getAttribute(SessionUser.getSessionKey());
85 if (CommonUtils.isNull(sessionUser)) { 74 if (CommonUtils.isNull(sessionUser)) {
86 return "redirect:/users/login"; 75 return "redirect:/users/login";
87 } 76 }
88 Integer spid = sessionUser.getSpid(); 77 Integer spid = sessionUser.getSpid();
  78 + commentsDTO.setSpid(spid);
89 String userId = sessionUser.getUserId(); 79 String userId = sessionUser.getUserId();
90 - if (spid == 0) spid = null;  
91 - //if (CommonUtils.isNull(page)) page = 1;  
92 - //if (CommonUtils.isNull(pageSize)) pageSize = 10;  
93 - Date sDate = null;  
94 - Date eDate = null; 80 + commentsDTO.setUserId(userId);
  81 + if (spid == 0) {
  82 + commentsDTO.setSpid(null);
  83 + }
95 84
96 - if (CommonUtils.isNotEmpty(commentsDTO.getStart_date())) { 85 + if (CommonUtils.isNotEmpty(commentsDTO.getsDate())) {
97 try { 86 try {
98 - sDate = CommonUtils.parseDate(commentsDTO.getStart_date(), "yyyy-MM-dd"); 87 + commentsDTO.setsDate(String.valueOf(CommonUtils.parseDate(commentsDTO.getsDate(), "yyyy-MM-dd")));
99 } catch (Exception e) { 88 } catch (Exception e) {
100 } 89 }
101 } 90 }
102 - if (CommonUtils.isNotEmpty(commentsDTO.getEnd_date())) { 91 + if (CommonUtils.isNotEmpty(commentsDTO.geteDate())) {
103 try { 92 try {
104 - eDate = CommonUtils.parseDate(commentsDTO.getEnd_date(), "yyyy-MM-dd"); 93 + commentsDTO.seteDate(String.valueOf(CommonUtils.parseDate(commentsDTO.geteDate(), "yyyy-MM-dd")));
105 } catch (Exception e) { 94 } catch (Exception e) {
106 } 95 }
107 } 96 }
108 - PageInfo<ShyComments> commentPage = commentsService.getPage(commentsDTO.getActivity_id(), commentsDTO.getContent(), commentsDTO.getIs_hot(), sDate, eDate, commentsDTO.getState(), commentsDTO.getReceive(), null, commentsDTO.getPage(), commentsDTO.getPageSize(), commentsDTO.getOrderByClause(), spid, userId, commentsDTO.getType(), commentsDTO.getComment_user_id());  
109 - //activity_id, content, is_hot, sDate, eDate, state, receive, null, page, pageSize, orderByClause, spid, userId, type, comment_user_id 97 + PageInfo<ShyComments> commentPage = commentsService.getPage(commentsDTO);
110 List<ShyComments> list = commentPage.getList(); 98 List<ShyComments> list = commentPage.getList();
111 if (!list.isEmpty()) { 99 if (!list.isEmpty()) {
112 for (ShyComments comment : list) { 100 for (ShyComments comment : list) {
113 - if (comment.getState() != CommonConst.AUDIT_INTT) { 101 + if (!comment.getState().equals(CommonConst.AUDIT_INTT)) {
114 String updater = CommonUtils.isEmpty(comment.getUpdater()) || "null".equals(comment.getUpdater()) ? "白名单" : comment.getUpdater(); 102 String updater = CommonUtils.isEmpty(comment.getUpdater()) || "null".equals(comment.getUpdater()) ? "白名单" : comment.getUpdater();
115 String auditor_id = comment.getAuditor_id(); 103 String auditor_id = comment.getAuditor_id();
116 if (CommonUtils.isNotEmpty(auditor_id)) { 104 if (CommonUtils.isNotEmpty(auditor_id)) {
@@ -313,33 +301,28 @@ public class CommentsController extends BaseController { @@ -313,33 +301,28 @@ public class CommentsController extends BaseController {
313 */ 301 */
314 @GetMapping("excel") 302 @GetMapping("excel")
315 public void getExcel(CommentsDTO commentsDTO, HttpSession session, HttpServletResponse response) { 303 public void getExcel(CommentsDTO commentsDTO, HttpSession session, HttpServletResponse response) {
316 -  
317 - //String activity_id, String content, Integer is_hot,  
318 - // String start_date, String end_date, Integer state, Integer receive, Integer type,  
319 - // Integer page, Integer pageSize, String orderByClause,  
320 SessionUser sessionUser = (SessionUser) session.getAttribute(SessionUser.getSessionKey()); 304 SessionUser sessionUser = (SessionUser) session.getAttribute(SessionUser.getSessionKey());
321 Integer spid = sessionUser.getSpid(); 305 Integer spid = sessionUser.getSpid();
  306 + commentsDTO.setSpid(spid);
322 String userId = sessionUser.getUserId(); 307 String userId = sessionUser.getUserId();
323 - if (spid == 0) spid = null;  
324 - //if (CommonUtils.isNull(page)) page = 1;  
325 - //if (CommonUtils.isNull(pageSize)) pageSize = 10;  
326 - Date sDate = null;  
327 - Date eDate = null; 308 + commentsDTO.setUserId(userId);
  309 + if (spid == 0) {
  310 + commentsDTO.setSpid(null);
  311 + }
328 312
329 - if (CommonUtils.isNotEmpty(commentsDTO.getStart_date())) { 313 + if (CommonUtils.isNotEmpty(commentsDTO.getsDate())) {
330 try { 314 try {
331 - sDate = CommonUtils.parseDate(commentsDTO.getStart_date(), "yyyy-MM-dd"); 315 + commentsDTO.setsDate(String.valueOf(CommonUtils.parseDate(commentsDTO.getsDate(), "yyyy-MM-dd")));
332 } catch (Exception e) { 316 } catch (Exception e) {
333 } 317 }
334 } 318 }
335 - if (CommonUtils.isNotEmpty(commentsDTO.getEnd_date())) { 319 + if (CommonUtils.isNotEmpty(commentsDTO.geteDate())) {
336 try { 320 try {
337 - eDate = CommonUtils.parseDate(commentsDTO.getEnd_date(), "yyyy-MM-dd"); 321 + commentsDTO.seteDate(String.valueOf(CommonUtils.parseDate(commentsDTO.geteDate(), "yyyy-MM-dd")));
338 } catch (Exception e) { 322 } catch (Exception e) {
339 } 323 }
340 } 324 }
341 - PageInfo<ShyComments> commentPage = commentsService.getPageExcel(commentsDTO.getActivity_id(), commentsDTO.getContent(), commentsDTO.getIs_hot(), sDate, eDate, commentsDTO.getState(), commentsDTO.getReceive(), null, commentsDTO.getPage(), commentsDTO.getPageSize(), commentsDTO.getOrderByClause(), spid, userId, commentsDTO.getType());  
342 - //activity_id, content, is_hot, sDate, eDate, state, receive, null, page, pageSize, orderByClause, spid, userId, type 325 + PageInfo<ShyComments> commentPage = commentsService.getPageExcel(commentsDTO);
343 List<ShyComments> list = commentPage.getList(); 326 List<ShyComments> list = commentPage.getList();
344 String fileName = "评论数据"; 327 String fileName = "评论数据";
345 328
@@ -437,7 +420,7 @@ public class CommentsController extends BaseController { @@ -437,7 +420,7 @@ public class CommentsController extends BaseController {
437 420
438 /* 审核员需要做处理*/ 421 /* 审核员需要做处理*/
439 String updater = "";//审核员名字 422 String updater = "";//审核员名字
440 - if (list.get(i).getState() != CommonConst.AUDIT_INTT) { 423 + if (!list.get(i).getState().equals(CommonConst.AUDIT_INTT)) {
441 updater = CommonUtils.isEmpty(list.get(i).getUpdater()) || "null".equals(list.get(i).getUpdater()) ? "自动通过" : list.get(i).getUpdater(); 424 updater = CommonUtils.isEmpty(list.get(i).getUpdater()) || "null".equals(list.get(i).getUpdater()) ? "自动通过" : list.get(i).getUpdater();
442 String auditor_id = list.get(i).getAuditor_id(); 425 String auditor_id = list.get(i).getAuditor_id();
443 if (CommonUtils.isNotEmpty(auditor_id)) { 426 if (CommonUtils.isNotEmpty(auditor_id)) {
@@ -475,19 +458,23 @@ public class CommentsController extends BaseController { @@ -475,19 +458,23 @@ public class CommentsController extends BaseController {
475 } catch (final Exception e) { 458 } catch (final Exception e) {
476 e.printStackTrace(); 459 e.printStackTrace();
477 try { 460 try {
478 - if (bis != null) 461 + if (bis != null) {
479 bis.close(); 462 bis.close();
480 - if (bos != null) 463 + }
  464 + if (bos != null) {
481 bos.close(); 465 bos.close();
  466 + }
482 } catch (Exception e1) { 467 } catch (Exception e1) {
483 e1.printStackTrace(); 468 e1.printStackTrace();
484 } 469 }
485 } finally { 470 } finally {
486 try { 471 try {
487 - if (bis != null) 472 + if (bis != null) {
488 bis.close(); 473 bis.close();
489 - if (bos != null) 474 + }
  475 + if (bos != null) {
490 bos.close(); 476 bos.close();
  477 + }
491 } catch (Exception e2) { 478 } catch (Exception e2) {
492 e2.printStackTrace(); 479 e2.printStackTrace();
493 } 480 }
src/main/java/com/cnlive/shenhe/controller/ContentController.java
@@ -46,66 +46,49 @@ public class ContentController extends BaseController { @@ -46,66 +46,49 @@ public class ContentController extends BaseController {
46 * 图文列表 46 * 图文列表
47 * 47 *
48 * @param model 48 * @param model
49 - * @param title  
50 - * @param contentId  
51 - * @param content_tag  
52 - * @param start_date  
53 - * @param end_date  
54 - * @param receive_status  
55 - * @param sp_desc  
56 - * @param source  
57 - * @param author  
58 - * @param page  
59 - * @param pageSize  
60 - * @param orderByClause 49 + * @param contentDTO
61 * @param session 50 * @param session
62 * @return 51 * @return
63 */ 52 */
64 @GetMapping("/page") 53 @GetMapping("/page")
65 - public String getPage(Model model, ContentDTO contentDTO , HttpSession session) {  
66 - //String title, String contentId, String content_tag,  
67 - // String start_date, String end_date, Integer receive_status, String sp_desc, String source, String author,  
68 - // Integer page, Integer pageSize, String orderByClause 54 + public String getPage(Model model, ContentDTO contentDTO, HttpSession session) {
69 SessionUser sessionUser = (SessionUser) session.getAttribute(SessionUser.getSessionKey()); 55 SessionUser sessionUser = (SessionUser) session.getAttribute(SessionUser.getSessionKey());
70 if (CommonUtils.isNull(sessionUser)) { 56 if (CommonUtils.isNull(sessionUser)) {
71 return "redirect:/users/login"; 57 return "redirect:/users/login";
72 } 58 }
73 Integer spid = sessionUser.getSpid(); 59 Integer spid = sessionUser.getSpid();
  60 + contentDTO.setSpid(spid);
74 String userId = sessionUser.getUserId(); 61 String userId = sessionUser.getUserId();
75 - //if (CommonUtils.isNull(page)) page = 1;  
76 - //if (CommonUtils.isNull(pageSize)) pageSize = 10;  
77 - if (CommonUtils.isNotEmpty(contentDTO.getSp_desc()) && spid == 0) { 62 + contentDTO.setUserId(userId);
  63 + if (CommonUtils.isNotEmpty(contentDTO.getSp_desc()) && contentDTO.getSpid() == 0) {
78 ShySites shySite = sitesService.findspidBySpdesc(contentDTO.getSp_desc()); 64 ShySites shySite = sitesService.findspidBySpdesc(contentDTO.getSp_desc());
79 if (CommonUtils.isNotNull(shySite)) { 65 if (CommonUtils.isNotNull(shySite)) {
80 - spid = shySite.getSpid(); 66 + contentDTO.setSpid(shySite.getSpid());
81 } else { 67 } else {
82 setmodelSite(model); 68 setmodelSite(model);
83 return "error.html"; 69 return "error.html";
84 } 70 }
85 - } else if (CommonUtils.isEmpty(contentDTO.getSp_desc()) && spid == 0) {  
86 - spid = null; 71 + } else if (CommonUtils.isEmpty(contentDTO.getSp_desc()) && contentDTO.getSpid() == 0) {
  72 + contentDTO.setSpid(null);
87 } 73 }
88 - Date sDate = null;  
89 - Date eDate = null;  
90 74
91 - if (CommonUtils.isNotEmpty(contentDTO.getStart_date())) { 75 + if (CommonUtils.isNotEmpty(String.valueOf(contentDTO.getsDate()))) {
92 try { 76 try {
93 - sDate = CommonUtils.parseDate(contentDTO.getStart_date(), "yyyy-MM-dd"); 77 + contentDTO.setsDate(String.valueOf(CommonUtils.parseDate(String.valueOf(contentDTO.getsDate()), "yyyy-MM-dd")));
94 } catch (Exception e) { 78 } catch (Exception e) {
95 } 79 }
96 } 80 }
97 - if (CommonUtils.isNotEmpty(contentDTO.getEnd_date())) { 81 + if (CommonUtils.isNotEmpty(contentDTO.geteDate())) {
98 try { 82 try {
99 - eDate = CommonUtils.parseDate(contentDTO.getEnd_date(), "yyyy-MM-dd"); 83 + contentDTO.seteDate(String.valueOf(CommonUtils.parseDate(contentDTO.geteDate(), "yyyy-MM-dd")));
100 } catch (Exception e) { 84 } catch (Exception e) {
101 } 85 }
102 } 86 }
103 - PageInfo<ShyContent> contentPage = contentService.getPage(contentDTO.getTitle(), contentDTO.getSource(), contentDTO.getAuthor(), contentDTO.getContent_tag(), contentDTO.getContentId(), sDate, eDate, contentDTO.getReceive_status(), null, contentDTO.getPage(), contentDTO.getPageSize(), contentDTO.getOrderByClause(), spid, userId);  
104 - //title, source, author, content_tag, contentId, sDate, eDate, receive_status, null, page, pageSize, orderByClause, spid, userId 87 + PageInfo<ShyContent> contentPage = contentService.getPage(contentDTO);
105 List<ShyContent> list = contentPage.getList(); 88 List<ShyContent> list = contentPage.getList();
106 if (!list.isEmpty()) { 89 if (!list.isEmpty()) {
107 for (ShyContent content : list) { 90 for (ShyContent content : list) {
108 - if (content.getReceive_status() == CommonConst.RECEIVE_AUDIT) { 91 + if (content.getReceive_status().equals(CommonConst.RECEIVE_AUDIT)) {
109 String auditor_id = content.getAuditor_id(); 92 String auditor_id = content.getAuditor_id();
110 String updater = CommonUtils.isEmpty(content.getUpdater()) || "null".equals(content.getUpdater()) ? "白名单" : content.getUpdater(); 93 String updater = CommonUtils.isEmpty(content.getUpdater()) || "null".equals(content.getUpdater()) ? "白名单" : content.getUpdater();
111 updater = sitesService.getUpdater(updater, auditor_id); 94 updater = sitesService.getUpdater(updater, auditor_id);
@@ -232,37 +215,33 @@ public class ContentController extends BaseController { @@ -232,37 +215,33 @@ public class ContentController extends BaseController {
232 */ 215 */
233 @GetMapping("excel") 216 @GetMapping("excel")
234 public void getExcel(ContentDTO contentDTO, HttpSession session, HttpServletResponse response) { 217 public void getExcel(ContentDTO contentDTO, HttpSession session, HttpServletResponse response) {
235 - //String title, String contentId, String content_tag,  
236 - // String start_date, String end_date, Integer receive_status, String sp_desc,  
237 - // Integer page, Integer pageSize, String orderByClause  
238 SessionUser sessionUser = (SessionUser) session.getAttribute(SessionUser.getSessionKey()); 218 SessionUser sessionUser = (SessionUser) session.getAttribute(SessionUser.getSessionKey());
239 Integer spid = sessionUser.getSpid(); 219 Integer spid = sessionUser.getSpid();
240 - if (CommonUtils.isNotEmpty(contentDTO.getSp_desc()) && spid == 0) { 220 + contentDTO.setSpid(spid);
  221 + String userId = sessionUser.getUserId();
  222 + contentDTO.setUserId(userId);
  223 + if (CommonUtils.isNotEmpty(contentDTO.getSp_desc()) && contentDTO.getSpid() == 0) {
241 ShySites shySite = sitesService.findspidBySpdesc(contentDTO.getSp_desc()); 224 ShySites shySite = sitesService.findspidBySpdesc(contentDTO.getSp_desc());
242 if (CommonUtils.isNotNull(shySite)) { 225 if (CommonUtils.isNotNull(shySite)) {
243 - spid = shySite.getSpid(); 226 + contentDTO.setSpid(shySite.getSpid());
244 } 227 }
245 - } else if (CommonUtils.isEmpty(contentDTO.getSp_desc()) && spid == 0) {  
246 - spid = null; 228 + } else if (CommonUtils.isEmpty(contentDTO.getSp_desc()) && contentDTO.getSpid() == 0) {
  229 + contentDTO.setSpid(null);
247 } 230 }
248 - Date sDate = null;  
249 - Date eDate = null;  
250 231
251 - if (CommonUtils.isNotEmpty(contentDTO.getStart_date())) { 232 + if (CommonUtils.isNotEmpty(contentDTO.getsDate())) {
252 try { 233 try {
253 - sDate = CommonUtils.parseDate(contentDTO.getStart_date(), "yyyy-MM-dd"); 234 + contentDTO.setsDate(String.valueOf((CommonUtils.parseDate(contentDTO.getsDate(), "yyyy-MM-dd"))));
254 } catch (Exception e) { 235 } catch (Exception e) {
255 } 236 }
256 } 237 }
257 - if (CommonUtils.isNotEmpty(contentDTO.getEnd_date())) { 238 + if (CommonUtils.isNotEmpty(contentDTO.geteDate())) {
258 try { 239 try {
259 - eDate = CommonUtils.parseDate(contentDTO.getEnd_date(), "yyyy-MM-dd"); 240 + contentDTO.seteDate(String.valueOf(CommonUtils.parseDate(contentDTO.geteDate(), "yyyy-MM-dd")));
260 } catch (Exception e) { 241 } catch (Exception e) {
261 } 242 }
262 } 243 }
263 - List<ShyContent> contentList = contentService.findByCondition(contentDTO.getTitle(), contentDTO.getContent_tag(), contentDTO.getContentId(), sDate, eDate, contentDTO.getReceive_status(), contentDTO.getPage(), contentDTO.getPageSize(), contentDTO.getOrderByClause(), spid);  
264 - //title, content_tag, contentId, sDate, eDate, receive_status, page, pageSize, orderByClause, spid  
265 - 244 + List<ShyContent> contentList = contentService.findByCondition(contentDTO);
266 String fileName = "图文数据"; 245 String fileName = "图文数据";
267 246
268 XSSFWorkbook wb = new XSSFWorkbook(); 247 XSSFWorkbook wb = new XSSFWorkbook();
@@ -322,7 +301,7 @@ public class ContentController extends BaseController { @@ -322,7 +301,7 @@ public class ContentController extends BaseController {
322 } 301 }
323 cell = row.createCell(4);//列 302 cell = row.createCell(4);//列
324 cell.setCellValue(contentTag); 303 cell.setCellValue(contentTag);
325 - 304 +
326 /*状态需要处理成用户可读*/ 305 /*状态需要处理成用户可读*/
327 String shenheType = "";//审核类型,1:免审,2:机审,3:人工审 306 String shenheType = "";//审核类型,1:免审,2:机审,3:人工审
328 if (contentList.get(i).getShenhe_type() == 1) { 307 if (contentList.get(i).getShenhe_type() == 1) {
@@ -334,7 +313,7 @@ public class ContentController extends BaseController { @@ -334,7 +313,7 @@ public class ContentController extends BaseController {
334 } 313 }
335 cell = row.createCell(5);//列 314 cell = row.createCell(5);//列
336 cell.setCellValue(shenheType); 315 cell.setCellValue(shenheType);
337 - 316 +
338 /*状态需要处理成用户可读*/ 317 /*状态需要处理成用户可读*/
339 String contentStatus = "";//内容状态:0:待发布,1:已发布,2:已下线,3:已删除 318 String contentStatus = "";//内容状态:0:待发布,1:已发布,2:已下线,3:已删除
340 if (contentList.get(i).getContent_status() == 0) { 319 if (contentList.get(i).getContent_status() == 0) {
@@ -353,7 +332,7 @@ public class ContentController extends BaseController { @@ -353,7 +332,7 @@ public class ContentController extends BaseController {
353 cell.setCellValue(contentList.get(i).getContent_time() == null ? "" : CommonUtils.formatDate(contentList.get(i).getContent_time(), "yyyy-MM-dd HH:mm:ss")); 332 cell.setCellValue(contentList.get(i).getContent_time() == null ? "" : CommonUtils.formatDate(contentList.get(i).getContent_time(), "yyyy-MM-dd HH:mm:ss"));
354 cell = row.createCell(8);//列 333 cell = row.createCell(8);//列
355 cell.setCellValue(contentList.get(i).getCreate_date() == null ? "" : CommonUtils.formatDate(contentList.get(i).getCreate_date(), "yyyy-MM-dd HH:mm:ss")); 334 cell.setCellValue(contentList.get(i).getCreate_date() == null ? "" : CommonUtils.formatDate(contentList.get(i).getCreate_date(), "yyyy-MM-dd HH:mm:ss"));
356 - 335 +
357 /*状态需要处理成用户可读*/ 336 /*状态需要处理成用户可读*/
358 String receiveStatus = "";//领取状态。0:未领取;1:已领取,2:已审核 337 String receiveStatus = "";//领取状态。0:未领取;1:已领取,2:已审核
359 if (contentList.get(i).getReceive_status() == 1) { 338 if (contentList.get(i).getReceive_status() == 1) {
@@ -366,10 +345,10 @@ public class ContentController extends BaseController { @@ -366,10 +345,10 @@ public class ContentController extends BaseController {
366 345
367 cell = row.createCell(9);//列 346 cell = row.createCell(9);//列
368 cell.setCellValue(receiveStatus); 347 cell.setCellValue(receiveStatus);
369 - 348 +
370 /* 审核员需要做处理*/ 349 /* 审核员需要做处理*/
371 String updater = "";//审核员名字 350 String updater = "";//审核员名字
372 - if (contentList.get(i).getReceive_status() != CommonConst.RECEIVE_BEFORE) { 351 + if (!contentList.get(i).getReceive_status().equals(CommonConst.RECEIVE_BEFORE)) {
373 updater = CommonUtils.isEmpty(contentList.get(i).getUpdater()) || "null".equals(contentList.get(i).getUpdater()) ? "自动通过" : contentList.get(i).getUpdater(); 352 updater = CommonUtils.isEmpty(contentList.get(i).getUpdater()) || "null".equals(contentList.get(i).getUpdater()) ? "自动通过" : contentList.get(i).getUpdater();
374 String auditor_id = contentList.get(i).getAuditor_id(); 353 String auditor_id = contentList.get(i).getAuditor_id();
375 if (CommonUtils.isNotEmpty(auditor_id)) { 354 if (CommonUtils.isNotEmpty(auditor_id)) {
@@ -414,19 +393,23 @@ public class ContentController extends BaseController { @@ -414,19 +393,23 @@ public class ContentController extends BaseController {
414 } catch (final Exception e) { 393 } catch (final Exception e) {
415 e.printStackTrace(); 394 e.printStackTrace();
416 try { 395 try {
417 - if (bis != null) 396 + if (bis != null) {
418 bis.close(); 397 bis.close();
419 - if (bos != null) 398 + }
  399 + if (bos != null) {
420 bos.close(); 400 bos.close();
  401 + }
421 } catch (Exception e1) { 402 } catch (Exception e1) {
422 e1.printStackTrace(); 403 e1.printStackTrace();
423 } 404 }
424 } finally { 405 } finally {
425 try { 406 try {
426 - if (bis != null) 407 + if (bis != null) {
427 bis.close(); 408 bis.close();
428 - if (bos != null) 409 + }
  410 + if (bos != null) {
429 bos.close(); 411 bos.close();
  412 + }
430 } catch (Exception e2) { 413 } catch (Exception e2) {
431 e2.printStackTrace(); 414 e2.printStackTrace();
432 } 415 }
src/main/java/com/cnlive/shenhe/controller/EmailController.java
@@ -46,16 +46,11 @@ public class EmailController extends BaseController { @@ -46,16 +46,11 @@ public class EmailController extends BaseController {
46 46
47 @GetMapping(value = "/page") 47 @GetMapping(value = "/page")
48 public String page(Model model, EmailDTO emailDTO, HttpSession session) { 48 public String page(Model model, EmailDTO emailDTO, HttpSession session) {
49 - //Integer page, Integer pageSize, String orderByClause,  
50 - // String remark,String email  
51 SessionUser sessionUser = (SessionUser) session.getAttribute(SessionUser.getSessionKey()); 49 SessionUser sessionUser = (SessionUser) session.getAttribute(SessionUser.getSessionKey());
52 if(CommonUtils.isNull(sessionUser)){ 50 if(CommonUtils.isNull(sessionUser)){
53 return "redirect:/users/login"; 51 return "redirect:/users/login";
54 } 52 }
55 - //if (CommonUtils.isNull(page)) page = 1;  
56 - //if (CommonUtils.isNull(pageSize)) pageSize = 10;  
57 - PageInfo<ShyEmail> emailPage = emailServiceImpl.getPage(emailDTO.getPage(), emailDTO.getPageSize(), emailDTO.getOrderByClause(), emailDTO.getRemark(),emailDTO.getEmail());  
58 - //page, pageSize, orderByClause, remark,email 53 + PageInfo<ShyEmail> emailPage = emailServiceImpl.getPage(emailDTO);
59 List<ShyEmail> list = emailPage.getList(); 54 List<ShyEmail> list = emailPage.getList();
60 JSONObject email_message = CommonConst.EMAIL_MESSAGE; 55 JSONObject email_message = CommonConst.EMAIL_MESSAGE;
61 if (!list.isEmpty()) { 56 if (!list.isEmpty()) {
src/main/java/com/cnlive/shenhe/controller/LiveApplyController.java
@@ -66,9 +66,9 @@ public class LiveApplyController extends BaseController { @@ -66,9 +66,9 @@ public class LiveApplyController extends BaseController {
66 /** 66 /**
67 * 直播申请审核信息回调接口 67 * 直播申请审核信息回调接口
68 * 68 *
69 - * @param activity_id 视频id 69 + * @param ids 视频id
70 * @param state 状态码 70 * @param state 状态码
71 - * @param attr_tags 标签 71 + * @param
72 * @param msg 备注信息 72 * @param msg 备注信息
73 * @return 73 * @return
74 */ 74 */
@@ -117,48 +117,36 @@ public class LiveApplyController extends BaseController { @@ -117,48 +117,36 @@ public class LiveApplyController extends BaseController {
117 /** 117 /**
118 * 内容分页列表接口 118 * 内容分页列表接口
119 * 119 *
120 - * @param video_title  
121 - * @param start_date  
122 - * @param end_date  
123 - * @param state  
124 - * @param page  
125 - * @param pageSize  
126 - * @param orderByClause 120 + * @param liveApplyDTO
127 * @return 121 * @return
128 */ 122 */
129 @GetMapping("/page") 123 @GetMapping("/page")
130 public Object getListLiveApply(Model model, LiveApplyDTO liveApplyDTO, HttpSession session) { 124 public Object getListLiveApply(Model model, LiveApplyDTO liveApplyDTO, HttpSession session) {
131 - //String start_date,String end_date,  
132 - // String theme, String business_model, Integer page,Integer pageSize,  
133 - // Integer shenhe_state,Integer receive, String sp_desc,String orderByClause  
134 System.out.println("进入直播申请内容页"); 125 System.out.println("进入直播申请内容页");
135 SessionUser sessionUser = (SessionUser) session.getAttribute(SessionUser.getSessionKey()); 126 SessionUser sessionUser = (SessionUser) session.getAttribute(SessionUser.getSessionKey());
136 if(CommonUtils.isNull(sessionUser)){ 127 if(CommonUtils.isNull(sessionUser)){
137 return "redirect:/users/login"; 128 return "redirect:/users/login";
138 } 129 }
139 Integer spid = sessionUser.getSpid(); 130 Integer spid = sessionUser.getSpid();
  131 + liveApplyDTO.setSpid(spid);
140 String userId = sessionUser.getUserId(); 132 String userId = sessionUser.getUserId();
141 - //if (CommonUtils.isNull(page)) page = 1;  
142 - //if (CommonUtils.isNull(pageSize)) pageSize = 10; 133 + liveApplyDTO.setUserId(userId);
143 if (CommonUtils.isNotEmpty(liveApplyDTO.getSp_desc()) && spid == 0) { 134 if (CommonUtils.isNotEmpty(liveApplyDTO.getSp_desc()) && spid == 0) {
144 ShySites shySite=sitesService.findspidBySpdesc(liveApplyDTO.getSp_desc()); 135 ShySites shySite=sitesService.findspidBySpdesc(liveApplyDTO.getSp_desc());
145 if(CommonUtils.isNotNull(shySite)){ 136 if(CommonUtils.isNotNull(shySite)){
146 - spid = shySite.getSpid(); 137 + liveApplyDTO.setSpid(shySite.getSpid());
147 }else{ 138 }else{
148 setmodelSite(model); 139 setmodelSite(model);
149 return "error.html"; 140 return "error.html";
150 } 141 }
151 } else if (CommonUtils.isEmpty(liveApplyDTO.getSp_desc()) && spid == 0) { 142 } else if (CommonUtils.isEmpty(liveApplyDTO.getSp_desc()) && spid == 0) {
152 - spid = null; 143 + liveApplyDTO.setSpid(null);
153 } 144 }
154 - PageInfo<ShyLiveapply> liveApplyPage = liveApplyServiceImpl.getListLiveApply(liveApplyDTO.getTheme(), liveApplyDTO.getStart_date(),liveApplyDTO.getEnd_date(),  
155 - liveApplyDTO.getBusiness_model(), liveApplyDTO.getPage(), liveApplyDTO.getPageSize(), liveApplyDTO.getShenhe_state(),liveApplyDTO.getReceive(), liveApplyDTO.getOrderByClause(), spid, userId);  
156 - //theme, start_date,end_date,  
157 - // business_model, page, pageSize, shenhe_state,receive, orderByClause, spid, userId 145 + PageInfo<ShyLiveapply> liveApplyPage = liveApplyServiceImpl.getListLiveApply(liveApplyDTO);
158 List<ShyLiveapply> list = liveApplyPage.getList(); 146 List<ShyLiveapply> list = liveApplyPage.getList();
159 if (!list.isEmpty()) { 147 if (!list.isEmpty()) {
160 for (ShyLiveapply liveApply : list) { 148 for (ShyLiveapply liveApply : list) {
161 - if (liveApply.getShenhe_state() != CommonConst.AUDIT_INTT) { 149 + if (!liveApply.getShenhe_state().equals(CommonConst.AUDIT_INTT)) {
162 String updater =CommonUtils.isEmpty(liveApply.getUpdater()) || "null".equals(liveApply.getUpdater())? "白名单":liveApply.getUpdater(); 150 String updater =CommonUtils.isEmpty(liveApply.getUpdater()) || "null".equals(liveApply.getUpdater())? "白名单":liveApply.getUpdater();
163 String auditor_id = liveApply.getAuditor(); 151 String auditor_id = liveApply.getAuditor();
164 if (CommonUtils.isNotEmpty(auditor_id)) { 152 if (CommonUtils.isNotEmpty(auditor_id)) {
@@ -226,7 +214,7 @@ public class LiveApplyController extends BaseController { @@ -226,7 +214,7 @@ public class LiveApplyController extends BaseController {
226 for (String cid : cids) { 214 for (String cid : cids) {
227 ShyLiveapply shyLiveapply = liveApplyServiceImpl.selectByPrimaryKey(Integer.parseInt(cid)); 215 ShyLiveapply shyLiveapply = liveApplyServiceImpl.selectByPrimaryKey(Integer.parseInt(cid));
228 if (CommonUtils.isNotNull(shyLiveapply)) { 216 if (CommonUtils.isNotNull(shyLiveapply)) {
229 - if (shyLiveapply.getShenhe_state() != CommonConst.RECEIVE_BEFORE ) { 217 + if (!shyLiveapply.getShenhe_state().equals(CommonConst.RECEIVE_BEFORE)) {
230 return new ResponseBean(ErrorEnum.ERROR.getErrorCode(), "您领取的内容中有已被领取或者已经被审核,请检查并重试"); 218 return new ResponseBean(ErrorEnum.ERROR.getErrorCode(), "您领取的内容中有已被领取或者已经被审核,请检查并重试");
231 } 219 }
232 } else { 220 } else {
@@ -317,25 +305,21 @@ public class LiveApplyController extends BaseController { @@ -317,25 +305,21 @@ public class LiveApplyController extends BaseController {
317 */ 305 */
318 @GetMapping("excel") 306 @GetMapping("excel")
319 public void getExcel(LiveApplyDTO liveApplyDTO, HttpSession session,HttpServletResponse response) { 307 public void getExcel(LiveApplyDTO liveApplyDTO, HttpSession session,HttpServletResponse response) {
320 - //String start_date,String end_date,  
321 - // String theme, Integer business_model, Integer page,Integer pageSize,  
322 - // Integer shenhe_state,Integer receive, String sp_desc,String orderByClause  
323 SessionUser sessionUser = (SessionUser) session.getAttribute(SessionUser.getSessionKey()); 308 SessionUser sessionUser = (SessionUser) session.getAttribute(SessionUser.getSessionKey());
324 Integer spid = sessionUser.getSpid(); 309 Integer spid = sessionUser.getSpid();
  310 + liveApplyDTO.setSpid(spid);
325 String userId = sessionUser.getUserId(); 311 String userId = sessionUser.getUserId();
  312 + liveApplyDTO.setUserId(userId);
326 if (CommonUtils.isNotEmpty(liveApplyDTO.getSp_desc()) && spid == 0) { 313 if (CommonUtils.isNotEmpty(liveApplyDTO.getSp_desc()) && spid == 0) {
327 ShySites shySite=sitesService.findspidBySpdesc(liveApplyDTO.getSp_desc()); 314 ShySites shySite=sitesService.findspidBySpdesc(liveApplyDTO.getSp_desc());
328 if(CommonUtils.isNotNull(shySite)){ 315 if(CommonUtils.isNotNull(shySite)){
329 - spid = shySite.getSpid(); 316 + liveApplyDTO.setSpid(shySite.getSpid());
330 } 317 }
331 }else if (CommonUtils.isEmpty(liveApplyDTO.getSp_desc()) && spid == 0) { 318 }else if (CommonUtils.isEmpty(liveApplyDTO.getSp_desc()) && spid == 0) {
332 - spid = null; 319 + liveApplyDTO.setSpid(null);
333 } 320 }
334 - List<ShyLiveapply> liveApplyList = liveApplyServiceImpl.findByCondition(liveApplyDTO.getTheme(), liveApplyDTO.getStart_date(),liveApplyDTO.getEnd_date(),  
335 - liveApplyDTO.getBusiness_model(), liveApplyDTO.getPage(), liveApplyDTO.getPageSize(), liveApplyDTO.getShenhe_state(),liveApplyDTO.getReceive(), liveApplyDTO.getOrderByClause(), spid, userId);  
336 - //theme, start_date,end_date,  
337 - // business_model, page, pageSize, shenhe_state,receive, orderByClause,  
338 - 321 + List<ShyLiveapply> liveApplyList = liveApplyServiceImpl.findByCondition(liveApplyDTO);
  322 +
339 String fileName = "直播申请数据"; 323 String fileName = "直播申请数据";
340 324
341 XSSFWorkbook wb = new XSSFWorkbook(); 325 XSSFWorkbook wb = new XSSFWorkbook();
@@ -429,19 +413,23 @@ public class LiveApplyController extends BaseController { @@ -429,19 +413,23 @@ public class LiveApplyController extends BaseController {
429 } catch (final Exception e) { 413 } catch (final Exception e) {
430 e.printStackTrace(); 414 e.printStackTrace();
431 try { 415 try {
432 - if (bis != null) 416 + if (bis != null) {
433 bis.close(); 417 bis.close();
434 - if (bos != null) 418 + }
  419 + if (bos != null) {
435 bos.close(); 420 bos.close();
  421 + }
436 } catch (Exception e1) { 422 } catch (Exception e1) {
437 e1.printStackTrace(); 423 e1.printStackTrace();
438 } 424 }
439 } finally { 425 } finally {
440 try { 426 try {
441 - if (bis != null) 427 + if (bis != null) {
442 bis.close(); 428 bis.close();
443 - if (bos != null) 429 + }
  430 + if (bos != null) {
444 bos.close(); 431 bos.close();
  432 + }
445 } catch (Exception e2) { 433 } catch (Exception e2) {
446 e2.printStackTrace(); 434 e2.printStackTrace();
447 } 435 }
src/main/java/com/cnlive/shenhe/controller/LiveController.java
@@ -112,43 +112,28 @@ public class LiveController extends BaseController { @@ -112,43 +112,28 @@ public class LiveController extends BaseController {
112 * 内容分页列表接口 112 * 内容分页列表接口
113 * 113 *
114 * @param model 114 * @param model
115 - * @param activity_id  
116 - * @param start_date  
117 - * @param end_date  
118 - * @param activity_name  
119 - * @param activity_status  
120 - * @param page  
121 - * @param pageSize  
122 - * @param shenhe_state  
123 - * @param sp_desc  
124 - * @param contentId 115 + * @param liveDTO
125 * @param session 116 * @param session
126 * @return 117 * @return
127 */ 118 */
128 @GetMapping("/page") 119 @GetMapping("/page")
129 public Object getListVideos(Model model, LiveDTO liveDTO, HttpSession session) { 120 public Object getListVideos(Model model, LiveDTO liveDTO, HttpSession session) {
130 - //String activity_id, String start_date, String end_date,  
131 - // String activity_name, Integer activity_status, Integer page, Integer pageSize,  
132 - // Integer shenhe_state, String sp_desc, Integer contentId  
133 System.out.println("进入直播内容页"); 121 System.out.println("进入直播内容页");
134 SessionUser sessionUser = (SessionUser) session.getAttribute(SessionUser.getSessionKey()); 122 SessionUser sessionUser = (SessionUser) session.getAttribute(SessionUser.getSessionKey());
135 -// if(CommonUtils.isNull(sessionUser)){  
136 -// return "redirect:/users/login";  
137 -// }  
138 Integer spid = sessionUser.getSpid(); 123 Integer spid = sessionUser.getSpid();
139 String userId = sessionUser.getUserId(); 124 String userId = sessionUser.getUserId();
140 - //if (CommonUtils.isNull(page)) page = 1;  
141 - //if (CommonUtils.isNull(pageSize)) pageSize = 20; 125 + liveDTO.setSpid(spid);
  126 + liveDTO.setUserId(userId);
142 if (CommonUtils.isNotEmpty(liveDTO.getSp_desc()) && spid == 0) { 127 if (CommonUtils.isNotEmpty(liveDTO.getSp_desc()) && spid == 0) {
143 ShySites shySite = sitesService.findspidBySpdesc(liveDTO.getSp_desc()); 128 ShySites shySite = sitesService.findspidBySpdesc(liveDTO.getSp_desc());
144 if (CommonUtils.isNotNull(shySite)) { 129 if (CommonUtils.isNotNull(shySite)) {
145 - spid = shySite.getSpid(); 130 + liveDTO.setSpid(shySite.getSpid());
146 } else { 131 } else {
147 setmodelSite(model); 132 setmodelSite(model);
148 return "error.html"; 133 return "error.html";
149 } 134 }
150 } else if (CommonUtils.isEmpty(liveDTO.getSp_desc()) && spid == 0) { 135 } else if (CommonUtils.isEmpty(liveDTO.getSp_desc()) && spid == 0) {
151 - spid = null; 136 + liveDTO.setSpid(null);
152 } 137 }
153 String orderByClause = ""; 138 String orderByClause = "";
154 //审核状态:全部待领 139 //审核状态:全部待领
@@ -179,8 +164,7 @@ public class LiveController extends BaseController { @@ -179,8 +164,7 @@ public class LiveController extends BaseController {
179 } 164 }
180 } 165 }
181 166
182 - PageInfo<ShyLive> livePage = liveService.getListContent(liveDTO.getActivity_name(), liveDTO.getStart_date(), liveDTO.getEnd_date(),  
183 - liveDTO.getActivity_id(), liveDTO.getActivity_status(), liveDTO.getPage(), liveDTO.getPageSize(), liveDTO.getShenhe_state(), orderByClause, spid, userId); 167 + PageInfo<ShyLive> livePage = liveService.getListContent(liveDTO);
184 List<ShyLive> list = livePage.getList(); 168 List<ShyLive> list = livePage.getList();
185 if (!list.isEmpty()) { 169 if (!list.isEmpty()) {
186 for (ShyLive live : list) { 170 for (ShyLive live : list) {
@@ -376,22 +360,21 @@ public class LiveController extends BaseController { @@ -376,22 +360,21 @@ public class LiveController extends BaseController {
376 */ 360 */
377 @GetMapping("excel") 361 @GetMapping("excel")
378 public void getExcel(LiveDTO liveDTO, HttpSession session,HttpServletResponse response) { 362 public void getExcel(LiveDTO liveDTO, HttpSession session,HttpServletResponse response) {
379 - //String activity_id,String start_date,String end_date,  
380 - // String activity_name, Integer activity_status, Integer page,Integer pageSize,  
381 - // Integer shenhe_state, String orderByClause, String sp_desc 363 +
382 SessionUser sessionUser = (SessionUser) session.getAttribute(SessionUser.getSessionKey()); 364 SessionUser sessionUser = (SessionUser) session.getAttribute(SessionUser.getSessionKey());
383 Integer spid = sessionUser.getSpid(); 365 Integer spid = sessionUser.getSpid();
384 String userId = sessionUser.getUserId(); 366 String userId = sessionUser.getUserId();
  367 + liveDTO.setSpid(spid);
  368 + liveDTO.setUserId(userId);
385 if (CommonUtils.isNotEmpty(liveDTO.getSp_desc()) && spid == 0) { 369 if (CommonUtils.isNotEmpty(liveDTO.getSp_desc()) && spid == 0) {
386 ShySites shySite=sitesService.findspidBySpdesc(liveDTO.getSp_desc()); 370 ShySites shySite=sitesService.findspidBySpdesc(liveDTO.getSp_desc());
387 if(CommonUtils.isNotNull(shySite)){ 371 if(CommonUtils.isNotNull(shySite)){
388 - spid = shySite.getSpid(); 372 + liveDTO.setSpid(shySite.getSpid());
389 } 373 }
390 }else if (CommonUtils.isEmpty(liveDTO.getSp_desc()) && spid == 0) { 374 }else if (CommonUtils.isEmpty(liveDTO.getSp_desc()) && spid == 0) {
391 - spid = null; 375 + liveDTO.setSpid(null);
392 } 376 }
393 - List<ShyLive> liveList = liveService.findByCondition(liveDTO.getActivity_name(), liveDTO.getStart_date(),liveDTO.getEnd_date(),  
394 - liveDTO.getActivity_id(), liveDTO.getActivity_status(), liveDTO.getPage(), liveDTO.getPageSize(), liveDTO.getShenhe_state(), liveDTO.getOrderByClause(), spid,userId); 377 + List<ShyLive> liveList = liveService.findByCondition(liveDTO);
395 378
396 String fileName = "直播数据"; 379 String fileName = "直播数据";
397 380
@@ -526,19 +509,23 @@ public class LiveController extends BaseController { @@ -526,19 +509,23 @@ public class LiveController extends BaseController {
526 } catch (final Exception e) { 509 } catch (final Exception e) {
527 e.printStackTrace(); 510 e.printStackTrace();
528 try { 511 try {
529 - if (bis != null) 512 + if (bis != null) {
530 bis.close(); 513 bis.close();
531 - if (bos != null) 514 + }
  515 + if (bos != null) {
532 bos.close(); 516 bos.close();
  517 + }
533 } catch (Exception e1) { 518 } catch (Exception e1) {
534 e1.printStackTrace(); 519 e1.printStackTrace();
535 } 520 }
536 } finally { 521 } finally {
537 try { 522 try {
538 - if (bis != null) 523 + if (bis != null) {
539 bis.close(); 524 bis.close();
540 - if (bos != null) 525 + }
  526 + if (bos != null) {
541 bos.close(); 527 bos.close();
  528 + }
542 } catch (Exception e2) { 529 } catch (Exception e2) {
543 e2.printStackTrace(); 530 e2.printStackTrace();
544 } 531 }
src/main/java/com/cnlive/shenhe/controller/NotSpeakController.java
@@ -55,30 +55,19 @@ public class NotSpeakController extends BaseController { @@ -55,30 +55,19 @@ public class NotSpeakController extends BaseController {
55 /** 55 /**
56 * 禁言列表页 56 * 禁言列表页
57 * 57 *
58 - * @param activity_id  
59 - * @param content  
60 - * @param is_hot  
61 - * @param start_date  
62 - * @param end_date  
63 - * @param state  
64 - * @param page  
65 - * @param pageSize  
66 - * @param orderByClause 58 + * @param notSpeakDTO
67 * @return 59 * @return
68 */ 60 */
69 @GetMapping("/page") 61 @GetMapping("/page")
70 public String getPage(Model model, NotSpeakDTO notSpeakDTO, HttpSession session) { 62 public String getPage(Model model, NotSpeakDTO notSpeakDTO, HttpSession session) {
71 - //String user_name, Integer user_id,Integer state,  
72 - // Integer page, Integer pageSize, String orderByClause  
73 SessionUser sessionUser = (SessionUser) session.getAttribute(SessionUser.getSessionKey()); 63 SessionUser sessionUser = (SessionUser) session.getAttribute(SessionUser.getSessionKey());
74 if(CommonUtils.isNull(sessionUser)){ 64 if(CommonUtils.isNull(sessionUser)){
75 return "redirect:/users/login"; 65 return "redirect:/users/login";
76 } 66 }
77 String userId = sessionUser.getUserId(); 67 String userId = sessionUser.getUserId();
78 - //if (CommonUtils.isNull(page)) page = 1;  
79 - //if (CommonUtils.isNull(pageSize)) pageSize = 10;  
80 - PageInfo<ShyNotspeak> shyNotspeakPage = notSpeakService.getPage(notSpeakDTO.getUser_name(),notSpeakDTO.getUser_id(), notSpeakDTO.getState(), notSpeakDTO.getPage(), notSpeakDTO.getPageSize(), notSpeakDTO.getOrderByClause());  
81 - //user_name,user_id, state, page, pageSize, orderByClause 68 + notSpeakDTO.setUserId(userId);
  69 + PageInfo<ShyNotspeak> shyNotspeakPage = notSpeakService.getPage(notSpeakDTO);
  70 +
82 List<ShyNotspeak> list = shyNotspeakPage.getList(); 71 List<ShyNotspeak> list = shyNotspeakPage.getList();
83 if (!list.isEmpty()) { 72 if (!list.isEmpty()) {
84 for (ShyNotspeak notspeak : list) { 73 for (ShyNotspeak notspeak : list) {
@@ -115,7 +104,7 @@ public class NotSpeakController extends BaseController { @@ -115,7 +104,7 @@ public class NotSpeakController extends BaseController {
115 /** 104 /**
116 * 禁言(通过评论进入) 105 * 禁言(通过评论进入)
117 * @param commentId 106 * @param commentId
118 - * @param type 107 + * @param
119 * @param time 108 * @param time
120 * @param session 109 * @param session
121 * @return 110 * @return
@@ -131,8 +120,8 @@ public class NotSpeakController extends BaseController { @@ -131,8 +120,8 @@ public class NotSpeakController extends BaseController {
131 /** 120 /**
132 * 查询禁言状态(通过评论进入) 121 * 查询禁言状态(通过评论进入)
133 * @param commentId 122 * @param commentId
134 - * @param type  
135 - * @param time 123 + * @param
  124 + * @param
136 * @param session 125 * @param session
137 * @return 126 * @return
138 */ 127 */
src/main/java/com/cnlive/shenhe/controller/ShyActivityController.java
@@ -6,15 +6,11 @@ import com.cnlive.shenhe.bean.ResponseBean; @@ -6,15 +6,11 @@ import com.cnlive.shenhe.bean.ResponseBean;
6 import com.cnlive.shenhe.dto.ShyActivityDTO; 6 import com.cnlive.shenhe.dto.ShyActivityDTO;
7 import com.cnlive.shenhe.entity.ShyActivity; 7 import com.cnlive.shenhe.entity.ShyActivity;
8 import com.cnlive.shenhe.serviceImpl.ShyActivityImpl; 8 import com.cnlive.shenhe.serviceImpl.ShyActivityImpl;
9 -import com.cnlive.shenhe.utils.CommonConst;  
10 -import com.cnlive.shenhe.utils.CommonUtils;  
11 import com.github.pagehelper.PageInfo; 9 import com.github.pagehelper.PageInfo;
12 import org.springframework.beans.factory.annotation.Autowired; 10 import org.springframework.beans.factory.annotation.Autowired;
13 import org.springframework.stereotype.Controller; 11 import org.springframework.stereotype.Controller;
14 import org.springframework.ui.Model; 12 import org.springframework.ui.Model;
15 import org.springframework.web.bind.annotation.*; 13 import org.springframework.web.bind.annotation.*;
16 -  
17 -import java.util.Date;  
18 import java.util.List; 14 import java.util.List;
19 15
20 16
@@ -64,7 +60,6 @@ public class ShyActivityController extends BaseController { @@ -64,7 +60,6 @@ public class ShyActivityController extends BaseController {
64 60
65 @GetMapping("/page") 61 @GetMapping("/page")
66 public String getShyActivity(ShyActivityDTO shyActivityDTO, Model model) { 62 public String getShyActivity(ShyActivityDTO shyActivityDTO, Model model) {
67 - //@RequestParam(defaultValue = "1") Integer pageNum, @RequestParam(defaultValue = "10") Integer pageSize, String activity, Integer exempt_from_trial  
68 PageInfo<ShyActivity> shyActivityPageInfo = shyActivityImpl.selectByExample(shyActivityDTO); 63 PageInfo<ShyActivity> shyActivityPageInfo = shyActivityImpl.selectByExample(shyActivityDTO);
69 List<ShyActivity> list = shyActivityPageInfo.getList(); 64 List<ShyActivity> list = shyActivityPageInfo.getList();
70 model.addAttribute("exempt_from_trial",shyActivityDTO.getExempt_from_trial()); 65 model.addAttribute("exempt_from_trial",shyActivityDTO.getExempt_from_trial());
src/main/java/com/cnlive/shenhe/controller/SitesController.java
@@ -37,28 +37,27 @@ public class SitesController extends BaseController { @@ -37,28 +37,27 @@ public class SitesController extends BaseController {
37 /** 37 /**
38 * 站点白名单分页列表 38 * 站点白名单分页列表
39 * 39 *
40 - * @param page  
41 - * @param pageSize  
42 - * @param orderByClause  
43 - * @param keyword 40 + * @param sitesDTO
44 * @return 41 * @return
45 */ 42 */
46 @GetMapping(value = "/page") 43 @GetMapping(value = "/page")
47 public String page(Model model, SitesDTO sitesDTO, HttpSession session) { 44 public String page(Model model, SitesDTO sitesDTO, HttpSession session) {
48 - //Integer page, Integer pageSize, String orderByClause, String keyword 45 +
49 SessionUser sessionUser = (SessionUser) session.getAttribute(SessionUser.getSessionKey()); 46 SessionUser sessionUser = (SessionUser) session.getAttribute(SessionUser.getSessionKey());
50 if(CommonUtils.isNull(sessionUser)){ 47 if(CommonUtils.isNull(sessionUser)){
51 return "redirect:/users/login"; 48 return "redirect:/users/login";
52 } 49 }
53 Integer spid = sessionUser.getSpid(); 50 Integer spid = sessionUser.getSpid();
  51 + sitesDTO.setSpId(spid);
54 if (!sessionUser.isMaster() && spid != 0) { 52 if (!sessionUser.isMaster() && spid != 0) {
55 setmodelSite(model); 53 setmodelSite(model);
56 return "error.html"; 54 return "error.html";
57 } 55 }
58 - if (spid == 0) spid = null;  
59 - //if (CommonUtils.isNull(page)) page = 1;  
60 - //if (CommonUtils.isNull(pageSize)) pageSize = 10;  
61 - PageInfo<ShySites> sitePage = sitesService.getPage(sitesDTO.getPage(), sitesDTO.getPageSize(), sitesDTO.getOrderByClause(), sitesDTO.getKeyword(), spid); 56 + if (spid == 0) {
  57 + sitesDTO.setSpId(null);
  58 + }
  59 +
  60 + PageInfo<ShySites> sitePage = sitesService.getPage(sitesDTO);
62 List<ShySites> list = sitePage.getList(); 61 List<ShySites> list = sitePage.getList();
63 JSONObject business = CommonConst.BUSINESS; 62 JSONObject business = CommonConst.BUSINESS;
64 if (!list.isEmpty()) { 63 if (!list.isEmpty()) {
src/main/java/com/cnlive/shenhe/controller/TopicController.java
@@ -53,61 +53,50 @@ public class TopicController extends BaseController { @@ -53,61 +53,50 @@ public class TopicController extends BaseController {
53 * 图文列表 53 * 图文列表
54 * 54 *
55 * @param model 55 * @param model
56 - * @param title  
57 - * @param start_date  
58 - * @param end_date  
59 - * @param receive_status  
60 - * @param sp_desc  
61 - * @param page  
62 - * @param pageSize  
63 - * @param orderByClause 56 + * @param topicDTO
64 * @param session 57 * @param session
65 * @return 58 * @return
66 */ 59 */
67 @GetMapping("/page") 60 @GetMapping("/page")
68 public String getPage(Model model, TopicDTO topicDTO, HttpSession session) { 61 public String getPage(Model model, TopicDTO topicDTO, HttpSession session) {
69 - //String topic_name,String topic_id, String topic_tag,  
70 - // String start_date, String end_date, Integer shenhe_status, String sp_desc,  
71 - // Integer page, Integer pageSize,Integer receive, String orderByClause 62 +
72 SessionUser sessionUser = (SessionUser) session.getAttribute(SessionUser.getSessionKey()); 63 SessionUser sessionUser = (SessionUser) session.getAttribute(SessionUser.getSessionKey());
73 if(CommonUtils.isNull(sessionUser)){ 64 if(CommonUtils.isNull(sessionUser)){
74 return "redirect:/users/login"; 65 return "redirect:/users/login";
75 } 66 }
76 Integer spid = sessionUser.getSpid(); 67 Integer spid = sessionUser.getSpid();
77 String userId = sessionUser.getUserId(); 68 String userId = sessionUser.getUserId();
78 - //if (CommonUtils.isNull(page)) page = 1;  
79 - //if (CommonUtils.isNull(pageSize)) pageSize = 10; 69 + topicDTO.setSpid(spid);
  70 + topicDTO.setUserId(userId);
80 if (CommonUtils.isNotEmpty(topicDTO.getSp_desc()) && spid == 0) { 71 if (CommonUtils.isNotEmpty(topicDTO.getSp_desc()) && spid == 0) {
81 ShySites shySite=sitesService.findspidBySpdesc(topicDTO.getSp_desc()); 72 ShySites shySite=sitesService.findspidBySpdesc(topicDTO.getSp_desc());
82 if(CommonUtils.isNotNull(shySite)){ 73 if(CommonUtils.isNotNull(shySite)){
83 - spid = shySite.getSpid(); 74 + topicDTO.setSpid(shySite.getSpid());
84 }else{ 75 }else{
85 setmodelSite(model); 76 setmodelSite(model);
86 return "error.html"; 77 return "error.html";
87 } 78 }
88 } else if (CommonUtils.isEmpty(topicDTO.getSp_desc()) && spid == 0) { 79 } else if (CommonUtils.isEmpty(topicDTO.getSp_desc()) && spid == 0) {
89 - spid = null; 80 + topicDTO.setSpid(null);
90 } 81 }
91 - Date sDate = null;  
92 - Date eDate = null;  
93 82
94 - if (CommonUtils.isNotEmpty(topicDTO.getStart_date())) { 83 + if (CommonUtils.isNotEmpty(topicDTO.getsDate())) {
95 try { 84 try {
96 - sDate = CommonUtils.parseDate(topicDTO.getStart_date(), "yyyy-MM-dd"); 85 + topicDTO.setsDate(String.valueOf(CommonUtils.parseDate(topicDTO.getsDate(), "yyyy-MM-dd")));
97 } catch (Exception e) { 86 } catch (Exception e) {
98 } 87 }
99 } 88 }
100 - if (CommonUtils.isNotEmpty(topicDTO.getEnd_date())) { 89 + if (CommonUtils.isNotEmpty(topicDTO.geteDate())) {
101 try { 90 try {
102 - eDate = CommonUtils.parseDate(topicDTO.getEnd_date(), "yyyy-MM-dd"); 91 + topicDTO.seteDate(String.valueOf(CommonUtils.parseDate(topicDTO.geteDate(), "yyyy-MM-dd")));
103 } catch (Exception e) { 92 } catch (Exception e) {
104 } 93 }
105 } 94 }
106 - PageInfo<ShyTopic> topicPage = topicService.getPage( topicDTO.getTopic_name(),topicDTO.getTopic_tag(),topicDTO.getTopic_id(), sDate, eDate, topicDTO.getShenhe_status(), null, topicDTO.getPage(), topicDTO.getPageSize(), topicDTO.getOrderByClause(), spid, userId,topicDTO.getReceive()); 95 + PageInfo<ShyTopic> topicPage = topicService.getPage(topicDTO);
107 List<ShyTopic> list = topicPage.getList(); 96 List<ShyTopic> list = topicPage.getList();
108 if (!list.isEmpty()) { 97 if (!list.isEmpty()) {
109 for (ShyTopic topic : list) { 98 for (ShyTopic topic : list) {
110 - if (topic.getShenhe_status() != CommonConst.AUDIT_INTT) { 99 + if (!topic.getShenhe_status().equals(CommonConst.AUDIT_INTT)) {
111 String auditor_id = topic.getAuditor_id(); 100 String auditor_id = topic.getAuditor_id();
112 String updater = CommonUtils.isEmpty(topic.getUpdater()) || "null".equals(topic.getUpdater())? "白名单":topic.getUpdater(); 101 String updater = CommonUtils.isEmpty(topic.getUpdater()) || "null".equals(topic.getUpdater())? "白名单":topic.getUpdater();
113 updater =sitesService.getUpdater(updater,auditor_id); 102 updater =sitesService.getUpdater(updater,auditor_id);
src/main/java/com/cnlive/shenhe/controller/UsersController.java
@@ -84,17 +84,17 @@ public class UsersController extends BaseController { @@ -84,17 +84,17 @@ public class UsersController extends BaseController {
84 @GetMapping(value = "/page") 84 @GetMapping(value = "/page")
85 public String page(Model model, UsersDTO usersDTO, HttpSession session) { 85 public String page(Model model, UsersDTO usersDTO, HttpSession session) {
86 86
87 - //Integer page, Integer pageSize, String orderByClause,  
88 - // String username, String mobile, Integer sp_id, String company_brief  
89 SessionUser sessionUser = (SessionUser) session.getAttribute(SessionUser.getSessionKey()); 87 SessionUser sessionUser = (SessionUser) session.getAttribute(SessionUser.getSessionKey());
90 if(CommonUtils.isNull(sessionUser)){ 88 if(CommonUtils.isNull(sessionUser)){
91 return "redirect:/users/login"; 89 return "redirect:/users/login";
92 } 90 }
93 Integer spid = sessionUser.getSpid(); 91 Integer spid = sessionUser.getSpid();
94 - if (spid == 0) spid = null;  
95 - //if (CommonUtils.isNull(page)) page = 1;  
96 - //if (CommonUtils.isNull(pageSize)) pageSize = 10;  
97 - PageInfo<ShyUsers> usersPage = usersService.getPage(usersDTO.getPage(), usersDTO.getPageSize(), usersDTO.getOrderByClause(), usersDTO.getUsername(),usersDTO.getMobile(),usersDTO.getSp_id(),usersDTO.getCompany_brief()); 92 + usersDTO.setSp_id(spid);
  93 + if (spid == 0) {
  94 + usersDTO.setSp_id(null);
  95 + }
  96 +
  97 + PageInfo<ShyUsers> usersPage = usersService.getPage(usersDTO);
98 List<ShyUsers> list = usersPage.getList(); 98 List<ShyUsers> list = usersPage.getList();
99 JSONObject notice = CommonConst.NOTICE; 99 JSONObject notice = CommonConst.NOTICE;
100 if (!list.isEmpty()) { 100 if (!list.isEmpty()) {
@@ -114,7 +114,7 @@ public class UsersController extends BaseController { @@ -114,7 +114,7 @@ public class UsersController extends BaseController {
114 114
115 /** 115 /**
116 * 获取通知是否显示 116 * 获取通知是否显示
117 - * @param showType 117 + * @param
118 * @param session 118 * @param session
119 * @return 119 * @return
120 */ 120 */
src/main/java/com/cnlive/shenhe/controller/UsersFreeController.java
@@ -41,8 +41,6 @@ public class UsersFreeController extends BaseController { @@ -41,8 +41,6 @@ public class UsersFreeController extends BaseController {
41 41
42 @GetMapping(value = "/page") 42 @GetMapping(value = "/page")
43 public String wangjiajiaPage(Model model, UsersFreeDTO usersFreeDTO, HttpSession session) { 43 public String wangjiajiaPage(Model model, UsersFreeDTO usersFreeDTO, HttpSession session) {
44 - //Integer page, Integer pageSize, String orderByClause,  
45 - // String userId, String mobile  
46 SessionUser sessionUser = (SessionUser) session.getAttribute(SessionUser.getSessionKey()); 44 SessionUser sessionUser = (SessionUser) session.getAttribute(SessionUser.getSessionKey());
47 if(CommonUtils.isNull(sessionUser)){ 45 if(CommonUtils.isNull(sessionUser)){
48 return "redirect:/users/login"; 46 return "redirect:/users/login";
@@ -51,10 +49,10 @@ public class UsersFreeController extends BaseController { @@ -51,10 +49,10 @@ public class UsersFreeController extends BaseController {
51 if (!sessionUser.isMaster() && spid != 0) { 49 if (!sessionUser.isMaster() && spid != 0) {
52 return "page/error.html"; 50 return "page/error.html";
53 } 51 }
54 - if (spid == 0) spid = null;  
55 - //if (CommonUtils.isNull(page)) page = 1;  
56 - //if (CommonUtils.isNull(pageSize)) pageSize = 10;  
57 - PageInfo<ShyUsersfree> usersPage = usersfreeService.getpage(usersFreeDTO.getPage(), usersFreeDTO.getPageSize(), usersFreeDTO.getOrderByClause(), usersFreeDTO.getUserId(),usersFreeDTO.getMobile()); 52 + if (spid == 0) {
  53 + spid = null;
  54 + }
  55 + PageInfo<ShyUsersfree> usersPage = usersfreeService.getpage(usersFreeDTO);
58 List<ShyUsersfree> list = usersPage.getList(); 56 List<ShyUsersfree> list = usersPage.getList();
59 JSONObject category = CommonConst.CATEGORY; 57 JSONObject category = CommonConst.CATEGORY;
60 if (!list.isEmpty()) { 58 if (!list.isEmpty()) {
src/main/java/com/cnlive/shenhe/controller/VideosController.java
@@ -115,47 +115,36 @@ public class VideosController extends BaseController { @@ -115,47 +115,36 @@ public class VideosController extends BaseController {
115 /** 115 /**
116 * 内容分页列表接口 116 * 内容分页列表接口
117 * 117 *
118 - * @param video_title  
119 - * @param start_date  
120 - * @param end_date  
121 - * @param state  
122 - * @param page  
123 - * @param pageSize  
124 - * @param orderByClause 118 + * @param videosDTO
125 * @return 119 * @return
126 */ 120 */
127 @GetMapping("/page") 121 @GetMapping("/page")
128 public Object getListVideos(Model model, VideosDTO videosDTO, HttpSession session) { 122 public Object getListVideos(Model model, VideosDTO videosDTO, HttpSession session) {
129 - //String video_title, String start_date, String end_date, Integer state, Integer receive, Integer page, Integer pageSize,  
130 - // String video_priority, String orderByClause, String sp_desc, String sp_Id, String source, String video_user_id,  
131 - // String shen_auditor_id, Integer contentId, String video_id  
132 if (!StringUtils.isEmpty(videosDTO.getShen_auditor_id())) { 123 if (!StringUtils.isEmpty(videosDTO.getShen_auditor_id())) {
133 if ((!"自动审核".equals(videosDTO.getShen_auditor_id())) && (!"白名单".equals(videosDTO.getShen_auditor_id()))) { 124 if ((!"自动审核".equals(videosDTO.getShen_auditor_id())) && (!"白名单".equals(videosDTO.getShen_auditor_id()))) {
134 videosDTO.setShen_auditor_id(usersService.findspidByName(videosDTO.getShen_auditor_id())); 125 videosDTO.setShen_auditor_id(usersService.findspidByName(videosDTO.getShen_auditor_id()));
135 126
136 } 127 }
137 } 128 }
138 -  
139 SessionUser sessionUser = (SessionUser) session.getAttribute(SessionUser.getSessionKey()); 129 SessionUser sessionUser = (SessionUser) session.getAttribute(SessionUser.getSessionKey());
140 if (CommonUtils.isNull(sessionUser)) { 130 if (CommonUtils.isNull(sessionUser)) {
141 return "redirect:/users/login"; 131 return "redirect:/users/login";
142 } 132 }
143 -  
144 - Integer sessionUserSpid = sessionUser.getSpid();  
145 - logger.info("sp_Id:{},sessionUserSpid:{}", videosDTO.getSp_Id(), sessionUserSpid); 133 + Integer spid = sessionUser.getSpid();
  134 + videosDTO.setSpid(spid);
  135 + logger.info("sp_Id:{},spid:{}", videosDTO.getSp_Id(), videosDTO.getSpid());
146 String userId = sessionUser.getUserId(); 136 String userId = sessionUser.getUserId();
147 - //if (CommonUtils.isNull(page)) page = 1;  
148 - //if (CommonUtils.isNull(pageSize)) pageSize = 10;  
149 - if (CommonUtils.isNotEmpty(videosDTO.getSp_desc()) && sessionUserSpid == 0) { 137 + videosDTO.setUserId(userId);
  138 + if (CommonUtils.isNotEmpty(videosDTO.getSp_desc()) && videosDTO.getSpid() == 0) {
150 ShySites shySite = sitesService.findspidBySpdesc(videosDTO.getSp_desc()); 139 ShySites shySite = sitesService.findspidBySpdesc(videosDTO.getSp_desc());
151 if (CommonUtils.isNotNull(shySite)) { 140 if (CommonUtils.isNotNull(shySite)) {
152 - sessionUserSpid = shySite.getSpid(); 141 + videosDTO.setSpid(shySite.getSpid());
153 } else { 142 } else {
154 setmodelSite(model); 143 setmodelSite(model);
155 return "error.html"; 144 return "error.html";
156 } 145 }
157 - } else if (CommonUtils.isEmpty(videosDTO.getSp_desc()) && sessionUserSpid == 0) {  
158 - sessionUserSpid = null; 146 + } else if (CommonUtils.isEmpty(videosDTO.getSp_desc()) && videosDTO.getSpid() == 0) {
  147 + videosDTO.setSpid(null);
159 } 148 }
160 149
161 if (CommonUtils.isNotNull(videosDTO.getContentId())) { 150 if (CommonUtils.isNotNull(videosDTO.getContentId())) {
@@ -167,15 +156,12 @@ public class VideosController extends BaseController { @@ -167,15 +156,12 @@ public class VideosController extends BaseController {
167 if (data != null) { 156 if (data != null) {
168 String pid = data.getString("pid"); 157 String pid = data.getString("pid");
169 videosDTO.setVideo_id(pid); 158 videosDTO.setVideo_id(pid);
170 - //video_id = pid;  
171 } else { 159 } else {
172 videosDTO.setVideo_id(String.valueOf(videosDTO.getContentId())); 160 videosDTO.setVideo_id(String.valueOf(videosDTO.getContentId()));
173 - //video_id = contentId.toString();  
174 } 161 }
175 } 162 }
176 163
177 - PageInfo<ShyVideos> videoPage = videosService.getListContent(videosDTO.getVideo_title(), videosDTO.getStart_date(), videosDTO.getEnd_date(), videosDTO.getState(), videosDTO.getReceive(), videosDTO.getPage(),  
178 - videosDTO.getPageSize(), videosDTO.getVideo_priority(), videosDTO.getOrderByClause(), sessionUserSpid, userId, videosDTO.getSp_Id(), videosDTO.getSource(), videosDTO.getVideo_user_id(), videosDTO.getShen_auditor_id(), videosDTO.getVideo_id()); 164 + PageInfo<ShyVideos> videoPage = videosService.getListContent(videosDTO);
179 //查询查询条件 165 //查询查询条件
180 List<ShyActivity> activityList = shyActivityImpl.selectAll(); 166 List<ShyActivity> activityList = shyActivityImpl.selectAll();
181 List<ShyVideos> list = videoPage.getList(); 167 List<ShyVideos> list = videoPage.getList();
@@ -339,37 +325,31 @@ public class VideosController extends BaseController { @@ -339,37 +325,31 @@ public class VideosController extends BaseController {
339 /** 325 /**
340 * 根据条件导出excel 326 * 根据条件导出excel
341 * 327 *
342 - * @param video_title  
343 - * @param start_date  
344 - * @param end_date  
345 - * @param state  
346 - * @param receive  
347 - * @param video_priority  
348 - * @param orderByClause 328 + * @param videosDTO
349 * @param session 329 * @param session
350 * @param response 330 * @param response
351 */ 331 */
352 @GetMapping("excel") 332 @GetMapping("excel")
353 public void getExcel(VideosDTO videosDTO, HttpSession session, HttpServletResponse response) { 333 public void getExcel(VideosDTO videosDTO, HttpSession session, HttpServletResponse response) {
354 334
355 - //String video_title, String start_date, String end_date, Integer state, Integer  
356 - //receive, String video_priority, Integer source, String video_user_id, String orderByClause, Integer  
357 - //sp_Id, String sp_desc,  
358 if (CommonUtils.isNotEmpty(videosDTO.getSp_desc())) { 335 if (CommonUtils.isNotEmpty(videosDTO.getSp_desc())) {
359 ShySites shySite = sitesService.findspidBySpdesc(videosDTO.getSp_desc()); 336 ShySites shySite = sitesService.findspidBySpdesc(videosDTO.getSp_desc());
360 if (CommonUtils.isNotNull(shySite)) { 337 if (CommonUtils.isNotNull(shySite)) {
361 videosDTO.setSp_Id(String.valueOf(shySite.getSpid())); 338 videosDTO.setSp_Id(String.valueOf(shySite.getSpid()));
362 - //sp_Id = shySite.getSpid();  
363 } 339 }
364 } 340 }
365 SessionUser sessionUser = (SessionUser) session.getAttribute(SessionUser.getSessionKey()); 341 SessionUser sessionUser = (SessionUser) session.getAttribute(SessionUser.getSessionKey());
366 Integer spid = sessionUser.getSpid(); 342 Integer spid = sessionUser.getSpid();
367 String userId = sessionUser.getUserId(); 343 String userId = sessionUser.getUserId();
368 - if (spid == 0) spid = null; 344 + videosDTO.setSpid(spid);
  345 + videosDTO.setUserId(userId);
  346 + if (spid == 0) {
  347 + videosDTO.setSpid(null);
  348 + }
369 if (videosDTO.getSp_Id() != null) { 349 if (videosDTO.getSp_Id() != null) {
370 - spid = Integer.valueOf(videosDTO.getSp_Id()); 350 + videosDTO.setSpid(Integer.valueOf(videosDTO.getSp_Id()));
371 } 351 }
372 - List<ShyVideos> shyVideosList = videosService.findByCondition(videosDTO.getVideo_title(), videosDTO.getStart_date(), videosDTO.getEnd_date(), videosDTO.getState(), videosDTO.getReceive(), videosDTO.getVideo_priority(), videosDTO.getOrderByClause(), spid, userId, videosDTO.getSource(), videosDTO.getVideo_user_id()); 352 + List<ShyVideos> shyVideosList = videosService.findByCondition(videosDTO);
373 String fileName = "点播数据"; 353 String fileName = "点播数据";
374 String updater = "";//审核员名字 354 String updater = "";//审核员名字
375 String state1 = "";//审核状态 1已审核 2审核拒绝 0未审核 355 String state1 = "";//审核状态 1已审核 2审核拒绝 0未审核
@@ -504,19 +484,23 @@ public class VideosController extends BaseController { @@ -504,19 +484,23 @@ public class VideosController extends BaseController {
504 } catch (final Exception e) { 484 } catch (final Exception e) {
505 e.printStackTrace(); 485 e.printStackTrace();
506 try { 486 try {
507 - if (bis != null) 487 + if (bis != null) {
508 bis.close(); 488 bis.close();
509 - if (bos != null) 489 + }
  490 + if (bos != null) {
510 bos.close(); 491 bos.close();
  492 + }
511 } catch (Exception e1) { 493 } catch (Exception e1) {
512 e1.printStackTrace(); 494 e1.printStackTrace();
513 } 495 }
514 } finally { 496 } finally {
515 try { 497 try {
516 - if (bis != null) 498 + if (bis != null) {
517 bis.close(); 499 bis.close();
518 - if (bos != null) 500 + }
  501 + if (bos != null) {
519 bos.close(); 502 bos.close();
  503 + }
520 } catch (Exception e2) { 504 } catch (Exception e2) {
521 e2.printStackTrace(); 505 e2.printStackTrace();
522 } 506 }
src/main/java/com/cnlive/shenhe/dto/AudioDTO.java
@@ -10,8 +10,8 @@ import java.io.Serializable; @@ -10,8 +10,8 @@ import java.io.Serializable;
10 public class AudioDTO implements Serializable { 10 public class AudioDTO implements Serializable {
11 11
12 private String video_title; 12 private String video_title;
13 - private String start_date;  
14 - private String end_date; 13 + private String sDate ;
  14 + private String eDate ;
15 private Integer state; 15 private Integer state;
16 private Integer receive; 16 private Integer receive;
17 private Integer page = 1; 17 private Integer page = 1;
@@ -20,24 +20,16 @@ public class AudioDTO implements Serializable { @@ -20,24 +20,16 @@ public class AudioDTO implements Serializable {
20 private String orderByClause; 20 private String orderByClause;
21 private String sp_desc; 21 private String sp_desc;
22 private String sp_Id; 22 private String sp_Id;
  23 + private Integer spid;
  24 + private String userId;
23 25
24 public AudioDTO() { 26 public AudioDTO() {
25 } 27 }
26 28
27 - public AudioDTO(String video_title, String start_date, String end_date, Integer state, Integer receive, String video_priority, String orderByClause) { 29 + public AudioDTO(String video_title, String sDate, String eDate, Integer state, Integer receive, Integer page, Integer pageSize, String video_priority, String orderByClause, String sp_desc, String sp_Id, Integer spid, String userId) {
28 this.video_title = video_title; 30 this.video_title = video_title;
29 - this.start_date = start_date;  
30 - this.end_date = end_date;  
31 - this.state = state;  
32 - this.receive = receive;  
33 - this.video_priority = video_priority;  
34 - this.orderByClause = orderByClause;  
35 - }  
36 -  
37 - public AudioDTO(String video_title, String start_date, String end_date, Integer state, Integer receive, Integer page, Integer pageSize, String video_priority, String orderByClause, String sp_desc, String sp_Id) {  
38 - this.video_title = video_title;  
39 - this.start_date = start_date;  
40 - this.end_date = end_date; 31 + this.sDate = sDate;
  32 + this.eDate = eDate;
41 this.state = state; 33 this.state = state;
42 this.receive = receive; 34 this.receive = receive;
43 this.page = page; 35 this.page = page;
@@ -46,9 +38,10 @@ public class AudioDTO implements Serializable { @@ -46,9 +38,10 @@ public class AudioDTO implements Serializable {
46 this.orderByClause = orderByClause; 38 this.orderByClause = orderByClause;
47 this.sp_desc = sp_desc; 39 this.sp_desc = sp_desc;
48 this.sp_Id = sp_Id; 40 this.sp_Id = sp_Id;
  41 + this.spid = spid;
  42 + this.userId = userId;
49 } 43 }
50 44
51 -  
52 public String getVideo_title() { 45 public String getVideo_title() {
53 return video_title; 46 return video_title;
54 } 47 }
@@ -57,20 +50,20 @@ public class AudioDTO implements Serializable { @@ -57,20 +50,20 @@ public class AudioDTO implements Serializable {
57 this.video_title = video_title; 50 this.video_title = video_title;
58 } 51 }
59 52
60 - public String getStart_date() {  
61 - return start_date; 53 + public String getsDate() {
  54 + return sDate;
62 } 55 }
63 56
64 - public void setStart_date(String start_date) {  
65 - this.start_date = start_date; 57 + public void setsDate(String sDate) {
  58 + this.sDate = sDate;
66 } 59 }
67 60
68 - public String getEnd_date() {  
69 - return end_date; 61 + public String geteDate() {
  62 + return eDate;
70 } 63 }
71 64
72 - public void setEnd_date(String end_date) {  
73 - this.end_date = end_date; 65 + public void seteDate(String eDate) {
  66 + this.eDate = eDate;
74 } 67 }
75 68
76 public Integer getState() { 69 public Integer getState() {
@@ -136,6 +129,22 @@ public class AudioDTO implements Serializable { @@ -136,6 +129,22 @@ public class AudioDTO implements Serializable {
136 public void setSp_Id(String sp_Id) { 129 public void setSp_Id(String sp_Id) {
137 this.sp_Id = sp_Id; 130 this.sp_Id = sp_Id;
138 } 131 }
  132 +
  133 + public Integer getSpid() {
  134 + return spid;
  135 + }
  136 +
  137 + public void setSpid(Integer spid) {
  138 + this.spid = spid;
  139 + }
  140 +
  141 + public String getUserId() {
  142 + return userId;
  143 + }
  144 +
  145 + public void setUserId(String userId) {
  146 + this.userId = userId;
  147 + }
139 } 148 }
140 149
141 150
src/main/java/com/cnlive/shenhe/dto/ChannelDTO.java
1 package com.cnlive.shenhe.dto; 1 package com.cnlive.shenhe.dto;
2 2
3 import java.io.Serializable; 3 import java.io.Serializable;
  4 +import java.util.Date;
4 5
5 /** 6 /**
6 * @author Administrator 7 * @author Administrator
@@ -12,28 +13,34 @@ public class ChannelDTO implements Serializable { @@ -12,28 +13,34 @@ public class ChannelDTO implements Serializable {
12 private String channel_id; 13 private String channel_id;
13 private String channel_name; 14 private String channel_name;
14 private Integer receive; 15 private Integer receive;
15 - private String start_date;  
16 - private String end_date;  
17 private Integer shenhe_status; 16 private Integer shenhe_status;
18 private String sp_desc; 17 private String sp_desc;
19 private Integer page = 1; 18 private Integer page = 1;
20 private Integer pageSize = 10; 19 private Integer pageSize = 10;
21 private String orderByClause; 20 private String orderByClause;
  21 + private Integer spid;
  22 + private String userId;
  23 + private String updater;
  24 + private String sDate ;
  25 + private String eDate ;
22 26
23 public ChannelDTO() { 27 public ChannelDTO() {
24 } 28 }
25 29
26 - public ChannelDTO(String channel_id, String channel_name, Integer receive, String start_date, String end_date, Integer shenhe_status, String sp_desc, Integer page, Integer pageSize, String orderByClause) { 30 + public ChannelDTO(String channel_id, String channel_name, Integer receive, Integer shenhe_status, String sp_desc, Integer page, Integer pageSize, String orderByClause, Integer spid, String userId, String updater, String sDate, String eDate) {
27 this.channel_id = channel_id; 31 this.channel_id = channel_id;
28 this.channel_name = channel_name; 32 this.channel_name = channel_name;
29 this.receive = receive; 33 this.receive = receive;
30 - this.start_date = start_date;  
31 - this.end_date = end_date;  
32 this.shenhe_status = shenhe_status; 34 this.shenhe_status = shenhe_status;
33 this.sp_desc = sp_desc; 35 this.sp_desc = sp_desc;
34 this.page = page; 36 this.page = page;
35 this.pageSize = pageSize; 37 this.pageSize = pageSize;
36 this.orderByClause = orderByClause; 38 this.orderByClause = orderByClause;
  39 + this.spid = spid;
  40 + this.userId = userId;
  41 + this.updater = updater;
  42 + this.sDate = sDate;
  43 + this.eDate = eDate;
37 } 44 }
38 45
39 public String getChannel_id() { 46 public String getChannel_id() {
@@ -60,22 +67,6 @@ public class ChannelDTO implements Serializable { @@ -60,22 +67,6 @@ public class ChannelDTO implements Serializable {
60 this.receive = receive; 67 this.receive = receive;
61 } 68 }
62 69
63 - public String getStart_date() {  
64 - return start_date;  
65 - }  
66 -  
67 - public void setStart_date(String start_date) {  
68 - this.start_date = start_date;  
69 - }  
70 -  
71 - public String getEnd_date() {  
72 - return end_date;  
73 - }  
74 -  
75 - public void setEnd_date(String end_date) {  
76 - this.end_date = end_date;  
77 - }  
78 -  
79 public Integer getShenhe_status() { 70 public Integer getShenhe_status() {
80 return shenhe_status; 71 return shenhe_status;
81 } 72 }
@@ -115,4 +106,44 @@ public class ChannelDTO implements Serializable { @@ -115,4 +106,44 @@ public class ChannelDTO implements Serializable {
115 public void setOrderByClause(String orderByClause) { 106 public void setOrderByClause(String orderByClause) {
116 this.orderByClause = orderByClause; 107 this.orderByClause = orderByClause;
117 } 108 }
  109 +
  110 + public Integer getSpid() {
  111 + return spid;
  112 + }
  113 +
  114 + public void setSpid(Integer spid) {
  115 + this.spid = spid;
  116 + }
  117 +
  118 + public String getUserId() {
  119 + return userId;
  120 + }
  121 +
  122 + public void setUserId(String userId) {
  123 + this.userId = userId;
  124 + }
  125 +
  126 + public String getsDate() {
  127 + return sDate;
  128 + }
  129 +
  130 + public void setsDate(String sDate) {
  131 + this.sDate = sDate;
  132 + }
  133 +
  134 + public String geteDate() {
  135 + return eDate;
  136 + }
  137 +
  138 + public void seteDate(String eDate) {
  139 + this.eDate = eDate;
  140 + }
  141 +
  142 + public String getUpdater() {
  143 + return updater;
  144 + }
  145 +
  146 + public void setUpdater(String updater) {
  147 + this.updater = updater;
  148 + }
118 } 149 }
src/main/java/com/cnlive/shenhe/dto/CommentsDTO.java
@@ -12,8 +12,6 @@ public class CommentsDTO implements Serializable { @@ -12,8 +12,6 @@ public class CommentsDTO implements Serializable {
12 private String activity_id; 12 private String activity_id;
13 private String content; 13 private String content;
14 private Integer is_hot; 14 private Integer is_hot;
15 - private String start_date;  
16 - private String end_date;  
17 private Integer state; 15 private Integer state;
18 private Integer receive; 16 private Integer receive;
19 private Integer page = 1; 17 private Integer page = 1;
@@ -21,16 +19,19 @@ public class CommentsDTO implements Serializable { @@ -21,16 +19,19 @@ public class CommentsDTO implements Serializable {
21 private String orderByClause; 19 private String orderByClause;
22 private Integer type; 20 private Integer type;
23 private Integer comment_user_id; 21 private Integer comment_user_id;
  22 + private String sDate ;
  23 + private String eDate ;
  24 + private Integer spid;
  25 + private String userId;
  26 + private String updater;
24 27
25 public CommentsDTO() { 28 public CommentsDTO() {
26 } 29 }
27 30
28 - public CommentsDTO(String activity_id, String content, Integer is_hot, String start_date, String end_date, Integer state, Integer receive, Integer page, Integer pageSize, String orderByClause, Integer type, Integer comment_user_id) { 31 + public CommentsDTO(String activity_id, String content, Integer is_hot, Integer state, Integer receive, Integer page, Integer pageSize, String orderByClause, Integer type, Integer comment_user_id, String sDate, String eDate, Integer spid, String userId, String updater) {
29 this.activity_id = activity_id; 32 this.activity_id = activity_id;
30 this.content = content; 33 this.content = content;
31 this.is_hot = is_hot; 34 this.is_hot = is_hot;
32 - this.start_date = start_date;  
33 - this.end_date = end_date;  
34 this.state = state; 35 this.state = state;
35 this.receive = receive; 36 this.receive = receive;
36 this.page = page; 37 this.page = page;
@@ -38,6 +39,11 @@ public class CommentsDTO implements Serializable { @@ -38,6 +39,11 @@ public class CommentsDTO implements Serializable {
38 this.orderByClause = orderByClause; 39 this.orderByClause = orderByClause;
39 this.type = type; 40 this.type = type;
40 this.comment_user_id = comment_user_id; 41 this.comment_user_id = comment_user_id;
  42 + this.sDate = sDate;
  43 + this.eDate = eDate;
  44 + this.spid = spid;
  45 + this.userId = userId;
  46 + this.updater = updater;
41 } 47 }
42 48
43 public String getActivity_id() { 49 public String getActivity_id() {
@@ -64,22 +70,6 @@ public class CommentsDTO implements Serializable { @@ -64,22 +70,6 @@ public class CommentsDTO implements Serializable {
64 this.is_hot = is_hot; 70 this.is_hot = is_hot;
65 } 71 }
66 72
67 - public String getStart_date() {  
68 - return start_date;  
69 - }  
70 -  
71 - public void setStart_date(String start_date) {  
72 - this.start_date = start_date;  
73 - }  
74 -  
75 - public String getEnd_date() {  
76 - return end_date;  
77 - }  
78 -  
79 - public void setEnd_date(String end_date) {  
80 - this.end_date = end_date;  
81 - }  
82 -  
83 public Integer getState() { 73 public Integer getState() {
84 return state; 74 return state;
85 } 75 }
@@ -135,4 +125,44 @@ public class CommentsDTO implements Serializable { @@ -135,4 +125,44 @@ public class CommentsDTO implements Serializable {
135 public void setComment_user_id(Integer comment_user_id) { 125 public void setComment_user_id(Integer comment_user_id) {
136 this.comment_user_id = comment_user_id; 126 this.comment_user_id = comment_user_id;
137 } 127 }
  128 +
  129 + public String getsDate() {
  130 + return sDate;
  131 + }
  132 +
  133 + public void setsDate(String sDate) {
  134 + this.sDate = sDate;
  135 + }
  136 +
  137 + public String geteDate() {
  138 + return eDate;
  139 + }
  140 +
  141 + public void seteDate(String eDate) {
  142 + this.eDate = eDate;
  143 + }
  144 +
  145 + public Integer getSpid() {
  146 + return spid;
  147 + }
  148 +
  149 + public void setSpid(Integer spid) {
  150 + this.spid = spid;
  151 + }
  152 +
  153 + public String getUserId() {
  154 + return userId;
  155 + }
  156 +
  157 + public void setUserId(String userId) {
  158 + this.userId = userId;
  159 + }
  160 +
  161 + public String getUpdater() {
  162 + return updater;
  163 + }
  164 +
  165 + public void setUpdater(String updater) {
  166 + this.updater = updater;
  167 + }
138 } 168 }
src/main/java/com/cnlive/shenhe/dto/ContentDTO.java
1 package com.cnlive.shenhe.dto; 1 package com.cnlive.shenhe.dto;
2 2
3 import java.io.Serializable; 3 import java.io.Serializable;
  4 +import java.util.Date;
4 5
5 /** 6 /**
6 * @author Administrator 7 * @author Administrator
@@ -12,8 +13,6 @@ public class ContentDTO implements Serializable { @@ -12,8 +13,6 @@ public class ContentDTO implements Serializable {
12 private String title; 13 private String title;
13 private String contentId; 14 private String contentId;
14 private String content_tag; 15 private String content_tag;
15 - private String start_date;  
16 - private String end_date;  
17 private Integer receive_status; 16 private Integer receive_status;
18 private String sp_desc; 17 private String sp_desc;
19 private String source; 18 private String source;
@@ -21,25 +20,15 @@ public class ContentDTO implements Serializable { @@ -21,25 +20,15 @@ public class ContentDTO implements Serializable {
21 private Integer page = 1; 20 private Integer page = 1;
22 private Integer pageSize = 10; 21 private Integer pageSize = 10;
23 private String orderByClause; 22 private String orderByClause;
  23 + private String sDate;
  24 + private String eDate;
  25 + private Integer spid;
  26 + private String userId;
  27 + private String updater;
24 28
25 public ContentDTO() { 29 public ContentDTO() {
26 } 30 }
27 31
28 - public ContentDTO(String title, String contentId, String content_tag, String start_date, String end_date, Integer receive_status, String sp_desc, String source, String author, Integer page, Integer pageSize, String orderByClause) {  
29 - this.title = title;  
30 - this.contentId = contentId;  
31 - this.content_tag = content_tag;  
32 - this.start_date = start_date;  
33 - this.end_date = end_date;  
34 - this.receive_status = receive_status;  
35 - this.sp_desc = sp_desc;  
36 - this.source = source;  
37 - this.author = author;  
38 - this.page = page;  
39 - this.pageSize = pageSize;  
40 - this.orderByClause = orderByClause;  
41 - }  
42 -  
43 public String getTitle() { 32 public String getTitle() {
44 return title; 33 return title;
45 } 34 }
@@ -64,22 +53,6 @@ public class ContentDTO implements Serializable { @@ -64,22 +53,6 @@ public class ContentDTO implements Serializable {
64 this.content_tag = content_tag; 53 this.content_tag = content_tag;
65 } 54 }
66 55
67 - public String getStart_date() {  
68 - return start_date;  
69 - }  
70 -  
71 - public void setStart_date(String start_date) {  
72 - this.start_date = start_date;  
73 - }  
74 -  
75 - public String getEnd_date() {  
76 - return end_date;  
77 - }  
78 -  
79 - public void setEnd_date(String end_date) {  
80 - this.end_date = end_date;  
81 - }  
82 -  
83 public Integer getReceive_status() { 56 public Integer getReceive_status() {
84 return receive_status; 57 return receive_status;
85 } 58 }
@@ -135,4 +108,63 @@ public class ContentDTO implements Serializable { @@ -135,4 +108,63 @@ public class ContentDTO implements Serializable {
135 public void setOrderByClause(String orderByClause) { 108 public void setOrderByClause(String orderByClause) {
136 this.orderByClause = orderByClause; 109 this.orderByClause = orderByClause;
137 } 110 }
  111 +
  112 +
  113 + public Integer getSpid() {
  114 + return spid;
  115 + }
  116 +
  117 + public void setSpid(Integer spid) {
  118 + this.spid = spid;
  119 + }
  120 +
  121 + public String getUserId() {
  122 + return userId;
  123 + }
  124 +
  125 + public void setUserId(String userId) {
  126 + this.userId = userId;
  127 + }
  128 +
  129 + public String getsDate() {
  130 + return sDate;
  131 + }
  132 +
  133 + public void setsDate(String sDate) {
  134 + this.sDate = sDate;
  135 + }
  136 +
  137 + public String geteDate() {
  138 + return eDate;
  139 + }
  140 +
  141 + public void seteDate(String eDate) {
  142 + this.eDate = eDate;
  143 + }
  144 +
  145 + public String getUpdater() {
  146 + return updater;
  147 + }
  148 +
  149 + public void setUpdater(String updater) {
  150 + this.updater = updater;
  151 + }
  152 +
  153 + public ContentDTO(String title, String contentId, String content_tag, Integer receive_status, String sp_desc, String source, String author, Integer page, Integer pageSize, String orderByClause, String sDate, String eDate, Integer spid, String userId, String updater) {
  154 + this.title = title;
  155 + this.contentId = contentId;
  156 + this.content_tag = content_tag;
  157 + this.receive_status = receive_status;
  158 + this.sp_desc = sp_desc;
  159 + this.source = source;
  160 + this.author = author;
  161 + this.page = page;
  162 + this.pageSize = pageSize;
  163 + this.orderByClause = orderByClause;
  164 + this.sDate = sDate;
  165 + this.eDate = eDate;
  166 + this.spid = spid;
  167 + this.userId = userId;
  168 + this.updater = updater;
  169 + }
138 } 170 }
src/main/java/com/cnlive/shenhe/dto/LiveApplyDTO.java
@@ -8,8 +8,8 @@ import java.io.Serializable; @@ -8,8 +8,8 @@ import java.io.Serializable;
8 * @create 2022-03-17 15:22 8 * @create 2022-03-17 15:22
9 */ 9 */
10 public class LiveApplyDTO implements Serializable { 10 public class LiveApplyDTO implements Serializable {
11 - private String start_date;  
12 - private String end_date; 11 +
  12 +
13 private String theme; 13 private String theme;
14 private String business_model; 14 private String business_model;
15 private Integer page = 1; 15 private Integer page = 1;
@@ -18,13 +18,17 @@ public class LiveApplyDTO implements Serializable { @@ -18,13 +18,17 @@ public class LiveApplyDTO implements Serializable {
18 private Integer receive; 18 private Integer receive;
19 private String sp_desc; 19 private String sp_desc;
20 private String orderByClause; 20 private String orderByClause;
  21 + private Integer spid;
  22 + private String userId;
  23 + private String sDate;
  24 + private String eDate;
21 25
22 public LiveApplyDTO() { 26 public LiveApplyDTO() {
23 } 27 }
24 28
25 - public LiveApplyDTO(String start_date, String end_date, String theme, String business_model, Integer page, Integer pageSize, Integer shenhe_state, Integer receive, String sp_desc, String orderByClause) {  
26 - this.start_date = start_date;  
27 - this.end_date = end_date; 29 + public LiveApplyDTO(String sDate, String eDate, String theme, String business_model, Integer page, Integer pageSize, Integer shenhe_state, Integer receive, String sp_desc, String orderByClause, Integer spid, String userId) {
  30 + this.sDate = sDate;
  31 + this.eDate = eDate;
28 this.theme = theme; 32 this.theme = theme;
29 this.business_model = business_model; 33 this.business_model = business_model;
30 this.page = page; 34 this.page = page;
@@ -33,22 +37,40 @@ public class LiveApplyDTO implements Serializable { @@ -33,22 +37,40 @@ public class LiveApplyDTO implements Serializable {
33 this.receive = receive; 37 this.receive = receive;
34 this.sp_desc = sp_desc; 38 this.sp_desc = sp_desc;
35 this.orderByClause = orderByClause; 39 this.orderByClause = orderByClause;
  40 + this.spid = spid;
  41 + this.userId = userId;
  42 + }
  43 +
  44 + public String getsDate() {
  45 + return sDate;
  46 + }
  47 +
  48 + public void setsDate(String sDate) {
  49 + this.sDate = sDate;
36 } 50 }
37 51
38 - public String getStart_date() {  
39 - return start_date; 52 + public String geteDate() {
  53 + return eDate;
40 } 54 }
41 55
42 - public void setStart_date(String start_date) {  
43 - this.start_date = start_date; 56 + public void seteDate(String eDate) {
  57 + this.eDate = eDate;
44 } 58 }
45 59
46 - public String getEnd_date() {  
47 - return end_date; 60 + public Integer getSpid() {
  61 + return spid;
48 } 62 }
49 63
50 - public void setEnd_date(String end_date) {  
51 - this.end_date = end_date; 64 + public void setSpid(Integer spid) {
  65 + this.spid = spid;
  66 + }
  67 +
  68 + public String getUserId() {
  69 + return userId;
  70 + }
  71 +
  72 + public void setUserId(String userId) {
  73 + this.userId = userId;
52 } 74 }
53 75
54 public String getTheme() { 76 public String getTheme() {
@@ -114,4 +136,6 @@ public class LiveApplyDTO implements Serializable { @@ -114,4 +136,6 @@ public class LiveApplyDTO implements Serializable {
114 public void setOrderByClause(String orderByClause) { 136 public void setOrderByClause(String orderByClause) {
115 this.orderByClause = orderByClause; 137 this.orderByClause = orderByClause;
116 } 138 }
  139 +
  140 +
117 } 141 }
src/main/java/com/cnlive/shenhe/dto/LiveDTO.java
@@ -10,8 +10,6 @@ import java.io.Serializable; @@ -10,8 +10,6 @@ import java.io.Serializable;
10 public class LiveDTO implements Serializable { 10 public class LiveDTO implements Serializable {
11 11
12 private String activity_id; 12 private String activity_id;
13 - private String start_date;  
14 - private String end_date;  
15 private String activity_name; 13 private String activity_name;
16 private Integer activity_status; 14 private Integer activity_status;
17 private Integer page = 1; 15 private Integer page = 1;
@@ -21,13 +19,16 @@ public class LiveDTO implements Serializable { @@ -21,13 +19,16 @@ public class LiveDTO implements Serializable {
21 private Integer contentId; 19 private Integer contentId;
22 private String orderByClause; 20 private String orderByClause;
23 21
  22 + private Integer spid;
  23 + private String userId;
  24 + private String sDate;
  25 + private String eDate;
  26 +
24 public LiveDTO() { 27 public LiveDTO() {
25 } 28 }
26 29
27 - public LiveDTO(String activity_id, String start_date, String end_date, String activity_name, Integer activity_status, Integer page, Integer pageSize, Integer shenhe_state, String sp_desc, Integer contentId, String orderByClause) { 30 + public LiveDTO(String activity_id, String activity_name, Integer activity_status, Integer page, Integer pageSize, Integer shenhe_state, String sp_desc, Integer contentId, String orderByClause, Integer spid, String userId, String sDate, String eDate) {
28 this.activity_id = activity_id; 31 this.activity_id = activity_id;
29 - this.start_date = start_date;  
30 - this.end_date = end_date;  
31 this.activity_name = activity_name; 32 this.activity_name = activity_name;
32 this.activity_status = activity_status; 33 this.activity_status = activity_status;
33 this.page = page; 34 this.page = page;
@@ -36,6 +37,10 @@ public class LiveDTO implements Serializable { @@ -36,6 +37,10 @@ public class LiveDTO implements Serializable {
36 this.sp_desc = sp_desc; 37 this.sp_desc = sp_desc;
37 this.contentId = contentId; 38 this.contentId = contentId;
38 this.orderByClause = orderByClause; 39 this.orderByClause = orderByClause;
  40 + this.spid = spid;
  41 + this.userId = userId;
  42 + this.sDate = sDate;
  43 + this.eDate = eDate;
39 } 44 }
40 45
41 public String getActivity_id() { 46 public String getActivity_id() {
@@ -46,22 +51,6 @@ public class LiveDTO implements Serializable { @@ -46,22 +51,6 @@ public class LiveDTO implements Serializable {
46 this.activity_id = activity_id; 51 this.activity_id = activity_id;
47 } 52 }
48 53
49 - public String getStart_date() {  
50 - return start_date;  
51 - }  
52 -  
53 - public void setStart_date(String start_date) {  
54 - this.start_date = start_date;  
55 - }  
56 -  
57 - public String getEnd_date() {  
58 - return end_date;  
59 - }  
60 -  
61 - public void setEnd_date(String end_date) {  
62 - this.end_date = end_date;  
63 - }  
64 -  
65 public String getActivity_name() { 54 public String getActivity_name() {
66 return activity_name; 55 return activity_name;
67 } 56 }
@@ -125,4 +114,36 @@ public class LiveDTO implements Serializable { @@ -125,4 +114,36 @@ public class LiveDTO implements Serializable {
125 public void setOrderByClause(String orderByClause) { 114 public void setOrderByClause(String orderByClause) {
126 this.orderByClause = orderByClause; 115 this.orderByClause = orderByClause;
127 } 116 }
  117 +
  118 + public Integer getSpid() {
  119 + return spid;
  120 + }
  121 +
  122 + public void setSpid(Integer spid) {
  123 + this.spid = spid;
  124 + }
  125 +
  126 + public String getUserId() {
  127 + return userId;
  128 + }
  129 +
  130 + public void setUserId(String userId) {
  131 + this.userId = userId;
  132 + }
  133 +
  134 + public String getsDate() {
  135 + return sDate;
  136 + }
  137 +
  138 + public void setsDate(String sDate) {
  139 + this.sDate = sDate;
  140 + }
  141 +
  142 + public String geteDate() {
  143 + return eDate;
  144 + }
  145 +
  146 + public void seteDate(String eDate) {
  147 + this.eDate = eDate;
  148 + }
128 } 149 }
src/main/java/com/cnlive/shenhe/dto/NotSpeakDTO.java
@@ -15,10 +15,30 @@ public class NotSpeakDTO implements Serializable { @@ -15,10 +15,30 @@ public class NotSpeakDTO implements Serializable {
15 private Integer page = 1; 15 private Integer page = 1;
16 private Integer pageSize = 10; 16 private Integer pageSize = 10;
17 private String orderByClause; 17 private String orderByClause;
  18 + private String userId;
18 19
19 public NotSpeakDTO() { 20 public NotSpeakDTO() {
20 } 21 }
21 22
  23 + public String getUserId() {
  24 + return userId;
  25 + }
  26 +
  27 + public void setUserId(String userId) {
  28 + this.userId = userId;
  29 + }
  30 +
  31 + public NotSpeakDTO(String user_name, Integer user_id, Integer state, Integer page, Integer pageSize, String orderByClause, String userId) {
  32 +
  33 + this.user_name = user_name;
  34 + this.user_id = user_id;
  35 + this.state = state;
  36 + this.page = page;
  37 + this.pageSize = pageSize;
  38 + this.orderByClause = orderByClause;
  39 + this.userId = userId;
  40 + }
  41 +
22 public NotSpeakDTO(String user_name, Integer user_id, Integer state, Integer page, Integer pageSize, String orderByClause) { 42 public NotSpeakDTO(String user_name, Integer user_id, Integer state, Integer page, Integer pageSize, String orderByClause) {
23 this.user_name = user_name; 43 this.user_name = user_name;
24 this.user_id = user_id; 44 this.user_id = user_id;
src/main/java/com/cnlive/shenhe/dto/SitesDTO.java
@@ -12,6 +12,7 @@ public class SitesDTO implements Serializable { @@ -12,6 +12,7 @@ public class SitesDTO implements Serializable {
12 private Integer pageSize = 10; 12 private Integer pageSize = 10;
13 private String orderByClause; 13 private String orderByClause;
14 private String keyword; 14 private String keyword;
  15 + private Integer spId;
15 16
16 public SitesDTO() { 17 public SitesDTO() {
17 } 18 }
@@ -23,6 +24,22 @@ public class SitesDTO implements Serializable { @@ -23,6 +24,22 @@ public class SitesDTO implements Serializable {
23 this.keyword = keyword; 24 this.keyword = keyword;
24 } 25 }
25 26
  27 + public SitesDTO(Integer page, Integer pageSize, String orderByClause, String keyword, Integer spId) {
  28 + this.page = page;
  29 + this.pageSize = pageSize;
  30 + this.orderByClause = orderByClause;
  31 + this.keyword = keyword;
  32 + this.spId = spId;
  33 + }
  34 +
  35 + public Integer getSpId() {
  36 + return spId;
  37 + }
  38 +
  39 + public void setSpId(Integer spId) {
  40 + this.spId = spId;
  41 + }
  42 +
26 public Integer getPage() { 43 public Integer getPage() {
27 return page; 44 return page;
28 } 45 }
src/main/java/com/cnlive/shenhe/dto/TopicDTO.java
@@ -12,30 +12,86 @@ public class TopicDTO implements Serializable { @@ -12,30 +12,86 @@ public class TopicDTO implements Serializable {
12 private String topic_name; 12 private String topic_name;
13 private String topic_id; 13 private String topic_id;
14 private String topic_tag; 14 private String topic_tag;
15 - private String start_date;  
16 - private String end_date;  
17 private Integer shenhe_status; 15 private Integer shenhe_status;
18 private String sp_desc; 16 private String sp_desc;
19 private Integer page = 1; 17 private Integer page = 1;
20 private Integer pageSize = 10; 18 private Integer pageSize = 10;
21 private Integer receive; 19 private Integer receive;
22 private String orderByClause; 20 private String orderByClause;
  21 + private String sDate;
  22 + private String eDate;
  23 + private Integer spid;
  24 + private String userId;
  25 + private String updater;
  26 + private String title;
23 27
24 public TopicDTO() { 28 public TopicDTO() {
25 } 29 }
26 30
27 - public TopicDTO(String topic_name, String topic_id, String topic_tag, String start_date, String end_date, Integer shenhe_status, String sp_desc, Integer page, Integer pageSize, Integer receive, String orderByClause) { 31 + public TopicDTO(String topic_name, String topic_id, String topic_tag, Integer shenhe_status, String sp_desc, Integer page, Integer pageSize, Integer receive, String orderByClause, String sDate, String eDate, Integer spid, String userId, String updater, String title) {
28 this.topic_name = topic_name; 32 this.topic_name = topic_name;
29 this.topic_id = topic_id; 33 this.topic_id = topic_id;
30 this.topic_tag = topic_tag; 34 this.topic_tag = topic_tag;
31 - this.start_date = start_date;  
32 - this.end_date = end_date;  
33 this.shenhe_status = shenhe_status; 35 this.shenhe_status = shenhe_status;
34 this.sp_desc = sp_desc; 36 this.sp_desc = sp_desc;
35 this.page = page; 37 this.page = page;
36 this.pageSize = pageSize; 38 this.pageSize = pageSize;
37 this.receive = receive; 39 this.receive = receive;
38 this.orderByClause = orderByClause; 40 this.orderByClause = orderByClause;
  41 + this.sDate = sDate;
  42 + this.eDate = eDate;
  43 + this.spid = spid;
  44 + this.userId = userId;
  45 + this.updater = updater;
  46 + this.title = title;
  47 + }
  48 +
  49 + public String getTitle() {
  50 + return title;
  51 + }
  52 +
  53 + public void setTitle(String title) {
  54 + this.title = title;
  55 + }
  56 +
  57 + public String getsDate() {
  58 + return sDate;
  59 + }
  60 +
  61 + public void setsDate(String sDate) {
  62 + this.sDate = sDate;
  63 + }
  64 +
  65 + public String geteDate() {
  66 + return eDate;
  67 + }
  68 +
  69 + public void seteDate(String eDate) {
  70 + this.eDate = eDate;
  71 + }
  72 +
  73 + public Integer getSpid() {
  74 + return spid;
  75 + }
  76 +
  77 + public void setSpid(Integer spid) {
  78 + this.spid = spid;
  79 + }
  80 +
  81 + public String getUserId() {
  82 + return userId;
  83 + }
  84 +
  85 + public void setUserId(String userId) {
  86 + this.userId = userId;
  87 + }
  88 +
  89 + public String getUpdater() {
  90 + return updater;
  91 + }
  92 +
  93 + public void setUpdater(String updater) {
  94 + this.updater = updater;
39 } 95 }
40 96
41 public String getTopic_name() { 97 public String getTopic_name() {
@@ -62,22 +118,6 @@ public class TopicDTO implements Serializable { @@ -62,22 +118,6 @@ public class TopicDTO implements Serializable {
62 this.topic_tag = topic_tag; 118 this.topic_tag = topic_tag;
63 } 119 }
64 120
65 - public String getStart_date() {  
66 - return start_date;  
67 - }  
68 -  
69 - public void setStart_date(String start_date) {  
70 - this.start_date = start_date;  
71 - }  
72 -  
73 - public String getEnd_date() {  
74 - return end_date;  
75 - }  
76 -  
77 - public void setEnd_date(String end_date) {  
78 - this.end_date = end_date;  
79 - }  
80 -  
81 public Integer getShenhe_status() { 121 public Integer getShenhe_status() {
82 return shenhe_status; 122 return shenhe_status;
83 } 123 }
src/main/java/com/cnlive/shenhe/dto/VideosDTO.java
@@ -10,8 +10,6 @@ import java.io.Serializable; @@ -10,8 +10,6 @@ import java.io.Serializable;
10 public class VideosDTO implements Serializable { 10 public class VideosDTO implements Serializable {
11 11
12 private String video_title; 12 private String video_title;
13 - private String start_date;  
14 - private String end_date;  
15 private Integer state; 13 private Integer state;
16 private Integer receive; 14 private Integer receive;
17 private Integer page = 1; 15 private Integer page = 1;
@@ -25,14 +23,16 @@ public class VideosDTO implements Serializable { @@ -25,14 +23,16 @@ public class VideosDTO implements Serializable {
25 private String shen_auditor_id; 23 private String shen_auditor_id;
26 private Integer contentId; 24 private Integer contentId;
27 private String video_id; 25 private String video_id;
  26 + private String sDate;
  27 + private String eDate;
  28 + private Integer spid;
  29 + private String userId;
28 30
29 public VideosDTO() { 31 public VideosDTO() {
30 } 32 }
31 33
32 - public VideosDTO(String video_title, String start_date, String end_date, Integer state, Integer receive, Integer page, Integer pageSize, String video_priority, String orderByClause, String sp_desc, String sp_Id, String source, String video_user_id, String shen_auditor_id, Integer contentId, String video_id) { 34 + public VideosDTO(String video_title, Integer state, Integer receive, Integer page, Integer pageSize, String video_priority, String orderByClause, String sp_desc, String sp_Id, String source, String video_user_id, String shen_auditor_id, Integer contentId, String video_id, String sDate, String eDate, Integer spid, String userId) {
33 this.video_title = video_title; 35 this.video_title = video_title;
34 - this.start_date = start_date;  
35 - this.end_date = end_date;  
36 this.state = state; 36 this.state = state;
37 this.receive = receive; 37 this.receive = receive;
38 this.page = page; 38 this.page = page;
@@ -46,6 +46,10 @@ public class VideosDTO implements Serializable { @@ -46,6 +46,10 @@ public class VideosDTO implements Serializable {
46 this.shen_auditor_id = shen_auditor_id; 46 this.shen_auditor_id = shen_auditor_id;
47 this.contentId = contentId; 47 this.contentId = contentId;
48 this.video_id = video_id; 48 this.video_id = video_id;
  49 + this.sDate = sDate;
  50 + this.eDate = eDate;
  51 + this.spid = spid;
  52 + this.userId = userId;
49 } 53 }
50 54
51 public String getVideo_title() { 55 public String getVideo_title() {
@@ -56,20 +60,20 @@ public class VideosDTO implements Serializable { @@ -56,20 +60,20 @@ public class VideosDTO implements Serializable {
56 this.video_title = video_title; 60 this.video_title = video_title;
57 } 61 }
58 62
59 - public String getStart_date() {  
60 - return start_date; 63 + public String getsDate() {
  64 + return sDate;
61 } 65 }
62 66
63 - public void setStart_date(String start_date) {  
64 - this.start_date = start_date; 67 + public void setsDate(String sDate) {
  68 + this.sDate = sDate;
65 } 69 }
66 70
67 - public String getEnd_date() {  
68 - return end_date; 71 + public String geteDate() {
  72 + return eDate;
69 } 73 }
70 74
71 - public void setEnd_date(String end_date) {  
72 - this.end_date = end_date; 75 + public void seteDate(String eDate) {
  76 + this.eDate = eDate;
73 } 77 }
74 78
75 public Integer getState() { 79 public Integer getState() {
@@ -175,4 +179,20 @@ public class VideosDTO implements Serializable { @@ -175,4 +179,20 @@ public class VideosDTO implements Serializable {
175 public void setVideo_id(String video_id) { 179 public void setVideo_id(String video_id) {
176 this.video_id = video_id; 180 this.video_id = video_id;
177 } 181 }
  182 +
  183 + public Integer getSpid() {
  184 + return spid;
  185 + }
  186 +
  187 + public void setSpid(Integer spid) {
  188 + this.spid = spid;
  189 + }
  190 +
  191 + public String getUserId() {
  192 + return userId;
  193 + }
  194 +
  195 + public void setUserId(String userId) {
  196 + this.userId = userId;
  197 + }
178 } 198 }
src/main/java/com/cnlive/shenhe/serviceImpl/AudioServiceImpl.java
@@ -3,6 +3,7 @@ package com.cnlive.shenhe.serviceImpl; @@ -3,6 +3,7 @@ package com.cnlive.shenhe.serviceImpl;
3 import com.alibaba.fastjson.JSONObject; 3 import com.alibaba.fastjson.JSONObject;
4 import com.cnlive.shenhe.bean.ErrorEnum; 4 import com.cnlive.shenhe.bean.ErrorEnum;
5 import com.cnlive.shenhe.bean.ResponseBean; 5 import com.cnlive.shenhe.bean.ResponseBean;
  6 +import com.cnlive.shenhe.dto.AudioDTO;
6 import com.cnlive.shenhe.entity.*; 7 import com.cnlive.shenhe.entity.*;
7 import com.cnlive.shenhe.mapper.ShyAudioMapper; 8 import com.cnlive.shenhe.mapper.ShyAudioMapper;
8 import com.cnlive.shenhe.mapper.ShyUsersMapper; 9 import com.cnlive.shenhe.mapper.ShyUsersMapper;
@@ -104,7 +105,7 @@ public class AudioServiceImpl { @@ -104,7 +105,7 @@ public class AudioServiceImpl {
104 String[] cids = ids.split(","); 105 String[] cids = ids.split(",");
105 for (String cid : cids) { 106 for (String cid : cids) {
106 ShyAudio shyAudio = shyAudioMapper.selectByPrimaryKey(Integer.parseInt(cid)); 107 ShyAudio shyAudio = shyAudioMapper.selectByPrimaryKey(Integer.parseInt(cid));
107 - if (CommonUtils.isNotNull(shyAudio) && shyAudio.getState() == CommonConst.AUDIT_INTT && shyAudio.getReceive() == CommonConst.RECEIVE_BEFORE) { 108 + if (CommonUtils.isNotNull(shyAudio) && shyAudio.getState().equals(CommonConst.AUDIT_INTT) && shyAudio.getReceive().equals(CommonConst.RECEIVE_BEFORE)) {
108 shyAudio.setReceive_user_id(userId); 109 shyAudio.setReceive_user_id(userId);
109 shyAudio.setReceive(CommonConst.RECEIVE_AFTER); 110 shyAudio.setReceive(CommonConst.RECEIVE_AFTER);
110 shyAudioMapper.updateByPrimaryKeySelective(shyAudio); 111 shyAudioMapper.updateByPrimaryKeySelective(shyAudio);
@@ -116,7 +117,9 @@ public class AudioServiceImpl { @@ -116,7 +117,9 @@ public class AudioServiceImpl {
116 example.setOrderByClause("createTime desc"); 117 example.setOrderByClause("createTime desc");
117 example.and().andEqualTo("state", CommonConst.AUDIT_INTT); 118 example.and().andEqualTo("state", CommonConst.AUDIT_INTT);
118 example.and().andEqualTo("receive", CommonConst.RECEIVE_BEFORE); 119 example.and().andEqualTo("receive", CommonConst.RECEIVE_BEFORE);
119 - if (CommonUtils.isNotNull(spid) && spid != 0) example.and().andEqualTo("spid", spid); 120 + if (CommonUtils.isNotNull(spid) && spid != 0) {
  121 + example.and().andEqualTo("spid", spid);
  122 + }
120 List<ShyAudio> shyCommentsList = shyAudioMapper.selectByExampleAndRowBounds(example, new RowBounds(0, num)); 123 List<ShyAudio> shyCommentsList = shyAudioMapper.selectByExampleAndRowBounds(example, new RowBounds(0, num));
121 if (!shyCommentsList.isEmpty()) { 124 if (!shyCommentsList.isEmpty()) {
122 for (ShyAudio shyComments : shyCommentsList) { 125 for (ShyAudio shyComments : shyCommentsList) {
@@ -135,7 +138,7 @@ public class AudioServiceImpl { @@ -135,7 +138,7 @@ public class AudioServiceImpl {
135 String[] cids = ids.split(","); 138 String[] cids = ids.split(",");
136 for (String cid : cids) { 139 for (String cid : cids) {
137 ShyAudio shyAudio = shyAudioMapper.selectByPrimaryKey(Integer.parseInt(cid)); 140 ShyAudio shyAudio = shyAudioMapper.selectByPrimaryKey(Integer.parseInt(cid));
138 - if (shyAudio.getState() == CommonConst.AUDIT_INTT && shyAudio.getReceive() == CommonConst.RECEIVE_AFTER && shyAudio.getReceive_user_id().equals(userId)) { 141 + if (shyAudio.getState().equals(CommonConst.AUDIT_INTT) && shyAudio.getReceive().equals(CommonConst.RECEIVE_AFTER) && shyAudio.getReceive_user_id().equals(userId)) {
139 shyAudio.setReceive(CommonConst.RECEIVE_BEFORE); 142 shyAudio.setReceive(CommonConst.RECEIVE_BEFORE);
140 shyAudio.setReceive_user_id(null); 143 shyAudio.setReceive_user_id(null);
141 int i = shyAudioMapper.updateByPrimaryKey(shyAudio); 144 int i = shyAudioMapper.updateByPrimaryKey(shyAudio);
@@ -201,51 +204,51 @@ public class AudioServiceImpl { @@ -201,51 +204,51 @@ public class AudioServiceImpl {
201 } 204 }
202 205
203 //分页查询音频数据 206 //分页查询音频数据
204 - public PageInfo<ShyAudio> getListContent(String video_title, String start_date, String end_date, Integer state, Integer receive, Integer page, Integer pageSize, String video_priority, String orderByClause, Integer spid, String userId, String sp_Id) { 207 + public PageInfo<ShyAudio> getListContent(AudioDTO audioDTO) {
205 Example example = new Example(ShyAudio.class); 208 Example example = new Example(ShyAudio.class);
206 Example.Criteria criteria = example.createCriteria(); 209 Example.Criteria criteria = example.createCriteria();
207 Example.Criteria criteria2 = example.createCriteria(); 210 Example.Criteria criteria2 = example.createCriteria();
208 - if (CommonUtils.isNotEmpty(orderByClause)) {  
209 - example.setOrderByClause(orderByClause); 211 + if (CommonUtils.isNotEmpty(audioDTO.getOrderByClause())) {
  212 + example.setOrderByClause(audioDTO.getOrderByClause());
210 } 213 }
211 - if (CommonUtils.isNotEmpty(start_date) && CommonUtils.isNotEmpty(end_date)) {  
212 - criteria.andGreaterThanOrEqualTo("createTime", start_date);  
213 - criteria2.andGreaterThanOrEqualTo("createTime", start_date);  
214 - criteria.andLessThanOrEqualTo("createTime", end_date);  
215 - criteria2.andLessThanOrEqualTo("createTime", end_date); 214 + if (CommonUtils.isNotEmpty(audioDTO.getsDate()) && CommonUtils.isNotEmpty(audioDTO.geteDate())) {
  215 + criteria.andGreaterThanOrEqualTo("createTime", audioDTO.getsDate());
  216 + criteria2.andGreaterThanOrEqualTo("createTime", audioDTO.getsDate());
  217 + criteria.andLessThanOrEqualTo("createTime", audioDTO.geteDate());
  218 + criteria2.andLessThanOrEqualTo("createTime", audioDTO.geteDate());
216 } 219 }
217 - if (CommonUtils.isNotEmpty(video_title)) {  
218 - criteria.andLike("audioTitle", "%" + video_title + "%");  
219 - criteria2.andLike("audioTitle", "%" + video_title + "%"); 220 + if (CommonUtils.isNotEmpty(audioDTO.getVideo_title())) {
  221 + criteria.andLike("audioTitle", "%" + audioDTO.getVideo_title() + "%");
  222 + criteria2.andLike("audioTitle", "%" + audioDTO.getVideo_title() + "%");
220 } 223 }
221 224
222 - if (CommonUtils.isNotEmpty(video_priority)) {  
223 - criteria.andEqualTo("priority", video_priority);  
224 - criteria2.andEqualTo("priority", video_priority); 225 + if (CommonUtils.isNotEmpty(audioDTO.getVideo_priority())) {
  226 + criteria.andEqualTo("priority", audioDTO.getVideo_priority());
  227 + criteria2.andEqualTo("priority", audioDTO.getVideo_priority());
225 } 228 }
226 229
227 - if (CommonUtils.isNotNull(spid)) {  
228 - criteria.andEqualTo("spId", spid);  
229 - criteria2.andEqualTo("spId", spid);  
230 - } else if (CommonUtils.isNotEmpty(sp_Id)) {  
231 - criteria.andEqualTo("spId", sp_Id);  
232 - criteria2.andEqualTo("spId", sp_Id); 230 + if (CommonUtils.isNotNull(audioDTO.getSpid())) {
  231 + criteria.andEqualTo("spId", audioDTO.getSpid());
  232 + criteria2.andEqualTo("spId", audioDTO.getSpid());
  233 + } else if (CommonUtils.isNotEmpty(audioDTO.getSp_Id())) {
  234 + criteria.andEqualTo("spId", audioDTO.getSp_Id());
  235 + criteria2.andEqualTo("spId", audioDTO.getSp_Id());
233 } 236 }
234 237
235 //领取状态 0-未领取 1-已领取 238 //领取状态 0-未领取 1-已领取
236 - if (CommonUtils.isNotNull(receive)) {  
237 - criteria.andEqualTo("receive", receive);  
238 - criteria2.andEqualTo("receive", receive);  
239 - if (receive == CommonConst.RECEIVE_AFTER) {  
240 - criteria.andEqualTo("receive_user_id", userId);  
241 - criteria2.andEqualTo("receive_user_id", userId); 239 + if (CommonUtils.isNotNull(audioDTO.getReceive())) {
  240 + criteria.andEqualTo("receive", audioDTO.getReceive());
  241 + criteria2.andEqualTo("receive", audioDTO.getReceive());
  242 + if (audioDTO.getReceive().equals(CommonConst.RECEIVE_AFTER)) {
  243 + criteria.andEqualTo("receive_user_id", audioDTO.getUserId());
  244 + criteria2.andEqualTo("receive_user_id", audioDTO.getUserId());
242 } 245 }
243 } 246 }
244 247
245 //审核状态 0-未审核 1-已审核 2-拒绝 248 //审核状态 0-未审核 1-已审核 2-拒绝
246 - if (CommonUtils.isNotNull(state) && state != 3) {  
247 - criteria.andEqualTo("state", state);  
248 - } else if (CommonUtils.isNotNull(state) && state == 3) { 249 + if (CommonUtils.isNotNull(audioDTO.getState()) && audioDTO.getState() != 3) {
  250 + criteria.andEqualTo("state", audioDTO.getState());
  251 + } else if (CommonUtils.isNotNull(audioDTO.getState()) && audioDTO.getState() == 3) {
249 criteria.andEqualTo("state", 1); 252 criteria.andEqualTo("state", 1);
250 criteria2.andEqualTo("state", 2); 253 criteria2.andEqualTo("state", 2);
251 example.or(criteria2); 254 example.or(criteria2);
@@ -253,7 +256,7 @@ public class AudioServiceImpl { @@ -253,7 +256,7 @@ public class AudioServiceImpl {
253 256
254 //默认按上传时间倒序排序 257 //默认按上传时间倒序排序
255 example.setOrderByClause("createTime desc"); 258 example.setOrderByClause("createTime desc");
256 - PageHelper.startPage(page, pageSize, true); 259 + PageHelper.startPage(audioDTO.getPage(), audioDTO.getPageSize(), true);
257 List<ShyAudio> shyAudioList = shyAudioMapper.selectByExample(example); 260 List<ShyAudio> shyAudioList = shyAudioMapper.selectByExample(example);
258 PageInfo<ShyAudio> pageInfo = new PageInfo<>(shyAudioList); 261 PageInfo<ShyAudio> pageInfo = new PageInfo<>(shyAudioList);
259 return pageInfo; 262 return pageInfo;
@@ -262,7 +265,7 @@ public class AudioServiceImpl { @@ -262,7 +265,7 @@ public class AudioServiceImpl {
262 265
263 public ShyAudio getDetailsContent(Integer id) { 266 public ShyAudio getDetailsContent(Integer id) {
264 ShyAudio shyAudio = shyAudioMapper.selectByPrimaryKey(id); 267 ShyAudio shyAudio = shyAudioMapper.selectByPrimaryKey(id);
265 - if (shyAudio.getState() != CommonConst.AUDIT_INTT) { 268 + if (!shyAudio.getState().equals(CommonConst.AUDIT_INTT)) {
266 String updater = CommonUtils.isEmpty(shyAudio.getUploader()) || "null".equals(shyAudio.getUploader()) ? "白名单" : shyAudio.getUploader(); 269 String updater = CommonUtils.isEmpty(shyAudio.getUploader()) || "null".equals(shyAudio.getUploader()) ? "白名单" : shyAudio.getUploader();
267 String auditor_id = shyAudio.getAuditor_id(); 270 String auditor_id = shyAudio.getAuditor_id();
268 if (CommonUtils.isNotEmpty(auditor_id)) { 271 if (CommonUtils.isNotEmpty(auditor_id)) {
@@ -281,48 +284,40 @@ public class AudioServiceImpl { @@ -281,48 +284,40 @@ public class AudioServiceImpl {
281 /** 284 /**
282 * 根据条件导出数据excel 285 * 根据条件导出数据excel
283 * 286 *
284 - * @param video_title  
285 - * @param start_date  
286 - * @param end_date  
287 - * @param state  
288 - * @param receive  
289 - * @param video_priority  
290 - * @param orderByClause  
291 - * @param spid  
292 - * @param userId 287 + * @param audioDTO
293 * @return 288 * @return
294 */ 289 */
295 - public List<ShyAudio> findByCondition(String video_title, String start_date, String end_date, Integer state, Integer receive, String video_priority, String orderByClause, Integer spid, String userId) { 290 + public List<ShyAudio> findByCondition(AudioDTO audioDTO) {
296 Example example = new Example(ShyAudio.class); 291 Example example = new Example(ShyAudio.class);
297 Example.Criteria criteria = example.createCriteria(); 292 Example.Criteria criteria = example.createCriteria();
298 Example.Criteria criteria2 = example.createCriteria(); 293 Example.Criteria criteria2 = example.createCriteria();
299 - if (CommonUtils.isNotEmpty(orderByClause)) {  
300 - example.setOrderByClause(orderByClause); 294 + if (CommonUtils.isNotEmpty(audioDTO.getOrderByClause())) {
  295 + example.setOrderByClause(audioDTO.getOrderByClause());
301 } 296 }
302 - if (CommonUtils.isNotEmpty(start_date) && CommonUtils.isNotEmpty(end_date)) {  
303 - criteria.andGreaterThanOrEqualTo("createTime", start_date);  
304 - criteria.andLessThanOrEqualTo("createTime", end_date); 297 + if (CommonUtils.isNotEmpty(audioDTO.getsDate()) && CommonUtils.isNotEmpty(audioDTO.geteDate())) {
  298 + criteria.andGreaterThanOrEqualTo("createTime", audioDTO.getsDate());
  299 + criteria.andLessThanOrEqualTo("createTime", audioDTO.geteDate());
305 } 300 }
306 - if (CommonUtils.isNotEmpty(video_title)) {  
307 - criteria.andLike("audioTitle", "%" + video_title + "%"); 301 + if (CommonUtils.isNotEmpty(audioDTO.getVideo_title())) {
  302 + criteria.andLike("audioTitle", "%" + audioDTO.getVideo_title() + "%");
308 } 303 }
309 - if (CommonUtils.isNotNull(state) && state == 0) {  
310 - criteria.andEqualTo("state", state);  
311 - } else if (CommonUtils.isNotNull(state) && state == 1) {  
312 - criteria.andEqualTo("state", state); 304 + if (CommonUtils.isNotNull(audioDTO.getState()) && audioDTO.getState() == 0) {
  305 + criteria.andEqualTo("state", audioDTO.getState());
  306 + } else if (CommonUtils.isNotNull(audioDTO.getState()) && audioDTO.getState() == 1) {
  307 + criteria.andEqualTo("state", audioDTO.getState());
313 criteria2.andEqualTo("state", 2); 308 criteria2.andEqualTo("state", 2);
314 example.or(criteria2); 309 example.or(criteria2);
315 } 310 }
316 - if (CommonUtils.isNotEmpty(video_priority)) {  
317 - criteria.andEqualTo("priority", video_priority); 311 + if (CommonUtils.isNotEmpty(audioDTO.getVideo_priority())) {
  312 + criteria.andEqualTo("priority", audioDTO.getVideo_priority());
318 } 313 }
319 - if (CommonUtils.isNotNull(spid)) {  
320 - criteria.andEqualTo("spId", spid); 314 + if (CommonUtils.isNotNull(audioDTO.getSpid())) {
  315 + criteria.andEqualTo("spId", audioDTO.getSpid());
321 } 316 }
322 - if (CommonUtils.isNotNull(receive)) {  
323 - criteria.andEqualTo("receive", receive);  
324 - if (receive == CommonConst.RECEIVE_AFTER) {  
325 - criteria.andEqualTo("receive_user_id", userId); 317 + if (CommonUtils.isNotNull(audioDTO.getReceive())) {
  318 + criteria.andEqualTo("receive", audioDTO.getReceive());
  319 + if (audioDTO.getReceive().equals(CommonConst.RECEIVE_AFTER)) {
  320 + criteria.andEqualTo("receive_user_id", audioDTO.getUserId());
326 } 321 }
327 } 322 }
328 //默认按上传时间倒序排序 323 //默认按上传时间倒序排序
src/main/java/com/cnlive/shenhe/serviceImpl/ChannelServiceImpl.java
1 package com.cnlive.shenhe.serviceImpl; 1 package com.cnlive.shenhe.serviceImpl;
2 2
3 import com.alibaba.fastjson.JSONObject; 3 import com.alibaba.fastjson.JSONObject;
  4 +import com.cnlive.shenhe.dto.ChannelDTO;
4 import com.cnlive.shenhe.entity.ShyChannel; 5 import com.cnlive.shenhe.entity.ShyChannel;
5 import com.cnlive.shenhe.entity.ShyUsers; 6 import com.cnlive.shenhe.entity.ShyUsers;
6 import com.cnlive.shenhe.mapper.ShyChannelMapper; 7 import com.cnlive.shenhe.mapper.ShyChannelMapper;
@@ -61,50 +62,50 @@ public class ChannelServiceImpl { @@ -61,50 +62,50 @@ public class ChannelServiceImpl {
61 return true; 62 return true;
62 } 63 }
63 64
64 - public PageInfo<ShyChannel> getPage(String channelId, String channelName, Integer receive, Date start_date, Date end_date, Integer shenhe_status, String updater, Integer page, Integer pageSize, String orderByClause, Integer spid, String userId) { 65 + public PageInfo<ShyChannel> getPage(ChannelDTO channelDTO) {
65 Example example = new Example(ShyChannel.class); 66 Example example = new Example(ShyChannel.class);
66 Example.Criteria criteria = example.createCriteria(); 67 Example.Criteria criteria = example.createCriteria();
67 - if (CommonUtils.isNotEmpty(orderByClause)) {  
68 - example.setOrderByClause(orderByClause); 68 + if (CommonUtils.isNotEmpty(channelDTO.getOrderByClause())) {
  69 + example.setOrderByClause(channelDTO.getOrderByClause());
69 } else { 70 } else {
70 example.setOrderByClause("created_at desc"); 71 example.setOrderByClause("created_at desc");
71 } 72 }
72 - if (CommonUtils.isNotNull(start_date)) {  
73 - criteria.andGreaterThanOrEqualTo("created_at", start_date); 73 + if (CommonUtils.isNotNull(channelDTO.getsDate())) {
  74 + criteria.andGreaterThanOrEqualTo("created_at", channelDTO.getsDate());
74 } 75 }
75 - if (CommonUtils.isNotNull(end_date)) {  
76 - criteria.andLessThanOrEqualTo("created_at", end_date); 76 + if (CommonUtils.isNotNull(channelDTO.geteDate())) {
  77 + criteria.andLessThanOrEqualTo("created_at", channelDTO.geteDate());
77 } 78 }
78 - if (CommonUtils.isNotEmpty(channelName)) {  
79 - criteria.andLike("channel_name", "%" + channelName + "%"); 79 + if (CommonUtils.isNotEmpty(channelDTO.getChannel_name())) {
  80 + criteria.andLike("channel_name", "%" + channelDTO.getChannel_name() + "%");
80 } 81 }
81 - if (CommonUtils.isNotEmpty(updater)) {  
82 - criteria.andEqualTo("updater", updater); 82 + if (CommonUtils.isNotEmpty(channelDTO.getUpdater())) {
  83 + criteria.andEqualTo("updater", channelDTO.getUpdater());
83 } 84 }
84 - if (CommonUtils.isNotNull(spid)) {  
85 - criteria.andEqualTo("sp_id", spid); 85 + if (CommonUtils.isNotNull(channelDTO.getSpid())) {
  86 + criteria.andEqualTo("sp_id", channelDTO.getSpid());
86 } 87 }
87 88
88 - if (CommonUtils.isNotEmpty(channelId)) {  
89 - criteria.andLike("channel_id", "%" + channelId + "%"); 89 + if (CommonUtils.isNotEmpty(channelDTO.getChannel_id())) {
  90 + criteria.andLike("channel_id", "%" + channelDTO.getChannel_id() + "%");
90 } 91 }
91 92
92 //已认领 加上用户id 93 //已认领 加上用户id
93 - if (CommonUtils.isNotNull(receive) && receive == 1) {  
94 - criteria.andEqualTo("auditor", userId); 94 + if (CommonUtils.isNotNull(channelDTO.getReceive()) && channelDTO.getReceive() == 1) {
  95 + criteria.andEqualTo("auditor", channelDTO.getUserId());
95 } 96 }
96 //不是 我的已审 进来的,只查一种状态 97 //不是 我的已审 进来的,只查一种状态
97 - if (CommonUtils.isNotNull(shenhe_status) && shenhe_status != 3) {  
98 - criteria.andEqualTo("shenhe_status", shenhe_status); 98 + if (CommonUtils.isNotNull(channelDTO.getShenhe_status()) && channelDTO.getShenhe_status() != 3) {
  99 + criteria.andEqualTo("shenhe_status", channelDTO.getShenhe_status());
99 //是 我的已审,查通过和拒绝的两种状态 100 //是 我的已审,查通过和拒绝的两种状态
100 - } else if (CommonUtils.isNotNull(shenhe_status) && shenhe_status == 3) { 101 + } else if (CommonUtils.isNotNull(channelDTO.getShenhe_status()) && channelDTO.getShenhe_status() == 3) {
101 Example.Criteria criteria1 = example.createCriteria(); 102 Example.Criteria criteria1 = example.createCriteria();
102 criteria1.orEqualTo("shenhe_status", 1); 103 criteria1.orEqualTo("shenhe_status", 1);
103 criteria1.orEqualTo("shenhe_status", 2); 104 criteria1.orEqualTo("shenhe_status", 2);
104 example.and(criteria1); 105 example.and(criteria1);
105 } 106 }
106 107
107 - PageHelper.startPage(page, pageSize, true); 108 + PageHelper.startPage(channelDTO.getPage(), channelDTO.getPageSize(), true);
108 List<ShyChannel> channelList = shyChannelMapper.selectByExample(example); 109 List<ShyChannel> channelList = shyChannelMapper.selectByExample(example);
109 PageInfo<ShyChannel> pageInfo = new PageInfo<>(channelList); 110 PageInfo<ShyChannel> pageInfo = new PageInfo<>(channelList);
110 return pageInfo; 111 return pageInfo;
src/main/java/com/cnlive/shenhe/serviceImpl/CommentsServiceImpl.java
1 package com.cnlive.shenhe.serviceImpl; 1 package com.cnlive.shenhe.serviceImpl;
2 2
3 import com.alibaba.fastjson.JSONObject; 3 import com.alibaba.fastjson.JSONObject;
  4 +import com.cnlive.shenhe.dto.CommentsDTO;
4 import com.cnlive.shenhe.entity.ShyComments; 5 import com.cnlive.shenhe.entity.ShyComments;
5 import com.cnlive.shenhe.entity.ShySites; 6 import com.cnlive.shenhe.entity.ShySites;
6 import com.cnlive.shenhe.entity.ShyUsers; 7 import com.cnlive.shenhe.entity.ShyUsers;
@@ -78,45 +79,45 @@ public class CommentsServiceImpl { @@ -78,45 +79,45 @@ public class CommentsServiceImpl {
78 return shyCommentsMapper.updateByPrimaryKeySelective(shyComments); 79 return shyCommentsMapper.updateByPrimaryKeySelective(shyComments);
79 } 80 }
80 81
81 - public PageInfo<ShyComments> getPage(String activity_id, String content, Integer is_hot, Date start_date, Date end_date, Integer states, Integer receive, String updater, Integer page, Integer pageSize, String orderByClause, Integer spid, String userId, Integer type, Integer comment_user_id) { 82 + public PageInfo<ShyComments> getPage(CommentsDTO commentsDTO) {
82 Example example = new Example(ShyComments.class); 83 Example example = new Example(ShyComments.class);
83 Example.Criteria criteria = example.createCriteria(); 84 Example.Criteria criteria = example.createCriteria();
84 - if (CommonUtils.isNotEmpty(orderByClause)) {  
85 - example.setOrderByClause(orderByClause); 85 + if (CommonUtils.isNotEmpty(commentsDTO.getOrderByClause())) {
  86 + example.setOrderByClause(commentsDTO.getOrderByClause());
86 } else { 87 } else {
87 example.setOrderByClause("comment_time desc"); 88 example.setOrderByClause("comment_time desc");
88 } 89 }
89 - if (CommonUtils.isNotNull(start_date) && CommonUtils.isNotNull(end_date)) {  
90 - criteria.andGreaterThanOrEqualTo("comment_time", start_date);  
91 - criteria.andLessThanOrEqualTo("comment_time", end_date); 90 + if (CommonUtils.isNotNull(commentsDTO.getsDate()) && CommonUtils.isNotNull(commentsDTO.geteDate())) {
  91 + criteria.andGreaterThanOrEqualTo("comment_time", commentsDTO.getsDate());
  92 + criteria.andLessThanOrEqualTo("comment_time", commentsDTO.geteDate());
92 } 93 }
93 - if (CommonUtils.isNotEmpty(content)) {  
94 - criteria.andLike("comment_content", "%" + content + "%"); 94 + if (CommonUtils.isNotEmpty(commentsDTO.getContent())) {
  95 + criteria.andLike("comment_content", "%" + commentsDTO.getContent() + "%");
95 } 96 }
96 - if (CommonUtils.isNotEmpty(updater)) {  
97 - criteria.andEqualTo("updater", updater); 97 + if (CommonUtils.isNotEmpty(commentsDTO.getUpdater())) {
  98 + criteria.andEqualTo("updater", commentsDTO.getUpdater());
98 } 99 }
99 - if (CommonUtils.isNotNull(spid)) {  
100 - criteria.andEqualTo("spid", spid); 100 + if (CommonUtils.isNotNull(commentsDTO.getSpid())) {
  101 + criteria.andEqualTo("spid", commentsDTO.getSpid());
101 } 102 }
102 - if (CommonUtils.isNotNull(is_hot)) {  
103 - criteria.andEqualTo("is_hot", is_hot); 103 + if (CommonUtils.isNotNull(commentsDTO.getIs_hot())) {
  104 + criteria.andEqualTo("is_hot", commentsDTO.getIs_hot());
104 } 105 }
105 - if (CommonUtils.isNotNull(comment_user_id)) {  
106 - criteria.andEqualTo("comment_user_id", comment_user_id); 106 + if (CommonUtils.isNotNull(commentsDTO.getComment_user_id())) {
  107 + criteria.andEqualTo("comment_user_id", commentsDTO.getComment_user_id());
107 } 108 }
108 - if (CommonUtils.isNotNull(type) && type == 0) { 109 + if (CommonUtils.isNotNull(commentsDTO.getType()) && commentsDTO.getType() == 0) {
109 criteria.andEqualTo("type", CommonConst.CATEGORY_TOPIC); 110 criteria.andEqualTo("type", CommonConst.CATEGORY_TOPIC);
110 - } else if (CommonUtils.isNotNull(type) && type == 1) { 111 + } else if (CommonUtils.isNotNull(commentsDTO.getType()) && commentsDTO.getType() == 1) {
111 criteria.andEqualTo("type", CommonConst.CATEGORY_ELSE); 112 criteria.andEqualTo("type", CommonConst.CATEGORY_ELSE);
112 } 113 }
113 - if (CommonUtils.isNotEmpty(activity_id)) {  
114 - criteria.andLike("activity_id", "%" + activity_id + "%"); 114 + if (CommonUtils.isNotEmpty(commentsDTO.getActivity_id())) {
  115 + criteria.andLike("activity_id", "%" + commentsDTO.getActivity_id() + "%");
115 } 116 }
116 - if (CommonUtils.isNotNull(receive)) {  
117 - criteria.andEqualTo("receive", receive);  
118 - if (receive == CommonConst.RECEIVE_AFTER) {  
119 - criteria.andEqualTo("receive_user_id", userId); 117 + if (CommonUtils.isNotNull(commentsDTO.getReceive())) {
  118 + criteria.andEqualTo("receive", commentsDTO.getReceive());
  119 + if (commentsDTO.getReceive().equals(CommonConst.RECEIVE_AFTER) ) {
  120 + criteria.andEqualTo("receive_user_id", commentsDTO.getUserId());
120 } 121 }
121 } 122 }
122 123
@@ -129,56 +130,56 @@ public class CommentsServiceImpl { @@ -129,56 +130,56 @@ public class CommentsServiceImpl {
129 // example.and(criteria1); 130 // example.and(criteria1);
130 // } 131 // }
131 132
132 - if (CommonUtils.isNotNull(states) && states != 3) {  
133 - criteria.andEqualTo("state", states);  
134 - } else if (CommonUtils.isNotNull(states) && states == 3) { 133 + if (CommonUtils.isNotNull(commentsDTO.getState()) && commentsDTO.getState() != 3) {
  134 + criteria.andEqualTo("state", commentsDTO.getState());
  135 + } else if (CommonUtils.isNotNull(commentsDTO.getState()) && commentsDTO.getState() == 3) {
135 Example.Criteria criteria1 = example.createCriteria(); 136 Example.Criteria criteria1 = example.createCriteria();
136 criteria1.orEqualTo("state", 1); 137 criteria1.orEqualTo("state", 1);
137 criteria1.orEqualTo("state", 2); 138 criteria1.orEqualTo("state", 2);
138 example.and(criteria1); 139 example.and(criteria1);
139 } 140 }
140 141
141 - PageHelper.startPage(page, pageSize, true); 142 + PageHelper.startPage(commentsDTO.getPage(), commentsDTO.getPageSize(), true);
142 List<ShyComments> commentsList = shyCommentsMapper.selectByExample(example); 143 List<ShyComments> commentsList = shyCommentsMapper.selectByExample(example);
143 PageInfo<ShyComments> pageInfo = new PageInfo<>(commentsList); 144 PageInfo<ShyComments> pageInfo = new PageInfo<>(commentsList);
144 return pageInfo; 145 return pageInfo;
145 } 146 }
146 - public PageInfo<ShyComments> getPageExcel(String activity_id, String content, Integer is_hot, Date start_date, Date end_date, Integer states, Integer receive, String updater, Integer page, Integer pageSize, String orderByClause, Integer spid, String userId,Integer type) { 147 + public PageInfo<ShyComments> getPageExcel(CommentsDTO commentsDTO) {
147 Example example = new Example(ShyComments.class); 148 Example example = new Example(ShyComments.class);
148 Example.Criteria criteria = example.createCriteria(); 149 Example.Criteria criteria = example.createCriteria();
149 - if (CommonUtils.isNotEmpty(orderByClause)) {  
150 - example.setOrderByClause(orderByClause); 150 + if (CommonUtils.isNotEmpty(commentsDTO.getOrderByClause())) {
  151 + example.setOrderByClause(commentsDTO.getOrderByClause());
151 } else { 152 } else {
152 example.setOrderByClause("comment_time desc"); 153 example.setOrderByClause("comment_time desc");
153 } 154 }
154 - if (CommonUtils.isNotNull(start_date) && CommonUtils.isNotNull(end_date)) {  
155 - criteria.andGreaterThanOrEqualTo("comment_time", start_date);  
156 - criteria.andLessThanOrEqualTo("comment_time", end_date); 155 + if (CommonUtils.isNotNull(commentsDTO.getsDate()) && CommonUtils.isNotNull(commentsDTO.geteDate())) {
  156 + criteria.andGreaterThanOrEqualTo("comment_time", commentsDTO.getsDate());
  157 + criteria.andLessThanOrEqualTo("comment_time", commentsDTO.geteDate());
157 } 158 }
158 - if (CommonUtils.isNotEmpty(content)) {  
159 - criteria.andLike("comment_content", "%" + content + "%"); 159 + if (CommonUtils.isNotEmpty(commentsDTO.getContent())) {
  160 + criteria.andLike("comment_content", "%" + commentsDTO.getContent() + "%");
160 } 161 }
161 - if (CommonUtils.isNotEmpty(updater)) {  
162 - criteria.andEqualTo("updater", updater); 162 + if (CommonUtils.isNotEmpty(commentsDTO.getUpdater())) {
  163 + criteria.andEqualTo("updater", commentsDTO.getUpdater());
163 } 164 }
164 - if (CommonUtils.isNotNull(spid)) {  
165 - criteria.andEqualTo("spid", spid); 165 + if (CommonUtils.isNotNull(commentsDTO.getSpid())) {
  166 + criteria.andEqualTo("spid", commentsDTO.getSpid());
166 } 167 }
167 - if (CommonUtils.isNotNull(is_hot)) {  
168 - criteria.andEqualTo("is_hot", is_hot); 168 + if (CommonUtils.isNotNull(commentsDTO.getIs_hot())) {
  169 + criteria.andEqualTo("is_hot", commentsDTO.getIs_hot());
169 } 170 }
170 - if (CommonUtils.isNotNull(type)&&type==0) { 171 + if (CommonUtils.isNotNull(commentsDTO.getType())&&commentsDTO.getType()==0) {
171 criteria.andEqualTo("type", CommonConst.CATEGORY_TOPIC); 172 criteria.andEqualTo("type", CommonConst.CATEGORY_TOPIC);
172 - }else if(CommonUtils.isNotNull(type)&&type==1){ 173 + }else if(CommonUtils.isNotNull(commentsDTO.getType())&&commentsDTO.getType()==1){
173 criteria.andIsNull("type"); 174 criteria.andIsNull("type");
174 } 175 }
175 - if (CommonUtils.isNotEmpty(activity_id)) {  
176 - criteria.andLike("activity_id", "%" + activity_id + "%"); 176 + if (CommonUtils.isNotEmpty(commentsDTO.getActivity_id())) {
  177 + criteria.andLike("activity_id", "%" + commentsDTO.getActivity_id() + "%");
177 } 178 }
178 - if (CommonUtils.isNotNull(receive)) {  
179 - criteria.andEqualTo("receive", receive);  
180 - if (receive==CommonConst.RECEIVE_AFTER) {  
181 - criteria.andEqualTo("receive_user_id", userId); 179 + if (CommonUtils.isNotNull(commentsDTO.getReceive())) {
  180 + criteria.andEqualTo("receive", commentsDTO.getReceive());
  181 + if (commentsDTO.getReceive().equals(CommonConst.RECEIVE_AFTER)) {
  182 + criteria.andEqualTo("receive_user_id", commentsDTO.getUserId());
182 } 183 }
183 } 184 }
184 185
@@ -191,9 +192,9 @@ public class CommentsServiceImpl { @@ -191,9 +192,9 @@ public class CommentsServiceImpl {
191 // example.and(criteria1); 192 // example.and(criteria1);
192 // } 193 // }
193 194
194 - if (CommonUtils.isNotNull(states) && states != 3) {  
195 - criteria.andEqualTo("state", states);  
196 - } else if (CommonUtils.isNotNull(states) && states == 3) { 195 + if (CommonUtils.isNotNull(commentsDTO.getState()) && commentsDTO.getState() != 3) {
  196 + criteria.andEqualTo("state", commentsDTO.getState());
  197 + } else if (CommonUtils.isNotNull(commentsDTO.getState()) && commentsDTO.getState() == 3) {
197 Example.Criteria criteria1 = example.createCriteria(); 198 Example.Criteria criteria1 = example.createCriteria();
198 criteria1.orEqualTo("state", 1); 199 criteria1.orEqualTo("state", 1);
199 criteria1.orEqualTo("state", 2); 200 criteria1.orEqualTo("state", 2);
@@ -207,7 +208,7 @@ public class CommentsServiceImpl { @@ -207,7 +208,7 @@ public class CommentsServiceImpl {
207 208
208 public ShyComments getDetailsComment(Integer id) { 209 public ShyComments getDetailsComment(Integer id) {
209 ShyComments comment = shyCommentsMapper.selectByPrimaryKey(id); 210 ShyComments comment = shyCommentsMapper.selectByPrimaryKey(id);
210 - if (comment.getState() != CommonConst.AUDIT_INTT) { 211 + if (!comment.getState().equals(CommonConst.AUDIT_INTT)) {
211 String updater = CommonUtils.isEmpty(comment.getUpdater()) || "null".equals(comment.getUpdater())? "白名单":comment.getUpdater(); 212 String updater = CommonUtils.isEmpty(comment.getUpdater()) || "null".equals(comment.getUpdater())? "白名单":comment.getUpdater();
212 String auditor_id = comment.getAuditor_id(); 213 String auditor_id = comment.getAuditor_id();
213 if (CommonUtils.isNotEmpty(auditor_id)) { 214 if (CommonUtils.isNotEmpty(auditor_id)) {
@@ -278,7 +279,7 @@ public class CommentsServiceImpl { @@ -278,7 +279,7 @@ public class CommentsServiceImpl {
278 String[] cids = ids.split(","); 279 String[] cids = ids.split(",");
279 for (String cid : cids) { 280 for (String cid : cids) {
280 ShyComments shyComments = shyCommentsMapper.selectByPrimaryKey(Integer.parseInt(cid)); 281 ShyComments shyComments = shyCommentsMapper.selectByPrimaryKey(Integer.parseInt(cid));
281 - if (CommonUtils.isNotNull(shyComments) && shyComments.getState() == CommonConst.AUDIT_INTT && shyComments.getReceive()==CommonConst.RECEIVE_BEFORE) { 282 + if (CommonUtils.isNotNull(shyComments) && shyComments.getState().equals(CommonConst.AUDIT_INTT) && shyComments.getReceive().equals(CommonConst.RECEIVE_BEFORE)) {
282 shyComments.setReceive_user_id(userId); 283 shyComments.setReceive_user_id(userId);
283 shyComments.setReceive(CommonConst.RECEIVE_AFTER); 284 shyComments.setReceive(CommonConst.RECEIVE_AFTER);
284 shyCommentsMapper.updateByPrimaryKeySelective(shyComments); 285 shyCommentsMapper.updateByPrimaryKeySelective(shyComments);
@@ -290,7 +291,9 @@ public class CommentsServiceImpl { @@ -290,7 +291,9 @@ public class CommentsServiceImpl {
290 example.setOrderByClause("created_at desc"); 291 example.setOrderByClause("created_at desc");
291 example.and().andEqualTo("state", CommonConst.AUDIT_INTT); 292 example.and().andEqualTo("state", CommonConst.AUDIT_INTT);
292 example.and().andEqualTo("receive", CommonConst.RECEIVE_AFTER); 293 example.and().andEqualTo("receive", CommonConst.RECEIVE_AFTER);
293 - if (CommonUtils.isNotNull(spid) && spid != 0) example.and().andEqualTo("spid", spid); 294 + if (CommonUtils.isNotNull(spid) && spid != 0) {
  295 + example.and().andEqualTo("spid", spid);
  296 + }
294 List<ShyComments> shyCommentsList = shyCommentsMapper.selectByExampleAndRowBounds(example, new RowBounds(0, num)); 297 List<ShyComments> shyCommentsList = shyCommentsMapper.selectByExampleAndRowBounds(example, new RowBounds(0, num));
295 if (!shyCommentsList.isEmpty()) { 298 if (!shyCommentsList.isEmpty()) {
296 for (ShyComments shyComments : shyCommentsList) { 299 for (ShyComments shyComments : shyCommentsList) {
@@ -309,11 +312,13 @@ public class CommentsServiceImpl { @@ -309,11 +312,13 @@ public class CommentsServiceImpl {
309 String[] cids = ids.split(","); 312 String[] cids = ids.split(",");
310 for (String cid : cids) { 313 for (String cid : cids) {
311 ShyComments shyComments = shyCommentsMapper.selectByPrimaryKey(Integer.parseInt(cid)); 314 ShyComments shyComments = shyCommentsMapper.selectByPrimaryKey(Integer.parseInt(cid));
312 - if (shyComments.getState() == CommonConst.AUDIT_INTT && shyComments.getReceive()==CommonConst.RECEIVE_AFTER && userId.equals(shyComments.getReceive_user_id())) { 315 + if (shyComments.getState().equals(CommonConst.AUDIT_INTT) && shyComments.getReceive().equals(CommonConst.RECEIVE_AFTER) && userId.equals(shyComments.getReceive_user_id())) {
313 shyComments.setReceive(CommonConst.RECEIVE_BEFORE); 316 shyComments.setReceive(CommonConst.RECEIVE_BEFORE);
314 shyComments.setReceive_user_id(null); 317 shyComments.setReceive_user_id(null);
315 int i = shyCommentsMapper.updateByPrimaryKeySelective(shyComments); 318 int i = shyCommentsMapper.updateByPrimaryKeySelective(shyComments);
316 - if (i == 1) n++; 319 + if (i == 1) {
  320 + n++;
  321 + }
317 } 322 }
318 } 323 }
319 return n; 324 return n;
src/main/java/com/cnlive/shenhe/serviceImpl/ContentServiceImpl.java
1 package com.cnlive.shenhe.serviceImpl; 1 package com.cnlive.shenhe.serviceImpl;
2 2
3 import com.alibaba.fastjson.JSONObject; 3 import com.alibaba.fastjson.JSONObject;
  4 +import com.cnlive.shenhe.dto.ContentDTO;
4 import com.cnlive.shenhe.entity.*; 5 import com.cnlive.shenhe.entity.*;
5 import com.cnlive.shenhe.mapper.ShyCommentsMapper; 6 import com.cnlive.shenhe.mapper.ShyCommentsMapper;
6 import com.cnlive.shenhe.mapper.ShyContentMapper; 7 import com.cnlive.shenhe.mapper.ShyContentMapper;
@@ -93,49 +94,52 @@ public class ContentServiceImpl { @@ -93,49 +94,52 @@ public class ContentServiceImpl {
93 return shyCommentsMapper.updateByPrimaryKeySelective(shyComments); 94 return shyCommentsMapper.updateByPrimaryKeySelective(shyComments);
94 } 95 }
95 96
96 - public PageInfo<ShyContent> getPage(String title, String source, String author, String content_tag, String contentId, Date start_date, Date end_date, Integer receive_status, String updater, Integer page, Integer pageSize, String orderByClause, Integer spid, String userId) { 97 + public PageInfo<ShyContent> getPage(ContentDTO contentDTO) {
  98 + //String title, String source, String author, String content_tag,
  99 + // String contentId, Date start_date, Date end_date, Integer receive_status, String updater,
  100 + // Integer page, Integer pageSize, String orderByClause, Integer spid, String userId
97 Example example = new Example(ShyContent.class); 101 Example example = new Example(ShyContent.class);
98 Example.Criteria criteria = example.createCriteria(); 102 Example.Criteria criteria = example.createCriteria();
99 - if (CommonUtils.isNotEmpty(orderByClause)) {  
100 - example.setOrderByClause(orderByClause); 103 + if (CommonUtils.isNotEmpty(contentDTO.getOrderByClause())) {
  104 + example.setOrderByClause(contentDTO.getOrderByClause());
101 } else { 105 } else {
102 example.setOrderByClause("create_date desc"); 106 example.setOrderByClause("create_date desc");
103 } 107 }
104 - if (CommonUtils.isNotNull(start_date)) {  
105 - criteria.andGreaterThanOrEqualTo("create_date", start_date); 108 + if (CommonUtils.isNotNull(contentDTO.getsDate())) {
  109 + criteria.andGreaterThanOrEqualTo("create_date", contentDTO.getsDate());
106 } 110 }
107 - if (CommonUtils.isNotNull(end_date)) {  
108 - criteria.andLessThanOrEqualTo("create_date", end_date); 111 + if (CommonUtils.isNotNull(contentDTO.geteDate())) {
  112 + criteria.andLessThanOrEqualTo("create_date", contentDTO.geteDate());
109 } 113 }
110 - if (CommonUtils.isNotEmpty(title)) {  
111 - criteria.andLike("title", "%" + title + "%"); 114 + if (CommonUtils.isNotEmpty(contentDTO.getTitle())) {
  115 + criteria.andLike("title", "%" + contentDTO.getTitle() + "%");
112 } 116 }
113 - if (CommonUtils.isNotEmpty(source)) {  
114 - criteria.andLike("source", "%" + source + "%"); 117 + if (CommonUtils.isNotEmpty(contentDTO.getSource())) {
  118 + criteria.andLike("source", "%" + contentDTO.getSource() + "%");
115 } 119 }
116 - if (CommonUtils.isNotEmpty(author)) {  
117 - criteria.andEqualTo("author", author); 120 + if (CommonUtils.isNotEmpty(contentDTO.getAuthor())) {
  121 + criteria.andEqualTo("author", contentDTO.getAuthor());
118 } 122 }
119 - if (CommonUtils.isNotEmpty(updater)) {  
120 - criteria.andEqualTo("updater", updater); 123 + if (CommonUtils.isNotEmpty(contentDTO.getUpdater())) {
  124 + criteria.andEqualTo("updater", contentDTO.getUpdater());
121 } 125 }
122 - if (CommonUtils.isNotEmpty(content_tag)) {  
123 - criteria.andEqualTo("content_tag", content_tag); 126 + if (CommonUtils.isNotEmpty(contentDTO.getContent_tag())) {
  127 + criteria.andEqualTo("content_tag", contentDTO.getContent_tag());
124 } 128 }
125 - if (CommonUtils.isNotNull(spid)) {  
126 - criteria.andEqualTo("sp_id", spid); 129 + if (CommonUtils.isNotNull(contentDTO.getSpid())) {
  130 + criteria.andEqualTo("sp_id", contentDTO.getSpid());
127 } 131 }
128 - if (CommonUtils.isNotEmpty(contentId)) {  
129 - criteria.andEqualTo("content_id", contentId); 132 + if (CommonUtils.isNotEmpty(contentDTO.getContentId())) {
  133 + criteria.andEqualTo("content_id", contentDTO.getContentId());
130 } 134 }
131 - if (CommonUtils.isNotNull(receive_status)) {  
132 - criteria.andEqualTo("receive_status", receive_status);  
133 - if (receive_status != CommonConst.RECEIVE_BEFORE) {  
134 - criteria.andEqualTo("auditor_id", userId); 135 + if (CommonUtils.isNotNull(contentDTO.getReceive_status())) {
  136 + criteria.andEqualTo("receive_status", contentDTO.getReceive_status());
  137 + if (!contentDTO.getReceive_status().equals(CommonConst.RECEIVE_BEFORE)) {
  138 + criteria.andEqualTo("auditor_id", contentDTO.getUserId());
135 } 139 }
136 } 140 }
137 141
138 - PageHelper.startPage(page, pageSize, true); 142 + PageHelper.startPage(contentDTO.getPage(), contentDTO.getPageSize(), true);
139 List<ShyContent> contentList = shyContentMapper.selectByExample(example); 143 List<ShyContent> contentList = shyContentMapper.selectByExample(example);
140 PageInfo<ShyContent> pageInfo = new PageInfo<>(contentList); 144 PageInfo<ShyContent> pageInfo = new PageInfo<>(contentList);
141 return pageInfo; 145 return pageInfo;
@@ -146,37 +150,35 @@ public class ContentServiceImpl { @@ -146,37 +150,35 @@ public class ContentServiceImpl {
146 * 150 *
147 * @return 151 * @return
148 */ 152 */
149 - public List<ShyContent> findByCondition(String title, String content_tag, String contentId, Date start_date,  
150 - Date end_date, Integer receive_status, Integer page,  
151 - Integer pageSize, String orderByClause, Integer spid) { 153 + public List<ShyContent> findByCondition(ContentDTO contentDTO) {
152 154
153 Example example = new Example(ShyContent.class); 155 Example example = new Example(ShyContent.class);
154 Example.Criteria criteria = example.createCriteria(); 156 Example.Criteria criteria = example.createCriteria();
155 - if (CommonUtils.isNotEmpty(orderByClause)) {  
156 - example.setOrderByClause(orderByClause); 157 + if (CommonUtils.isNotEmpty(contentDTO.getOrderByClause())) {
  158 + example.setOrderByClause(contentDTO.getOrderByClause());
157 } else { 159 } else {
158 example.setOrderByClause("create_date desc"); 160 example.setOrderByClause("create_date desc");
159 } 161 }
160 - if (CommonUtils.isNotNull(start_date)) {  
161 - criteria.andGreaterThanOrEqualTo("create_date", start_date); 162 + if (CommonUtils.isNotNull(contentDTO.getsDate())) {
  163 + criteria.andGreaterThanOrEqualTo("create_date", contentDTO.getsDate());
162 } 164 }
163 - if (CommonUtils.isNotNull(end_date)) {  
164 - criteria.andLessThanOrEqualTo("create_date", end_date); 165 + if (CommonUtils.isNotNull(contentDTO.geteDate())) {
  166 + criteria.andLessThanOrEqualTo("create_date", contentDTO.geteDate());
165 } 167 }
166 - if (CommonUtils.isNotEmpty(title)) {  
167 - criteria.andLike("title", "%" + title + "%"); 168 + if (CommonUtils.isNotEmpty(contentDTO.getTitle())) {
  169 + criteria.andLike("title", "%" + contentDTO.getTitle() + "%");
168 } 170 }
169 - if (CommonUtils.isNotNull(spid)) {  
170 - criteria.andEqualTo("sp_id", spid); 171 + if (CommonUtils.isNotNull(contentDTO.getSpid())) {
  172 + criteria.andEqualTo("sp_id", contentDTO.getSpid());
171 } 173 }
172 - if (CommonUtils.isNotEmpty(contentId)) {  
173 - criteria.andEqualTo("content_id", contentId); 174 + if (CommonUtils.isNotEmpty(contentDTO.getContentId())) {
  175 + criteria.andEqualTo("content_id", contentDTO.getContentId());
174 } 176 }
175 - if (CommonUtils.isNotEmpty(content_tag)) {  
176 - criteria.andEqualTo("content_tag", content_tag); 177 + if (CommonUtils.isNotEmpty(contentDTO.getContent_tag())) {
  178 + criteria.andEqualTo("content_tag", contentDTO.getContent_tag());
177 } 179 }
178 - if (CommonUtils.isNotNull(receive_status)) {  
179 - criteria.andEqualTo("receive_status", receive_status); 180 + if (CommonUtils.isNotNull(contentDTO.getReceive_status())) {
  181 + criteria.andEqualTo("receive_status", contentDTO.getReceive_status());
180 } 182 }
181 List<ShyContent> shyContentList = shyContentMapper.selectByExample(example); 183 List<ShyContent> shyContentList = shyContentMapper.selectByExample(example);
182 return shyContentList; 184 return shyContentList;
@@ -186,7 +188,7 @@ public class ContentServiceImpl { @@ -186,7 +188,7 @@ public class ContentServiceImpl {
186 //****************************** 188 //******************************
187 public ShyContent getDetailsContent(Integer id) { 189 public ShyContent getDetailsContent(Integer id) {
188 ShyContent content = shyContentMapper.selectByPrimaryKey(id); 190 ShyContent content = shyContentMapper.selectByPrimaryKey(id);
189 - if (content.getReceive_status() == CommonConst.RECEIVE_AUDIT) { 191 + if (content.getReceive_status().equals(CommonConst.RECEIVE_AUDIT)) {
190 String updater = CommonUtils.isEmpty(content.getUpdater()) || "null".equals(content.getUpdater()) ? "白名单" : content.getUpdater(); 192 String updater = CommonUtils.isEmpty(content.getUpdater()) || "null".equals(content.getUpdater()) ? "白名单" : content.getUpdater();
191 String auditor_id = content.getAuditor_id(); 193 String auditor_id = content.getAuditor_id();
192 if (CommonUtils.isNotEmpty(auditor_id)) { 194 if (CommonUtils.isNotEmpty(auditor_id)) {
@@ -243,7 +245,7 @@ public class ContentServiceImpl { @@ -243,7 +245,7 @@ public class ContentServiceImpl {
243 if (CommonUtils.isNotEmpty(content.getContent_tag()) 245 if (CommonUtils.isNotEmpty(content.getContent_tag())
244 && content.getContent_tag().equals("moment") 246 && content.getContent_tag().equals("moment")
245 && CommonUtils.isNotEmpty(content.getVideo_id()) 247 && CommonUtils.isNotEmpty(content.getVideo_id())
246 - && state == CommonConst.AUDIT_REFUSE) { 248 + && state.equals(CommonConst.AUDIT_REFUSE)) {
247 ShyVideos shyVideos1 = new ShyVideos(); 249 ShyVideos shyVideos1 = new ShyVideos();
248 shyVideos1.setVideo_id(content.getVideo_id()); 250 shyVideos1.setVideo_id(content.getVideo_id());
249 List<ShyVideos> listshyVideos = videosService.findshyVideo(shyVideos1); 251 List<ShyVideos> listshyVideos = videosService.findshyVideo(shyVideos1);
@@ -296,7 +298,9 @@ public class ContentServiceImpl { @@ -296,7 +298,9 @@ public class ContentServiceImpl {
296 example.setOrderByClause("create_date desc"); 298 example.setOrderByClause("create_date desc");
297 example.and().andEqualTo("receive_status", CommonConst.RECEIVE_BEFORE); 299 example.and().andEqualTo("receive_status", CommonConst.RECEIVE_BEFORE);
298 // example.and().andEqualTo("receive", CommonConst.RECEIVE_AFTER); 300 // example.and().andEqualTo("receive", CommonConst.RECEIVE_AFTER);
299 - if (CommonUtils.isNotNull(spid) && spid != 0) example.and().andEqualTo("spid", spid); 301 + if (CommonUtils.isNotNull(spid) && spid != 0) {
  302 + example.and().andEqualTo("spid", spid);
  303 + }
300 List<ShyContent> shyContentList = shyContentMapper.selectByExampleAndRowBounds(example, new RowBounds(0, num)); 304 List<ShyContent> shyContentList = shyContentMapper.selectByExampleAndRowBounds(example, new RowBounds(0, num));
301 if (!shyContentList.isEmpty()) { 305 if (!shyContentList.isEmpty()) {
302 for (ShyContent shyContent : shyContentList) { 306 for (ShyContent shyContent : shyContentList) {
@@ -317,12 +321,14 @@ public class ContentServiceImpl { @@ -317,12 +321,14 @@ public class ContentServiceImpl {
317 String[] cids = ids.split(","); 321 String[] cids = ids.split(",");
318 for (String cid : cids) { 322 for (String cid : cids) {
319 ShyContent shyContent = shyContentMapper.selectByPrimaryKey(Integer.parseInt(cid)); 323 ShyContent shyContent = shyContentMapper.selectByPrimaryKey(Integer.parseInt(cid));
320 - if (shyContent.getReceive_status() == CommonConst.RECEIVE_AFTER && userId.equals(shyContent.getAuditor_id())) { 324 + if (shyContent.getReceive_status().equals(CommonConst.RECEIVE_AFTER) && userId.equals(shyContent.getAuditor_id())) {
321 shyContent.setReceive_status(CommonConst.RECEIVE_BEFORE); 325 shyContent.setReceive_status(CommonConst.RECEIVE_BEFORE);
322 shyContent.setAuditor_id(null); 326 shyContent.setAuditor_id(null);
323 shyContent.setLast_update(CommonUtils.getCurrentTime()); 327 shyContent.setLast_update(CommonUtils.getCurrentTime());
324 int i = shyContentMapper.updateByPrimaryKeySelective(shyContent); 328 int i = shyContentMapper.updateByPrimaryKeySelective(shyContent);
325 - if (i == 1) n++; 329 + if (i == 1) {
  330 + n++;
  331 + }
326 } 332 }
327 } 333 }
328 return n; 334 return n;
src/main/java/com/cnlive/shenhe/serviceImpl/EmailServiceImpl.java
1 package com.cnlive.shenhe.serviceImpl; 1 package com.cnlive.shenhe.serviceImpl;
2 2
3 import com.alibaba.fastjson.JSONObject; 3 import com.alibaba.fastjson.JSONObject;
  4 +import com.cnlive.shenhe.dto.EmailDTO;
4 import com.cnlive.shenhe.entity.ShyEmail; 5 import com.cnlive.shenhe.entity.ShyEmail;
5 import com.cnlive.shenhe.entity.ShySites; 6 import com.cnlive.shenhe.entity.ShySites;
6 import com.cnlive.shenhe.entity.ShyUsers; 7 import com.cnlive.shenhe.entity.ShyUsers;
@@ -34,23 +35,23 @@ public class EmailServiceImpl { @@ -34,23 +35,23 @@ public class EmailServiceImpl {
34 @Autowired 35 @Autowired
35 ShyEmailMapper shyEmailMapper; 36 ShyEmailMapper shyEmailMapper;
36 37
37 - public PageInfo<ShyEmail> getPage(Integer page, Integer pageSize, String orderByClause,  
38 - String remark,String email) { 38 + public PageInfo<ShyEmail> getPage(EmailDTO emailDTO) {
39 Example example = new Example(ShyEmail.class); 39 Example example = new Example(ShyEmail.class);
40 Example.Criteria criteria = example.createCriteria(); 40 Example.Criteria criteria = example.createCriteria();
41 - if (CommonUtils.isNotEmpty(orderByClause)) {  
42 - example.setOrderByClause(orderByClause); 41 + if (CommonUtils.isNotEmpty(emailDTO.getOrderByClause())) {
  42 + example.setOrderByClause(emailDTO.getOrderByClause());
43 }else{ 43 }else{
44 example.setOrderByClause("created_at desc"); 44 example.setOrderByClause("created_at desc");
45 } 45 }
46 - if (CommonUtils.isNotEmpty(remark)) {  
47 - criteria.andLike("remark", "%" + remark + "%"); 46 + if (CommonUtils.isNotEmpty(emailDTO.getRemark())) {
  47 + criteria.andLike("remark", "%" + emailDTO.getRemark() + "%");
48 } 48 }
49 - if (CommonUtils.isNotEmpty(email)) {  
50 - criteria.andLike("email", "%" + email + "%"); 49 + if (CommonUtils.isNotEmpty(emailDTO.getEmail())) {
  50 + criteria.andLike("email", "%" + emailDTO.getEmail() + "%");
51 } 51 }
52 criteria.andEqualTo("is_delete",false); 52 criteria.andEqualTo("is_delete",false);
53 - PageHelper.startPage(page, pageSize, true); 53 + PageHelper.startPage(emailDTO.getPage(), emailDTO.getPageSize(), true);
  54 +
54 List<ShyEmail> ShyEmailList = shyEmailMapper.selectByExample(example); 55 List<ShyEmail> ShyEmailList = shyEmailMapper.selectByExample(example);
55 PageInfo<ShyEmail> pageInfo = new PageInfo<ShyEmail>(ShyEmailList); 56 PageInfo<ShyEmail> pageInfo = new PageInfo<ShyEmail>(ShyEmailList);
56 return pageInfo; 57 return pageInfo;
src/main/java/com/cnlive/shenhe/serviceImpl/LiveApplyServiceImpl.java
@@ -5,6 +5,7 @@ import com.alibaba.fastjson.JSONArray; @@ -5,6 +5,7 @@ import com.alibaba.fastjson.JSONArray;
5 import com.alibaba.fastjson.JSONObject; 5 import com.alibaba.fastjson.JSONObject;
6 import com.cnlive.shenhe.bean.ErrorEnum; 6 import com.cnlive.shenhe.bean.ErrorEnum;
7 import com.cnlive.shenhe.bean.ResponseBean; 7 import com.cnlive.shenhe.bean.ResponseBean;
  8 +import com.cnlive.shenhe.dto.LiveApplyDTO;
8 import com.cnlive.shenhe.entity.ShyChannel; 9 import com.cnlive.shenhe.entity.ShyChannel;
9 import com.cnlive.shenhe.entity.ShyLive; 10 import com.cnlive.shenhe.entity.ShyLive;
10 import com.cnlive.shenhe.entity.ShyLiveapply; 11 import com.cnlive.shenhe.entity.ShyLiveapply;
@@ -111,56 +112,54 @@ public class LiveApplyServiceImpl { @@ -111,56 +112,54 @@ public class LiveApplyServiceImpl {
111 } 112 }
112 113
113 //=============== 114 //===============
114 - public PageInfo<ShyLiveapply> getListLiveApply(String theme, String start_date, String end_date,  
115 - String business_model, Integer page, Integer pageSize,  
116 - Integer shenhe_state,Integer receive, String orderByClause, Integer spid, String userId) { 115 + public PageInfo<ShyLiveapply> getListLiveApply(LiveApplyDTO liveApplyDTO) {
117 Example example = new Example(ShyLiveapply.class); 116 Example example = new Example(ShyLiveapply.class);
118 Example.Criteria criteria = example.createCriteria(); 117 Example.Criteria criteria = example.createCriteria();
119 - if (CommonUtils.isNotEmpty(orderByClause)) {  
120 - example.setOrderByClause(orderByClause); 118 + if (CommonUtils.isNotEmpty(liveApplyDTO.getOrderByClause())) {
  119 + example.setOrderByClause(liveApplyDTO.getOrderByClause());
121 }else{ 120 }else{
122 example.setOrderByClause("created_at desc"); 121 example.setOrderByClause("created_at desc");
123 } 122 }
124 - if (CommonUtils.isNotEmpty(start_date)) { 123 + if (CommonUtils.isNotEmpty(liveApplyDTO.getsDate())) {
125 Timestamp startdate = null; 124 Timestamp startdate = null;
126 try { 125 try {
127 - startdate = CommonUtils.parseDate(start_date, "yyyy-MM-dd"); 126 + startdate = CommonUtils.parseDate(liveApplyDTO.getsDate(), "yyyy-MM-dd");
128 } catch (ParseException e) { 127 } catch (ParseException e) {
129 e.printStackTrace(); 128 e.printStackTrace();
130 } 129 }
131 criteria.andGreaterThanOrEqualTo("pre_start_time", startdate); 130 criteria.andGreaterThanOrEqualTo("pre_start_time", startdate);
132 } 131 }
133 - if ( CommonUtils.isNotEmpty(end_date)) { 132 + if ( CommonUtils.isNotEmpty(liveApplyDTO.geteDate())) {
134 Timestamp enddate = null; 133 Timestamp enddate = null;
135 try { 134 try {
136 - enddate = CommonUtils.parseDate(end_date, "yyyy-MM-dd"); 135 + enddate = CommonUtils.parseDate(liveApplyDTO.geteDate(), "yyyy-MM-dd");
137 } catch (ParseException e) { 136 } catch (ParseException e) {
138 e.printStackTrace(); 137 e.printStackTrace();
139 } 138 }
140 criteria.andLessThanOrEqualTo("pre_end_time", enddate); 139 criteria.andLessThanOrEqualTo("pre_end_time", enddate);
141 } 140 }
142 - if (CommonUtils.isNotEmpty(theme)) {  
143 - criteria.andLike("theme", "%" + theme + "%"); 141 + if (CommonUtils.isNotEmpty(liveApplyDTO.getTheme())) {
  142 + criteria.andLike("theme", "%" + liveApplyDTO.getTheme() + "%");
144 } 143 }
145 144
146 - if (CommonUtils.isNotNull(business_model)) {  
147 - criteria.andLike("organization", "%" + business_model + "%"); 145 + if (CommonUtils.isNotNull(liveApplyDTO.getBusiness_model())) {
  146 + criteria.andLike("organization", "%" + liveApplyDTO.getBusiness_model() + "%");
148 } 147 }
149 - if (CommonUtils.isNotNull(spid)) {  
150 - criteria.andEqualTo("sp_id", spid); 148 + if (CommonUtils.isNotNull(liveApplyDTO.getSpid())) {
  149 + criteria.andEqualTo("sp_id", liveApplyDTO.getSpid());
151 } 150 }
152 - if (CommonUtils.isNotNull(shenhe_state)&& shenhe_state != 3) {  
153 - criteria.andEqualTo("shenhe_state", shenhe_state);  
154 - }else if(CommonUtils.isNotNull(shenhe_state)&& shenhe_state == 3){ 151 + if (CommonUtils.isNotNull(liveApplyDTO.getShenhe_state())&& liveApplyDTO.getShenhe_state() != 3) {
  152 + criteria.andEqualTo("shenhe_state", liveApplyDTO.getShenhe_state());
  153 + }else if(CommonUtils.isNotNull(liveApplyDTO.getShenhe_state())&& liveApplyDTO.getShenhe_state() == 3){
155 criteria.andNotEqualTo("shenhe_state", 0); 154 criteria.andNotEqualTo("shenhe_state", 0);
156 } 155 }
157 - if (CommonUtils.isNotNull(receive)) {  
158 - criteria.andEqualTo("receive", receive);  
159 - if(receive!=0 && CommonUtils.isNotEmpty(userId)){  
160 - criteria.andEqualTo("auditor", userId); 156 + if (CommonUtils.isNotNull(liveApplyDTO.getReceive())) {
  157 + criteria.andEqualTo("receive", liveApplyDTO.getReceive());
  158 + if(liveApplyDTO.getReceive()!=0 && CommonUtils.isNotEmpty(liveApplyDTO.getUserId())){
  159 + criteria.andEqualTo("auditor", liveApplyDTO.getUserId());
161 } 160 }
162 } 161 }
163 - PageHelper.startPage(page, pageSize, true); 162 + PageHelper.startPage(liveApplyDTO.getPage(), liveApplyDTO.getPageSize(), true);
164 List<ShyLiveapply> shyLiveApplyList = shyLiveApplyMapper.selectByExample(example); 163 List<ShyLiveapply> shyLiveApplyList = shyLiveApplyMapper.selectByExample(example);
165 PageInfo<ShyLiveapply> pageInfo = new PageInfo<>(shyLiveApplyList); 164 PageInfo<ShyLiveapply> pageInfo = new PageInfo<>(shyLiveApplyList);
166 return pageInfo; 165 return pageInfo;
@@ -169,7 +168,7 @@ public class LiveApplyServiceImpl { @@ -169,7 +168,7 @@ public class LiveApplyServiceImpl {
169 //====================== 168 //======================
170 public ShyLiveapply getDetailsLive(Integer id) { 169 public ShyLiveapply getDetailsLive(Integer id) {
171 ShyLiveapply shyLiveapply = shyLiveApplyMapper.selectByPrimaryKey(id); 170 ShyLiveapply shyLiveapply = shyLiveApplyMapper.selectByPrimaryKey(id);
172 - if (shyLiveapply.getShenhe_state() != CommonConst.RECEIVE_BEFORE) { 171 + if (!shyLiveapply.getShenhe_state().equals(CommonConst.RECEIVE_BEFORE)) {
173 String updater = CommonUtils.isEmpty(shyLiveapply.getUpdater()) || "null".equals(shyLiveapply.getUpdater())? "自动通过":shyLiveapply.getUpdater(); 172 String updater = CommonUtils.isEmpty(shyLiveapply.getUpdater()) || "null".equals(shyLiveapply.getUpdater())? "自动通过":shyLiveapply.getUpdater();
174 String auditor_id = shyLiveapply.getAuditor(); 173 String auditor_id = shyLiveapply.getAuditor();
175 if (CommonUtils.isNotEmpty(auditor_id)) { 174 if (CommonUtils.isNotEmpty(auditor_id)) {
@@ -205,7 +204,9 @@ public class LiveApplyServiceImpl { @@ -205,7 +204,9 @@ public class LiveApplyServiceImpl {
205 example.setOrderByClause("pre_start_time asc"); 204 example.setOrderByClause("pre_start_time asc");
206 example.and().andEqualTo("shenhe_state", CommonConst.AUDIT_INTT); 205 example.and().andEqualTo("shenhe_state", CommonConst.AUDIT_INTT);
207 example.and().andEqualTo("receive", CommonConst.RECEIVE_BEFORE); 206 example.and().andEqualTo("receive", CommonConst.RECEIVE_BEFORE);
208 - if (CommonUtils.isNotNull(spid) && spid != 0) example.and().andEqualTo("spid", spid); 207 + if (CommonUtils.isNotNull(spid) && spid != 0) {
  208 + example.and().andEqualTo("spid", spid);
  209 + }
209 List<ShyLiveapply> shyLiveapplyList = shyLiveApplyMapper.selectByExampleAndRowBounds(example, new RowBounds(0, num)); 210 List<ShyLiveapply> shyLiveapplyList = shyLiveApplyMapper.selectByExampleAndRowBounds(example, new RowBounds(0, num));
210 if (!shyLiveapplyList.isEmpty()) { 211 if (!shyLiveapplyList.isEmpty()) {
211 for (ShyLiveapply shyLiveapply : shyLiveapplyList) { 212 for (ShyLiveapply shyLiveapply : shyLiveapplyList) {
@@ -225,7 +226,7 @@ public class LiveApplyServiceImpl { @@ -225,7 +226,7 @@ public class LiveApplyServiceImpl {
225 String[] cids = ids.split(","); 226 String[] cids = ids.split(",");
226 for (String cid : cids) { 227 for (String cid : cids) {
227 ShyLiveapply shyLiveapply = shyLiveApplyMapper.selectByPrimaryKey(Integer.parseInt(cid)); 228 ShyLiveapply shyLiveapply = shyLiveApplyMapper.selectByPrimaryKey(Integer.parseInt(cid));
228 - if (shyLiveapply.getShenhe_state() == CommonConst.AUDIT_INTT &&shyLiveapply.getReceive() == CommonConst.RECEIVE_AFTER && shyLiveapply.getAuditor().equals(userId)) { 229 + if (shyLiveapply.getShenhe_state().equals(CommonConst.AUDIT_INTT) && shyLiveapply.getReceive().equals(CommonConst.RECEIVE_AFTER) && shyLiveapply.getAuditor().equals(userId)) {
229 shyLiveapply.setShenhe_state(CommonConst.AUDIT_INTT); 230 shyLiveapply.setShenhe_state(CommonConst.AUDIT_INTT);
230 shyLiveapply.setReceive(CommonConst.RECEIVE_BEFORE); 231 shyLiveapply.setReceive(CommonConst.RECEIVE_BEFORE);
231 shyLiveapply.setAuditor(null); 232 shyLiveapply.setAuditor(null);
@@ -244,53 +245,51 @@ public class LiveApplyServiceImpl { @@ -244,53 +245,51 @@ public class LiveApplyServiceImpl {
244 * 根据条件导出数据excel 245 * 根据条件导出数据excel
245 * @return 246 * @return
246 */ 247 */
247 - public List<ShyLiveapply> findByCondition(String theme, String start_date, String end_date,  
248 - String business_model, Integer page, Integer pageSize,  
249 - Integer shenhe_state,Integer receive, String orderByClause, Integer spid, String userId) { 248 + public List<ShyLiveapply> findByCondition(LiveApplyDTO liveApplyDTO) {
250 Example example = new Example(ShyLiveapply.class); 249 Example example = new Example(ShyLiveapply.class);
251 Example.Criteria criteria = example.createCriteria(); 250 Example.Criteria criteria = example.createCriteria();
252 - if (CommonUtils.isNotEmpty(orderByClause)) {  
253 - example.setOrderByClause(orderByClause); 251 + if (CommonUtils.isNotEmpty(liveApplyDTO.getOrderByClause())) {
  252 + example.setOrderByClause(liveApplyDTO.getOrderByClause());
254 }else{ 253 }else{
255 example.setOrderByClause("pre_start_time"); 254 example.setOrderByClause("pre_start_time");
256 } 255 }
257 - if (CommonUtils.isNotEmpty(start_date)) { 256 + if (CommonUtils.isNotEmpty(liveApplyDTO.getsDate())) {
258 Timestamp startdate = null; 257 Timestamp startdate = null;
259 try { 258 try {
260 - startdate = CommonUtils.parseDate(start_date, "yyyy-MM-dd"); 259 + startdate = CommonUtils.parseDate(liveApplyDTO.getsDate(), "yyyy-MM-dd");
261 } catch (ParseException e) { 260 } catch (ParseException e) {
262 e.printStackTrace(); 261 e.printStackTrace();
263 } 262 }
264 criteria.andGreaterThanOrEqualTo("pre_start_time", startdate); 263 criteria.andGreaterThanOrEqualTo("pre_start_time", startdate);
265 } 264 }
266 - if ( CommonUtils.isNotEmpty(end_date)) { 265 + if ( CommonUtils.isNotEmpty(liveApplyDTO.geteDate())) {
267 Timestamp enddate = null; 266 Timestamp enddate = null;
268 try { 267 try {
269 - enddate = CommonUtils.parseDate(end_date, "yyyy-MM-dd"); 268 + enddate = CommonUtils.parseDate(liveApplyDTO.geteDate(), "yyyy-MM-dd");
270 } catch (ParseException e) { 269 } catch (ParseException e) {
271 e.printStackTrace(); 270 e.printStackTrace();
272 } 271 }
273 criteria.andLessThanOrEqualTo("pre_end_time", enddate); 272 criteria.andLessThanOrEqualTo("pre_end_time", enddate);
274 } 273 }
275 - if (CommonUtils.isNotEmpty(theme)) {  
276 - criteria.andLike("theme", "%" + theme + "%"); 274 + if (CommonUtils.isNotEmpty(liveApplyDTO.getTheme())) {
  275 + criteria.andLike("theme", "%" + liveApplyDTO.getTheme() + "%");
277 } 276 }
278 277
279 - if (CommonUtils.isNotNull(business_model)) {  
280 - criteria.andEqualTo("business_model", business_model); 278 + if (CommonUtils.isNotNull(liveApplyDTO.getBusiness_model())) {
  279 + criteria.andEqualTo("business_model", liveApplyDTO.getBusiness_model());
281 } 280 }
282 - if (CommonUtils.isNotNull(spid)) {  
283 - criteria.andEqualTo("sp_id", spid); 281 + if (CommonUtils.isNotNull(liveApplyDTO.getSpid())) {
  282 + criteria.andEqualTo("sp_id", liveApplyDTO.getSpid());
284 } 283 }
285 - if (CommonUtils.isNotNull(shenhe_state)&& shenhe_state != 3) {  
286 - criteria.andEqualTo("shenhe_state", shenhe_state);  
287 - }else if(CommonUtils.isNotNull(shenhe_state)&& shenhe_state == 3){ 284 + if (CommonUtils.isNotNull(liveApplyDTO.getShenhe_state())&& liveApplyDTO.getShenhe_state() != 3) {
  285 + criteria.andEqualTo("shenhe_state", liveApplyDTO.getShenhe_state());
  286 + }else if(CommonUtils.isNotNull(liveApplyDTO.getShenhe_state())&& liveApplyDTO.getShenhe_state() == 3){
288 criteria.andNotEqualTo("shenhe_state", 0); 287 criteria.andNotEqualTo("shenhe_state", 0);
289 } 288 }
290 - if (CommonUtils.isNotNull(receive)) {  
291 - criteria.andEqualTo("receive", receive);  
292 - if(receive!=0 && CommonUtils.isNotEmpty(userId)){  
293 - criteria.andEqualTo("auditor", userId); 289 + if (CommonUtils.isNotNull(liveApplyDTO.getReceive())) {
  290 + criteria.andEqualTo("receive", liveApplyDTO.getReceive());
  291 + if(liveApplyDTO.getReceive()!=0 && CommonUtils.isNotEmpty(liveApplyDTO.getUserId())){
  292 + criteria.andEqualTo("auditor", liveApplyDTO.getUserId());
294 } 293 }
295 } 294 }
296 List<ShyLiveapply> shyLiveApplyList = shyLiveApplyMapper.selectByExample(example); 295 List<ShyLiveapply> shyLiveApplyList = shyLiveApplyMapper.selectByExample(example);
@@ -299,7 +298,7 @@ public class LiveApplyServiceImpl { @@ -299,7 +298,7 @@ public class LiveApplyServiceImpl {
299 298
300 /** 299 /**
301 * 获得审核类型 300 * 获得审核类型
302 - * @param shyChannel 301 + * @param shyLiveApply
303 */ 302 */
304 public void getShenheType(ShyLiveapply shyLiveApply){ 303 public void getShenheType(ShyLiveapply shyLiveApply){
305 304
src/main/java/com/cnlive/shenhe/serviceImpl/LiveServiceImpl.java
@@ -2,6 +2,7 @@ package com.cnlive.shenhe.serviceImpl; @@ -2,6 +2,7 @@ package com.cnlive.shenhe.serviceImpl;
2 2
3 import com.cnlive.shenhe.bean.ErrorEnum; 3 import com.cnlive.shenhe.bean.ErrorEnum;
4 import com.cnlive.shenhe.bean.ResponseBean; 4 import com.cnlive.shenhe.bean.ResponseBean;
  5 +import com.cnlive.shenhe.dto.LiveDTO;
5 import com.cnlive.shenhe.entity.ShyLive; 6 import com.cnlive.shenhe.entity.ShyLive;
6 import com.cnlive.shenhe.entity.ShyUsers; 7 import com.cnlive.shenhe.entity.ShyUsers;
7 import com.cnlive.shenhe.mapper.ShyLiveMapper; 8 import com.cnlive.shenhe.mapper.ShyLiveMapper;
@@ -84,53 +85,51 @@ public class LiveServiceImpl { @@ -84,53 +85,51 @@ public class LiveServiceImpl {
84 } 85 }
85 86
86 //=============== 87 //===============
87 - public PageInfo<ShyLive> getListContent(String activity_name, String start_date, String end_date,  
88 - String activity_id, Integer activity_status, Integer page, Integer pageSize,  
89 - Integer shenhe_state, String orderByClause, Integer spid, String userId) { 88 + public PageInfo<ShyLive> getListContent(LiveDTO liveDTO) {
90 Example example = new Example(ShyLive.class); 89 Example example = new Example(ShyLive.class);
91 Example.Criteria criteria = example.createCriteria(); 90 Example.Criteria criteria = example.createCriteria();
92 - if (CommonUtils.isNotEmpty(orderByClause)) {  
93 - example.setOrderByClause(orderByClause); 91 + if (CommonUtils.isNotEmpty(liveDTO.getOrderByClause())) {
  92 + example.setOrderByClause(liveDTO.getOrderByClause());
94 } 93 }
95 - if (CommonUtils.isNotEmpty(start_date)) { 94 + if (CommonUtils.isNotEmpty(liveDTO.getsDate())) {
96 Timestamp startdate = null; 95 Timestamp startdate = null;
97 try { 96 try {
98 - startdate = CommonUtils.parseDate(start_date, "yyyy-MM-dd"); 97 + startdate = CommonUtils.parseDate(liveDTO.getsDate(), "yyyy-MM-dd");
99 } catch (ParseException e) { 98 } catch (ParseException e) {
100 e.printStackTrace(); 99 e.printStackTrace();
101 } 100 }
102 criteria.andGreaterThanOrEqualTo("activity_start_time", startdate); 101 criteria.andGreaterThanOrEqualTo("activity_start_time", startdate);
103 } 102 }
104 - if ( CommonUtils.isNotEmpty(end_date)) { 103 + if ( CommonUtils.isNotEmpty(liveDTO.geteDate())) {
105 Timestamp enddate = null; 104 Timestamp enddate = null;
106 try { 105 try {
107 - enddate = CommonUtils.parseDate(end_date, "yyyy-MM-dd"); 106 + enddate = CommonUtils.parseDate(liveDTO.geteDate(), "yyyy-MM-dd");
108 } catch (ParseException e) { 107 } catch (ParseException e) {
109 e.printStackTrace(); 108 e.printStackTrace();
110 } 109 }
111 criteria.andLessThanOrEqualTo("activity_start_time", enddate); 110 criteria.andLessThanOrEqualTo("activity_start_time", enddate);
112 } 111 }
113 - if (CommonUtils.isNotEmpty(activity_name)) {  
114 - criteria.andLike("activity_name", "%" + activity_name + "%"); 112 + if (CommonUtils.isNotEmpty(liveDTO.getActivity_name())) {
  113 + criteria.andLike("activity_name", "%" + liveDTO.getActivity_name() + "%");
115 } 114 }
116 115
117 - if (CommonUtils.isNotEmpty(activity_id)) {  
118 - criteria.andEqualTo("activity_id", activity_id); 116 + if (CommonUtils.isNotEmpty(liveDTO.getActivity_id())) {
  117 + criteria.andEqualTo("activity_id", liveDTO.getActivity_id());
119 } 118 }
120 - if (CommonUtils.isNotNull(spid)) {  
121 - criteria.andEqualTo("sp_id", spid); 119 + if (CommonUtils.isNotNull(liveDTO.getSpid())) {
  120 + criteria.andEqualTo("sp_id", liveDTO.getSpid());
122 } 121 }
123 - if (CommonUtils.isNotNull(shenhe_state)) {  
124 - criteria.andEqualTo("shenhe_state", shenhe_state);  
125 - if (shenhe_state != CommonConst.RECEIVE_BEFORE) {  
126 - criteria.andEqualTo("auditor", userId); 122 + if (CommonUtils.isNotNull(liveDTO.getShenhe_state())) {
  123 + criteria.andEqualTo("shenhe_state", liveDTO.getShenhe_state());
  124 + if (!liveDTO.getShenhe_state().equals(CommonConst.RECEIVE_BEFORE)) {
  125 + criteria.andEqualTo("auditor", liveDTO.getUserId());
127 } 126 }
128 } 127 }
129 - if (CommonUtils.isNotNull(activity_status) ) {  
130 - criteria.andEqualTo("activity_status", activity_status); 128 + if (CommonUtils.isNotNull(liveDTO.getActivity_status()) ) {
  129 + criteria.andEqualTo("activity_status", liveDTO.getActivity_status());
131 } 130 }
132 criteria.andEqualTo("is_show", 1); 131 criteria.andEqualTo("is_show", 1);
133 - PageHelper.startPage(page, pageSize, true); 132 + PageHelper.startPage(liveDTO.getPage(), liveDTO.getPageSize(), true);
134 List<ShyLive> shyLiveList = shyLiveMapper.selectByExample(example); 133 List<ShyLive> shyLiveList = shyLiveMapper.selectByExample(example);
135 PageInfo<ShyLive> pageInfo = new PageInfo<>(shyLiveList); 134 PageInfo<ShyLive> pageInfo = new PageInfo<>(shyLiveList);
136 return pageInfo; 135 return pageInfo;
@@ -139,7 +138,7 @@ public class LiveServiceImpl { @@ -139,7 +138,7 @@ public class LiveServiceImpl {
139 //====================== 138 //======================
140 public ShyLive getDetailsLive(Integer id) { 139 public ShyLive getDetailsLive(Integer id) {
141 ShyLive shyLive = shyLiveMapper.selectByPrimaryKey(id); 140 ShyLive shyLive = shyLiveMapper.selectByPrimaryKey(id);
142 - if (shyLive.getShenhe_state() != CommonConst.RECEIVE_BEFORE) { 141 + if (!shyLive.getShenhe_state().equals(CommonConst.RECEIVE_BEFORE)) {
143 String updater = CommonUtils.isEmpty(shyLive.getUpdater()) || "null".equals(shyLive.getUpdater())? "自动通过":shyLive.getUpdater(); 142 String updater = CommonUtils.isEmpty(shyLive.getUpdater()) || "null".equals(shyLive.getUpdater())? "自动通过":shyLive.getUpdater();
144 String auditor_id = shyLive.getAuditor(); 143 String auditor_id = shyLive.getAuditor();
145 if (CommonUtils.isNotEmpty(auditor_id)) { 144 if (CommonUtils.isNotEmpty(auditor_id)) {
@@ -173,7 +172,9 @@ public class LiveServiceImpl { @@ -173,7 +172,9 @@ public class LiveServiceImpl {
173 Example example = new Example(ShyLive.class); 172 Example example = new Example(ShyLive.class);
174 example.setOrderByClause("is_hot desc, activity_start_time asc"); 173 example.setOrderByClause("is_hot desc, activity_start_time asc");
175 example.and().andEqualTo("shenhe_state", CommonConst.RECEIVE_BEFORE); 174 example.and().andEqualTo("shenhe_state", CommonConst.RECEIVE_BEFORE);
176 - if (CommonUtils.isNotNull(spid) && spid != 0) example.and().andEqualTo("spid", spid); 175 + if (CommonUtils.isNotNull(spid) && spid != 0) {
  176 + example.and().andEqualTo("spid", spid);
  177 + }
177 List<ShyLive> shyLiveList = shyLiveMapper.selectByExampleAndRowBounds(example, new RowBounds(0, num)); 178 List<ShyLive> shyLiveList = shyLiveMapper.selectByExampleAndRowBounds(example, new RowBounds(0, num));
178 if (!shyLiveList.isEmpty()) { 179 if (!shyLiveList.isEmpty()) {
179 for (ShyLive shyLive : shyLiveList) { 180 for (ShyLive shyLive : shyLiveList) {
@@ -192,7 +193,7 @@ public class LiveServiceImpl { @@ -192,7 +193,7 @@ public class LiveServiceImpl {
192 String[] cids = ids.split(","); 193 String[] cids = ids.split(",");
193 for (String cid : cids) { 194 for (String cid : cids) {
194 ShyLive shyLive = shyLiveMapper.selectByPrimaryKey(Integer.parseInt(cid)); 195 ShyLive shyLive = shyLiveMapper.selectByPrimaryKey(Integer.parseInt(cid));
195 - if (shyLive.getShenhe_state() == CommonConst.RECEIVE_AFTER && shyLive.getAuditor().equals(userId)) { 196 + if (shyLive.getShenhe_state().equals(CommonConst.RECEIVE_AFTER) && shyLive.getAuditor().equals(userId)) {
196 shyLive.setShenhe_state(CommonConst.RECEIVE_BEFORE); 197 shyLive.setShenhe_state(CommonConst.RECEIVE_BEFORE);
197 shyLive.setAuditor(null); 198 shyLive.setAuditor(null);
198 int i = shyLiveMapper.updateByPrimaryKey(shyLive); 199 int i = shyLiveMapper.updateByPrimaryKey(shyLive);
@@ -210,52 +211,50 @@ public class LiveServiceImpl { @@ -210,52 +211,50 @@ public class LiveServiceImpl {
210 * 根据条件导出数据excel 211 * 根据条件导出数据excel
211 * @return 212 * @return
212 */ 213 */
213 - public List<ShyLive> findByCondition(String activity_name, String start_date, String end_date,  
214 - String activity_id, Integer activity_status, Integer page, Integer pageSize,  
215 - Integer shenhe_state, String orderByClause, Integer spid, String userId) { 214 + public List<ShyLive> findByCondition(LiveDTO liveDTO) {
216 Example example = new Example(ShyLive.class); 215 Example example = new Example(ShyLive.class);
217 Example.Criteria criteria = example.createCriteria(); 216 Example.Criteria criteria = example.createCriteria();
218 - if (CommonUtils.isNotEmpty(orderByClause)) {  
219 - example.setOrderByClause(orderByClause); 217 + if (CommonUtils.isNotEmpty(liveDTO.getOrderByClause())) {
  218 + example.setOrderByClause(liveDTO.getOrderByClause());
220 }else{ 219 }else{
221 example.setOrderByClause("activity_start_time"); 220 example.setOrderByClause("activity_start_time");
222 } 221 }
223 - if (CommonUtils.isNotEmpty(start_date)) { 222 + if (CommonUtils.isNotEmpty(liveDTO.getsDate())) {
224 Timestamp startdate = null; 223 Timestamp startdate = null;
225 try { 224 try {
226 - startdate = CommonUtils.parseDate(start_date, "yyyy-MM-dd"); 225 + startdate = CommonUtils.parseDate(liveDTO.getsDate(), "yyyy-MM-dd");
227 } catch (ParseException e) { 226 } catch (ParseException e) {
228 e.printStackTrace(); 227 e.printStackTrace();
229 } 228 }
230 criteria.andGreaterThanOrEqualTo("activity_start_time", startdate); 229 criteria.andGreaterThanOrEqualTo("activity_start_time", startdate);
231 } 230 }
232 - if ( CommonUtils.isNotEmpty(end_date)) { 231 + if (CommonUtils.isNotEmpty(liveDTO.geteDate())) {
233 Timestamp enddate = null; 232 Timestamp enddate = null;
234 try { 233 try {
235 - enddate = CommonUtils.parseDate(end_date, "yyyy-MM-dd"); 234 + enddate = CommonUtils.parseDate(liveDTO.geteDate(), "yyyy-MM-dd");
236 } catch (ParseException e) { 235 } catch (ParseException e) {
237 e.printStackTrace(); 236 e.printStackTrace();
238 } 237 }
239 criteria.andLessThanOrEqualTo("activity_start_time", enddate); 238 criteria.andLessThanOrEqualTo("activity_start_time", enddate);
240 } 239 }
241 - if (CommonUtils.isNotEmpty(activity_name)) {  
242 - criteria.andLike("activity_name", "%" + activity_name + "%"); 240 + if (CommonUtils.isNotEmpty(liveDTO.getActivity_name())) {
  241 + criteria.andLike("activity_name", "%" + liveDTO.getActivity_name() + "%");
243 } 242 }
244 243
245 - if (CommonUtils.isNotEmpty(activity_id)) {  
246 - criteria.andEqualTo("activity_id", activity_id); 244 + if (CommonUtils.isNotEmpty(liveDTO.getActivity_id())) {
  245 + criteria.andEqualTo("activity_id", liveDTO.getActivity_id());
247 } 246 }
248 - if (CommonUtils.isNotNull(spid)) {  
249 - criteria.andEqualTo("sp_id", spid); 247 + if (CommonUtils.isNotNull(liveDTO.getSpid())) {
  248 + criteria.andEqualTo("sp_id", liveDTO.getSpid());
250 } 249 }
251 - if (CommonUtils.isNotNull(shenhe_state)) {  
252 - criteria.andEqualTo("shenhe_state", shenhe_state);  
253 - if (shenhe_state != CommonConst.RECEIVE_BEFORE) {  
254 - criteria.andEqualTo("auditor", userId); 250 + if (CommonUtils.isNotNull(liveDTO.getShenhe_state())) {
  251 + criteria.andEqualTo("shenhe_state", liveDTO.getShenhe_state());
  252 + if (!liveDTO.getShenhe_state().equals(CommonConst.RECEIVE_BEFORE)) {
  253 + criteria.andEqualTo("auditor", liveDTO.getUserId());
255 } 254 }
256 } 255 }
257 - if (CommonUtils.isNotNull(activity_status) ) {  
258 - criteria.andEqualTo("activity_status", activity_status); 256 + if (CommonUtils.isNotNull(liveDTO.getActivity_status()) ) {
  257 + criteria.andEqualTo("activity_status", liveDTO.getActivity_status());
259 } 258 }
260 criteria.andEqualTo("is_show", 1); 259 criteria.andEqualTo("is_show", 1);
261 List<ShyLive> shyLiveList = shyLiveMapper.selectByExample(example); 260 List<ShyLive> shyLiveList = shyLiveMapper.selectByExample(example);
src/main/java/com/cnlive/shenhe/serviceImpl/NotspeakServiceImpl.java
@@ -3,6 +3,7 @@ package com.cnlive.shenhe.serviceImpl; @@ -3,6 +3,7 @@ package com.cnlive.shenhe.serviceImpl;
3 import com.alibaba.fastjson.JSONArray; 3 import com.alibaba.fastjson.JSONArray;
4 import com.alibaba.fastjson.JSONObject; 4 import com.alibaba.fastjson.JSONObject;
5 import com.cnlive.shenhe.bean.ResponseBean; 5 import com.cnlive.shenhe.bean.ResponseBean;
  6 +import com.cnlive.shenhe.dto.NotSpeakDTO;
6 import com.cnlive.shenhe.entity.ShyComments; 7 import com.cnlive.shenhe.entity.ShyComments;
7 import com.cnlive.shenhe.entity.ShyContent; 8 import com.cnlive.shenhe.entity.ShyContent;
8 import com.cnlive.shenhe.entity.ShyLive; 9 import com.cnlive.shenhe.entity.ShyLive;
@@ -162,7 +163,7 @@ public class NotspeakServiceImpl { @@ -162,7 +163,7 @@ public class NotspeakServiceImpl {
162 List<ShyNotspeak> shyNotspeakList = findshyNotspeak(shyNotspeak); 163 List<ShyNotspeak> shyNotspeakList = findshyNotspeak(shyNotspeak);
163 if(shyNotspeakList.size()>0){ 164 if(shyNotspeakList.size()>0){
164 shyNotspeak =shyNotspeakList.get(0); 165 shyNotspeak =shyNotspeakList.get(0);
165 - return new ResponseBean(500,"当前用户已被禁言,禁言剩余时长:"+(shyNotspeak.getEnd_time().getTime()-new Date().getTime())/(1000*60)+"分钟,解禁时间:"+CommonUtils.formatDate(shyNotspeak.getEnd_time(), "yyyy-MM-dd HH:mm:ss")); 166 + return new ResponseBean(500,"当前用户已被禁言,禁言剩余时长:"+(shyNotspeak.getEnd_time().getTime()-System.currentTimeMillis())/(1000*60)+"分钟,解禁时间:"+CommonUtils.formatDate(shyNotspeak.getEnd_time(), "yyyy-MM-dd HH:mm:ss"));
166 } 167 }
167 return new ResponseBean(); 168 return new ResponseBean();
168 } 169 }
@@ -195,7 +196,7 @@ public class NotspeakServiceImpl { @@ -195,7 +196,7 @@ public class NotspeakServiceImpl {
195 } 196 }
196 String msg=CommonUtils.getCurrentDate("yyyy-MM-dd HH:mm:ss")+"解除禁言"; 197 String msg=CommonUtils.getCurrentDate("yyyy-MM-dd HH:mm:ss")+"解除禁言";
197 shyNotspeak.setState(type); 198 shyNotspeak.setState(type);
198 - if(type==CommonConst.SPEAK_NOT){ 199 + if(type.equals(CommonConst.SPEAK_NOT)){
199 shyNotspeak.setStart_time(CommonUtils.getCurrentTime()); 200 shyNotspeak.setStart_time(CommonUtils.getCurrentTime());
200 shyNotspeak.setTime(time); 201 shyNotspeak.setTime(time);
201 shyNotspeak.setEnd_time(CommonUtils.getAddTime(time)); 202 shyNotspeak.setEnd_time(CommonUtils.getAddTime(time));
@@ -266,26 +267,25 @@ public class NotspeakServiceImpl { @@ -266,26 +267,25 @@ public class NotspeakServiceImpl {
266 return result; 267 return result;
267 } 268 }
268 269
269 - public PageInfo<ShyNotspeak> getPage( String user_name, Integer user_id,Integer state,  
270 - Integer page, Integer pageSize, String orderByClause) { 270 + public PageInfo<ShyNotspeak> getPage(NotSpeakDTO notSpeakDTO) {
271 Example example = new Example(ShyNotspeak.class); 271 Example example = new Example(ShyNotspeak.class);
272 Example.Criteria criteria = example.createCriteria(); 272 Example.Criteria criteria = example.createCriteria();
273 - if (CommonUtils.isNotEmpty(orderByClause)) {  
274 - example.setOrderByClause(orderByClause); 273 + if (CommonUtils.isNotEmpty(notSpeakDTO.getOrderByClause())) {
  274 + example.setOrderByClause(notSpeakDTO.getOrderByClause());
275 } else { 275 } else {
276 example.setOrderByClause("state desc , updated_at desc"); 276 example.setOrderByClause("state desc , updated_at desc");
277 } 277 }
278 - if (CommonUtils.isNotEmpty(user_name)) {  
279 - criteria.andLike("user_name", "%" + user_name + "%"); 278 + if (CommonUtils.isNotEmpty(notSpeakDTO.getUser_name())) {
  279 + criteria.andLike("user_name", "%" + notSpeakDTO.getUser_name() + "%");
280 } 280 }
281 - if (CommonUtils.isNotNull(user_id)) {  
282 - criteria.andEqualTo("user_id", user_id); 281 + if (CommonUtils.isNotNull(notSpeakDTO.getUser_id())) {
  282 + criteria.andEqualTo("user_id", notSpeakDTO.getUser_id());
283 } 283 }
284 - if (CommonUtils.isNotNull(state)) {  
285 - criteria.andEqualTo("state", state); 284 + if (CommonUtils.isNotNull(notSpeakDTO.getState())) {
  285 + criteria.andEqualTo("state", notSpeakDTO.getState());
286 } 286 }
287 287
288 - PageHelper.startPage(page, pageSize, true); 288 + PageHelper.startPage(notSpeakDTO.getPage(), notSpeakDTO.getPageSize(), true);
289 List<ShyNotspeak> shyNotspeakList = shyNotspeakMapper.selectByExample(example); 289 List<ShyNotspeak> shyNotspeakList = shyNotspeakMapper.selectByExample(example);
290 PageInfo<ShyNotspeak> pageInfo = new PageInfo<>(shyNotspeakList); 290 PageInfo<ShyNotspeak> pageInfo = new PageInfo<>(shyNotspeakList);
291 return pageInfo; 291 return pageInfo;
src/main/java/com/cnlive/shenhe/serviceImpl/SitesServiceImpl.java
1 package com.cnlive.shenhe.serviceImpl; 1 package com.cnlive.shenhe.serviceImpl;
2 2
  3 +import com.cnlive.shenhe.dto.SitesDTO;
3 import com.cnlive.shenhe.entity.ShySites; 4 import com.cnlive.shenhe.entity.ShySites;
4 import com.cnlive.shenhe.entity.ShyUsers; 5 import com.cnlive.shenhe.entity.ShyUsers;
5 import com.cnlive.shenhe.mapper.ShySitesMapper; 6 import com.cnlive.shenhe.mapper.ShySitesMapper;
@@ -27,22 +28,23 @@ public class SitesServiceImpl { @@ -27,22 +28,23 @@ public class SitesServiceImpl {
27 @Autowired 28 @Autowired
28 UsersServiceImpl usersService; 29 UsersServiceImpl usersService;
29 30
30 - public PageInfo<ShySites> getPage(Integer page, Integer pageSize, String orderByClause, String key, Integer spId) { 31 + public PageInfo<ShySites> getPage(SitesDTO sitesDTO) {
31 Example example = new Example(ShySites.class); 32 Example example = new Example(ShySites.class);
32 Example.Criteria criteria = example.createCriteria(); 33 Example.Criteria criteria = example.createCriteria();
33 Example.Criteria criteria2 = example.createCriteria(); 34 Example.Criteria criteria2 = example.createCriteria();
34 - if (CommonUtils.isNotEmpty(orderByClause)) {  
35 - example.setOrderByClause(orderByClause); 35 + if (CommonUtils.isNotEmpty(sitesDTO.getOrderByClause())) {
  36 + example.setOrderByClause(sitesDTO.getOrderByClause());
36 } 37 }
37 - if (CommonUtils.isNotEmpty(key)) {  
38 - criteria.andLike("name", "%" + key + "%");  
39 - criteria2.andLike("spid", "%" + key + "%"); 38 + if (CommonUtils.isNotEmpty(sitesDTO.getKeyword())) {
  39 + criteria.andLike("name", "%" + sitesDTO.getKeyword() + "%");
  40 + criteria2.andLike("spid", "%" + sitesDTO.getKeyword() + "%");
40 example.or(criteria2); 41 example.or(criteria2);
41 } 42 }
42 - if (CommonUtils.isNotNull(spId))  
43 - criteria.andEqualTo("spid", spId);  
44 - criteria2.andEqualTo("spid", spId);  
45 - PageHelper.startPage(page, pageSize, true); 43 + if (CommonUtils.isNotNull(sitesDTO.getSpId())) {
  44 + criteria.andEqualTo("spid", sitesDTO.getSpId());
  45 + criteria2.andEqualTo("spid", sitesDTO.getSpId());
  46 + }
  47 + PageHelper.startPage(sitesDTO.getPage(), sitesDTO.getPageSize(), true);
46 List<ShySites> shySitesList = shySitesMapper.selectByExample(example); 48 List<ShySites> shySitesList = shySitesMapper.selectByExample(example);
47 PageInfo<ShySites> pageInfo = new PageInfo<ShySites>(shySitesList); 49 PageInfo<ShySites> pageInfo = new PageInfo<ShySites>(shySitesList);
48 return pageInfo; 50 return pageInfo;
@@ -65,8 +67,9 @@ public class SitesServiceImpl { @@ -65,8 +67,9 @@ public class SitesServiceImpl {
65 public ShySites findspidDescByspid(int spId) { 67 public ShySites findspidDescByspid(int spId) {
66 Example example = new Example(ShySites.class); 68 Example example = new Example(ShySites.class);
67 Example.Criteria criteria = example.createCriteria(); 69 Example.Criteria criteria = example.createCriteria();
68 - if (CommonUtils.isNotNull(spId)) 70 + if (CommonUtils.isNotNull(spId)) {
69 criteria.andEqualTo("spid", spId); 71 criteria.andEqualTo("spid", spId);
  72 + }
70 List<ShySites> shySites = shySitesMapper.selectByExample(example); 73 List<ShySites> shySites = shySitesMapper.selectByExample(example);
71 if(CommonUtils.isNotNull(shySites)&&shySites.size()>0){ 74 if(CommonUtils.isNotNull(shySites)&&shySites.size()>0){
72 return shySites.get(0); 75 return shySites.get(0);
@@ -77,8 +80,9 @@ public class SitesServiceImpl { @@ -77,8 +80,9 @@ public class SitesServiceImpl {
77 public ShySites findspidBySpdesc(String sp_desc) { 80 public ShySites findspidBySpdesc(String sp_desc) {
78 Example example = new Example(ShySites.class); 81 Example example = new Example(ShySites.class);
79 Example.Criteria criteria = example.createCriteria(); 82 Example.Criteria criteria = example.createCriteria();
80 - if (CommonUtils.isNotEmpty(sp_desc)) 83 + if (CommonUtils.isNotEmpty(sp_desc)) {
81 criteria.andEqualTo("name", sp_desc); 84 criteria.andEqualTo("name", sp_desc);
  85 + }
82 List<ShySites> shySites = shySitesMapper.selectByExample(example); 86 List<ShySites> shySites = shySitesMapper.selectByExample(example);
83 if(CommonUtils.isNotNull(shySites)&&shySites.size()>0){ 87 if(CommonUtils.isNotNull(shySites)&&shySites.size()>0){
84 return shySites.get(0); 88 return shySites.get(0);
src/main/java/com/cnlive/shenhe/serviceImpl/TopicServiceImpl.java
@@ -2,6 +2,7 @@ package com.cnlive.shenhe.serviceImpl; @@ -2,6 +2,7 @@ package com.cnlive.shenhe.serviceImpl;
2 2
3 import com.alibaba.fastjson.JSONArray; 3 import com.alibaba.fastjson.JSONArray;
4 import com.alibaba.fastjson.JSONObject; 4 import com.alibaba.fastjson.JSONObject;
  5 +import com.cnlive.shenhe.dto.TopicDTO;
5 import com.cnlive.shenhe.entity.ShyComments; 6 import com.cnlive.shenhe.entity.ShyComments;
6 import com.cnlive.shenhe.entity.ShyContent; 7 import com.cnlive.shenhe.entity.ShyContent;
7 import com.cnlive.shenhe.entity.ShyLive; 8 import com.cnlive.shenhe.entity.ShyLive;
@@ -107,48 +108,48 @@ public class TopicServiceImpl { @@ -107,48 +108,48 @@ public class TopicServiceImpl {
107 return shyCommentsMapper.updateByPrimaryKeySelective(shyComments); 108 return shyCommentsMapper.updateByPrimaryKeySelective(shyComments);
108 } 109 }
109 110
110 - public PageInfo<ShyTopic> getPage( String title,String topic_tag,String topicId, Date start_date, Date end_date, Integer shenhe_status, String updater, Integer page, Integer pageSize, String orderByClause, Integer spid, String userId,Integer receive) { 111 + public PageInfo<ShyTopic> getPage(TopicDTO topicDTO) {
111 Example example = new Example(ShyTopic.class); 112 Example example = new Example(ShyTopic.class);
112 Example.Criteria criteria = example.createCriteria(); 113 Example.Criteria criteria = example.createCriteria();
113 - if (CommonUtils.isNotEmpty(orderByClause)) {  
114 - example.setOrderByClause(orderByClause); 114 + if (CommonUtils.isNotEmpty(topicDTO.getOrderByClause())) {
  115 + example.setOrderByClause(topicDTO.getOrderByClause());
115 } else { 116 } else {
116 example.setOrderByClause("create_date desc"); 117 example.setOrderByClause("create_date desc");
117 } 118 }
118 - if (CommonUtils.isNotNull(start_date) ) {  
119 - criteria.andGreaterThanOrEqualTo("create_date", start_date); 119 + if (CommonUtils.isNotNull(topicDTO.getsDate()) ) {
  120 + criteria.andGreaterThanOrEqualTo("create_date", topicDTO.getsDate());
120 } 121 }
121 - if ( CommonUtils.isNotNull(end_date)) {  
122 - criteria.andLessThanOrEqualTo("create_date", end_date); 122 + if ( CommonUtils.isNotNull(topicDTO.geteDate())) {
  123 + criteria.andLessThanOrEqualTo("create_date", topicDTO.geteDate());
123 } 124 }
124 - if (CommonUtils.isNotEmpty(title)) {  
125 - criteria.andLike("title", "%" + title + "%"); 125 + if (CommonUtils.isNotEmpty(topicDTO.getTopic_name())) {
  126 + criteria.andLike("title", "%" + topicDTO.getTopic_name() + "%");
126 } 127 }
127 - if (CommonUtils.isNotEmpty(updater)) {  
128 - criteria.andEqualTo("updater", updater); 128 + if (CommonUtils.isNotEmpty(topicDTO.getUpdater())) {
  129 + criteria.andEqualTo("updater", topicDTO.getUpdater());
129 } 130 }
130 - if (CommonUtils.isNotEmpty(topic_tag)) {  
131 - criteria.andEqualTo("topic_tag", topic_tag); 131 + if (CommonUtils.isNotEmpty(topicDTO.getTopic_tag())) {
  132 + criteria.andEqualTo("topic_tag", topicDTO.getTopic_tag());
132 } 133 }
133 - if (CommonUtils.isNotNull(spid)) {  
134 - criteria.andEqualTo("sp_id", spid); 134 + if (CommonUtils.isNotNull(topicDTO.getSpid())) {
  135 + criteria.andEqualTo("sp_id", topicDTO.getSpid());
135 } 136 }
136 - if (CommonUtils.isNotEmpty(topicId)) {  
137 - criteria.andEqualTo("topic_id", topicId); 137 + if (CommonUtils.isNotEmpty(topicDTO.getTopic_id())) {
  138 + criteria.andEqualTo("topic_id", topicDTO.getTopic_id());
138 } 139 }
139 - if (CommonUtils.isNotNull(receive)&&receive==CommonConst.RECEIVE_AFTER) {  
140 - criteria.andEqualTo("auditor_id", userId); 140 + if (CommonUtils.isNotNull(topicDTO.getReceive())&& topicDTO.getReceive().equals(CommonConst.RECEIVE_AFTER)) {
  141 + criteria.andEqualTo("auditor_id", topicDTO.getUserId());
141 } 142 }
142 - if (CommonUtils.isNotNull(shenhe_status) && shenhe_status != 3) {//不是 我的已审 进来的,只查一种状态  
143 - criteria.andEqualTo("shenhe_status", shenhe_status);  
144 - } else if (CommonUtils.isNotNull(shenhe_status) && shenhe_status == 3) {//是 我的已审,查通过和拒绝的两种状态 143 + if (CommonUtils.isNotNull(topicDTO.getShenhe_status()) && topicDTO.getShenhe_status() != 3) {//不是 我的已审 进来的,只查一种状态
  144 + criteria.andEqualTo("shenhe_status", topicDTO.getShenhe_status());
  145 + } else if (CommonUtils.isNotNull(topicDTO.getShenhe_status()) && topicDTO.getShenhe_status() == 3) {//是 我的已审,查通过和拒绝的两种状态
145 Example.Criteria criteria1 = example.createCriteria(); 146 Example.Criteria criteria1 = example.createCriteria();
146 criteria1.orEqualTo("shenhe_status", 1); 147 criteria1.orEqualTo("shenhe_status", 1);
147 criteria1.orEqualTo("shenhe_status", 2); 148 criteria1.orEqualTo("shenhe_status", 2);
148 example.and(criteria1); 149 example.and(criteria1);
149 } 150 }
150 151
151 - PageHelper.startPage(page, pageSize, true); 152 + PageHelper.startPage(topicDTO.getPage(), topicDTO.getPageSize(), true);
152 List<ShyTopic> topicList = shyTopicMapper.selectByExample(example); 153 List<ShyTopic> topicList = shyTopicMapper.selectByExample(example);
153 PageInfo<ShyTopic> pageInfo = new PageInfo<>(topicList); 154 PageInfo<ShyTopic> pageInfo = new PageInfo<>(topicList);
154 return pageInfo; 155 return pageInfo;
src/main/java/com/cnlive/shenhe/serviceImpl/UsersServiceImpl.java
1 package com.cnlive.shenhe.serviceImpl; 1 package com.cnlive.shenhe.serviceImpl;
2 2
  3 +import com.cnlive.shenhe.dto.UsersDTO;
3 import com.cnlive.shenhe.entity.ShySites; 4 import com.cnlive.shenhe.entity.ShySites;
4 import com.cnlive.shenhe.entity.ShyUsers; 5 import com.cnlive.shenhe.entity.ShyUsers;
5 import com.cnlive.shenhe.mapper.ShyUsersMapper; 6 import com.cnlive.shenhe.mapper.ShyUsersMapper;
@@ -23,28 +24,27 @@ public class UsersServiceImpl { @@ -23,28 +24,27 @@ public class UsersServiceImpl {
23 @Autowired 24 @Autowired
24 ShyUsersMapper shyUsersMapper; 25 ShyUsersMapper shyUsersMapper;
25 26
26 - public PageInfo<ShyUsers> getPage(Integer page, Integer pageSize, String orderByClause,  
27 - String username,String mobile,Integer sp_id,String company_brief) { 27 + public PageInfo<ShyUsers> getPage(UsersDTO usersDTO) {
28 Example example = new Example(ShyUsers.class); 28 Example example = new Example(ShyUsers.class);
29 Example.Criteria criteria = example.createCriteria(); 29 Example.Criteria criteria = example.createCriteria();
30 - if (CommonUtils.isNotEmpty(orderByClause)) {  
31 - example.setOrderByClause(orderByClause); 30 + if (CommonUtils.isNotEmpty(usersDTO.getOrderByClause())) {
  31 + example.setOrderByClause(usersDTO.getOrderByClause());
32 }else{ 32 }else{
33 example.setOrderByClause("created_at desc"); 33 example.setOrderByClause("created_at desc");
34 } 34 }
35 - if (CommonUtils.isNotEmpty(username)) {  
36 - criteria.andLike("username", "%" + username + "%"); 35 + if (CommonUtils.isNotEmpty(usersDTO.getUsername())) {
  36 + criteria.andLike("username", "%" + usersDTO.getUsername() + "%");
37 } 37 }
38 - if(CommonUtils.isNotEmpty(mobile)){  
39 - criteria.andLike("mobile", "%" + mobile + "%" ); 38 + if(CommonUtils.isNotEmpty(usersDTO.getMobile())){
  39 + criteria.andLike("mobile", "%" + usersDTO.getMobile() + "%" );
40 } 40 }
41 - if(CommonUtils.isNotEmpty(company_brief)){  
42 - criteria.andLike("company_brief", "%" + company_brief + "%" ); 41 + if(CommonUtils.isNotEmpty(usersDTO.getCompany_brief())){
  42 + criteria.andLike("company_brief", "%" + usersDTO.getCompany_brief() + "%" );
43 } 43 }
44 - if(CommonUtils.isNotNull(sp_id)){  
45 - criteria.andEqualTo("sp_id", sp_id ); 44 + if(CommonUtils.isNotNull(usersDTO.getSp_id())){
  45 + criteria.andEqualTo("sp_id", usersDTO.getSp_id() );
46 } 46 }
47 - PageHelper.startPage(page, pageSize, true); 47 + PageHelper.startPage(usersDTO.getPage(), usersDTO.getPageSize(), true);
48 List<ShyUsers> ShyUsersList = shyUsersMapper.selectByExample(example); 48 List<ShyUsers> ShyUsersList = shyUsersMapper.selectByExample(example);
49 PageInfo<ShyUsers> pageInfo = new PageInfo<ShyUsers>(ShyUsersList); 49 PageInfo<ShyUsers> pageInfo = new PageInfo<ShyUsers>(ShyUsersList);
50 return pageInfo; 50 return pageInfo;
src/main/java/com/cnlive/shenhe/serviceImpl/UsersfreeServiceImpl.java
1 package com.cnlive.shenhe.serviceImpl; 1 package com.cnlive.shenhe.serviceImpl;
2 2
3 import com.alibaba.fastjson.JSONObject; 3 import com.alibaba.fastjson.JSONObject;
  4 +import com.cnlive.shenhe.dto.UsersFreeDTO;
4 import com.cnlive.shenhe.entity.ShyUsers; 5 import com.cnlive.shenhe.entity.ShyUsers;
5 import com.cnlive.shenhe.entity.ShyUsersfree; 6 import com.cnlive.shenhe.entity.ShyUsersfree;
6 import com.cnlive.shenhe.mapper.ShyUsersfreeMapper; 7 import com.cnlive.shenhe.mapper.ShyUsersfreeMapper;
@@ -46,22 +47,21 @@ public class UsersfreeServiceImpl { @@ -46,22 +47,21 @@ public class UsersfreeServiceImpl {
46 return shyUsersfreeMapper.updateByPrimaryKeySelective(shyUsersfree); 47 return shyUsersfreeMapper.updateByPrimaryKeySelective(shyUsersfree);
47 } 48 }
48 49
49 - public PageInfo<ShyUsersfree> getpage(Integer page, Integer pageSize, String orderByClause,  
50 - String userId,String mobile) { 50 + public PageInfo<ShyUsersfree> getpage(UsersFreeDTO usersFreeDTO) {
51 Example example = new Example(ShyUsers.class); 51 Example example = new Example(ShyUsers.class);
52 Example.Criteria criteria = example.createCriteria(); 52 Example.Criteria criteria = example.createCriteria();
53 - if (CommonUtils.isNotEmpty(orderByClause)) {  
54 - example.setOrderByClause(orderByClause); 53 + if (CommonUtils.isNotEmpty(usersFreeDTO.getOrderByClause())) {
  54 + example.setOrderByClause(usersFreeDTO.getOrderByClause());
55 }else{ 55 }else{
56 example.setOrderByClause("created_at desc"); 56 example.setOrderByClause("created_at desc");
57 } 57 }
58 - if (CommonUtils.isNotEmpty(userId)) {  
59 - criteria.andEqualTo("user_id", userId ); 58 + if (CommonUtils.isNotEmpty(usersFreeDTO.getUserId())) {
  59 + criteria.andEqualTo("user_id", usersFreeDTO.getUserId() );
60 } 60 }
61 - if(CommonUtils.isNotEmpty(mobile)){  
62 - criteria.andLike("mobile", "%" + mobile + "%" ); 61 + if(CommonUtils.isNotEmpty(usersFreeDTO.getMobile())){
  62 + criteria.andLike("mobile", "%" + usersFreeDTO.getMobile() + "%" );
63 } 63 }
64 - PageHelper.startPage(page, pageSize, true); 64 + PageHelper.startPage(usersFreeDTO.getPage(), usersFreeDTO.getPageSize(), true);
65 List<ShyUsersfree> ShyUsersList = shyUsersfreeMapper.selectByExample(example); 65 List<ShyUsersfree> ShyUsersList = shyUsersfreeMapper.selectByExample(example);
66 PageInfo<ShyUsersfree> pageInfo = new PageInfo<ShyUsersfree>(ShyUsersList); 66 PageInfo<ShyUsersfree> pageInfo = new PageInfo<ShyUsersfree>(ShyUsersList);
67 return pageInfo; 67 return pageInfo;
src/main/java/com/cnlive/shenhe/serviceImpl/VideosServiceImpl.java
@@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSONArray; @@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSONArray;
4 import com.alibaba.fastjson.JSONObject; 4 import com.alibaba.fastjson.JSONObject;
5 import com.cnlive.shenhe.bean.ErrorEnum; 5 import com.cnlive.shenhe.bean.ErrorEnum;
6 import com.cnlive.shenhe.bean.ResponseBean; 6 import com.cnlive.shenhe.bean.ResponseBean;
  7 +import com.cnlive.shenhe.dto.VideosDTO;
7 import com.cnlive.shenhe.entity.ShyUsers; 8 import com.cnlive.shenhe.entity.ShyUsers;
8 import com.cnlive.shenhe.entity.ShyUsersfree; 9 import com.cnlive.shenhe.entity.ShyUsersfree;
9 import com.cnlive.shenhe.entity.ShyVideos; 10 import com.cnlive.shenhe.entity.ShyVideos;
@@ -110,96 +111,93 @@ public class VideosServiceImpl { @@ -110,96 +111,93 @@ public class VideosServiceImpl {
110 return shyVideosMapper.updateByPrimaryKey(shyVideos); 111 return shyVideosMapper.updateByPrimaryKey(shyVideos);
111 } 112 }
112 113
113 - public PageInfo<ShyVideos> getListContent(String video_title, String start_date, String end_date, Integer state, Integer receive, Integer page,  
114 - Integer pageSize, String video_priority, String orderByClause, Integer spid, String userId, String sp_Id,  
115 - String source, String video_user_id, String shen_auditor_id, String video_id) { 114 + public PageInfo<ShyVideos> getListContent(VideosDTO videosDTO) {
116 Example example = new Example(ShyVideos.class); 115 Example example = new Example(ShyVideos.class);
117 Example.Criteria criteria = example.createCriteria(); 116 Example.Criteria criteria = example.createCriteria();
118 Example.Criteria criteria2 = example.createCriteria(); 117 Example.Criteria criteria2 = example.createCriteria();
119 - if (CommonUtils.isNotEmpty(orderByClause)) {  
120 - example.setOrderByClause(orderByClause); 118 + if (CommonUtils.isNotEmpty(videosDTO.getOrderByClause())) {
  119 + example.setOrderByClause(videosDTO.getOrderByClause());
121 } 120 }
122 - if (CommonUtils.isNotEmpty(start_date) && CommonUtils.isNotEmpty(end_date)) {  
123 - Timestamp startdate = null;  
124 - Timestamp enddate = null; 121 + if (CommonUtils.isNotEmpty(videosDTO.getsDate()) && CommonUtils.isNotEmpty(videosDTO.geteDate())) {
  122 +
125 try { 123 try {
126 - startdate = CommonUtils.parseDate(start_date, "yyyy-MM-dd");  
127 - enddate = CommonUtils.parseDate(end_date, "yyyy-MM-dd"); 124 + videosDTO.setsDate(String.valueOf(CommonUtils.parseDate(videosDTO.getsDate(), "yyyy-MM-dd")));
  125 + videosDTO.seteDate(String.valueOf(CommonUtils.parseDate(videosDTO.geteDate(), "yyyy-MM-dd")));
128 } catch (ParseException e) { 126 } catch (ParseException e) {
129 e.printStackTrace(); 127 e.printStackTrace();
130 } 128 }
131 - criteria.andGreaterThanOrEqualTo("created_at", startdate);  
132 - criteria2.andGreaterThanOrEqualTo("created_at", startdate);  
133 - criteria.andLessThanOrEqualTo("created_at", enddate);  
134 - criteria2.andLessThanOrEqualTo("created_at", enddate); 129 + criteria.andGreaterThanOrEqualTo("created_at", videosDTO.getsDate());
  130 + criteria2.andGreaterThanOrEqualTo("created_at", videosDTO.getsDate());
  131 + criteria.andLessThanOrEqualTo("created_at", videosDTO.geteDate());
  132 + criteria2.andLessThanOrEqualTo("created_at", videosDTO.geteDate());
135 } 133 }
136 - if (CommonUtils.isNotEmpty(video_title)) {  
137 - criteria.andLike("video_title", "%" + video_title + "%");  
138 - criteria2.andLike("video_title", "%" + video_title + "%"); 134 + if (CommonUtils.isNotEmpty(videosDTO.getVideo_title())) {
  135 + criteria.andLike("video_title", "%" + videosDTO.getVideo_title() + "%");
  136 + criteria2.andLike("video_title", "%" + videosDTO.getVideo_title() + "%");
139 } 137 }
140 138
141 - if (CommonUtils.isNotEmpty(video_priority)) {  
142 - criteria.andEqualTo("video_priority", video_priority);  
143 - criteria2.andEqualTo("video_priority", video_priority); 139 + if (CommonUtils.isNotEmpty(videosDTO.getVideo_priority())) {
  140 + criteria.andEqualTo("video_priority", videosDTO.getVideo_priority());
  141 + criteria2.andEqualTo("video_priority", videosDTO.getVideo_priority());
144 } 142 }
145 143
146 - if (CommonUtils.isNotEmpty(video_id)) {  
147 - criteria.andEqualTo("video_id", video_id);  
148 - criteria2.andEqualTo("video_id", video_id); 144 + if (CommonUtils.isNotEmpty(videosDTO.getVideo_id())) {
  145 + criteria.andEqualTo("video_id", videosDTO.getVideo_id());
  146 + criteria2.andEqualTo("video_id", videosDTO.getVideo_id());
149 } 147 }
150 148
151 - if (CommonUtils.isNotEmpty(shen_auditor_id)) {  
152 - if ("白名单".equals(shen_auditor_id) || "自动审核".equals(shen_auditor_id)) {  
153 - criteria.andEqualTo("updater", shen_auditor_id);  
154 - criteria2.andEqualTo("updater", shen_auditor_id); 149 + if (CommonUtils.isNotEmpty(videosDTO.getShen_auditor_id())) {
  150 + if ("白名单".equals(videosDTO.getShen_auditor_id()) || "自动审核".equals(videosDTO.getShen_auditor_id())) {
  151 + criteria.andEqualTo("updater", videosDTO.getShen_auditor_id());
  152 + criteria2.andEqualTo("updater", videosDTO.getShen_auditor_id());
155 } else { 153 } else {
156 - criteria.andEqualTo("auditor_id", shen_auditor_id);  
157 - criteria2.andEqualTo("auditor_id", shen_auditor_id); 154 + criteria.andEqualTo("auditor_id", videosDTO.getShen_auditor_id());
  155 + criteria2.andEqualTo("auditor_id", videosDTO.getShen_auditor_id());
158 } 156 }
159 } 157 }
160 158
161 - if (CommonUtils.isNotEmpty(source) && !"22".equals(source) && !"102".equals(source)) {  
162 - criteria.andEqualTo("source", source);  
163 - criteria2.andEqualTo("source", source);  
164 - } else if (CommonUtils.isNotEmpty(source) && "22".equals(source)) { 159 + if (CommonUtils.isNotEmpty(videosDTO.getSource()) && !"22".equals(videosDTO.getSource()) && !"102".equals(videosDTO.getSource())) {
  160 + criteria.andEqualTo("source", videosDTO.getSource());
  161 + criteria2.andEqualTo("source", videosDTO.getSource());
  162 + } else if (CommonUtils.isNotEmpty(videosDTO.getSource()) && "22".equals(videosDTO.getSource())) {
165 criteria.andEqualTo("category", "moment"); 163 criteria.andEqualTo("category", "moment");
166 criteria2.andEqualTo("category", "moment"); 164 criteria2.andEqualTo("category", "moment");
167 - } else if (CommonUtils.isNotEmpty(source) && "102".equals(source)) {  
168 - criteria.andEqualTo("source", "102".equals(source) ? "0" : source);  
169 - criteria2.andEqualTo("source", "102".equals(source) ? "0" : source); 165 + } else if (CommonUtils.isNotEmpty(videosDTO.getSource()) && "102".equals(videosDTO.getSource())) {
  166 + criteria.andEqualTo("source", "102".equals(videosDTO.getSource()) ? "0" : videosDTO.getSource());
  167 + criteria2.andEqualTo("source", "102".equals(videosDTO.getSource()) ? "0" : videosDTO.getSource());
170 } 168 }
171 169
172 - if (CommonUtils.isNotEmpty(video_user_id)) {  
173 - criteria.andEqualTo("video_user_id", video_user_id);  
174 - criteria2.andEqualTo("video_user_id", video_user_id); 170 + if (CommonUtils.isNotEmpty(videosDTO.getVideo_user_id())) {
  171 + criteria.andEqualTo("video_user_id", videosDTO.getVideo_user_id());
  172 + criteria2.andEqualTo("video_user_id", videosDTO.getVideo_user_id());
175 } 173 }
176 174
177 - if (CommonUtils.isNotNull(spid)) {  
178 - criteria.andEqualTo("spid", spid);  
179 - criteria2.andEqualTo("spid", spid);  
180 - } else if (CommonUtils.isNotEmpty(sp_Id)) {  
181 - criteria.andEqualTo("spid", sp_Id);  
182 - criteria2.andEqualTo("spid", sp_Id); 175 + if (CommonUtils.isNotNull(videosDTO.getSpid())) {
  176 + criteria.andEqualTo("spid", videosDTO.getSpid());
  177 + criteria2.andEqualTo("spid", videosDTO.getSpid());
  178 + } else if (CommonUtils.isNotEmpty(videosDTO.getSp_Id())) {
  179 + criteria.andEqualTo("spid", videosDTO.getSp_Id());
  180 + criteria2.andEqualTo("spid", videosDTO.getSp_Id());
183 } 181 }
184 182
185 - if (CommonUtils.isNotNull(receive)) {  
186 - criteria.andEqualTo("receive", receive);  
187 - criteria2.andEqualTo("receive", receive);  
188 - if (receive == CommonConst.RECEIVE_AFTER) {  
189 - criteria.andEqualTo("receive_user_id", userId);  
190 - criteria2.andEqualTo("receive_user_id", userId); 183 + if (CommonUtils.isNotNull(videosDTO.getReceive())) {
  184 + criteria.andEqualTo("receive", videosDTO.getReceive());
  185 + criteria2.andEqualTo("receive", videosDTO.getReceive());
  186 + if (videosDTO.getReceive().equals(CommonConst.RECEIVE_AFTER)) {
  187 + criteria.andEqualTo("receive_user_id", videosDTO.getUserId());
  188 + criteria2.andEqualTo("receive_user_id", videosDTO.getUserId());
191 } 189 }
192 } 190 }
193 - if (CommonUtils.isNotNull(state) && state != 3) {  
194 - criteria.andEqualTo("state", state);  
195 - } else if (CommonUtils.isNotNull(state) && state == 3) { 191 + if (CommonUtils.isNotNull(videosDTO.getState()) && videosDTO.getState() != 3) {
  192 + criteria.andEqualTo("state", videosDTO.getState());
  193 + } else if (CommonUtils.isNotNull(videosDTO.getState()) && videosDTO.getState() == 3) {
196 criteria.andEqualTo("state", 1); 194 criteria.andEqualTo("state", 1);
197 criteria2.andEqualTo("state", 2); 195 criteria2.andEqualTo("state", 2);
198 example.or(criteria2); 196 example.or(criteria2);
199 } 197 }
200 //默认按上传时间倒序排序 198 //默认按上传时间倒序排序
201 example.setOrderByClause("created_at desc"); 199 example.setOrderByClause("created_at desc");
202 - PageHelper.startPage(page, pageSize, true); 200 + PageHelper.startPage(videosDTO.getPage(), videosDTO.getPageSize(), true);
203 List<ShyVideos> shyVideosList = shyVideosMapper.selectByExample(example); 201 List<ShyVideos> shyVideosList = shyVideosMapper.selectByExample(example);
204 PageInfo<ShyVideos> pageInfo = new PageInfo<>(shyVideosList); 202 PageInfo<ShyVideos> pageInfo = new PageInfo<>(shyVideosList);
205 return pageInfo; 203 return pageInfo;
@@ -207,7 +205,7 @@ public class VideosServiceImpl { @@ -207,7 +205,7 @@ public class VideosServiceImpl {
207 205
208 public ShyVideos getDetailsContent(Integer id) { 206 public ShyVideos getDetailsContent(Integer id) {
209 ShyVideos shyVideos = shyVideosMapper.selectByPrimaryKey(id); 207 ShyVideos shyVideos = shyVideosMapper.selectByPrimaryKey(id);
210 - if (shyVideos.getState() != CommonConst.AUDIT_INTT) { 208 + if (!shyVideos.getState().equals(CommonConst.AUDIT_INTT)) {
211 String updater = CommonUtils.isEmpty(shyVideos.getUpdater()) || "null".equals(shyVideos.getUpdater()) ? "白名单" : shyVideos.getUpdater(); 209 String updater = CommonUtils.isEmpty(shyVideos.getUpdater()) || "null".equals(shyVideos.getUpdater()) ? "白名单" : shyVideos.getUpdater();
212 String auditor_id = shyVideos.getAuditor_id(); 210 String auditor_id = shyVideos.getAuditor_id();
213 if (CommonUtils.isNotEmpty(auditor_id)) { 211 if (CommonUtils.isNotEmpty(auditor_id)) {
@@ -241,7 +239,9 @@ public class VideosServiceImpl { @@ -241,7 +239,9 @@ public class VideosServiceImpl {
241 example.setOrderByClause("created_at desc"); 239 example.setOrderByClause("created_at desc");
242 example.and().andEqualTo("state", CommonConst.AUDIT_INTT); 240 example.and().andEqualTo("state", CommonConst.AUDIT_INTT);
243 example.and().andEqualTo("receive", CommonConst.RECEIVE_BEFORE); 241 example.and().andEqualTo("receive", CommonConst.RECEIVE_BEFORE);
244 - if (CommonUtils.isNotNull(spid) && spid != 0) example.and().andEqualTo("spid", spid); 242 + if (CommonUtils.isNotNull(spid) && spid != 0) {
  243 + example.and().andEqualTo("spid", spid);
  244 + }
245 List<ShyVideos> shyCommentsList = shyVideosMapper.selectByExampleAndRowBounds(example, new RowBounds(0, num)); 245 List<ShyVideos> shyCommentsList = shyVideosMapper.selectByExampleAndRowBounds(example, new RowBounds(0, num));
246 if (!shyCommentsList.isEmpty()) { 246 if (!shyCommentsList.isEmpty()) {
247 for (ShyVideos shyComments : shyCommentsList) { 247 for (ShyVideos shyComments : shyCommentsList) {
@@ -259,7 +259,7 @@ public class VideosServiceImpl { @@ -259,7 +259,7 @@ public class VideosServiceImpl {
259 String[] cids = ids.split(","); 259 String[] cids = ids.split(",");
260 for (String cid : cids) { 260 for (String cid : cids) {
261 ShyVideos shyVideos = shyVideosMapper.selectByPrimaryKey(Integer.parseInt(cid)); 261 ShyVideos shyVideos = shyVideosMapper.selectByPrimaryKey(Integer.parseInt(cid));
262 - if (shyVideos.getState() == CommonConst.AUDIT_INTT && shyVideos.getReceive() == CommonConst.RECEIVE_AFTER && shyVideos.getReceive_user_id().equals(userId)) { 262 + if (shyVideos.getState().equals(CommonConst.AUDIT_INTT) && shyVideos.getReceive().equals(CommonConst.RECEIVE_AFTER) && shyVideos.getReceive_user_id().equals(userId)) {
263 shyVideos.setReceive(CommonConst.RECEIVE_BEFORE); 263 shyVideos.setReceive(CommonConst.RECEIVE_BEFORE);
264 shyVideos.setReceive_user_id(null); 264 shyVideos.setReceive_user_id(null);
265 int i = shyVideosMapper.updateByPrimaryKey(shyVideos); 265 int i = shyVideosMapper.updateByPrimaryKey(shyVideos);
@@ -276,61 +276,52 @@ public class VideosServiceImpl { @@ -276,61 +276,52 @@ public class VideosServiceImpl {
276 /** 276 /**
277 * 根据条件导出数据excel 277 * 根据条件导出数据excel
278 * 278 *
279 - * @param video_title  
280 - * @param start_date  
281 - * @param end_date  
282 - * @param state  
283 - * @param receive  
284 - * @param video_priority  
285 - * @param orderByClause  
286 - * @param spid  
287 - * @param userId 279 + * @param videosDTO
288 * @return 280 * @return
289 */ 281 */
290 - public List<ShyVideos> findByCondition(String video_title, String start_date, String end_date, Integer state, Integer receive, String video_priority, String orderByClause, Integer spid, String userId, String source, String video_user_id) { 282 + public List<ShyVideos> findByCondition(VideosDTO videosDTO) {
291 Example example = new Example(ShyVideos.class); 283 Example example = new Example(ShyVideos.class);
292 Example.Criteria criteria = example.createCriteria(); 284 Example.Criteria criteria = example.createCriteria();
293 Example.Criteria criteria2 = example.createCriteria(); 285 Example.Criteria criteria2 = example.createCriteria();
294 - if (CommonUtils.isNotEmpty(orderByClause)) {  
295 - example.setOrderByClause(orderByClause); 286 + if (CommonUtils.isNotEmpty(videosDTO.getOrderByClause())) {
  287 + example.setOrderByClause(videosDTO.getOrderByClause());
296 } 288 }
297 - if (CommonUtils.isNotEmpty(start_date) && CommonUtils.isNotEmpty(end_date)) {  
298 - Timestamp startdate = null;  
299 - Timestamp enddate = null; 289 + if (CommonUtils.isNotEmpty(videosDTO.getsDate()) && CommonUtils.isNotEmpty(videosDTO.geteDate())) {
  290 +
300 try { 291 try {
301 - startdate = CommonUtils.parseDate(start_date, "yyyy-MM-dd");  
302 - enddate = CommonUtils.parseDate(end_date, "yyyy-MM-dd"); 292 + videosDTO.setsDate(String.valueOf(CommonUtils.parseDate(videosDTO.getsDate(), "yyyy-MM-dd")));
  293 + videosDTO.seteDate(String.valueOf(CommonUtils.parseDate(videosDTO.geteDate(), "yyyy-MM-dd")));
303 } catch (ParseException e) { 294 } catch (ParseException e) {
304 e.printStackTrace(); 295 e.printStackTrace();
305 } 296 }
306 - criteria.andGreaterThanOrEqualTo("created_at", startdate);  
307 - criteria.andLessThanOrEqualTo("created_at", enddate); 297 + criteria.andGreaterThanOrEqualTo("created_at", videosDTO.getsDate());
  298 + criteria.andLessThanOrEqualTo("created_at", videosDTO.geteDate());
308 } 299 }
309 - if (CommonUtils.isNotEmpty(video_title)) {  
310 - criteria.andLike("video_title", "%" + video_title + "%"); 300 + if (CommonUtils.isNotEmpty(videosDTO.getVideo_title())) {
  301 + criteria.andLike("video_title", "%" + videosDTO.getVideo_title() + "%");
311 } 302 }
312 - if (CommonUtils.isNotNull(state)) {  
313 - criteria.andEqualTo("state", state); 303 + if (CommonUtils.isNotNull(videosDTO.getState())) {
  304 + criteria.andEqualTo("state", videosDTO.getState());
314 } 305 }
315 - if (CommonUtils.isNotEmpty(video_priority)) {  
316 - criteria.andEqualTo("video_priority", video_priority); 306 + if (CommonUtils.isNotEmpty(videosDTO.getVideo_priority())) {
  307 + criteria.andEqualTo("video_priority", videosDTO.getVideo_priority());
317 } 308 }
318 - if (CommonUtils.isNotEmpty(video_user_id)) {  
319 - criteria.andEqualTo("video_user_id", video_user_id); 309 + if (CommonUtils.isNotEmpty(videosDTO.getVideo_user_id())) {
  310 + criteria.andEqualTo("video_user_id", videosDTO.getVideo_user_id());
320 } 311 }
321 312
322 - if (source != null) {  
323 - criteria.andEqualTo("source", source); 313 + if (videosDTO.getSource() != null) {
  314 + criteria.andEqualTo("source", videosDTO.getSource());
324 } 315 }
325 316
326 - if (CommonUtils.isNotNull(spid)) {  
327 - criteria.andEqualTo("spid", spid); 317 + if (CommonUtils.isNotNull(videosDTO.getSpid())) {
  318 + criteria.andEqualTo("spid", videosDTO.getSpid());
328 } 319 }
329 320
330 - if (CommonUtils.isNotNull(receive)) {  
331 - criteria.andEqualTo("receive", receive);  
332 - if (receive == CommonConst.RECEIVE_AFTER) {  
333 - criteria.andEqualTo("receive_user_id", userId); 321 + if (CommonUtils.isNotNull(videosDTO.getReceive())) {
  322 + criteria.andEqualTo("receive", videosDTO.getReceive());
  323 + if (videosDTO.getReceive().equals(CommonConst.RECEIVE_AFTER)) {
  324 + criteria.andEqualTo("receive_user_id", videosDTO.getUserId());
334 } 325 }
335 } 326 }
336 //默认按上传时间倒序排序 327 //默认按上传时间倒序排序
@@ -350,9 +341,9 @@ public class VideosServiceImpl { @@ -350,9 +341,9 @@ public class VideosServiceImpl {
350 shyVideos.setUpdater("自动审核"); 341 shyVideos.setUpdater("自动审核");
351 Integer plat = shyVideos.getPlat(); 342 Integer plat = shyVideos.getPlat();
352 String yuming = ""; 343 String yuming = "";
353 - if (plat == CommonConst.QINIU_PLAT) { 344 + if (plat.equals(CommonConst.QINIU_PLAT)) {
354 yuming = qn_domain + "/"; 345 yuming = qn_domain + "/";
355 - } else if (plat == CommonConst.KS_PLAT) { 346 + } else if (plat.equals(CommonConst.KS_PLAT)) {
356 yuming = ks_domain + "/"; 347 yuming = ks_domain + "/";
357 } 348 }
358 String url = ""; 349 String url = "";
src/main/resources/application.properties
@@ -2,7 +2,7 @@ spring.datasource.url=jdbc:mysql://120.92.102.31:3306/new_shy?serverTimezone=Asi @@ -2,7 +2,7 @@ spring.datasource.url=jdbc:mysql://120.92.102.31:3306/new_shy?serverTimezone=Asi
2 spring.datasource.username=root 2 spring.datasource.username=root
3 spring.datasource.password=M345sdfss4! 3 spring.datasource.password=M345sdfss4!
4 4
5 -spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver 5 +spring.datasource.driver-class-name=com.mysql.jdbc.Driver
6 6
7 server.tomcat.protocol_header=x-forwarded-proto 7 server.tomcat.protocol_header=x-forwarded-proto
8 server.use-forward-headers=true 8 server.use-forward-headers=true