Commit 06c9e43fd8904270e6d0210da315e6b08488cde5

Authored by 王言钊
1 parent 4152f3ac

修改参数

src/main/java/com/cnlive/shenhe/controller/AudioController.java
... ... @@ -81,10 +81,10 @@ public class AudioController extends BaseController {
81 81 }
82 82 Integer spid = sessionUser.getSpid();
83 83 audioDTO.setSpid(spid);
84   - logger.info("sp_Id:{},spid:{}", audioDTO.getSp_Id(), spid);
  84 + logger.info("sp_Id:{},spid:{}", audioDTO.getSp_Id(), audioDTO.getSpid());
85 85 String userId = sessionUser.getUserId();
86 86 audioDTO.setUserId(userId);
87   - if (CommonUtils.isNotEmpty(audioDTO.getSp_desc()) && spid == 0) {
  87 + if (CommonUtils.isNotEmpty(audioDTO.getSp_desc()) && audioDTO.getSpid() == 0) {
88 88 ShySites shySite = sitesService.findspidBySpdesc(audioDTO.getSp_desc());
89 89 if (CommonUtils.isNotNull(shySite)) {
90 90 audioDTO.setSpid(shySite.getSpid());
... ... @@ -92,7 +92,7 @@ public class AudioController extends BaseController {
92 92 setmodelSite(model);
93 93 return "error.html";
94 94 }
95   - } else if (CommonUtils.isEmpty(audioDTO.getSp_desc()) && spid == 0) {
  95 + } else if (CommonUtils.isEmpty(audioDTO.getSp_desc()) && audioDTO.getSpid() == 0) {
96 96 audioDTO.setSpid(null);
97 97 }
98 98 PageInfo<ShyAudio> audioPage = audioService.getListContent(audioDTO);
... ...
src/main/java/com/cnlive/shenhe/controller/ChannelController.java
... ... @@ -65,7 +65,7 @@ public class ChannelController extends BaseController {
65 65 channelDTO.setSpid(spid);
66 66 String userId = sessionUser.getUserId();
67 67 channelDTO.setUserId(userId);
68   - if (CommonUtils.isNotEmpty(channelDTO.getSp_desc()) && spid == 0) {
  68 + if (CommonUtils.isNotEmpty(channelDTO.getSp_desc()) && channelDTO.getSpid() == 0) {
69 69 ShySites shySite = sitesService.findspidBySpdesc(channelDTO.getSp_desc());
70 70 if (CommonUtils.isNotNull(shySite)) {
71 71 channelDTO.setSpid(shySite.getSpid());
... ... @@ -73,7 +73,7 @@ public class ChannelController extends BaseController {
73 73 setmodelSite(model);
74 74 return "error.html";
75 75 }
76   - } else if (CommonUtils.isEmpty(channelDTO.getSp_desc()) && spid == 0) {
  76 + } else if (CommonUtils.isEmpty(channelDTO.getSp_desc()) && channelDTO.getSpid() == 0) {
77 77 channelDTO.setSpid(null);
78 78 }
79 79  
... ...
src/main/java/com/cnlive/shenhe/controller/LiveApplyController.java
... ... @@ -131,7 +131,7 @@ public class LiveApplyController extends BaseController {
131 131 liveApplyDTO.setSpid(spid);
132 132 String userId = sessionUser.getUserId();
133 133 liveApplyDTO.setUserId(userId);
134   - if (CommonUtils.isNotEmpty(liveApplyDTO.getSp_desc()) && spid == 0) {
  134 + if (CommonUtils.isNotEmpty(liveApplyDTO.getSp_desc()) && liveApplyDTO.getSpid() == 0) {
135 135 ShySites shySite=sitesService.findspidBySpdesc(liveApplyDTO.getSp_desc());
136 136 if(CommonUtils.isNotNull(shySite)){
137 137 liveApplyDTO.setSpid(shySite.getSpid());
... ... @@ -139,7 +139,7 @@ public class LiveApplyController extends BaseController {
139 139 setmodelSite(model);
140 140 return "error.html";
141 141 }
142   - } else if (CommonUtils.isEmpty(liveApplyDTO.getSp_desc()) && spid == 0) {
  142 + } else if (CommonUtils.isEmpty(liveApplyDTO.getSp_desc()) && liveApplyDTO.getSpid() == 0) {
143 143 liveApplyDTO.setSpid(null);
144 144 }
145 145 PageInfo<ShyLiveapply> liveApplyPage = liveApplyServiceImpl.getListLiveApply(liveApplyDTO);
... ... @@ -310,12 +310,12 @@ public class LiveApplyController extends BaseController {
310 310 liveApplyDTO.setSpid(spid);
311 311 String userId = sessionUser.getUserId();
312 312 liveApplyDTO.setUserId(userId);
313   - if (CommonUtils.isNotEmpty(liveApplyDTO.getSp_desc()) && spid == 0) {
  313 + if (CommonUtils.isNotEmpty(liveApplyDTO.getSp_desc()) && liveApplyDTO.getSpid() == 0) {
314 314 ShySites shySite=sitesService.findspidBySpdesc(liveApplyDTO.getSp_desc());
315 315 if(CommonUtils.isNotNull(shySite)){
316 316 liveApplyDTO.setSpid(shySite.getSpid());
317 317 }
318   - }else if (CommonUtils.isEmpty(liveApplyDTO.getSp_desc()) && spid == 0) {
  318 + }else if (CommonUtils.isEmpty(liveApplyDTO.getSp_desc()) && liveApplyDTO.getSpid() == 0) {
319 319 liveApplyDTO.setSpid(null);
320 320 }
321 321 List<ShyLiveapply> liveApplyList = liveApplyServiceImpl.findByCondition(liveApplyDTO);
... ...
src/main/java/com/cnlive/shenhe/controller/LiveController.java
... ... @@ -124,7 +124,7 @@ public class LiveController extends BaseController {
124 124 String userId = sessionUser.getUserId();
125 125 liveDTO.setSpid(spid);
126 126 liveDTO.setUserId(userId);
127   - if (CommonUtils.isNotEmpty(liveDTO.getSp_desc()) && spid == 0) {
  127 + if (CommonUtils.isNotEmpty(liveDTO.getSp_desc()) && liveDTO.getSpid() == 0) {
128 128 ShySites shySite = sitesService.findspidBySpdesc(liveDTO.getSp_desc());
129 129 if (CommonUtils.isNotNull(shySite)) {
130 130 liveDTO.setSpid(shySite.getSpid());
... ... @@ -132,7 +132,7 @@ public class LiveController extends BaseController {
132 132 setmodelSite(model);
133 133 return "error.html";
134 134 }
135   - } else if (CommonUtils.isEmpty(liveDTO.getSp_desc()) && spid == 0) {
  135 + } else if (CommonUtils.isEmpty(liveDTO.getSp_desc()) && liveDTO.getSpid() == 0) {
136 136 liveDTO.setSpid(null);
137 137 }
138 138 String orderByClause = "";
... ... @@ -366,12 +366,12 @@ public class LiveController extends BaseController {
366 366 String userId = sessionUser.getUserId();
367 367 liveDTO.setSpid(spid);
368 368 liveDTO.setUserId(userId);
369   - if (CommonUtils.isNotEmpty(liveDTO.getSp_desc()) && spid == 0) {
  369 + if (CommonUtils.isNotEmpty(liveDTO.getSp_desc()) && liveDTO.getSpid() == 0) {
370 370 ShySites shySite=sitesService.findspidBySpdesc(liveDTO.getSp_desc());
371 371 if(CommonUtils.isNotNull(shySite)){
372 372 liveDTO.setSpid(shySite.getSpid());
373 373 }
374   - }else if (CommonUtils.isEmpty(liveDTO.getSp_desc()) && spid == 0) {
  374 + }else if (CommonUtils.isEmpty(liveDTO.getSp_desc()) && liveDTO.getSpid() == 0) {
375 375 liveDTO.setSpid(null);
376 376 }
377 377 List<ShyLive> liveList = liveService.findByCondition(liveDTO);
... ...
src/main/java/com/cnlive/shenhe/controller/SitesController.java
... ... @@ -49,7 +49,7 @@ public class SitesController extends BaseController {
49 49 }
50 50 Integer spid = sessionUser.getSpid();
51 51 sitesDTO.setSpId(spid);
52   - if (!sessionUser.isMaster() && spid != 0) {
  52 + if (!sessionUser.isMaster() && sitesDTO.getSpId() != 0) {
53 53 setmodelSite(model);
54 54 return "error.html";
55 55 }
... ...
src/main/java/com/cnlive/shenhe/controller/TopicController.java
... ... @@ -68,7 +68,7 @@ public class TopicController extends BaseController {
68 68 String userId = sessionUser.getUserId();
69 69 topicDTO.setSpid(spid);
70 70 topicDTO.setUserId(userId);
71   - if (CommonUtils.isNotEmpty(topicDTO.getSp_desc()) && spid == 0) {
  71 + if (CommonUtils.isNotEmpty(topicDTO.getSp_desc()) && topicDTO.getSpid() == 0) {
72 72 ShySites shySite=sitesService.findspidBySpdesc(topicDTO.getSp_desc());
73 73 if(CommonUtils.isNotNull(shySite)){
74 74 topicDTO.setSpid(shySite.getSpid());
... ... @@ -76,7 +76,7 @@ public class TopicController extends BaseController {
76 76 setmodelSite(model);
77 77 return "error.html";
78 78 }
79   - } else if (CommonUtils.isEmpty(topicDTO.getSp_desc()) && spid == 0) {
  79 + } else if (CommonUtils.isEmpty(topicDTO.getSp_desc()) && topicDTO.getSpid() == 0) {
80 80 topicDTO.setSpid(null);
81 81 }
82 82  
... ...
src/main/java/com/cnlive/shenhe/controller/UsersFreeController.java
... ... @@ -46,11 +46,12 @@ public class UsersFreeController extends BaseController {
46 46 return "redirect:/users/login";
47 47 }
48 48 Integer spid = sessionUser.getSpid();
49   - if (!sessionUser.isMaster() && spid != 0) {
  49 + usersFreeDTO.setSpid(spid);
  50 + if (!sessionUser.isMaster() && usersFreeDTO.getSpid() != 0) {
50 51 return "page/error.html";
51 52 }
52 53 if (spid == 0) {
53   - spid = null;
  54 + usersFreeDTO.setSpid(null);
54 55 }
55 56 PageInfo<ShyUsersfree> usersPage = usersfreeService.getpage(usersFreeDTO);
56 57 List<ShyUsersfree> list = usersPage.getList();
... ...
src/main/java/com/cnlive/shenhe/dto/UsersFreeDTO.java
... ... @@ -14,16 +14,26 @@ public class UsersFreeDTO implements Serializable {
14 14 private String orderByClause;
15 15 private String userId;
16 16 private String mobile;
  17 + private Integer spid;
17 18  
18 19 public UsersFreeDTO() {
19 20 }
20 21  
21   - public UsersFreeDTO(Integer page, Integer pageSize, String orderByClause, String userId, String mobile) {
  22 + public UsersFreeDTO(Integer page, Integer pageSize, String orderByClause, String userId, String mobile, Integer spid) {
22 23 this.page = page;
23 24 this.pageSize = pageSize;
24 25 this.orderByClause = orderByClause;
25 26 this.userId = userId;
26 27 this.mobile = mobile;
  28 + this.spid = spid;
  29 + }
  30 +
  31 + public Integer getSpid() {
  32 + return spid;
  33 + }
  34 +
  35 + public void setSpid(Integer spid) {
  36 + this.spid = spid;
27 37 }
28 38  
29 39 public Integer getPage() {
... ...