Commit 00eaf988990973ee2bfc9b87c4a38edaa4b0366c
1 parent
a5cc7aa4
增加直播申请审核业务
Showing
8 changed files
with
1098 additions
and
141 deletions
src/main/java/com/cnlive/shenhe/controller/LiveApplyController.java
| ... | ... | @@ -76,35 +76,44 @@ public class LiveApplyController { |
| 76 | 76 | */ |
| 77 | 77 | @PostMapping("/shenheLiveApply") |
| 78 | 78 | @ResponseBody |
| 79 | - public ResponseBean shenheInfo(Integer id, Integer state, String msg, HttpSession session) { | |
| 80 | - SessionUser sessionUser = (SessionUser) session.getAttribute(SessionUser.getSessionKey()); | |
| 81 | - String userId = sessionUser.getUserId(); | |
| 82 | - id=1; | |
| 83 | - state=1; | |
| 84 | - msg="通过"; | |
| 85 | - ShyLiveapply shyliveApply = liveApplyServiceImpl.selectByPrimaryKey(id); | |
| 86 | - JSONObject result = null; | |
| 87 | - try { | |
| 88 | - result = Pass.liveApplyPass(shyliveApply.getActivity_id(), state+2, "", msg, shyliveApply.getCallback()); | |
| 89 | - } catch (Exception e) { | |
| 90 | - e.printStackTrace(); | |
| 91 | - System.out.println("直播申请审核失败"); | |
| 92 | - return new ResponseBean(ErrorEnum.ERROR); | |
| 93 | - } | |
| 94 | - if (result == null) { | |
| 95 | - System.out.println("直播申请审核失败且接口错误没有返回信息"); | |
| 96 | - return new ResponseBean(ErrorEnum.ERROR); | |
| 97 | - } | |
| 98 | - Integer code = result.getInteger("code"); | |
| 99 | - if (code != 0) { | |
| 100 | - System.out.println("直播申请审核失败,code==" + code); | |
| 101 | - return new ResponseBean(code, result.getString("msg")); | |
| 102 | - } | |
| 103 | - int i = liveApplyServiceImpl.updateLiveApply(id, userId,null, state, msg); | |
| 104 | - if (i == 0) { | |
| 105 | - return new ResponseBean(ErrorEnum.ERROR); | |
| 106 | - } | |
| 107 | - return new ResponseBean(ErrorEnum.SUCCESS); | |
| 79 | + public ResponseBean shenheInfo(String ids, Integer state, String msg, HttpSession session) { | |
| 80 | + SessionUser sessionUser = (SessionUser) session.getAttribute(SessionUser.getSessionKey()); | |
| 81 | + String userId = sessionUser.getUserId(); | |
| 82 | + ResponseBean responseBean = new ResponseBean(); | |
| 83 | + String[] shyLiveApplyIds = ids.split(","); | |
| 84 | + String showMsg = ""; | |
| 85 | + for (String shyLiveApplyId : shyLiveApplyIds) { | |
| 86 | + ShyLiveapply shyLiveapply = liveApplyServiceImpl.selectByPrimaryKey(Integer.parseInt(shyLiveApplyId)); | |
| 87 | + JSONObject result = null; | |
| 88 | + try { | |
| 89 | + result = Pass.liveApplyPass(shyLiveapply.getActivity_id(), state+2, msg, msg, shyLiveapply.getCallback()); | |
| 90 | + } catch (Exception e) { | |
| 91 | + logger.error("直播视频审核失败,id==" + shyLiveApplyId, e); | |
| 92 | + showMsg = showMsg + "," + shyLiveapply.getActivity_id() + " 拒绝请求失败"; | |
| 93 | + break; | |
| 94 | + } | |
| 95 | + if (result == null) { | |
| 96 | + logger.error("直播视频审核失败且接口错误没有返回信息,id==" + shyLiveApplyId); | |
| 97 | + showMsg = showMsg + "," + shyLiveapply.getActivity_id() + " 拒绝请求失败"; | |
| 98 | + break; | |
| 99 | + } | |
| 100 | + Integer code = result.getInteger("errorCode"); | |
| 101 | + if (code != 0) { | |
| 102 | + logger.error("直播视频审核失败,id:{},code:{}", shyLiveApplyId, code); | |
| 103 | + showMsg = showMsg + "," + shyLiveapply.getActivity_id() + " " + result.getString(" errorMessage"); | |
| 104 | + break; | |
| 105 | + } | |
| 106 | + int i = liveApplyServiceImpl.updateLiveApply(Integer.parseInt(shyLiveApplyId), userId,"", state, msg); | |
| 107 | + if (i == 0) { | |
| 108 | + showMsg = showMsg + "," + shyLiveapply.getActivity_id() + " 更新失败"; | |
| 109 | + break; | |
| 110 | + } | |
| 111 | + } | |
| 112 | + if (CommonUtils.isNotEmpty(showMsg)) { | |
| 113 | + responseBean.setErrorCode(ErrorEnum.ERROR.getErrorCode()); | |
| 114 | + responseBean.setErrorMessage(showMsg); | |
| 115 | + } | |
| 116 | + return responseBean; | |
| 108 | 117 | } |
| 109 | 118 | |
| 110 | 119 | /** |
| ... | ... | @@ -120,18 +129,18 @@ public class LiveApplyController { |
| 120 | 129 | * @return |
| 121 | 130 | */ |
| 122 | 131 | @GetMapping("/page") |
| 123 | - public Object getListVideos(Model model,String activity_id,String start_date,String end_date, | |
| 124 | - String activity_name, Integer activity_status, Integer page,Integer pageSize, | |
| 125 | - Integer shenhe_state, String sp_desc, HttpSession session) { | |
| 126 | - System.out.println("进入直播内容页"); | |
| 132 | + public Object getListLiveApply(Model model,String start_date,String end_date, | |
| 133 | + String theme, Integer business_model, Integer page,Integer pageSize, | |
| 134 | + Integer shenhe_state,Integer receive, String sp_desc,String orderByClause, HttpSession session) { | |
| 135 | + System.out.println("进入直播申请内容页"); | |
| 127 | 136 | SessionUser sessionUser = (SessionUser) session.getAttribute(SessionUser.getSessionKey()); |
| 128 | -// if(CommonUtils.isNull(sessionUser)){ | |
| 129 | -// return "redirect:/users/login"; | |
| 130 | -// } | |
| 137 | + if(CommonUtils.isNull(sessionUser)){ | |
| 138 | + return "redirect:/users/login"; | |
| 139 | + } | |
| 131 | 140 | Integer spid = sessionUser.getSpid(); |
| 132 | 141 | String userId = sessionUser.getUserId(); |
| 133 | 142 | if (CommonUtils.isNull(page)) page = 1; |
| 134 | - if (CommonUtils.isNull(pageSize)) pageSize = 20; | |
| 143 | + if (CommonUtils.isNull(pageSize)) pageSize = 10; | |
| 135 | 144 | if (CommonUtils.isNotEmpty(sp_desc) && spid == 0) { |
| 136 | 145 | ShySites shySite=sitesService.findspidBySpdesc(sp_desc); |
| 137 | 146 | if(CommonUtils.isNotNull(shySite)){ |
| ... | ... | @@ -141,35 +150,37 @@ public class LiveApplyController { |
| 141 | 150 | } |
| 142 | 151 | } else if (CommonUtils.isEmpty(sp_desc) && spid == 0) { |
| 143 | 152 | spid = null; |
| 144 | - } | |
| 145 | - String orderByClause=""; | |
| 146 | - if(shenhe_state!=null&&shenhe_state==0){//审核状态:全部待领 | |
| 147 | - orderByClause="activity_start_time "; | |
| 148 | - }else if(shenhe_state!=null&&shenhe_state==1){//审核状态:待审核 | |
| 149 | - orderByClause="activity_start_time "; | |
| 150 | - }else if(shenhe_state!=null&&shenhe_state==2){//审核状态:已审核 | |
| 151 | - orderByClause="activity_start_time desc"; | |
| 152 | - }else{//审核状态:全部 | |
| 153 | - orderByClause="is_hot desc, activity_start_time "; | |
| 154 | - if(activity_status!=null &&(activity_status==0 ||activity_status==2 || activity_status==4)){//直播状态:结束、撤销、下线 | |
| 155 | - orderByClause="is_hot desc, activity_start_time desc"; | |
| 156 | - } | |
| 157 | - } | |
| 158 | - PageInfo<ShyLive> livePage = liveService.getListContent(activity_name, start_date,end_date, | |
| 159 | - activity_id, activity_status, page, pageSize, shenhe_state, orderByClause, spid, userId); | |
| 160 | - List<ShyLive> list = livePage.getList(); | |
| 153 | + } | |
| 154 | + PageInfo<ShyLiveapply> liveApplyPage = liveApplyServiceImpl.getListLiveApply(theme, start_date,end_date, | |
| 155 | + business_model, page, pageSize, shenhe_state,receive, orderByClause, spid, userId); | |
| 156 | + List<ShyLiveapply> list = liveApplyPage.getList(); | |
| 161 | 157 | if (!list.isEmpty()) { |
| 162 | - for (ShyLive live : list) { | |
| 158 | + for (ShyLiveapply liveApply : list) { | |
| 159 | + if (liveApply.getShenhe_state() != CommonConst.AUDIT_INTT) { | |
| 160 | + String updater =CommonUtils.isEmpty(liveApply.getUpdater()) || "null".equals(liveApply.getUpdater())? "白名单":liveApply.getUpdater(); | |
| 161 | + String auditor_id = liveApply.getAuditor(); | |
| 162 | + if (CommonUtils.isNotEmpty(auditor_id)) { | |
| 163 | + ShyUsers user = new ShyUsers(); | |
| 164 | + user.setUser_id(auditor_id); | |
| 165 | + user = usersService.select(user); | |
| 166 | + if (CommonUtils.isNotNull(user)) { | |
| 167 | + String email = CommonUtils.isEmpty(user.getEmail()) || "null".equals(user.getEmail()) ? "" : user.getEmail(); | |
| 168 | + String userName = CommonUtils.isEmpty(user.getUsername()) ? email : user.getUsername(); | |
| 169 | + updater = userName; | |
| 170 | + } | |
| 171 | + } | |
| 172 | + liveApply.setUpdater(updater); | |
| 173 | + } | |
| 163 | 174 | //显示spid简称 |
| 164 | - ShySites shySites = sitesService.findspidDescByspid(live.getSp_id()); | |
| 175 | + ShySites shySites = sitesService.findspidDescByspid(liveApply.getSp_id()); | |
| 165 | 176 | if (CommonUtils.isNotNull(shySites)) { |
| 166 | - live.setSpid_desc(shySites.getName()); | |
| 177 | + liveApply.setSpid_desc(shySites.getName()); | |
| 167 | 178 | } |
| 168 | 179 | } |
| 169 | 180 | } |
| 170 | - model.addAttribute("livePage", livePage); | |
| 181 | + model.addAttribute("liveApplyPage", liveApplyPage); | |
| 171 | 182 | model.addAttribute("pageSize", pageSize); |
| 172 | - return "page/live.html"; | |
| 183 | + return "page/liveApply.html"; | |
| 173 | 184 | } |
| 174 | 185 | |
| 175 | 186 | /** |
| ... | ... | @@ -180,17 +191,17 @@ public class LiveApplyController { |
| 180 | 191 | */ |
| 181 | 192 | @GetMapping("/details") |
| 182 | 193 | public Object getDetailsLive(Model model, Integer id) { |
| 183 | - ShyLive live = liveService.getDetailsLive(id); | |
| 194 | + ShyLiveapply shyLiveapply = liveApplyServiceImpl.getDetailsLive(id); | |
| 184 | 195 | |
| 185 | 196 | //显示spid简称 |
| 186 | - ShySites shySites = sitesService.findspidDescByspid(live.getSp_id()); | |
| 197 | + ShySites shySites = sitesService.findspidDescByspid(shyLiveapply.getSp_id()); | |
| 187 | 198 | if (CommonUtils.isNotNull(shySites)) { |
| 188 | - live.setSpid_desc(shySites.getName()); | |
| 199 | + shyLiveapply.setSpid_desc(shySites.getName()); | |
| 189 | 200 | } |
| 190 | 201 | |
| 191 | - model.addAttribute("live", live); | |
| 202 | + model.addAttribute("shyLiveapply", shyLiveapply); | |
| 192 | 203 | |
| 193 | - return "page/liveDetail.html"; | |
| 204 | + return "page/liveApplyDetail.html"; | |
| 194 | 205 | } |
| 195 | 206 | |
| 196 | 207 | /** |
| ... | ... | @@ -211,9 +222,9 @@ public class LiveApplyController { |
| 211 | 222 | if (CommonUtils.isNotEmpty(ids)) { |
| 212 | 223 | String[] cids = ids.split(","); |
| 213 | 224 | for (String cid : cids) { |
| 214 | - ShyLive shyLive = liveService.selectByPrimaryKey(Integer.parseInt(cid)); | |
| 215 | - if (CommonUtils.isNotNull(shyLive)) { | |
| 216 | - if (shyLive.getShenhe_state() != CommonConst.RECEIVE_BEFORE ) { | |
| 225 | + ShyLiveapply shyLiveapply = liveApplyServiceImpl.selectByPrimaryKey(Integer.parseInt(cid)); | |
| 226 | + if (CommonUtils.isNotNull(shyLiveapply)) { | |
| 227 | + if (shyLiveapply.getShenhe_state() != CommonConst.RECEIVE_BEFORE ) { | |
| 217 | 228 | return new ResponseBean(ErrorEnum.ERROR.getErrorCode(), "您领取的内容中有已被领取或者已经被审核,请检查并重试"); |
| 218 | 229 | } |
| 219 | 230 | } else { |
| ... | ... | @@ -222,7 +233,7 @@ public class LiveApplyController { |
| 222 | 233 | } |
| 223 | 234 | } |
| 224 | 235 | } |
| 225 | - Integer n = liveService.receive(ids, num, userId, spid); | |
| 236 | + Integer n = liveApplyServiceImpl.receive(ids, num, userId, spid); | |
| 226 | 237 | return new ResponseBean(ErrorEnum.SUCCESS.getErrorCode(), "认领到" + n + "条内容"); |
| 227 | 238 | } |
| 228 | 239 | |
| ... | ... | @@ -241,12 +252,12 @@ public class LiveApplyController { |
| 241 | 252 | //在退领操作前先判断是否包含已退领或者已经审核的数据,有则退回检查并重新退领 |
| 242 | 253 | String[] cids = ids.split(","); |
| 243 | 254 | for (String cid : cids) { |
| 244 | - ShyLive shyLive = liveService.selectByPrimaryKey(Integer.parseInt(cid)); | |
| 245 | - if (shyLive.getShenhe_state() != CommonConst.RECEIVE_AFTER || !shyLive.getAuditor().equals(userId)) { | |
| 255 | + ShyLiveapply shyLiveapply = liveApplyServiceImpl.selectByPrimaryKey(Integer.parseInt(cid)); | |
| 256 | + if (shyLiveapply.getReceive() != CommonConst.RECEIVE_AFTER || !shyLiveapply.getAuditor().equals(userId)||shyLiveapply.getShenhe_state()!=CommonConst.AUDIT_INTT) { | |
| 246 | 257 | return new ResponseBean(ErrorEnum.ERROR.getErrorCode(), "退领失败,您选中的内容包含已退领的或已经审核的"); |
| 247 | 258 | } |
| 248 | 259 | } |
| 249 | - return liveService.retReceive(ids, userId); | |
| 260 | + return liveApplyServiceImpl.retReceive(ids, userId); | |
| 250 | 261 | } |
| 251 | 262 | |
| 252 | 263 | /** |
| ... | ... | @@ -266,29 +277,29 @@ public class LiveApplyController { |
| 266 | 277 | String[] shyLiveIds = ids.split(","); |
| 267 | 278 | String showMsg = ""; |
| 268 | 279 | for (String shyLiveId : shyLiveIds) { |
| 269 | - ShyLive shyLive = liveService.selectByPrimaryKey(Integer.parseInt(shyLiveId)); | |
| 280 | + ShyLiveapply shyLiveapply = liveApplyServiceImpl.selectByPrimaryKey(Integer.parseInt(shyLiveId)); | |
| 270 | 281 | JSONObject result = null; |
| 271 | 282 | try { |
| 272 | - result = Pass.livePass(shyLive.getActivity_id(), 6, msg, msg, shyLive.getCallback()); | |
| 283 | + result = Pass.liveApplyPass(shyLiveapply.getActivity_id(), 4, msg, msg, shyLiveapply.getCallback()); | |
| 273 | 284 | } catch (Exception e) { |
| 274 | 285 | logger.error("直播视频审核失败,id==" + shyLiveId, e); |
| 275 | - showMsg = showMsg + "," + shyLive.getActivity_id() + " 拒绝请求失败"; | |
| 286 | + showMsg = showMsg + "," + shyLiveapply.getActivity_id() + " 拒绝请求失败"; | |
| 276 | 287 | break; |
| 277 | 288 | } |
| 278 | 289 | if (result == null) { |
| 279 | 290 | logger.error("直播视频审核失败且接口错误没有返回信息,id==" + shyLiveId); |
| 280 | - showMsg = showMsg + "," + shyLive.getActivity_id() + " 拒绝请求失败"; | |
| 291 | + showMsg = showMsg + "," + shyLiveapply.getActivity_id() + " 拒绝请求失败"; | |
| 281 | 292 | break; |
| 282 | 293 | } |
| 283 | 294 | Integer code = result.getInteger("errorCode"); |
| 284 | 295 | if (code != 0) { |
| 285 | 296 | logger.error("直播视频审核失败,id:{},code:{}", shyLiveId, code); |
| 286 | - showMsg = showMsg + "," + shyLive.getActivity_id() + " " + result.getString(" errorMessage"); | |
| 297 | + showMsg = showMsg + "," + shyLiveapply.getActivity_id() + " " + result.getString(" errorMessage"); | |
| 287 | 298 | break; |
| 288 | 299 | } |
| 289 | 300 | int i = liveService.updateLive(Integer.parseInt(shyLiveId), userId,"", 4, msg); |
| 290 | 301 | if (i == 0) { |
| 291 | - showMsg = showMsg + "," + shyLive.getActivity_id() + " 更新失败"; | |
| 302 | + showMsg = showMsg + "," + shyLiveapply.getActivity_id() + " 更新失败"; | |
| 292 | 303 | break; |
| 293 | 304 | } |
| 294 | 305 | } | ... | ... |
src/main/java/com/cnlive/shenhe/controller/UsersController.java
| ... | ... | @@ -131,10 +131,10 @@ public class UsersController { |
| 131 | 131 | shyUser =usersService.select(shyUser); |
| 132 | 132 | boolean isShow_chinnal=false;//是否显示频道消息框 |
| 133 | 133 | boolean isShow_liveApply=false;//是否显示直播申请消息框 |
| 134 | - if(shyUser.getNotice_show().contains("1")){ | |
| 134 | + if(CommonUtils.isNotEmpty(shyUser.getNotice_show())&­User.getNotice_show().contains("1")){ | |
| 135 | 135 | isShow_chinnal=true; |
| 136 | 136 | } |
| 137 | - if(shyUser.getNotice_show().contains("2")){ | |
| 137 | + if(CommonUtils.isNotEmpty(shyUser.getNotice_show())&­User.getNotice_show().contains("2")){ | |
| 138 | 138 | isShow_liveApply=true; |
| 139 | 139 | } |
| 140 | 140 | Map<String,Object> map=new HashMap<>(); | ... | ... |
src/main/java/com/cnlive/shenhe/entity/ShyLiveapply.java
| ... | ... | @@ -140,6 +140,9 @@ public class ShyLiveapply { |
| 140 | 140 | * 内容简述 |
| 141 | 141 | */ |
| 142 | 142 | private String simple_content; |
| 143 | + | |
| 144 | + @Transient | |
| 145 | + private String spid_desc; | |
| 143 | 146 | |
| 144 | 147 | /** |
| 145 | 148 | * 获取id |
| ... | ... | @@ -626,4 +629,13 @@ public class ShyLiveapply { |
| 626 | 629 | public void setSimple_content(String simple_content) { |
| 627 | 630 | this.simple_content = simple_content; |
| 628 | 631 | } |
| 632 | + | |
| 633 | + public String getSpid_desc() { | |
| 634 | + return spid_desc; | |
| 635 | + } | |
| 636 | + | |
| 637 | + public void setSpid_desc(String spid_desc) { | |
| 638 | + this.spid_desc = spid_desc; | |
| 639 | + } | |
| 640 | + | |
| 629 | 641 | } |
| 630 | 642 | \ No newline at end of file | ... | ... |
src/main/java/com/cnlive/shenhe/serviceImpl/LiveApplyServiceImpl.java
| ... | ... | @@ -104,14 +104,15 @@ public class LiveApplyServiceImpl { |
| 104 | 104 | } |
| 105 | 105 | |
| 106 | 106 | //=============== |
| 107 | - public PageInfo<ShyLive> getListContent(String activity_name, String start_date, String end_date, | |
| 108 | - String activity_id, Integer activity_status, Integer page, Integer pageSize, | |
| 109 | - Integer shenhe_state, String orderByClause, Integer spid, String userId) { | |
| 110 | - Example example = new Example(ShyLive.class); | |
| 107 | + public PageInfo<ShyLiveapply> getListLiveApply(String theme, String start_date, String end_date, | |
| 108 | + Integer business_model, Integer page, Integer pageSize, | |
| 109 | + Integer shenhe_state,Integer receive, String orderByClause, Integer spid, String userId) { | |
| 110 | + Example example = new Example(ShyLiveapply.class); | |
| 111 | 111 | Example.Criteria criteria = example.createCriteria(); |
| 112 | -// Example.Criteria criteria2 = example.createCriteria(); | |
| 113 | 112 | if (CommonUtils.isNotEmpty(orderByClause)) { |
| 114 | 113 | example.setOrderByClause(orderByClause); |
| 114 | + }else{ | |
| 115 | + example.setOrderByClause("pre_start_time"); | |
| 115 | 116 | } |
| 116 | 117 | if (CommonUtils.isNotEmpty(start_date)) { |
| 117 | 118 | Timestamp startdate = null; |
| ... | ... | @@ -120,8 +121,7 @@ public class LiveApplyServiceImpl { |
| 120 | 121 | } catch (ParseException e) { |
| 121 | 122 | e.printStackTrace(); |
| 122 | 123 | } |
| 123 | - criteria.andGreaterThanOrEqualTo("activity_start_time", startdate); | |
| 124 | -// criteria2.andGreaterThanOrEqualTo("activity_start_time", startdate); | |
| 124 | + criteria.andGreaterThanOrEqualTo("pre_start_time", startdate); | |
| 125 | 125 | } |
| 126 | 126 | if ( CommonUtils.isNotEmpty(end_date)) { |
| 127 | 127 | Timestamp enddate = null; |
| ... | ... | @@ -130,48 +130,41 @@ public class LiveApplyServiceImpl { |
| 130 | 130 | } catch (ParseException e) { |
| 131 | 131 | e.printStackTrace(); |
| 132 | 132 | } |
| 133 | - criteria.andLessThanOrEqualTo("activity_end_time", enddate); | |
| 134 | -// criteria2.andLessThanOrEqualTo("activity_end_time", enddate); | |
| 133 | + criteria.andLessThanOrEqualTo("pre_end_time", enddate); | |
| 135 | 134 | } |
| 136 | - if (CommonUtils.isNotEmpty(activity_name)) { | |
| 137 | - criteria.andLike("activity_name", "%" + activity_name + "%"); | |
| 138 | -// criteria2.andLike("activity_name", "%" + activity_name + "%"); | |
| 135 | + if (CommonUtils.isNotEmpty(theme)) { | |
| 136 | + criteria.andLike("theme", "%" + theme + "%"); | |
| 139 | 137 | } |
| 140 | 138 | |
| 141 | - if (CommonUtils.isNotEmpty(activity_id)) { | |
| 142 | - criteria.andEqualTo("activity_id", activity_id); | |
| 143 | -// criteria2.andEqualTo("activity_id", activity_id); | |
| 139 | + if (CommonUtils.isNotNull(business_model)) { | |
| 140 | + criteria.andEqualTo("business_model", business_model); | |
| 144 | 141 | } |
| 145 | 142 | if (CommonUtils.isNotNull(spid)) { |
| 146 | 143 | criteria.andEqualTo("sp_id", spid); |
| 147 | -// criteria2.andEqualTo("spid", spid); | |
| 148 | 144 | } |
| 149 | - if (CommonUtils.isNotNull(shenhe_state)) { | |
| 145 | + if (CommonUtils.isNotNull(shenhe_state)&& shenhe_state != 3) { | |
| 150 | 146 | criteria.andEqualTo("shenhe_state", shenhe_state); |
| 151 | -// criteria2.andEqualTo("shenhe_state", shenhe_state); | |
| 152 | - if (shenhe_state != CommonConst.RECEIVE_BEFORE) { | |
| 153 | - criteria.andEqualTo("auditor", userId); | |
| 154 | -// criteria2.andEqualTo("auditor", userId); | |
| 155 | - } | |
| 147 | + }else if(CommonUtils.isNotNull(shenhe_state)&& shenhe_state == 3){ | |
| 148 | + criteria.andNotEqualTo("shenhe_state", 0); | |
| 149 | + } | |
| 150 | + if (CommonUtils.isNotNull(receive)) { | |
| 151 | + criteria.andEqualTo("receive", receive); | |
| 152 | + if(receive!=0 && CommonUtils.isNotEmpty(userId)){ | |
| 153 | + criteria.andEqualTo("auditor", userId); | |
| 154 | + } | |
| 156 | 155 | } |
| 157 | - if (CommonUtils.isNotNull(activity_status) ) { | |
| 158 | - criteria.andEqualTo("activity_status", activity_status); | |
| 159 | - } | |
| 160 | - criteria.andEqualTo("is_show", 1); | |
| 161 | - //排序 | |
| 162 | -// example.setOrderByClause("is_hot desc, activity_start_time desc"); | |
| 163 | 156 | PageHelper.startPage(page, pageSize, true); |
| 164 | - List<ShyLive> shyLiveList = shyLiveMapper.selectByExample(example); | |
| 165 | - PageInfo<ShyLive> pageInfo = new PageInfo<>(shyLiveList); | |
| 157 | + List<ShyLiveapply> shyLiveApplyList = shyLiveApplyMapper.selectByExample(example); | |
| 158 | + PageInfo<ShyLiveapply> pageInfo = new PageInfo<>(shyLiveApplyList); | |
| 166 | 159 | return pageInfo; |
| 167 | 160 | } |
| 168 | 161 | |
| 169 | 162 | //====================== |
| 170 | - public ShyLive getDetailsLive(Integer id) { | |
| 171 | - ShyLive shyLive = shyLiveMapper.selectByPrimaryKey(id); | |
| 172 | - if (shyLive.getShenhe_state() != CommonConst.RECEIVE_BEFORE) { | |
| 173 | - String updater = CommonUtils.isEmpty(shyLive.getUpdater()) || "null".equals(shyLive.getUpdater())? "自动通过":shyLive.getUpdater(); | |
| 174 | - String auditor_id = shyLive.getAuditor(); | |
| 163 | + public ShyLiveapply getDetailsLive(Integer id) { | |
| 164 | + ShyLiveapply shyLiveapply = shyLiveApplyMapper.selectByPrimaryKey(id); | |
| 165 | + if (shyLiveapply.getShenhe_state() != CommonConst.RECEIVE_BEFORE) { | |
| 166 | + String updater = CommonUtils.isEmpty(shyLiveapply.getUpdater()) || "null".equals(shyLiveapply.getUpdater())? "自动通过":shyLiveapply.getUpdater(); | |
| 167 | + String auditor_id = shyLiveapply.getAuditor(); | |
| 175 | 168 | if (CommonUtils.isNotEmpty(auditor_id)) { |
| 176 | 169 | ShyUsers user = new ShyUsers(); |
| 177 | 170 | user.setUser_id(auditor_id); |
| ... | ... | @@ -180,9 +173,9 @@ public class LiveApplyServiceImpl { |
| 180 | 173 | String userName = CommonUtils.isEmpty(user.getUsername()) ? email: user.getUsername(); |
| 181 | 174 | updater = userName; |
| 182 | 175 | } |
| 183 | - shyLive.setUpdater(updater); | |
| 176 | + shyLiveapply.setUpdater(updater); | |
| 184 | 177 | } |
| 185 | - return shyLive; | |
| 178 | + return shyLiveapply; | |
| 186 | 179 | } |
| 187 | 180 | |
| 188 | 181 | //==================== |
| ... | ... | @@ -191,25 +184,28 @@ public class LiveApplyServiceImpl { |
| 191 | 184 | if (CommonUtils.isNotEmpty(ids)) { |
| 192 | 185 | String[] cids = ids.split(","); |
| 193 | 186 | for (String cid : cids) { |
| 194 | - ShyLive shyLive = shyLiveMapper.selectByPrimaryKey(Integer.parseInt(cid)); | |
| 195 | - if (CommonUtils.isNotNull(shyLive) && shyLive.getShenhe_state() == CommonConst.RECEIVE_BEFORE ) { | |
| 196 | - shyLive.setAuditor(userId);; | |
| 197 | - shyLive.setShenhe_state(CommonConst.RECEIVE_AFTER); | |
| 198 | - shyLiveMapper.updateByPrimaryKeySelective(shyLive); | |
| 187 | + ShyLiveapply shyLiveapply = shyLiveApplyMapper.selectByPrimaryKey(Integer.parseInt(cid)); | |
| 188 | + if (CommonUtils.isNotNull(shyLiveapply) && shyLiveapply.getShenhe_state() == CommonConst.RECEIVE_BEFORE ) { | |
| 189 | + shyLiveapply.setAuditor(userId);; | |
| 190 | + shyLiveapply.setShenhe_state(CommonConst.AUDIT_INTT); | |
| 191 | + shyLiveapply.setReceive(CommonConst.RECEIVE_AFTER); | |
| 192 | + shyLiveApplyMapper.updateByPrimaryKeySelective(shyLiveapply); | |
| 199 | 193 | n++; |
| 200 | 194 | } |
| 201 | 195 | } |
| 202 | 196 | } else if (CommonUtils.isNotNull(num) && num > 0) { |
| 203 | - Example example = new Example(ShyLive.class); | |
| 204 | - example.setOrderByClause("is_hot desc, activity_start_time asc"); | |
| 205 | - example.and().andEqualTo("shenhe_state", CommonConst.RECEIVE_BEFORE); | |
| 197 | + Example example = new Example(ShyLiveapply.class); | |
| 198 | + example.setOrderByClause("pre_start_time asc"); | |
| 199 | + example.and().andEqualTo("shenhe_state", CommonConst.AUDIT_INTT); | |
| 200 | + example.and().andEqualTo("receive", CommonConst.RECEIVE_BEFORE); | |
| 206 | 201 | if (CommonUtils.isNotNull(spid) && spid != 0) example.and().andEqualTo("spid", spid); |
| 207 | - List<ShyLive> shyLiveList = shyLiveMapper.selectByExampleAndRowBounds(example, new RowBounds(0, num)); | |
| 208 | - if (!shyLiveList.isEmpty()) { | |
| 209 | - for (ShyLive shyLive : shyLiveList) { | |
| 210 | - shyLive.setAuditor(userId); | |
| 211 | - shyLive.setShenhe_state(CommonConst.RECEIVE_AFTER); | |
| 212 | - shyLiveMapper.updateByPrimaryKeySelective(shyLive); | |
| 202 | + List<ShyLiveapply> shyLiveapplyList = shyLiveApplyMapper.selectByExampleAndRowBounds(example, new RowBounds(0, num)); | |
| 203 | + if (!shyLiveapplyList.isEmpty()) { | |
| 204 | + for (ShyLiveapply shyLiveapply : shyLiveapplyList) { | |
| 205 | + shyLiveapply.setAuditor(userId); | |
| 206 | + shyLiveapply.setShenhe_state(CommonConst.AUDIT_INTT); | |
| 207 | + shyLiveapply.setReceive(CommonConst.RECEIVE_AFTER); | |
| 208 | + shyLiveApplyMapper.updateByPrimaryKeySelective(shyLiveapply); | |
| 213 | 209 | n++; |
| 214 | 210 | } |
| 215 | 211 | } |
| ... | ... | @@ -221,11 +217,12 @@ public class LiveApplyServiceImpl { |
| 221 | 217 | public ResponseBean retReceive(String ids, String userId) { |
| 222 | 218 | String[] cids = ids.split(","); |
| 223 | 219 | for (String cid : cids) { |
| 224 | - ShyLive shyLive = shyLiveMapper.selectByPrimaryKey(Integer.parseInt(cid)); | |
| 225 | - if (shyLive.getShenhe_state() == CommonConst.RECEIVE_AFTER && shyLive.getAuditor().equals(userId)) { | |
| 226 | - shyLive.setShenhe_state(CommonConst.RECEIVE_BEFORE); | |
| 227 | - shyLive.setAuditor(null); | |
| 228 | - int i = shyLiveMapper.updateByPrimaryKey(shyLive); | |
| 220 | + ShyLiveapply shyLiveapply = shyLiveApplyMapper.selectByPrimaryKey(Integer.parseInt(cid)); | |
| 221 | + if (shyLiveapply.getShenhe_state() == CommonConst.AUDIT_INTT &­Liveapply.getReceive() == CommonConst.RECEIVE_AFTER && shyLiveapply.getAuditor().equals(userId)) { | |
| 222 | + shyLiveapply.setShenhe_state(CommonConst.AUDIT_INTT); | |
| 223 | + shyLiveapply.setReceive(CommonConst.RECEIVE_BEFORE); | |
| 224 | + shyLiveapply.setAuditor(null); | |
| 225 | + int i = shyLiveApplyMapper.updateByPrimaryKey(shyLiveapply); | |
| 229 | 226 | if (i != 1) { |
| 230 | 227 | return new ResponseBean(ErrorEnum.ERROR.getErrorCode(), "退领失败,请重试"); |
| 231 | 228 | } | ... | ... |
src/main/resources/templates/common/frame.html
| ... | ... | @@ -79,6 +79,7 @@ line-height: 2em; margin: 0 auto;font-size: 2em" th:text="${session.sessionUser. |
| 79 | 79 | <li><a href="/comments/page?state=0&receive=0" id="/comments/page"> 评论审核</a></li> |
| 80 | 80 | <li><a href="/content/page?receive_status=0" id="/content/page"> 图文审核</a></li> |
| 81 | 81 | <li><a href="/channel/page?shenhe_status=0&receive=0" id="/channel/page"> 频道审核</a></li> |
| 82 | + <li><a href="/liveApply/page?shenhe_state=0&receive=0" id="/liveApply/page">直播申请审核</a></li> | |
| 82 | 83 | </ul> |
| 83 | 84 | </li> |
| 84 | 85 | <!-- <li class="treeview" th:if="${session.sessionUser.spid==0 or session.sessionUser.master}"> --> | ... | ... |
src/main/resources/templates/page/channel.html
| ... | ... | @@ -120,11 +120,10 @@ |
| 120 | 120 | <div class="col-md-6" style="padding: 0;width: 45%;"> |
| 121 | 121 | <label for="start_date" class="control-label cb-toolbar">时间:</label> |
| 122 | 122 | <div class="input-group col-md-9 date"> |
| 123 | - <input class="form-control date" name="start_date" type="text" | |
| 124 | - id="start_date" > | |
| 123 | + <input class="form-control date" name="start_date" type="text" id="start_date" > | |
| 125 | 124 | <span class="input-group-addon"> |
| 126 | - <span class="glyphicon glyphicon-calendar"></span> | |
| 127 | - </span> | |
| 125 | + <span class="glyphicon glyphicon-calendar"></span> | |
| 126 | + </span> | |
| 128 | 127 | </div> |
| 129 | 128 | </div> |
| 130 | 129 | <div class="col-md-6" style="padding: 0;width: 45%;"> |
| ... | ... | @@ -133,8 +132,8 @@ |
| 133 | 132 | <input class="form-control date" name="end_date" type="text" |
| 134 | 133 | id="end_date" > |
| 135 | 134 | <span class="input-group-addon"> |
| 136 | - <span class="glyphicon glyphicon-calendar"></span> | |
| 137 | - </span> | |
| 135 | + <span class="glyphicon glyphicon-calendar"></span> | |
| 136 | + </span> | |
| 138 | 137 | </div> |
| 139 | 138 | </div> |
| 140 | 139 | </div> | ... | ... |
src/main/resources/templates/page/liveApply.html
0 → 100644
| 1 | +<!DOCTYPE html> | |
| 2 | +<html lang="zh" xmlns:th="http://www.thymeleaf.org"> | |
| 3 | + | |
| 4 | +<head th:replace="../templates/common/head::head"> | |
| 5 | +</head> | |
| 6 | + | |
| 7 | +<body class="skin-blue sidebar-mini"> | |
| 8 | + | |
| 9 | +<div class="wrapper"> | |
| 10 | + <div th:replace="../templates/common/frame::frame"></div> | |
| 11 | + <div class="content-wrapper" style="min-height: 788px;"> | |
| 12 | + <section class="content-header"> | |
| 13 | + <h1> | |
| 14 | + 直播申请审核 | |
| 15 | + </h1> | |
| 16 | + <ol class="breadcrumb"> | |
| 17 | + <li>首页</li> | |
| 18 | + <li class="active">直播申请审核</li> | |
| 19 | + </ol> | |
| 20 | + </section> | |
| 21 | + <section class="content"> | |
| 22 | + <div class="row"> | |
| 23 | + <div class="col-md-12"> | |
| 24 | + <div class="box box-info"> | |
| 25 | + <div class="box-body"> | |
| 26 | + | |
| 27 | + <div class="btn-group margin-bottom pull-left"> | |
| 28 | +<!-- <input type="hidden" name="state" id="state" value=""/> --> | |
| 29 | + <div class="btn-group margin-bottom" id="hide_select_area_2" style=> | |
| 30 | + <button type="button" class="btn btn-success btn-sm margin-r-5 action claim" | |
| 31 | + value="2" data="claim" id="claim" data-toggle="modal" | |
| 32 | + data-target="#modal" onclick="receive(0);">认领 | |
| 33 | + </button> | |
| 34 | + <button type="button" class="btn btn-success btn-sm margin-r-5 action claim" | |
| 35 | + value="2" data="claim100" id="claim100" data-toggle="modal" | |
| 36 | + data-target="#modal" onclick="receive(10);">认领10条 | |
| 37 | + </button> | |
| 38 | + <button type="button" class="btn btn-success btn-sm margin-r-5 action claim" | |
| 39 | + value="2" data="claim1000" id="claim1000" data-toggle="modal" | |
| 40 | + data-target="#modal" onclick="receive(100);">认领100条 | |
| 41 | + </button> | |
| 42 | + <button type="button" class="btn btn-warning btn-sm margin-r-5 action claim" | |
| 43 | + value="2" data="claim1000" id="claim1000" data-toggle="modal" | |
| 44 | + data-target="#modal" onclick="retReceive();">退领 | |
| 45 | + </button> | |
| 46 | + <button type="button" class="btn btn-danger btn-sm margin-r-5 action claim" | |
| 47 | + value="2" data="claim1000" id="claim1000" data-toggle="modal" | |
| 48 | + data-target="#modal" onclick="repulse();">拒绝 | |
| 49 | + </button> | |
| 50 | + </div> | |
| 51 | + </div> | |
| 52 | + | |
| 53 | + | |
| 54 | + <div class="btn-group margin-bottom pull-right"> | |
| 55 | + <button type="button" class="btn btn-success btn-sm margin-r-5 filter " | |
| 56 | + th:onclick="'javascript:daochu()'" value="" id="excel"> | |
| 57 | + 导出excel | |
| 58 | + </button> | |
| 59 | + <button type="button" class="btn btn-sm margin-r-5 filter " | |
| 60 | + th:onclick="'javascript:quanbu()'" value="" id="quanbu"> | |
| 61 | + 全部 | |
| 62 | + </button> | |
| 63 | + </button> | |
| 64 | + <button type="button" class="btn btn-sm margin-r-5 filter " id="daishen" | |
| 65 | + th:onclick="'javascript:daishen()'" value="0">全部待领 | |
| 66 | + </button> | |
| 67 | + <button type="button" class="btn btn-sm margin-r-5 filter " id="Mydaishen" | |
| 68 | + th:onclick="'javascript:Mydaishen()'" value="0">我的待审 | |
| 69 | + </button> | |
| 70 | + <button type="button" class="btn btn-sm margin-r-5 filter " id="yishen" | |
| 71 | + th:onclick="'javascript:yishen()'" value="1">我的已审 | |
| 72 | + </button> | |
| 73 | + <button type="button" class="btn btn-primary btn-sm margin-r-5" id="query" | |
| 74 | + onclick="openOrClose('forms')">查询 | |
| 75 | + <span id="a_up">▼</span><span id="a_down" style="display: none;">▲</span> | |
| 76 | + </button> | |
| 77 | + </div> | |
| 78 | + <div class="form-horizontal form-group-sm" id="forms" style="display: none;float: left;"> | |
| 79 | + <div class="btn-group margin-bottom col-md-6" style="padding: 0;width: 18%;float: left;"> | |
| 80 | + <div class="col-md-6" style="padding: 0;width: 100%;"> | |
| 81 | + <label for="liveApply_theme" class="control-label cb-toolbar">直播主题:</label> | |
| 82 | + <div class="col-sm-8" style="padding: 0;"> | |
| 83 | + <input class="form-control" type="text" value="" id="liveApply_theme"> | |
| 84 | + </div> | |
| 85 | + </div> | |
| 86 | + </div> | |
| 87 | + | |
| 88 | + <div class="btn-group margin-bottom col-md-6" style="padding-left:10px;width: 13%;float: left;"> | |
| 89 | + <div class="col-md-5" style="padding: 0;width: 100%;"> | |
| 90 | + <label for="shenhe_state" class="control-label cb-toolbar">状态:</label> | |
| 91 | + <div class="col-sm-8" style="padding: 0;"> | |
| 92 | + <select class="form-control" id="shenhe_state" name="shenhe_state"> | |
| 93 | + <option value="">全部</option> | |
| 94 | + <option value="0">未审核</option> | |
| 95 | + <option value="1">已通过</option> | |
| 96 | + <option value="2">已拒绝</option> | |
| 97 | + </select> | |
| 98 | + </div> | |
| 99 | + </div> | |
| 100 | + </div> | |
| 101 | + <div class="btn-group margin-bottom col-md-6" style="padding-left: 10px;width: 13%;float: left;"> | |
| 102 | + <div class="col-md-5" style="padding: 0;width: 100%;"> | |
| 103 | + <label for="business_model" class="control-label cb-toolbar">模式:</label> | |
| 104 | + <div class="col-sm-8" style="padding: 0;"> | |
| 105 | + <select class="form-control" id="business_model" name="business_model"> | |
| 106 | + <option value="">全部</option> | |
| 107 | + <option value="0">免费</option> | |
| 108 | + <option value="1">收费</option> | |
| 109 | + </select> | |
| 110 | + </div> | |
| 111 | + </div> | |
| 112 | + </div> | |
| 113 | + <div class="btn-group margin-bottom col-md-6" style="padding-left: 10px;width: 18%;float: left;"> | |
| 114 | + <div class="col-md-6" style="padding: 0;width: 100%;" th:if="${session.sessionUser.spid==0}"> | |
| 115 | + <label for="sp_desc" class="control-label cb-toolbar">sp简称:</label> | |
| 116 | + <div class="col-sm-8" style="padding: 0;"> | |
| 117 | + <input class="form-control" type="text" value="" id="sp_desc"> | |
| 118 | + </div> | |
| 119 | + </div> | |
| 120 | + </div> | |
| 121 | + <div class="btn-group margin-bottom col-md-6" style="padding-left: 10px;width: 20%;float: left;"> | |
| 122 | + <div class="col-md-12" style="padding: 0;width: 100%;"> | |
| 123 | + <label for="start_date" class="control-label cb-toolbar">预计时间:</label> | |
| 124 | + <div class="input-group col-md-8 date"> | |
| 125 | + <input class="form-control date" name="start_date" type="text" | |
| 126 | + id="start_date"> | |
| 127 | + <span class="input-group-addon"> | |
| 128 | + <span class="glyphicon glyphicon-calendar"></span> | |
| 129 | + </span> | |
| 130 | + </div> | |
| 131 | + </div> | |
| 132 | + </div> | |
| 133 | + <div class="btn-group margin-bottom col-md-6" style="padding-left: 0px;width: 18%;float: left;"> | |
| 134 | + <div class="col-md-9" style="padding: 0;width: 100%;"> | |
| 135 | + <label for="start_date" class="control-label cb-toolbar">至</label> | |
| 136 | + <div class="input-group col-md-8 date"> | |
| 137 | + <input class="form-control date" name="end_date" type="text" | |
| 138 | + id="end_date"> | |
| 139 | + <span class="input-group-addon"> | |
| 140 | + <span class="glyphicon glyphicon-calendar"></span> | |
| 141 | + </span> | |
| 142 | + </div> | |
| 143 | + </div> | |
| 144 | + </div> | |
| 145 | + | |
| 146 | + | |
| 147 | +<!-- <div class="btn-group margin-bottom col-md-6 pull-right" --> | |
| 148 | +<!-- style="position: relative;width: 40%;float: left !important;"> --> | |
| 149 | +<!-- <div class="col-md-12" style="width: 100%;padding: 0;"> --> | |
| 150 | +<!-- <div class="col-md-11" style="padding: 0;width: 25%;"> --> | |
| 151 | +<!-- <label for="start_date" class="control-label cb-toolbar">时间:</label> --> | |
| 152 | +<!-- <div class="input-group col-md-9 date"> --> | |
| 153 | +<!-- <input class="form-control date" name="start_date" type="text" --> | |
| 154 | +<!-- id="start_date"> --> | |
| 155 | +<!-- <span class="input-group-addon"> --> | |
| 156 | +<!-- <span class="glyphicon glyphicon-calendar"></span> --> | |
| 157 | +<!-- </span> --> | |
| 158 | +<!-- </div> --> | |
| 159 | +<!-- </div> --> | |
| 160 | +<!-- <div class="col-md-11" style="padding: 0;width: 25%;"> --> | |
| 161 | +<!-- <label for="start_date" class="control-label cb-toolbar">至</label> --> | |
| 162 | +<!-- <div class="input-group col-md-9 date"> --> | |
| 163 | +<!-- <input class="form-control date" name="end_date" type="text" --> | |
| 164 | +<!-- id="end_date"> --> | |
| 165 | +<!-- <span class="input-group-addon"> --> | |
| 166 | +<!-- <span class="glyphicon glyphicon-calendar"></span> --> | |
| 167 | +<!-- </span> --> | |
| 168 | +<!-- </div> --> | |
| 169 | +<!-- </div> --> | |
| 170 | + | |
| 171 | + | |
| 172 | +<!-- </div> --> | |
| 173 | +<!-- </div> --> | |
| 174 | + </div> | |
| 175 | + | |
| 176 | + <div class="fixed-table-container" style="padding-bottom: 0px;"> | |
| 177 | + <div class="fixed-table-body"> | |
| 178 | + <table id="table" data-toggle="table" class="table table-hover table-striped" | |
| 179 | + style="margin-bottom: 0; "> | |
| 180 | + <thead> | |
| 181 | + <tr> | |
| 182 | + <th class="bs-checkbox " style="width: 5%; " data-field="state" | |
| 183 | + tabindex="0"> | |
| 184 | + <div class="th-inner "><input name="btSelectAll" type="checkbox" | |
| 185 | + id="select_all"> | |
| 186 | + </div> | |
| 187 | + <div class="fht-cell"></div> | |
| 188 | + </th> | |
| 189 | + <th style="text-align: center; width: 6%; " data-field="sp_id_brief" | |
| 190 | + tabindex="0"> | |
| 191 | + <div class="th-inner ">sp简称</div> | |
| 192 | + <div class="fht-cell"></div> | |
| 193 | + </th> | |
| 194 | + <th style="text-align: center; width: 20%; " data-field="video_title" | |
| 195 | + tabindex="0"> | |
| 196 | + <div class="th-inner ">直播主题</div> | |
| 197 | + <div class="fht-cell"></div> | |
| 198 | + </th> | |
| 199 | + <th style="text-align: center; width: 3%; " data-field="is_hot_name" | |
| 200 | + tabindex="0"> | |
| 201 | + <div class="th-inner ">商务模式</div> | |
| 202 | + <div class="fht-cell"></div> | |
| 203 | + </th> | |
| 204 | + <th style="text-align: center; width: 6%; " data-field="updater" | |
| 205 | + tabindex="0"> | |
| 206 | + <div class="th-inner ">审核员</div> | |
| 207 | + <div class="fht-cell"></div> | |
| 208 | + </th> | |
| 209 | + <th style="text-align: center; width: 3%; " data-field="state_name" | |
| 210 | + tabindex="0"> | |
| 211 | + <div class="th-inner ">审核状态</div> | |
| 212 | + <div class="fht-cell"></div> | |
| 213 | + </th> | |
| 214 | + <th style="text-align: center; width: 3%; " data-field="state_name" | |
| 215 | + tabindex="0"> | |
| 216 | + <div class="th-inner ">审核类型</div> | |
| 217 | + <div class="fht-cell"></div> | |
| 218 | + </th> | |
| 219 | + <th style="text-align: center; width: 10%; " data-field="upload_time" | |
| 220 | + tabindex="0"> | |
| 221 | + <div class="th-inner ">直播申请时间</div> | |
| 222 | + <div class="fht-cell"></div> | |
| 223 | + </th> | |
| 224 | + <th style="text-align: center; width: 10%; " data-field="created_at" | |
| 225 | + tabindex="0"> | |
| 226 | + <div class="th-inner ">预计开播时间</div> | |
| 227 | + <div class="fht-cell"></div> | |
| 228 | + </th> | |
| 229 | + <th style="text-align: center; width: 17%; " data-field="action" | |
| 230 | + tabindex="0"> | |
| 231 | + <div class="th-inner ">操作</div> | |
| 232 | + <div class="fht-cell"></div> | |
| 233 | + </th> | |
| 234 | + </tr> | |
| 235 | + </thead> | |
| 236 | + <tbody> | |
| 237 | + <tr data-index="0" th:each="liveApply : ${liveApplyPage.list}"> | |
| 238 | + <td class="bs-checkbox "> | |
| 239 | + <input data-index="0" name="btSelectItem" type="checkbox" th:value="${liveApply.id}"> | |
| 240 | + </td> | |
| 241 | + <td style="text-align: center; width: 6%;" th:text="${liveApply.spid_desc}"></td> | |
| 242 | + <td style="text-align: center; width: 20%;" > | |
| 243 | + <a class="detail" th:href="@{'/liveApply/details/?id='+${liveApply.id}}"> | |
| 244 | + <span th:text="${liveApply.theme}">邓建国正面PK冯小刚</span> | |
| 245 | + </a> | |
| 246 | + </td> | |
| 247 | + <td style="text-align: center; width: 3%;" | |
| 248 | + th:text="${liveApply.business_model=='1'?'收费':'免费'}">收费 | |
| 249 | + </td> | |
| 250 | + <td style="text-align: center; width: 6%;" th:text="${liveApply.updater}">审核员 | |
| 251 | + </td> | |
| 252 | + <td style="text-align: center; width: 3%;"> | |
| 253 | + <span class="btn btn-sm btn-warning" th:if="${liveApply.shenhe_state==0}">待审</span> | |
| 254 | + <span class="btn btn-sm btn-success" th:if="${liveApply.shenhe_state==1}">通过</span> | |
| 255 | + <span class="btn btn-sm btn-danger" th:if="${liveApply.shenhe_state==2}">拒绝</span> | |
| 256 | + </td> | |
| 257 | + <td style="text-align: center; width: 3%;"> | |
| 258 | + <span th:if="${liveApply.shenhe_type==1}">免审</span> | |
| 259 | + <span th:if="${liveApply.shenhe_type==2}">机审</span> | |
| 260 | + <span th:if="${liveApply.shenhe_type==3}">人工审</span> | |
| 261 | + </td> | |
| 262 | + <td style="text-align: center; width: 10%;" | |
| 263 | + th:text="${#dates.format(liveApply.created_at, 'yyyy-MM-dd HH:mm:ss')}"> | |
| 264 | + 2018-03-07 16:56:20 | |
| 265 | + </td> | |
| 266 | + <td style="text-align: center; width: 10%;" | |
| 267 | + th:text="${#dates.format(liveApply.pre_start_time, 'yyyy-MM-dd HH:mm:ss')}"> | |
| 268 | + 2018-03-07 16:56:20 | |
| 269 | + </td> | |
| 270 | + <td style="text-align: center; width: 17%;"> | |
| 271 | + <a class="detail" th:href="@{'/liveApply/details/?id='+${liveApply.id}}"> | |
| 272 | + <button class="btn btn-info btn-sm" >查看</button> | |
| 273 | + </a> | |
| 274 | + <span th:if="${liveApply.shenhe_state==0 and liveApply.receive==0}"> </span> | |
| 275 | + <a th:href="@{'javascript:applyReceive('+${liveApply.id}+')'}" | |
| 276 | + th:if="${liveApply.shenhe_state==0 and liveApply.receive==0}"> | |
| 277 | + <button class="btn btn-primary btn-sm">认领</button> | |
| 278 | + </a> | |
| 279 | + <span th:if="${liveApply.shenhe_state==0 and liveApply.receive==1 and session.sessionUser.userId==liveApply.auditor}"> </span> | |
| 280 | + <a th:href="@{'javascript:applyRetReceive('+${liveApply.id}+')'}" | |
| 281 | + th:if="${liveApply.shenhe_state==0 and liveApply.receive==1 and session.sessionUser.userId==liveApply.auditor}"> | |
| 282 | + <button class="btn btn-warning btn-sm">退领</button> | |
| 283 | + </a> | |
| 284 | + </td> | |
| 285 | + </tr> | |
| 286 | + </tbody> | |
| 287 | + </table> | |
| 288 | + </div> | |
| 289 | + | |
| 290 | + | |
| 291 | + <!--分页处理--> | |
| 292 | + <div class="fixed-table-pagination" style="display: block;"> | |
| 293 | + <div class="pull-left pagination-detail"> | |
| 294 | + <span class="pagination-info" th:text="'共 '+${liveApplyPage.total}+' 条记录,每页显示'">共 0 条记录</span> | |
| 295 | + <select class="" id="pageSize" name="pageSize" onchange="selectPageSize()"> | |
| 296 | + <option value="10" th:selected="${pageSize==10}">10</option> | |
| 297 | + <option value="20" th:selected="${pageSize==20}">20</option> | |
| 298 | + <option value="50" th:selected="${pageSize==50}">50</option> | |
| 299 | + <option value="100" th:selected="${pageSize==100}">100</option> | |
| 300 | + </select> | |
| 301 | + <span class="pagination-info" >条记录</span> | |
| 302 | + </div> | |
| 303 | + <div class="pull-right pagination"> | |
| 304 | + <ul class="pagination" th:if="${liveApplyPage.pages>1}"> | |
| 305 | + <li class="page-pre"><a th:href="'javascript:fanye(1);'">‹‹</a></li> | |
| 306 | + <li class="page-pre" th:if="${!liveApplyPage.isFirstPage}"><a | |
| 307 | + th:onclick="'javascript:fanye(\''+${liveApplyPage.pageNum-1}+'\');'">‹</a> | |
| 308 | + </li> | |
| 309 | + | |
| 310 | + <li class="page-number" th:if="${liveApplyPage.pageNum-3>=1}"><a | |
| 311 | + th:onclick="'javascript:fanye(\''+${liveApplyPage.pageNum-3}+'\');'" | |
| 312 | + th:text="${liveApplyPage.pageNum-3}">2</a></li> | |
| 313 | + <li class="page-number" th:if="${liveApplyPage.pageNum-2>=1}"><a | |
| 314 | + th:onclick="'javascript:fanye(\''+${liveApplyPage.pageNum-2}+'\');'" | |
| 315 | + th:text="${liveApplyPage.pageNum-2}">2</a></li> | |
| 316 | + <li class="page-number" th:if="${liveApplyPage.pageNum-1>=1}"><a | |
| 317 | + th:onclick="'javascript:fanye(\''+${liveApplyPage.pageNum-1}+'\');'" | |
| 318 | + th:text="${liveApplyPage.pageNum-1}">2</a></li> | |
| 319 | + <li class="page-number active"><a href="javaScript:void(0);" | |
| 320 | + th:text="${liveApplyPage.pageNum}">2</a></li> | |
| 321 | + <li class="page-number" th:if="${liveApplyPage.pageNum+1<=liveApplyPage.pages}"><a | |
| 322 | + th:onclick="'javascript:fanye(\''+${liveApplyPage.pageNum+1}+'\');'" | |
| 323 | + th:text="${liveApplyPage.pageNum+1}">2</a></li> | |
| 324 | + <li class="page-number" th:if="${liveApplyPage.pageNum+2<=liveApplyPage.pages}"><a | |
| 325 | + th:onclick="'javascript:fanye(\''+${liveApplyPage.pageNum+2}+'\');'" | |
| 326 | + th:text="${liveApplyPage.pageNum+2}">2</a></li> | |
| 327 | + <li class="page-number" th:if="${liveApplyPage.pageNum+3<=liveApplyPage.pages}"><a | |
| 328 | + th:onclick="'javascript:fanye(\''+${liveApplyPage.pageNum+3}+'\');'" | |
| 329 | + th:text="${liveApplyPage.pageNum+3}">2</a></li> | |
| 330 | + | |
| 331 | + <li class="page-next" th:if="${!liveApplyPage.isLastPage}"><a | |
| 332 | + th:onclick="'javascript:fanye(\''+${liveApplyPage.pageNum+1}+'\');'">›</a> | |
| 333 | + </li> | |
| 334 | + <li class="page-next"><a | |
| 335 | + th:onclick="'javascript:fanye(\''+${liveApplyPage.pages}+'\');'">››</a> | |
| 336 | + </li> | |
| 337 | + </ul> | |
| 338 | + </div> | |
| 339 | + </div> | |
| 340 | + </div> | |
| 341 | + </div> | |
| 342 | + </div> | |
| 343 | + </div> | |
| 344 | + </div> | |
| 345 | + </section> | |
| 346 | + </div> | |
| 347 | + <script th:inline="javascript"> | |
| 348 | + $(function () { | |
| 349 | + //按钮颜色设置 | |
| 350 | + var state = [[${param.shenhe_state}]] ? [[${param.shenhe_state}]][0] : null; | |
| 351 | + var receive = [[${param.receive}]] ? [[${param.receive}]][0] : null; | |
| 352 | + var stateIsNull = $.trim(state) == ""; | |
| 353 | + var receiveIsNull = $.trim(receive) == ""; | |
| 354 | + if (receiveIsNull) { | |
| 355 | + $("#quanbu").addClass("btn-info"); | |
| 356 | + } else if (state == '0' && receive == '0') { | |
| 357 | + $("#daishen").addClass("btn-warning"); | |
| 358 | + } else if (state == '0' && receive == '1') { | |
| 359 | + $("#Mydaishen").addClass("btn-success"); | |
| 360 | + } else if (!stateIsNull && state != '0' && receive == '1') { | |
| 361 | + $("#yishen").addClass("btn-danger"); | |
| 362 | + } | |
| 363 | + | |
| 364 | + }) | |
| 365 | + | |
| 366 | + //翻页函数 | |
| 367 | + function fanye(page) { | |
| 368 | + var param = location.search; | |
| 369 | + if (param.indexOf("page=") != -1) { | |
| 370 | + var se = param.replace("?", "");//去掉问号,防止问号和要去掉的参数相连 | |
| 371 | + var split = se.split("&"); | |
| 372 | + var h = ""; | |
| 373 | + for (var i = 0; i < split.length; i++) { | |
| 374 | + var s = split[i]; | |
| 375 | + if (s.indexOf("page=") < 0) h = h + "&" + split[i]; | |
| 376 | + } | |
| 377 | + h = h.substring(1, h.length); | |
| 378 | + window.location.href = "/liveApply/page?" + h + "&page=" + page; | |
| 379 | + } else { | |
| 380 | + param = param.substring(1, param.length); | |
| 381 | + window.location.href = "/liveApply/page?" + param + "&page=" + page; | |
| 382 | + } | |
| 383 | + } | |
| 384 | + | |
| 385 | + //选择每页数量触发函数 | |
| 386 | + function selectPageSize(){ | |
| 387 | + var pageSize=$("#pageSize").val(); | |
| 388 | + var param = location.search; | |
| 389 | + if (param.indexOf("pageSize=") != -1) { | |
| 390 | + var se = param.replace("?", "");//去掉问号,防止问号和要去掉的参数相连 | |
| 391 | + var split = se.split("&"); | |
| 392 | + var h = ""; | |
| 393 | + for (var i = 0; i < split.length; i++) { | |
| 394 | + var s = split[i]; | |
| 395 | + if (s.indexOf("pageSize=") < 0 &&s.indexOf("page=") < 0) h = h + "&" + split[i]; | |
| 396 | + } | |
| 397 | + h = h.substring(1, h.length); | |
| 398 | + window.location.href = "/liveApply/page?" + h + "&pageSize=" + pageSize; | |
| 399 | + } else { | |
| 400 | + var se = param.replace("?", "");//去掉问号,防止问号和要去掉的参数相连 | |
| 401 | + var split = se.split("&"); | |
| 402 | + var h = ""; | |
| 403 | + for (var i = 0; i < split.length; i++) { | |
| 404 | + var s = split[i]; | |
| 405 | + if (s.indexOf("page=") < 0) h = h + "&" + split[i]; | |
| 406 | + } | |
| 407 | + h = h.substring(1, h.length); | |
| 408 | + window.location.href = "/liveApply/page?" + h + "&pageSize=" + pageSize; | |
| 409 | + } | |
| 410 | + } | |
| 411 | + | |
| 412 | + //导出excel | |
| 413 | + function daochu() { | |
| 414 | + var param = location.search; | |
| 415 | + window.location.href = "/liveApply/excel" + param; | |
| 416 | + } | |
| 417 | + | |
| 418 | + var liveApply_theme = ""; | |
| 419 | + var start_date =""; | |
| 420 | + var end_date = ""; | |
| 421 | + var sp_desc =""; | |
| 422 | + var business_model = ""; | |
| 423 | + var shenhe_state = ""; | |
| 424 | + var count = ""; | |
| 425 | + | |
| 426 | + function updateValue(){ | |
| 427 | + liveApply_theme = $("#liveApply_theme").val(); | |
| 428 | + start_date = $("#start_date").val(); | |
| 429 | + end_date = $("#end_date").val(); | |
| 430 | + shenhe_state = $("#shenhe_state").val(); | |
| 431 | + business_model = $("#business_model").val(); | |
| 432 | + count = $("#pageSize").val(); | |
| 433 | + var spId=[[${session.sessionUser.spid}]]; | |
| 434 | + if(spId==0){ | |
| 435 | + sp_desc = $("#sp_desc").val(); | |
| 436 | + } | |
| 437 | + } | |
| 438 | + | |
| 439 | + | |
| 440 | + //全部 | |
| 441 | + function quanbu() { | |
| 442 | + updateValue(); | |
| 443 | + var receive = ""; | |
| 444 | + window.location.href = "/liveApply/page?theme=" + liveApply_theme + "&start_date=" + start_date + "&end_date=" + end_date + "&shenhe_state=" + shenhe_state + "&receive=" + receive + "&business_model=" + business_model + "&sp_desc=" + sp_desc+"&pageSize="+count; | |
| 445 | + } | |
| 446 | + | |
| 447 | + //全部待领 | |
| 448 | + $('#daishen').click(function () { | |
| 449 | + updateValue(); | |
| 450 | + if($.trim(shenhe_state) == '') shenhe_state=0; | |
| 451 | + var receive = 0; | |
| 452 | + window.location.href = "/liveApply/page?theme=" + liveApply_theme + "&start_date=" + start_date + "&end_date=" + end_date + "&shenhe_state=" + shenhe_state + "&receive=" + receive + "&business_model=" + business_model + "&sp_desc=" + sp_desc+"&pageSize="+count; | |
| 453 | + }); | |
| 454 | + //我的待审核 | |
| 455 | + $('#Mydaishen').click(function () { | |
| 456 | + updateValue(); | |
| 457 | + var receive = 1; | |
| 458 | + if($.trim(shenhe_state) == '') shenhe_state=0; | |
| 459 | + window.location.href = "/liveApply/page?theme=" + liveApply_theme + "&start_date=" + start_date + "&end_date=" + end_date + "&shenhe_state=" + shenhe_state + "&receive=" + receive + "&business_model=" + business_model + "&sp_desc=" + sp_desc+"&pageSize="+count; | |
| 460 | + }); | |
| 461 | + //我的已审核 | |
| 462 | + $('#yishen').click(function () { | |
| 463 | + updateValue(); | |
| 464 | + var receive = 1; | |
| 465 | + if($.trim(shenhe_state) == '') shenhe_state=3;//审核状态,3代表通过和拒绝都查询 | |
| 466 | + window.location.href = "/liveApply/page?theme=" + liveApply_theme + "&start_date=" + start_date + "&end_date=" + end_date + "&shenhe_state=" + shenhe_state + "&receive=" + receive + "&business_model=" + business_model + "&sp_desc=" + sp_desc+"&pageSize="+count; | |
| 467 | + }); | |
| 468 | + | |
| 469 | + | |
| 470 | + //查询 | |
| 471 | + $('#videos_query').click(function () { | |
| 472 | + window.location.href = "/liveApply/page?theme=" + liveApply_theme + "&start_date=" + start_date + "&end_date=" + end_date + "&shenhe_state=" + shenhe_state + "&business_model=" + business_model + "&sp_desc=" + sp_desc+"&pageSize="+count; | |
| 473 | + }); | |
| 474 | + /*全选的操作*/ | |
| 475 | + $('#select_all').click(function () { | |
| 476 | + if ($("[name=btSelectItem]:checkbox:not(:checked)").length > 0) { | |
| 477 | + $("#select_all").prop('checked', true); | |
| 478 | + $("[name=btSelectItem]:checkbox").each(function () { | |
| 479 | + $(this).prop('checked', true); | |
| 480 | + }); | |
| 481 | + } else { | |
| 482 | + $("#select_all").prop('checked', false); | |
| 483 | + $("[name=btSelectItem]:checkbox").each(function () { | |
| 484 | + $(this).prop('checked', false); | |
| 485 | + }); | |
| 486 | + } | |
| 487 | + }); | |
| 488 | + | |
| 489 | + /** | |
| 490 | + * 认领 | |
| 491 | + */ | |
| 492 | + function receive(n) { | |
| 493 | + if (n > 0) { | |
| 494 | + applyReceiveNum(n); | |
| 495 | + } else { | |
| 496 | + var rows = $("[name=btSelectItem]:checkbox:checked"); | |
| 497 | + if (rows.length > 0) { | |
| 498 | + var ids = ""; | |
| 499 | + rows.each(function (i, e) { | |
| 500 | + ids = ids + "," + e.value; | |
| 501 | + }) | |
| 502 | + ids = ids.substring(1); | |
| 503 | + applyReceive(ids); | |
| 504 | + } else { | |
| 505 | + alert("请选择要认领的内容!"); | |
| 506 | + } | |
| 507 | + } | |
| 508 | + } | |
| 509 | + | |
| 510 | + //认领选中请求 | |
| 511 | + function applyReceive(ids) { | |
| 512 | + $.post("/liveApply/receive?ids=" + ids, function (data) { | |
| 513 | + if (data.errorCode == 0) { | |
| 514 | + alert(data.errorMessage); | |
| 515 | + location.href = location.href; | |
| 516 | + } else { | |
| 517 | + alert(data.errorMessage); | |
| 518 | + } | |
| 519 | + }) | |
| 520 | + } | |
| 521 | + | |
| 522 | + //认领多条请求 | |
| 523 | + function applyReceiveNum(num) { | |
| 524 | + $.post("/liveApply/receive?num=" + num, function (data) { | |
| 525 | + if (data.errorCode == 0) { | |
| 526 | + alert(data.errorMessage); | |
| 527 | + location.href = location.href; | |
| 528 | + } else { | |
| 529 | + alert(data.errorMessage); | |
| 530 | + } | |
| 531 | + }) | |
| 532 | + } | |
| 533 | + | |
| 534 | + //退领选中内容 | |
| 535 | + function retReceive() { | |
| 536 | + var rows = $("[name=btSelectItem]:checkbox:checked"); | |
| 537 | + if (rows.length > 0) { | |
| 538 | + var r = confirm("您确定退领选中的" + rows.length + "条内容吗?"); | |
| 539 | + if (r == true) { | |
| 540 | + var ids = ""; | |
| 541 | + rows.each(function (i, e) { | |
| 542 | + ids = ids + "," + e.value; | |
| 543 | + }) | |
| 544 | + ids = ids.substring(1); | |
| 545 | + applyRetReceive(ids); | |
| 546 | + } | |
| 547 | + } else { | |
| 548 | + alert("没有选中的数据!"); | |
| 549 | + } | |
| 550 | + } | |
| 551 | + | |
| 552 | + //退领 | |
| 553 | + function applyRetReceive(ids) { | |
| 554 | + $.post("/liveApply/retReceive?ids=" + ids, function (data) { | |
| 555 | + if (data.errorCode == 0) { | |
| 556 | + alert(data.errorMessage); | |
| 557 | + location.href = location.href; | |
| 558 | + } else { | |
| 559 | + alert(data.errorMessage); | |
| 560 | + } | |
| 561 | + }) | |
| 562 | + } | |
| 563 | + | |
| 564 | + //拒绝(打回)弹窗 | |
| 565 | + function repulse() { | |
| 566 | + var rows = $("[name=btSelectItem]:checkbox:checked"); | |
| 567 | + if (rows.length > 0) { | |
| 568 | + var r = confirm("您确定拒绝选中的" + rows.length + "条内容吗?"); | |
| 569 | + if (r == true) { | |
| 570 | + $('#msgModal').modal('show'); | |
| 571 | + } | |
| 572 | + } else { | |
| 573 | + alert("没有选中的数据!"); | |
| 574 | + } | |
| 575 | + } | |
| 576 | + | |
| 577 | + //批量打回 | |
| 578 | + function repulseSubmit() { | |
| 579 | + var rows = $("[name=btSelectItem]:checkbox:checked"); | |
| 580 | + var ids = ""; | |
| 581 | + rows.each(function (i, e) { | |
| 582 | + ids = ids + "," + e.value; | |
| 583 | + }) | |
| 584 | + ids = ids.substring(1); | |
| 585 | + var msg = $("#reviewMsg").val(); | |
| 586 | + $.post("/liveApply/shenheLiveApply?ids=" + ids + "&msg=" + msg+"&state="+2, function (data) { | |
| 587 | + if (data.errorCode == 0) { | |
| 588 | + alert(data.errorMessage); | |
| 589 | + location.href = location.href; | |
| 590 | + } else { | |
| 591 | + alert(data.errorMessage); | |
| 592 | + } | |
| 593 | + }) | |
| 594 | + } | |
| 595 | + | |
| 596 | + //批量通过 | |
| 597 | + function morePass() { | |
| 598 | + var rows = $("[name=btSelectItem]:checkbox:checked"); | |
| 599 | + if (rows.length > 0) { | |
| 600 | + var r = confirm("您确定通过选中的" + rows.length + "条内容吗?"); | |
| 601 | + if (r == true) { | |
| 602 | + var ids = ""; | |
| 603 | + rows.each(function (i, e) { | |
| 604 | + ids = ids + "," + e.value; | |
| 605 | + }) | |
| 606 | + ids = ids.substring(1); | |
| 607 | + var msg ="直播申请审核通过"; | |
| 608 | + $.post("/liveApply/shenheLiveApply?ids=" + ids + "&msg=" + msg+"&state="+1, function (data) { | |
| 609 | + if (data.errorCode == 0) { | |
| 610 | + alert(data.errorMessage); | |
| 611 | + location.href = location.href; | |
| 612 | + } else { | |
| 613 | + alert(data.errorMessage); | |
| 614 | + } | |
| 615 | + }) | |
| 616 | + } | |
| 617 | + } else { | |
| 618 | + alert("没有选中的数据!"); | |
| 619 | + } | |
| 620 | + } | |
| 621 | + </script> | |
| 622 | + <!-- 模态框(Modal) --> | |
| 623 | + <div class="modal fade" id="msgModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"> | |
| 624 | + <div class="modal-dialog"> | |
| 625 | + <div class="modal-content" style="margin-top: 30%;"> | |
| 626 | + <div class="modal-header"> | |
| 627 | + <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> | |
| 628 | + <h4 class="modal-title" id="myModalLabel">审核意见</h4> | |
| 629 | + </div> | |
| 630 | + <div class="modal-body"> | |
| 631 | + <div class="form-group" style="margin-bottom: 0;"> | |
| 632 | + <textarea id="reviewMsg" style="width: 100%;height: 80px;"></textarea> | |
| 633 | + </div> | |
| 634 | + <div class="form-group"> | |
| 635 | + </div> | |
| 636 | + </div> | |
| 637 | + <div class="modal-footer"> | |
| 638 | + <button type="button" class="btn btn-default" data-dismiss="modal">取消</button> | |
| 639 | + <button type="button" class="btn btn-primary" onclick="javascript:repulseSubmit();">提交</button> | |
| 640 | + </div> | |
| 641 | + </div><!-- /.modal-content --> | |
| 642 | + </div><!-- /.modal-dialog --> | |
| 643 | + </div> | |
| 644 | + <!-- /.modal --> | |
| 645 | + | |
| 646 | + <!--保留之前的样式代码--> | |
| 647 | + <script> | |
| 648 | + $('#a_down').hide(); | |
| 649 | + | |
| 650 | + /*查询样式*/ | |
| 651 | + function openOrClose(id_name_str) { | |
| 652 | + var id_name = '#' + id_name_str; | |
| 653 | + if ($(id_name).css('display') == 'block') { | |
| 654 | + $(id_name).slideUp(350); | |
| 655 | + $('#a_up').show(); | |
| 656 | + $('#a_down').hide(); | |
| 657 | + } else { | |
| 658 | + $(id_name).slideDown(350); | |
| 659 | + $('#a_up').hide(); | |
| 660 | + $('#a_down').show(); | |
| 661 | + } | |
| 662 | + } | |
| 663 | + | |
| 664 | + /*时间插件*/ | |
| 665 | + $('.date').datetimepicker({ | |
| 666 | +// format: 'YYYY-MM-DD HH:mm:ss', | |
| 667 | + format: 'YYYY-MM-DD', | |
| 668 | + locale: "zh-CN", | |
| 669 | + toolbarPlacement: 'bottom', | |
| 670 | + showClear: true, | |
| 671 | + }); | |
| 672 | + </script> | |
| 673 | + <footer th:replace="../templates/common/foot::foot"></footer> | |
| 674 | + <!-- Add the sidebar's background. This div must be placed | |
| 675 | + immediately after the control sidebar --> | |
| 676 | + <div class="control-sidebar-bg" style="position: fixed; height: auto;"></div> | |
| 677 | +</div><!-- ./wrapper --> | |
| 678 | + | |
| 679 | +<!-- Resolve conflict in jQuery UI tooltip with Bootstrap tooltip --> | |
| 680 | +<script type="text/javascript"> | |
| 681 | + $('div.alert').not('.alert-danger').delay(3000).slideUp(300); | |
| 682 | +</script> | |
| 683 | + | |
| 684 | +<!-- AdminLTE App --> | |
| 685 | +<script src="./../../static/js/app.min.js"></script> | |
| 686 | +<!-- AdminLTE for demo purposes --> | |
| 687 | +<script src="./../../static/js/sidebar.js"></script> | |
| 688 | +</body> | |
| 689 | +</html> | |
| 0 | 690 | \ No newline at end of file | ... | ... |
src/main/resources/templates/page/liveApplyDetail.html
0 → 100644
| 1 | +<!DOCTYPE html> | |
| 2 | +<html lang="zh" xmlns:th="http://www.thymeleaf.org"> | |
| 3 | +<head th:replace="../templates/common/head::head"></head> | |
| 4 | + | |
| 5 | +<body class="skin-blue sidebar-mini"> | |
| 6 | + | |
| 7 | +<div class="wrapper"> | |
| 8 | + | |
| 9 | + <div th:replace="../templates/common/frame::frame"></div> | |
| 10 | + | |
| 11 | + <div class="content-wrapper" style="min-height: 788px;"> | |
| 12 | + <section class="content-header"> | |
| 13 | + <h1> | |
| 14 | + 直播申请详情 | |
| 15 | + </h1> | |
| 16 | + <ol class="breadcrumb"> | |
| 17 | + <li> 首页</li> | |
| 18 | + <li class="active">直播审核</li> | |
| 19 | + </ol> | |
| 20 | + </section> | |
| 21 | + | |
| 22 | + <section class="content"> | |
| 23 | + <div class="row"> | |
| 24 | + <div class="col-xs-12"> | |
| 25 | + <div class="box box-info"> | |
| 26 | + <div class="box-body form-horizontal"> | |
| 27 | + <div align="center" id="tabContents" class="tab-content"> | |
| 28 | + <span style="font-size:30px;font-weight: bold;color:#F4A460;">中国网家家直播申请单</span> | |
| 29 | + <table border="1" style="background-color:#F5FFFA;width:80%;font-size:20px" id="table"> | |
| 30 | + <tr align="center" valign="middle" height="40px"> | |
| 31 | + <td width="25%" >直播发起人</td> | |
| 32 | + <td width="30%" colspan="2" > | |
| 33 | + <span style="color:#DC143C" th:text="${shyLiveapply.sender}">11111111111111</span> | |
| 34 | + </td> | |
| 35 | + <td width="15%">联系方式</td> | |
| 36 | + <td width="30%" colspan="2"> | |
| 37 | + <span style="color:#DC143C" th:text="${shyLiveapply.mobile}">11111111111111</span> | |
| 38 | + </td> | |
| 39 | + </tr> | |
| 40 | + <tr align="center" valign="middle" height="40px"> | |
| 41 | + <td >直播发起单位</td> | |
| 42 | + <td colspan="5"> | |
| 43 | + <span style="color:#DC143C" th:text="${shyLiveapply.organization}">11111111111111</span> | |
| 44 | + </td> | |
| 45 | + </tr> | |
| 46 | + <tr align="center" valign="middle" height="40px"> | |
| 47 | + <td >直播主题</td> | |
| 48 | + <td colspan="5"> | |
| 49 | + <span style="color:#DC143C" th:text="${shyLiveapply.theme}">11111111111111</span> | |
| 50 | + </td> | |
| 51 | + </tr> | |
| 52 | + <tr align="center" valign="middle" height="40px"> | |
| 53 | + <td >直播时间</td> | |
| 54 | + <td colspan="5"> | |
| 55 | + <span style="color:#DC143C" th:text="${#dates.format(shyLiveapply.pre_start_time, 'yyyy-MM-dd HH:mm:ss')}">11111111111111</span> | |
| 56 | + <span>~</span> | |
| 57 | + <span style="color:#DC143C" th:text="${#dates.format(shyLiveapply.pre_end_time, 'yyyy-MM-dd HH:mm:ss')}">11111111111111</span> | |
| 58 | + </td> | |
| 59 | + </tr> | |
| 60 | + <tr align="center" valign="middle" height="40px"> | |
| 61 | + <td >商务模式</td> | |
| 62 | + <td colspan="5"> | |
| 63 | + <input type="checkbox" style="height: 24px;width: 24px;" th:checked="${shyLiveapply.business_model==0}" disabled/> | |
| 64 | + <span th:style="${shyLiveapply.business_model==0?'color:#DC143C':''}">免费</span> | |
| 65 | + <span> </span> | |
| 66 | + <input type="checkbox" style="height: 24px;width: 24px;" th:checked="${shyLiveapply.business_model==1}" disabled/> | |
| 67 | + <span th:style="${shyLiveapply.business_model==1?'color:#DC143C':''}">收费</span> | |
| 68 | + </td> | |
| 69 | + </tr> | |
| 70 | + <tr align="center" valign="middle" height="40px"> | |
| 71 | + <td >内容属性</td> | |
| 72 | + <td colspan="5"> | |
| 73 | + <input type="checkbox" style="height: 24px;width: 24px;" th:checked="${shyLiveapply.content_property==1}" disabled/> | |
| 74 | + <span th:style="${shyLiveapply.content_property==1?'color:#DC143C':''}">商业类活动</span> | |
| 75 | + <span> </span> | |
| 76 | + <input type="checkbox" style="height: 24px;width: 24px;" th:checked="${shyLiveapply.content_property==0}" disabled/> | |
| 77 | + <span th:style="${shyLiveapply.content_property==0?'color:#DC143C':''}">非商业类活动</span> | |
| 78 | + </td> | |
| 79 | + </tr> | |
| 80 | + <tr align="center" valign="middle" height="100px"> | |
| 81 | + <td >内容简述</td> | |
| 82 | + <td colspan="5"> | |
| 83 | + <span style="color:#DC143C" th:text="${shyLiveapply.simple_content}">11111111111111</span> | |
| 84 | + </td> | |
| 85 | + </tr> | |
| 86 | + <tr align="center" valign="middle" height="40px"> | |
| 87 | + <td >要点报备</td> | |
| 88 | + <td colspan="5"> | |
| 89 | + <input type="checkbox" style="height: 24px;width: 24px;" th:checked="${#strings.contains(shyLiveapply.point_key,'0')}" disabled/> | |
| 90 | + <span th:style="${#strings.contains(shyLiveapply.point_key,'0')?'color:#DC143C':''}">品牌植入</span> | |
| 91 | + <span> </span> | |
| 92 | + <input type="checkbox" style="height: 24px;width: 24px;" th:checked="${#strings.contains(shyLiveapply.point_key,'1')}" disabled/> | |
| 93 | + <span th:style="${#strings.contains(shyLiveapply.point_key,'1')?'color:#DC143C':''}">广告植入</span> | |
| 94 | + <span> </span> | |
| 95 | + <input type="checkbox" style="height: 24px;width: 24px;" th:checked="${#strings.contains(shyLiveapply.point_key,'2')}" disabled/> | |
| 96 | + <span th:style="${#strings.contains(shyLiveapply.point_key,'2')?'color:#DC143C':''}">商品推销</span> | |
| 97 | + <span> </span> | |
| 98 | + <input type="checkbox" style="height: 24px;width: 24px;" th:checked="${#strings.contains(shyLiveapply.point_key,'3')}" disabled/> | |
| 99 | + <span th:style="${#strings.contains(shyLiveapply.point_key,'3')?'color:#DC143C':''}">网家家独家麦标</span> | |
| 100 | + </td> | |
| 101 | + </tr> | |
| 102 | + <tr align="center" valign="middle" height="40px"> | |
| 103 | + <td >直播地点</td> | |
| 104 | + <td colspan="5"> | |
| 105 | + <span style="color:#DC143C" th:text="${shyLiveapply.live_place}">11111111111111</span> | |
| 106 | + </td> | |
| 107 | + </tr> | |
| 108 | + <tr align="center" valign="middle" height="40px"> | |
| 109 | + <td >推流地址</td> | |
| 110 | + <td colspan="5"> | |
| 111 | + <span style="color:#DC143C" th:text="${shyLiveapply.push_url}">11111111111111</span> | |
| 112 | + </td> | |
| 113 | + </tr> | |
| 114 | + <tr align="center" valign="middle" height="40px"> | |
| 115 | + <td >拉流地址</td> | |
| 116 | + <td colspan="5"> | |
| 117 | + <span style="color:#DC143C" th:text="${shyLiveapply.pull_url}">11111111111111</span> | |
| 118 | + </td> | |
| 119 | + </tr> | |
| 120 | + <tr align="center" valign="middle" height="40px"> | |
| 121 | + <td >播出平台及通道</td> | |
| 122 | + <td colspan="5"> | |
| 123 | + <input type="checkbox" style="height: 24px;width: 24px;" th:checked="${#strings.contains(shyLiveapply.platforms,'0')}" disabled/> | |
| 124 | + <span th:style="${#strings.contains(shyLiveapply.platforms,'0')?'color:#DC143C':''}">网家家</span> | |
| 125 | + <span> </span> | |
| 126 | + <input type="checkbox" style="height: 24px;width: 24px;" th:checked="${#strings.contains(shyLiveapply.platforms,'1')}" disabled/> | |
| 127 | + <span th:style="${#strings.contains(shyLiveapply.platforms,'1')?'color:#DC143C':''}">CNlive网站</span> | |
| 128 | + <span> </span> | |
| 129 | + <input type="checkbox" style="height: 24px;width: 24px;" th:checked="${#strings.contains(shyLiveapply.platforms,'2')}" disabled/> | |
| 130 | + <span th:style="${#strings.contains(shyLiveapply.platforms,'2')?'color:#DC143C':''}">@TV互动电视</span> | |
| 131 | +<!-- <span> </span> --> | |
| 132 | +<!-- <input type="checkbox" style="height: 24px;width: 24px;" disabled/>其他平台 --> | |
| 133 | + </td> | |
| 134 | + </tr> | |
| 135 | + </table> | |
| 136 | + | |
| 137 | + <hr> | |
| 138 | + </div> | |
| 139 | + | |
| 140 | + <div class="form-group"> | |
| 141 | + <input type="text" hidden="hidden" id="shyLiveapply_id" th:value="${shyLiveapply.id}"> | |
| 142 | + </div> | |
| 143 | + | |
| 144 | + | |
| 145 | + <div class="box-footer"> | |
| 146 | + <div class="col-sm-5"> | |
| 147 | + <button type="button" class="btn btn-danger pull-right" onclick="live(2);">拒 绝 | |
| 148 | + </button> | |
| 149 | + </div> | |
| 150 | + | |
| 151 | + <div class="col-sm-1" style="margin-right:26px;"> | |
| 152 | + <button type="button" class="btn btn-primary pull-right" onclick="live(1);">通 过 | |
| 153 | + </button> | |
| 154 | + </div> | |
| 155 | + | |
| 156 | + <div class="col-sm-1"> | |
| 157 | + <button type="button" class="btn btn-info pull-right" | |
| 158 | + onclick="self.location=document.referrer;">返回列表 | |
| 159 | + </button> | |
| 160 | + </div> | |
| 161 | + </div> | |
| 162 | + | |
| 163 | + <!-- 模态框(Modal) --> | |
| 164 | + <div class="modal fade" id="msgModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"> | |
| 165 | + <div class="modal-dialog"> | |
| 166 | + <div class="modal-content" style="margin-top: 30%;"> | |
| 167 | + <div class="modal-header"> | |
| 168 | + <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> | |
| 169 | + <h4 class="modal-title" id="myModalLabel">审核意见</h4> | |
| 170 | + </div> | |
| 171 | + <div class="modal-body"> | |
| 172 | + <div class="form-group" style="margin-bottom: 0;"> | |
| 173 | + <textarea id="reviewMsg" style="width: 100%;height: 80px;"></textarea> | |
| 174 | + </div> | |
| 175 | + <div class="form-group"> | |
| 176 | + </div> | |
| 177 | + </div> | |
| 178 | + <div class="modal-footer"> | |
| 179 | + <button type="button" class="btn btn-default" data-dismiss="modal">取消</button> | |
| 180 | + <button type="button" class="btn btn-primary" onclick="javascript:repulseSubmit();">提交</button> | |
| 181 | + </div> | |
| 182 | + </div><!-- /.modal-content --> | |
| 183 | + </div><!-- /.modal-dialog --> | |
| 184 | + </div> | |
| 185 | + <!-- /.modal --> | |
| 186 | + <script th:inline="javascript"> | |
| 187 | + var liveId = [[${shyLiveapply.id}]]; | |
| 188 | + | |
| 189 | + //审核操作,status=1为通过 | |
| 190 | + function live(status) { | |
| 191 | + if (status == 1) { | |
| 192 | + var msg ="直播申请审核通过"; | |
| 193 | + $.post("/liveApply/shenheLiveApply?ids=" + liveId + "&msg=" + msg+"&state="+1, function (data) { | |
| 194 | + if (data.errorCode == 0) { | |
| 195 | + //location.href = history.back(); | |
| 196 | + alert(data.errorMessage); | |
| 197 | + self.location = document.referrer; | |
| 198 | + } else { | |
| 199 | + alert(data.errorMessage); | |
| 200 | + } | |
| 201 | + }) | |
| 202 | + } else { | |
| 203 | + var r = confirm("您确定拒绝本条内容吗?"); | |
| 204 | + if (r == true) { | |
| 205 | + $('#msgModal').modal('show'); | |
| 206 | + } | |
| 207 | + } | |
| 208 | + } | |
| 209 | + //提交拒绝 | |
| 210 | + function repulseSubmit() { | |
| 211 | + var msg = $("#reviewMsg").val(); | |
| 212 | + $.post("/liveApply/shenheLiveApply?ids=" + liveId + "&msg=" + msg+"&state="+2, function (data) { | |
| 213 | + if (data.errorCode == 0) { | |
| 214 | + alert(data.errorMessage); | |
| 215 | + self.location = document.referrer; | |
| 216 | + } else { | |
| 217 | + alert(data.errorMessage); | |
| 218 | + } | |
| 219 | + }) | |
| 220 | + } | |
| 221 | + | |
| 222 | + </script> | |
| 223 | + | |
| 224 | + </div> | |
| 225 | + </div> | |
| 226 | + </div> | |
| 227 | + </div> | |
| 228 | + | |
| 229 | + </section> | |
| 230 | + </div> | |
| 231 | + | |
| 232 | + | |
| 233 | + <footer th:replace="../templates/common/foot::foot"></footer> | |
| 234 | + | |
| 235 | + <div class="control-sidebar-bg" style="position: fixed; height: auto;"></div> | |
| 236 | + | |
| 237 | +</div><!-- ./wrapper --> | |
| 238 | + | |
| 239 | +<script type="text/javascript"> | |
| 240 | + $('div.alert').not('.alert-danger').delay(3000).slideUp(300); | |
| 241 | +</script> | |
| 242 | + | |
| 243 | +<script src="../../static/js/app.min.js"></script> | |
| 244 | +<script src="../../static/js/sidebar.js"></script> | |
| 245 | + | |
| 246 | + | |
| 247 | +</body> | |
| 248 | +</html> | |
| 0 | 249 | \ No newline at end of file | ... | ... |