Commit 18675c8224f0b3bddb517093ae9bdedc2d9dce61
Merge branch 'dev'
# Conflicts: # pom.xml # src/main/java/com/cnlive/shenhe/controller/UsersController.java # src/main/resources/application.properties
Showing
13 changed files
with
2793 additions
and
2 deletions
src/main/java/com/cnlive/shenhe/api/AudioControllerApi.java
0 → 100644
| 1 | +package com.cnlive.shenhe.api; | |
| 2 | + | |
| 3 | +import com.alibaba.fastjson.JSONObject; | |
| 4 | +import com.cnlive.shenhe.bean.ErrorEnum; | |
| 5 | +import com.cnlive.shenhe.bean.ResponseBean; | |
| 6 | +import com.cnlive.shenhe.entity.ShyAudio; | |
| 7 | +import com.cnlive.shenhe.serviceImpl.AudioServiceImpl; | |
| 8 | +import com.google.common.collect.EvictingQueue; | |
| 9 | +import org.slf4j.Logger; | |
| 10 | +import org.slf4j.LoggerFactory; | |
| 11 | +import org.springframework.beans.factory.annotation.Autowired; | |
| 12 | +import org.springframework.stereotype.Controller; | |
| 13 | +import org.springframework.web.bind.annotation.PostMapping; | |
| 14 | +import org.springframework.web.bind.annotation.RequestMapping; | |
| 15 | +import org.springframework.web.bind.annotation.ResponseBody; | |
| 16 | + | |
| 17 | +import java.util.Date; | |
| 18 | + | |
| 19 | +/** | |
| 20 | + * @Author: xujincheng | |
| 21 | + * @Date: 2020/6/5 13:33 | |
| 22 | + * @Description: 音频送审接口 | |
| 23 | + */ | |
| 24 | +@Controller | |
| 25 | +@RequestMapping("/api/audio") | |
| 26 | +public class AudioControllerApi { | |
| 27 | + | |
| 28 | + private static Logger logger = LoggerFactory.getLogger(AudioControllerApi.class); | |
| 29 | + | |
| 30 | + private static EvictingQueue<String> queue = EvictingQueue.create(50); | |
| 31 | + | |
| 32 | + @Autowired | |
| 33 | + AudioServiceImpl audioService; | |
| 34 | + | |
| 35 | + /** | |
| 36 | + * 音频入库 | |
| 37 | + * | |
| 38 | + * @param | |
| 39 | + * @multiplecategory 获取栏目分类 | |
| 40 | + * @audioClipsName 获取音频上传人的id | |
| 41 | + * @soure 音频来源 | |
| 42 | + * @audioId 音频id | |
| 43 | + * @audioTitle 音频标题 | |
| 44 | + * @audioUrl 音频url | |
| 45 | + * @audioCoverUrl 封面图 | |
| 46 | + * @audioIntro 音频简介 | |
| 47 | + * @audioTag 音频标签 | |
| 48 | + * @audioKeyword 音频关键字 | |
| 49 | + * @uploadTime 音频上传时间 | |
| 50 | + * @priority 优先级(1-热点 0-非热点) | |
| 51 | + * @callback 回调函数 | |
| 52 | + * @spId spId | |
| 53 | + * @bucketName 存储空间名 | |
| 54 | + * @bucketType 金山或七牛 | |
| 55 | + * @duration 时长 | |
| 56 | + * @contactInfo 音频上传人联系方式 | |
| 57 | + * @extendField 扩展字段 | |
| 58 | + */ | |
| 59 | + @PostMapping("/import") | |
| 60 | + @ResponseBody | |
| 61 | + public ResponseBean importAudio(String param) { | |
| 62 | + logger.info("音频入库,param=====" + param); | |
| 63 | + try { | |
| 64 | + ShyAudio shyAudio = JSONObject.parseObject(param, ShyAudio.class); | |
| 65 | + ShyAudio audioMsg = audioService.getAudioMsg(shyAudio.getAudioId()); | |
| 66 | + if (audioMsg == null) { | |
| 67 | + synchronized (AudioControllerApi.class) { | |
| 68 | + if (!queue.contains(shyAudio.getAudioId())) { | |
| 69 | + queue.add(shyAudio.getAudioId()); | |
| 70 | + shyAudio.setCreateTime(new Date()); | |
| 71 | + shyAudio.setState(0); | |
| 72 | + //目前直接设置为人工审 | |
| 73 | + audioService.getShenheType(shyAudio); | |
| 74 | + shyAudio.setReceive(0); | |
| 75 | + audioService.importAudioMsg(shyAudio); | |
| 76 | + } | |
| 77 | + } | |
| 78 | + } else { | |
| 79 | + shyAudio.setId(audioMsg.getId()); | |
| 80 | + shyAudio.setUpdateTime(new Date()); | |
| 81 | + audioService.updateAudioMsg(shyAudio); | |
| 82 | + return new ResponseBean(ErrorEnum.SUCCESS); | |
| 83 | + } | |
| 84 | + } catch (Exception e) { | |
| 85 | + e.printStackTrace(); | |
| 86 | + return new ResponseBean(ErrorEnum.ERROR); | |
| 87 | + } | |
| 88 | + return new ResponseBean(ErrorEnum.SUCCESS); | |
| 89 | + } | |
| 90 | + | |
| 91 | +} | |
| 0 | 92 | \ No newline at end of file | ... | ... |
src/main/java/com/cnlive/shenhe/controller/AudioController.java
0 → 100644
| 1 | +package com.cnlive.shenhe.controller; | |
| 2 | + | |
| 3 | +import com.alibaba.fastjson.JSON; | |
| 4 | +import com.alibaba.fastjson.JSONObject; | |
| 5 | +import com.cnlive.shenhe.bean.ErrorEnum; | |
| 6 | +import com.cnlive.shenhe.bean.ResponseBean; | |
| 7 | +import com.cnlive.shenhe.bean.SessionUser; | |
| 8 | +import com.cnlive.shenhe.entity.ShyAudio; | |
| 9 | +import com.cnlive.shenhe.entity.ShySites; | |
| 10 | +import com.cnlive.shenhe.entity.ShyUsers; | |
| 11 | +import com.cnlive.shenhe.serviceImpl.AudioServiceImpl; | |
| 12 | +import com.cnlive.shenhe.serviceImpl.SitesServiceImpl; | |
| 13 | +import com.cnlive.shenhe.serviceImpl.UsersServiceImpl; | |
| 14 | +import com.cnlive.shenhe.utils.AuditPass; | |
| 15 | +import com.cnlive.shenhe.utils.CommonConst; | |
| 16 | +import com.cnlive.shenhe.utils.CommonUtils; | |
| 17 | +import com.github.pagehelper.PageInfo; | |
| 18 | +import org.apache.poi.xssf.usermodel.XSSFCell; | |
| 19 | +import org.apache.poi.xssf.usermodel.XSSFRow; | |
| 20 | +import org.apache.poi.xssf.usermodel.XSSFSheet; | |
| 21 | +import org.apache.poi.xssf.usermodel.XSSFWorkbook; | |
| 22 | +import org.slf4j.Logger; | |
| 23 | +import org.slf4j.LoggerFactory; | |
| 24 | +import org.springframework.beans.factory.annotation.Autowired; | |
| 25 | +import org.springframework.beans.factory.annotation.Value; | |
| 26 | +import org.springframework.stereotype.Controller; | |
| 27 | +import org.springframework.ui.Model; | |
| 28 | +import org.springframework.web.bind.annotation.GetMapping; | |
| 29 | +import org.springframework.web.bind.annotation.PostMapping; | |
| 30 | +import org.springframework.web.bind.annotation.RequestMapping; | |
| 31 | +import org.springframework.web.bind.annotation.ResponseBody; | |
| 32 | + | |
| 33 | +import javax.servlet.ServletOutputStream; | |
| 34 | +import javax.servlet.http.HttpServletResponse; | |
| 35 | +import javax.servlet.http.HttpSession; | |
| 36 | +import java.io.*; | |
| 37 | +import java.util.List; | |
| 38 | + | |
| 39 | +/** | |
| 40 | + * @Author: xujincheng | |
| 41 | + * @Date: 2020/6/9 9:35 | |
| 42 | + */ | |
| 43 | +@Controller | |
| 44 | +@RequestMapping("/audio") | |
| 45 | +public class AudioController extends BaseController { | |
| 46 | + | |
| 47 | + private static Logger logger = LoggerFactory.getLogger(AudioController.class); | |
| 48 | + | |
| 49 | + @Autowired | |
| 50 | + SitesServiceImpl sitesService; | |
| 51 | + | |
| 52 | + @Autowired | |
| 53 | + AudioServiceImpl audioService; | |
| 54 | + | |
| 55 | + @Autowired | |
| 56 | + UsersServiceImpl usersService; | |
| 57 | + | |
| 58 | + @Value("${qn_domain}") | |
| 59 | + String qn_domain; | |
| 60 | + | |
| 61 | + @Value("${ks_domain}") | |
| 62 | + String ks_domain; | |
| 63 | + | |
| 64 | + @Autowired | |
| 65 | + AuditPass Pass; | |
| 66 | + | |
| 67 | + /** | |
| 68 | + * 音频数据分页获取 | |
| 69 | + * | |
| 70 | + * @param model | |
| 71 | + * @param video_title | |
| 72 | + * @param start_date | |
| 73 | + * @param end_date | |
| 74 | + * @param state | |
| 75 | + * @param receive | |
| 76 | + * @param page | |
| 77 | + * @param pageSize | |
| 78 | + * @param video_priority | |
| 79 | + * @param orderByClause | |
| 80 | + * @param sp_desc | |
| 81 | + * @param sp_Id | |
| 82 | + * @param session | |
| 83 | + * @return | |
| 84 | + */ | |
| 85 | + @GetMapping("/page") | |
| 86 | + public Object getListVideos(Model model, 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, HttpSession session) { | |
| 87 | + SessionUser sessionUser = (SessionUser) session.getAttribute(SessionUser.getSessionKey()); | |
| 88 | + if (CommonUtils.isNull(sessionUser)) { | |
| 89 | + return "redirect:/users/login"; | |
| 90 | + } | |
| 91 | + Integer spid = sessionUser.getSpid(); | |
| 92 | + logger.info("sp_Id:{},spid:{}", sp_Id, spid); | |
| 93 | + String userId = sessionUser.getUserId(); | |
| 94 | + if (CommonUtils.isNull(page)) page = 1; | |
| 95 | + if (CommonUtils.isNull(pageSize)) pageSize = 10; | |
| 96 | + if (CommonUtils.isNotEmpty(sp_desc) && spid == 0) { | |
| 97 | + ShySites shySite = sitesService.findspidBySpdesc(sp_desc); | |
| 98 | + if (CommonUtils.isNotNull(shySite)) { | |
| 99 | + spid = shySite.getSpid(); | |
| 100 | + } else { | |
| 101 | + setmodel_site(model); | |
| 102 | + return "error.html"; | |
| 103 | + } | |
| 104 | + } else if (CommonUtils.isEmpty(sp_desc) && spid == 0) { | |
| 105 | + spid = null; | |
| 106 | + } | |
| 107 | + | |
| 108 | + PageInfo<ShyAudio> audioPage = audioService.getListContent(video_title, start_date, end_date, state, receive, page, pageSize, video_priority, orderByClause, spid, userId, sp_Id); | |
| 109 | + if (audioPage != null && audioPage.getSize() > 0) { | |
| 110 | + List<ShyAudio> list = audioPage.getList(); | |
| 111 | + if (list != null && list.size() > 0) { | |
| 112 | + for (ShyAudio shyAudio : list) { | |
| 113 | + //审核状态 0-未审核 1-已审核 2-拒绝 | |
| 114 | + //已审+已拒绝 | |
| 115 | + if (!CommonConst.AUDIT_INTT.equals(shyAudio.getState())) { | |
| 116 | + String updater = CommonUtils.isEmpty(shyAudio.getUploader()) ? "白名单" : shyAudio.getUploader(); | |
| 117 | + String auditor_id = shyAudio.getAuditor_id(); | |
| 118 | + if (CommonUtils.isNotEmpty(auditor_id)) { | |
| 119 | + ShyUsers user = new ShyUsers(); | |
| 120 | + user.setUser_id(auditor_id); | |
| 121 | + user = usersService.select(user); | |
| 122 | + if (CommonUtils.isNotNull(user)) { | |
| 123 | + String email = CommonUtils.isEmpty(user.getEmail()) ? "" : user.getEmail(); | |
| 124 | + String userName = CommonUtils.isEmpty(user.getUsername()) ? email : user.getUsername(); | |
| 125 | + updater = userName; | |
| 126 | + } | |
| 127 | + } | |
| 128 | + shyAudio.setUploader(updater); | |
| 129 | + } | |
| 130 | + //显示spid简称 | |
| 131 | + ShySites shySites = sitesService.findspidDescByspid(shyAudio.getSpId()); | |
| 132 | + if (CommonUtils.isNotNull(shySites)) { | |
| 133 | + shyAudio.setSpid_desc(shySites.getName()); | |
| 134 | + } | |
| 135 | + } | |
| 136 | + } | |
| 137 | + } | |
| 138 | + | |
| 139 | + //获取参数值给前台 用来判断是否需要把查看显示出来 state recive | |
| 140 | + String state1 = state == null ? "" : state.toString(); | |
| 141 | + String receive1 = ""; | |
| 142 | + if (CommonUtils.isNotNull(receive)) { | |
| 143 | + receive1 = receive == CommonConst.RECEIVE_AFTER ? "true" : "false"; | |
| 144 | + } else { | |
| 145 | + receive1 = ""; | |
| 146 | + } | |
| 147 | + model.addAttribute("state1", state1); | |
| 148 | + model.addAttribute("receive1", receive1); | |
| 149 | + model.addAttribute("pageSize", pageSize); | |
| 150 | + model.addAttribute("audioPage", audioPage); | |
| 151 | + return "page/audio.html"; | |
| 152 | + } | |
| 153 | + | |
| 154 | + | |
| 155 | + /** | |
| 156 | + * 认领 | |
| 157 | + * | |
| 158 | + * @param ids | |
| 159 | + * @param num | |
| 160 | + * @param session | |
| 161 | + * @return | |
| 162 | + */ | |
| 163 | + @PostMapping("/receive") | |
| 164 | + @ResponseBody | |
| 165 | + public ResponseBean receive(String ids, Integer num, HttpSession session) { | |
| 166 | + SessionUser sessionUser = (SessionUser) session.getAttribute(SessionUser.getSessionKey()); | |
| 167 | + String userId = sessionUser.getUserId(); | |
| 168 | + Integer spid = sessionUser.getSpid(); | |
| 169 | + //领取时要检查领取的数据是否可以领 | |
| 170 | + if (CommonUtils.isNotEmpty(ids)) { | |
| 171 | + String[] cids = ids.split(","); | |
| 172 | + for (String cid : cids) { | |
| 173 | + ShyAudio shyAudio = audioService.selectByPrimaryKey(Integer.parseInt(cid)); | |
| 174 | + if (CommonUtils.isNotNull(shyAudio)) { | |
| 175 | + if (shyAudio.getState() != CommonConst.AUDIT_INTT || shyAudio.getReceive()==CommonConst.RECEIVE_AFTER) { | |
| 176 | + return new ResponseBean(ErrorEnum.ERROR.getErrorCode(), "您领取的内容中有已被领取或者已经被审核,请检查并重试"); | |
| 177 | + } | |
| 178 | + } else { | |
| 179 | + return new ResponseBean(ErrorEnum.ERROR.getErrorCode(), "您领取的内容不存在,请检查并重试"); | |
| 180 | + | |
| 181 | + } | |
| 182 | + } | |
| 183 | + } | |
| 184 | + Integer n = audioService.receive(ids, num, userId, spid); | |
| 185 | + return new ResponseBean(ErrorEnum.SUCCESS.getErrorCode(), "认领到" + n + "条内容"); | |
| 186 | + } | |
| 187 | + | |
| 188 | + | |
| 189 | + /** | |
| 190 | + * 退领 | |
| 191 | + * | |
| 192 | + * @param ids | |
| 193 | + * @param session | |
| 194 | + * @return | |
| 195 | + */ | |
| 196 | + @PostMapping("/retReceive") | |
| 197 | + @ResponseBody | |
| 198 | + public ResponseBean retReceive(String ids, HttpSession session) { | |
| 199 | + SessionUser sessionUser = (SessionUser) session.getAttribute(SessionUser.getSessionKey()); | |
| 200 | + String userId = sessionUser.getUserId(); | |
| 201 | + //在退领操作前先判断是否包含已退领或者已经审核的数据,有则退回检查并重新退领 | |
| 202 | + String[] cids = ids.split(","); | |
| 203 | + for (String cid : cids) { | |
| 204 | + ShyAudio shyAudio = audioService.selectByPrimaryKey(Integer.parseInt(cid)); | |
| 205 | + if (shyAudio.getState() != CommonConst.AUDIT_INTT || shyAudio.getReceive()==CommonConst.RECEIVE_BEFORE || !shyAudio.getReceive_user_id().equals(userId)) { | |
| 206 | + return new ResponseBean(ErrorEnum.ERROR.getErrorCode(), "退领失败,您选中的内容包含已退领的或已经审核的"); | |
| 207 | + } | |
| 208 | + } | |
| 209 | + return audioService.retReceive(ids, userId); | |
| 210 | + } | |
| 211 | + | |
| 212 | + /** | |
| 213 | + * 打回(审核拒绝,应要求不加权限、状态等限制) | |
| 214 | + * | |
| 215 | + * @param ids | |
| 216 | + * @param msg | |
| 217 | + * @param session | |
| 218 | + * @return | |
| 219 | + */ | |
| 220 | + @PostMapping("/repulse") | |
| 221 | + @ResponseBody | |
| 222 | + public ResponseBean repulse(String ids, String msg, HttpSession session) { | |
| 223 | + SessionUser sessionUser = (SessionUser) session.getAttribute(SessionUser.getSessionKey()); | |
| 224 | + String userId = sessionUser.getUserId(); | |
| 225 | + ResponseBean responseBean = new ResponseBean(); | |
| 226 | + String[] shyAudiods = ids.split(","); | |
| 227 | + String showMsg = ""; | |
| 228 | + for (String shyAudioId : shyAudiods) { | |
| 229 | + showMsg = audioService.repulse(shyAudioId, msg, userId); | |
| 230 | + } | |
| 231 | + if (CommonUtils.isNotEmpty(showMsg)) { | |
| 232 | + responseBean.setErrorCode(ErrorEnum.ERROR.getErrorCode()); | |
| 233 | + responseBean.setErrorMessage(showMsg); | |
| 234 | + } | |
| 235 | + return responseBean; | |
| 236 | + } | |
| 237 | + | |
| 238 | + | |
| 239 | + /** | |
| 240 | + * 音频详情页 | |
| 241 | + * | |
| 242 | + * @param model | |
| 243 | + * @param id | |
| 244 | + * @return | |
| 245 | + */ | |
| 246 | + @GetMapping("/details") | |
| 247 | + public Object getDetailsVideo(Model model, Integer id) { | |
| 248 | + ShyAudio shyAudio = audioService.getDetailsContent(id); | |
| 249 | + Object images = JSON.parse(shyAudio.getAudioCoverUrl()); | |
| 250 | + | |
| 251 | + String yuming = ""; | |
| 252 | + Integer plat = shyAudio.getBucketType(); | |
| 253 | + if (plat == CommonConst.QINIU_PLAT) { | |
| 254 | + yuming = qn_domain + "/"; | |
| 255 | + } else if (plat == CommonConst.KS_PLAT) { | |
| 256 | + yuming = ks_domain + "/"; | |
| 257 | + } | |
| 258 | + shyAudio.setAttr_tags(CommonUtils.isEmpty(shyAudio.getAttr_tags()) ? "" : shyAudio.getAttr_tags()); | |
| 259 | + model.addAttribute("images", images); | |
| 260 | + model.addAttribute("audio", shyAudio); | |
| 261 | + model.addAttribute("yuming", yuming); | |
| 262 | + return "page/audioDetail.html"; | |
| 263 | + } | |
| 264 | + | |
| 265 | + /** | |
| 266 | + * 根据条件导出excel | |
| 267 | + * | |
| 268 | + * @param video_title | |
| 269 | + * @param start_date | |
| 270 | + * @param end_date | |
| 271 | + * @param state | |
| 272 | + * @param receive | |
| 273 | + * @param video_priority | |
| 274 | + * @param orderByClause | |
| 275 | + * @param session | |
| 276 | + * @param response | |
| 277 | + */ | |
| 278 | + @GetMapping("excel") | |
| 279 | + public void getExcel(String video_title, String start_date, String end_date, Integer state, Integer receive, String video_priority, String orderByClause, HttpSession session, HttpServletResponse response) { | |
| 280 | + SessionUser sessionUser = (SessionUser) session.getAttribute(SessionUser.getSessionKey()); | |
| 281 | + Integer spid = sessionUser.getSpid(); | |
| 282 | + String userId = sessionUser.getUserId(); | |
| 283 | + if (spid == 0) spid = null; | |
| 284 | + List<ShyAudio> shyAudioList = audioService.findByCondition(video_title, start_date, end_date, state, receive, video_priority, orderByClause, spid, userId); | |
| 285 | + String fileName = "音频数据"; | |
| 286 | + String updater = "";//审核员名字 | |
| 287 | + String state1 = "";//审核状态 1已审核 2审核拒绝 0未审核 | |
| 288 | + XSSFWorkbook wb = new XSSFWorkbook(); | |
| 289 | + ServletOutputStream out = null; | |
| 290 | + BufferedInputStream bis = null; | |
| 291 | + BufferedOutputStream bos = null; | |
| 292 | + try { | |
| 293 | + XSSFSheet sheetlist = wb.createSheet(fileName); | |
| 294 | + XSSFRow row = sheetlist.createRow(0);//行 | |
| 295 | + XSSFCell cell = row.createCell(0);//列 | |
| 296 | + cell.setCellValue("id"); | |
| 297 | + cell = row.createCell(1);//列 | |
| 298 | + cell.setCellValue("标题"); | |
| 299 | + cell = row.createCell(2);//列 | |
| 300 | + cell.setCellValue("音频地址"); | |
| 301 | + cell = row.createCell(3);//列 | |
| 302 | + cell.setCellValue("标题图"); | |
| 303 | + cell = row.createCell(4);//列 | |
| 304 | + cell.setCellValue("音频标签"); | |
| 305 | + cell = row.createCell(5);//列 | |
| 306 | + cell.setCellValue("审核员"); | |
| 307 | + cell = row.createCell(6);//增加一列 | |
| 308 | + cell.setCellValue("常用审核意见"); | |
| 309 | + cell = row.createCell(7);//列 | |
| 310 | + cell.setCellValue("审核意见"); | |
| 311 | + cell = row.createCell(8);//列 | |
| 312 | + cell.setCellValue("状态"); | |
| 313 | + cell = row.createCell(9);//列 | |
| 314 | + cell.setCellValue("音频关键字"); | |
| 315 | + cell = row.createCell(10);//列 | |
| 316 | + cell.setCellValue("音频简介"); | |
| 317 | + cell = row.createCell(11);//列 | |
| 318 | + cell.setCellValue("音频id"); | |
| 319 | + cell = row.createCell(12);//列 | |
| 320 | + cell.setCellValue("创建时间"); | |
| 321 | + cell = row.createCell(13);//列 | |
| 322 | + cell.setCellValue("音频上传时间"); | |
| 323 | + cell = row.createCell(14);//列 | |
| 324 | + cell.setCellValue("音频时长(秒)"); | |
| 325 | + cell = row.createCell(15);//列 | |
| 326 | + cell.setCellValue("spid"); | |
| 327 | + cell = row.createCell(16);//列 | |
| 328 | + cell.setCellValue("sp简称"); | |
| 329 | + | |
| 330 | + for (int i = 0; i < shyAudioList.size(); i++) { | |
| 331 | + row = sheetlist.createRow((short) (i + 1));//行 | |
| 332 | + cell = row.createCell(0);//列 | |
| 333 | + cell.setCellValue(shyAudioList.get(i).getId()); | |
| 334 | + cell = row.createCell(1);//列 | |
| 335 | + cell.setCellValue(shyAudioList.get(i).getAudioTitle()); | |
| 336 | + cell = row.createCell(2);//列 | |
| 337 | + cell.setCellValue(shyAudioList.get(i).getAudioUrl()); | |
| 338 | + cell = row.createCell(3);//列 | |
| 339 | + cell.setCellValue(shyAudioList.get(i).getAudioCoverUrl()); | |
| 340 | + cell = row.createCell(4);//列 | |
| 341 | + cell.setCellValue(shyAudioList.get(i).getAudioTag()); | |
| 342 | + cell = row.createCell(5);//列 | |
| 343 | + //审核员需要做处理 | |
| 344 | + if (shyAudioList.get(i).getState() != CommonConst.AUDIT_INTT) { | |
| 345 | + updater = CommonUtils.isEmpty(shyAudioList.get(i).getUploader()) || "null".equals(shyAudioList.get(i).getUploader())? "白名单":shyAudioList.get(i).getUploader(); | |
| 346 | + String auditor_id = shyAudioList.get(i).getAuditor_id(); | |
| 347 | + if (CommonUtils.isNotEmpty(auditor_id)) { | |
| 348 | + ShyUsers user = new ShyUsers(); | |
| 349 | + user.setUser_id(auditor_id); | |
| 350 | + user = usersService.select(user); | |
| 351 | + if (CommonUtils.isNotNull(user)) { | |
| 352 | + String email = CommonUtils.isEmpty(user.getEmail()) || "null".equals(user.getEmail()) ? "" : user.getEmail(); | |
| 353 | + String userName = CommonUtils.isEmpty(user.getUsername()) ? email : user.getUsername(); | |
| 354 | + updater = userName ; | |
| 355 | + } | |
| 356 | + } | |
| 357 | + } | |
| 358 | + cell.setCellValue(updater); | |
| 359 | + cell = row.createCell(6);//列、增加一列 | |
| 360 | + cell.setCellValue(shyAudioList.get(i).getAttr_tags()); | |
| 361 | + cell = row.createCell(7);//列 | |
| 362 | + cell.setCellValue(shyAudioList.get(i).getMsg()); | |
| 363 | + cell = row.createCell(8);//列 | |
| 364 | + //状态需要处理成用户可读 | |
| 365 | + if (shyAudioList.get(i).getState() == 0) { | |
| 366 | + state1 = "未审核"; | |
| 367 | + } else if (shyAudioList.get(i).getState() == 1) { | |
| 368 | + state1 = "已审核"; | |
| 369 | + } else { | |
| 370 | + state1 = "审核拒绝"; | |
| 371 | + } | |
| 372 | + cell.setCellValue(state1); | |
| 373 | + cell = row.createCell(9);//列 | |
| 374 | + cell.setCellValue(shyAudioList.get(i).getAudioKeyword()); | |
| 375 | + cell = row.createCell(10);//列 | |
| 376 | + cell.setCellValue(shyAudioList.get(i).getAudioIntro()); | |
| 377 | + cell = row.createCell(11);//列 | |
| 378 | + cell.setCellValue(shyAudioList.get(i).getAudioId()); | |
| 379 | + cell = row.createCell(12);//列 | |
| 380 | + cell.setCellValue(CommonUtils.formatDate(shyAudioList.get(i).getCreateTime(), "yyyy-MM-dd HH:mm:ss")); | |
| 381 | + cell = row.createCell(13);//列 | |
| 382 | + cell.setCellValue(CommonUtils.formatDate(shyAudioList.get(i).getUploadTime(), "yyyy-MM-dd HH:mm:ss")); | |
| 383 | + cell = row.createCell(14);//列 | |
| 384 | + cell.setCellValue(shyAudioList.get(i).getDuration()); | |
| 385 | + cell = row.createCell(15);//列 | |
| 386 | + cell.setCellValue(shyAudioList.get(i).getSpId()); | |
| 387 | + cell = row.createCell(16);//列 | |
| 388 | + | |
| 389 | + //显示spid简称 | |
| 390 | + ShySites shySites = sitesService.findspidDescByspid(shyAudioList.get(i).getSpId()); | |
| 391 | + cell.setCellValue(shySites.getName()); | |
| 392 | + } | |
| 393 | + | |
| 394 | + ByteArrayOutputStream os = new ByteArrayOutputStream(); | |
| 395 | + wb.write(os); | |
| 396 | + byte[] content = os.toByteArray(); | |
| 397 | + InputStream is = new ByteArrayInputStream(content); | |
| 398 | + response.setContentType("application/vnd.ms-excel;charset=utf-8"); | |
| 399 | + response.setHeader("Content-Disposition", "attachment;filename=" + new String((fileName + ".xlsx").getBytes(), "iso-8859-1")); | |
| 400 | + out = response.getOutputStream(); | |
| 401 | + bis = new BufferedInputStream(is); | |
| 402 | + bos = new BufferedOutputStream(out); | |
| 403 | + byte[] buff = new byte[2048]; | |
| 404 | + int bytesRead; | |
| 405 | + while (-1 != (bytesRead = bis.read(buff, 0, buff.length))) { | |
| 406 | + bos.write(buff, 0, bytesRead); | |
| 407 | + } | |
| 408 | + } catch (final Exception e) { | |
| 409 | + e.printStackTrace(); | |
| 410 | + try { | |
| 411 | + if (bis != null) | |
| 412 | + bis.close(); | |
| 413 | + if (bos != null) | |
| 414 | + bos.close(); | |
| 415 | + } catch (Exception e1) { | |
| 416 | + e1.printStackTrace(); | |
| 417 | + } | |
| 418 | + } finally { | |
| 419 | + try { | |
| 420 | + if (bis != null) | |
| 421 | + bis.close(); | |
| 422 | + if (bos != null) | |
| 423 | + bos.close(); | |
| 424 | + } catch (Exception e2) { | |
| 425 | + e2.printStackTrace(); | |
| 426 | + } | |
| 427 | + } | |
| 428 | + } | |
| 429 | + | |
| 430 | + | |
| 431 | + /** | |
| 432 | + * 审核结果更新并通知点播音频 | |
| 433 | + * | |
| 434 | + * @param activity_id 音频id(audioId) | |
| 435 | + * @param state 状态码 | |
| 436 | + * @param attr_tags 常用审核意见(标签) | |
| 437 | + * @param msg 审核备注 | |
| 438 | + * @return | |
| 439 | + */ | |
| 440 | + @PostMapping("/shenheAudio") | |
| 441 | + @ResponseBody | |
| 442 | + public ResponseBean shenheInfo(Integer id, String activity_id, Integer state, String attr_tags, String msg, String callback, HttpSession session) { | |
| 443 | + SessionUser sessionUser = (SessionUser) session.getAttribute(SessionUser.getSessionKey()); | |
| 444 | + String userId = sessionUser.getUserId(); | |
| 445 | + JSONObject result; | |
| 446 | + try { | |
| 447 | + result = Pass.audioPass(activity_id, state, attr_tags, msg, callback); | |
| 448 | + } catch (Exception e) { | |
| 449 | + e.printStackTrace(); | |
| 450 | + System.out.println("音频审核失败"); | |
| 451 | + return new ResponseBean(ErrorEnum.ERROR); | |
| 452 | + } | |
| 453 | + if (result == null) { | |
| 454 | + System.out.println("音频审核失败且接口错误没有返回信息"); | |
| 455 | + return new ResponseBean(ErrorEnum.ERROR); | |
| 456 | + } | |
| 457 | + Integer code = result.getInteger("code"); | |
| 458 | + if (code != 0) { | |
| 459 | + System.out.println("审核失败,code==" + code); | |
| 460 | + return new ResponseBean(code, result.getString("msg")); | |
| 461 | + } | |
| 462 | + state = state == 4 ? 2 : 1; | |
| 463 | + int i = audioService.updateAudio(id, userId, null, attr_tags, state, msg); | |
| 464 | + if (i == 0) { | |
| 465 | + return new ResponseBean(ErrorEnum.ERROR); | |
| 466 | + } | |
| 467 | + return new ResponseBean(ErrorEnum.SUCCESS); | |
| 468 | + } | |
| 469 | +} | ... | ... |
src/main/java/com/cnlive/shenhe/entity/ShyAudio.java
0 → 100644
| 1 | +package com.cnlive.shenhe.entity; | |
| 2 | + | |
| 3 | +import java.util.Date; | |
| 4 | +import javax.persistence.*; | |
| 5 | + | |
| 6 | +@Table(name = "shy_audio") | |
| 7 | +public class ShyAudio { | |
| 8 | + @Id | |
| 9 | + private Integer id; | |
| 10 | + | |
| 11 | + /** | |
| 12 | + * 获取栏目分类 | |
| 13 | + */ | |
| 14 | + private String multiplecategory; | |
| 15 | + | |
| 16 | + /** | |
| 17 | + * 获取音频上传人的id | |
| 18 | + */ | |
| 19 | + @Column(name="audioClipsName") | |
| 20 | + private String audioClipsName; | |
| 21 | + | |
| 22 | + /** | |
| 23 | + * 音频来源 | |
| 24 | + */ | |
| 25 | + private Integer soure; | |
| 26 | + | |
| 27 | + /** | |
| 28 | + * 音频id | |
| 29 | + */ | |
| 30 | + @Column(name="audioId") | |
| 31 | + private String audioId; | |
| 32 | + | |
| 33 | + /** | |
| 34 | + * 音频标题 | |
| 35 | + */ | |
| 36 | + @Column(name="audioTitle") | |
| 37 | + private String audioTitle; | |
| 38 | + | |
| 39 | + /** | |
| 40 | + * 音频url | |
| 41 | + */ | |
| 42 | + @Column(name="audioUrl") | |
| 43 | + private String audioUrl; | |
| 44 | + | |
| 45 | + /** | |
| 46 | + * 封面图 | |
| 47 | + */ | |
| 48 | + @Column(name="audioCoverUrl") | |
| 49 | + private String audioCoverUrl; | |
| 50 | + | |
| 51 | + /** | |
| 52 | + * 音频简介 | |
| 53 | + */ | |
| 54 | + @Column(name="audioIntro") | |
| 55 | + private String audioIntro; | |
| 56 | + | |
| 57 | + /** | |
| 58 | + * 音频标签 | |
| 59 | + */ | |
| 60 | + @Column(name="audioTag") | |
| 61 | + private String audioTag; | |
| 62 | + | |
| 63 | + /** | |
| 64 | + * 音频关键字 | |
| 65 | + */ | |
| 66 | + @Column(name="audioKeyword") | |
| 67 | + private String audioKeyword; | |
| 68 | + | |
| 69 | + /** | |
| 70 | + * 上传时间 | |
| 71 | + */ | |
| 72 | + @Column(name="uploadTime") | |
| 73 | + private Date uploadTime; | |
| 74 | + | |
| 75 | + private Integer priority; | |
| 76 | + | |
| 77 | + /** | |
| 78 | + * 回调函数 | |
| 79 | + */ | |
| 80 | + private String callback; | |
| 81 | + | |
| 82 | + /** | |
| 83 | + * spId | |
| 84 | + */ | |
| 85 | + @Column(name="spId") | |
| 86 | + private Integer spId; | |
| 87 | + | |
| 88 | + /** | |
| 89 | + * 存储空间名 | |
| 90 | + */ | |
| 91 | + @Column(name="bucketName") | |
| 92 | + private String bucketName; | |
| 93 | + | |
| 94 | + /** | |
| 95 | + * 1:金山;2:七牛 | |
| 96 | + */ | |
| 97 | + @Column(name="bucketType") | |
| 98 | + private Integer bucketType; | |
| 99 | + | |
| 100 | + /** | |
| 101 | + * 音频时长,单位s | |
| 102 | + */ | |
| 103 | + private Integer duration; | |
| 104 | + | |
| 105 | + /** | |
| 106 | + * 审核员名称 | |
| 107 | + */ | |
| 108 | + private String uploader; | |
| 109 | + | |
| 110 | + /** | |
| 111 | + * 音频上传人联系方式 | |
| 112 | + */ | |
| 113 | + @Column(name="contactInfo") | |
| 114 | + private String contactInfo; | |
| 115 | + | |
| 116 | + /** | |
| 117 | + * 扩展字段 | |
| 118 | + */ | |
| 119 | + @Column(name="extendField") | |
| 120 | + private String extendField; | |
| 121 | + | |
| 122 | + /** | |
| 123 | + * 审核员id | |
| 124 | + */ | |
| 125 | + private String auditor_id; | |
| 126 | + | |
| 127 | + /** | |
| 128 | + * 常用审核意见 | |
| 129 | + */ | |
| 130 | + private String attr_tags; | |
| 131 | + | |
| 132 | + /** | |
| 133 | + * 拒绝理由 | |
| 134 | + */ | |
| 135 | + private String msg; | |
| 136 | + | |
| 137 | + /** | |
| 138 | + * 1:免审,2:机审,3:人工审 | |
| 139 | + */ | |
| 140 | + private Integer shenhe_type; | |
| 141 | + | |
| 142 | + /** | |
| 143 | + * 审核状态:0-未审核 1-已通过 2-拒绝 3-自动审核失败 | |
| 144 | + */ | |
| 145 | + private Integer state; | |
| 146 | + | |
| 147 | + /** | |
| 148 | + * 创建时间 | |
| 149 | + */ | |
| 150 | + @Column(name="createTime") | |
| 151 | + private Date createTime; | |
| 152 | + | |
| 153 | + /** | |
| 154 | + * 修改时间 | |
| 155 | + */ | |
| 156 | + @Column(name="updateTime") | |
| 157 | + private Date updateTime; | |
| 158 | + | |
| 159 | + /** | |
| 160 | + * 领取状态:0-未领取 1-已领取 | |
| 161 | + */ | |
| 162 | + private Integer receive; | |
| 163 | + | |
| 164 | + /** | |
| 165 | + * 领取人id | |
| 166 | + */ | |
| 167 | + private String receive_user_id; | |
| 168 | + | |
| 169 | + @Transient | |
| 170 | + private String spid_desc; | |
| 171 | + | |
| 172 | + /** | |
| 173 | + * @return id | |
| 174 | + */ | |
| 175 | + public Integer getId() { | |
| 176 | + return id; | |
| 177 | + } | |
| 178 | + | |
| 179 | + /** | |
| 180 | + * @param id | |
| 181 | + */ | |
| 182 | + public void setId(Integer id) { | |
| 183 | + this.id = id; | |
| 184 | + } | |
| 185 | + | |
| 186 | + /** | |
| 187 | + * 获取获取栏目分类 | |
| 188 | + * | |
| 189 | + * @return multiplecategory - 获取栏目分类 | |
| 190 | + */ | |
| 191 | + public String getMultiplecategory() { | |
| 192 | + return multiplecategory; | |
| 193 | + } | |
| 194 | + | |
| 195 | + /** | |
| 196 | + * 设置获取栏目分类 | |
| 197 | + * | |
| 198 | + * @param multiplecategory 获取栏目分类 | |
| 199 | + */ | |
| 200 | + public void setMultiplecategory(String multiplecategory) { | |
| 201 | + this.multiplecategory = multiplecategory; | |
| 202 | + } | |
| 203 | + | |
| 204 | + /** | |
| 205 | + * 获取获取音频上传人的id | |
| 206 | + * | |
| 207 | + * @return audioClipsName - 获取音频上传人的id | |
| 208 | + */ | |
| 209 | + public String getAudioClipsName() { | |
| 210 | + return audioClipsName; | |
| 211 | + } | |
| 212 | + | |
| 213 | + /** | |
| 214 | + * 设置获取音频上传人的id | |
| 215 | + * | |
| 216 | + * @param audioClipsName 获取音频上传人的id | |
| 217 | + */ | |
| 218 | + public void setAudioClipsName(String audioClipsName) { | |
| 219 | + this.audioClipsName = audioClipsName; | |
| 220 | + } | |
| 221 | + | |
| 222 | + /** | |
| 223 | + * 获取音频来源 | |
| 224 | + * | |
| 225 | + * @return soure - 音频来源 | |
| 226 | + */ | |
| 227 | + public Integer getSoure() { | |
| 228 | + return soure; | |
| 229 | + } | |
| 230 | + | |
| 231 | + /** | |
| 232 | + * 设置音频来源 | |
| 233 | + * | |
| 234 | + * @param soure 音频来源 | |
| 235 | + */ | |
| 236 | + public void setSoure(Integer soure) { | |
| 237 | + this.soure = soure; | |
| 238 | + } | |
| 239 | + | |
| 240 | + /** | |
| 241 | + * 获取音频id | |
| 242 | + * | |
| 243 | + * @return audioId - 音频id | |
| 244 | + */ | |
| 245 | + public String getAudioId() { | |
| 246 | + return audioId; | |
| 247 | + } | |
| 248 | + | |
| 249 | + /** | |
| 250 | + * 设置音频id | |
| 251 | + * | |
| 252 | + * @param audioId 音频id | |
| 253 | + */ | |
| 254 | + public void setAudioId(String audioId) { | |
| 255 | + this.audioId = audioId; | |
| 256 | + } | |
| 257 | + | |
| 258 | + /** | |
| 259 | + * 获取音频标题 | |
| 260 | + * | |
| 261 | + * @return audioTitle - 音频标题 | |
| 262 | + */ | |
| 263 | + public String getAudioTitle() { | |
| 264 | + return audioTitle; | |
| 265 | + } | |
| 266 | + | |
| 267 | + /** | |
| 268 | + * 设置音频标题 | |
| 269 | + * | |
| 270 | + * @param audioTitle 音频标题 | |
| 271 | + */ | |
| 272 | + public void setAudioTitle(String audioTitle) { | |
| 273 | + this.audioTitle = audioTitle; | |
| 274 | + } | |
| 275 | + | |
| 276 | + /** | |
| 277 | + * 获取音频url | |
| 278 | + * | |
| 279 | + * @return audioUrl - 音频url | |
| 280 | + */ | |
| 281 | + public String getAudioUrl() { | |
| 282 | + return audioUrl; | |
| 283 | + } | |
| 284 | + | |
| 285 | + /** | |
| 286 | + * 设置音频url | |
| 287 | + * | |
| 288 | + * @param audioUrl 音频url | |
| 289 | + */ | |
| 290 | + public void setAudioUrl(String audioUrl) { | |
| 291 | + this.audioUrl = audioUrl; | |
| 292 | + } | |
| 293 | + | |
| 294 | + /** | |
| 295 | + * 获取封面图 | |
| 296 | + * | |
| 297 | + * @return audioCoverUrl - 封面图 | |
| 298 | + */ | |
| 299 | + public String getAudioCoverUrl() { | |
| 300 | + return audioCoverUrl; | |
| 301 | + } | |
| 302 | + | |
| 303 | + /** | |
| 304 | + * 设置封面图 | |
| 305 | + * | |
| 306 | + * @param audioCoverUrl 封面图 | |
| 307 | + */ | |
| 308 | + public void setAudioCoverUrl(String audioCoverUrl) { | |
| 309 | + this.audioCoverUrl = audioCoverUrl; | |
| 310 | + } | |
| 311 | + | |
| 312 | + /** | |
| 313 | + * 获取音频简介 | |
| 314 | + * | |
| 315 | + * @return audioIntro - 音频简介 | |
| 316 | + */ | |
| 317 | + public String getAudioIntro() { | |
| 318 | + return audioIntro; | |
| 319 | + } | |
| 320 | + | |
| 321 | + /** | |
| 322 | + * 设置音频简介 | |
| 323 | + * | |
| 324 | + * @param audioIntro 音频简介 | |
| 325 | + */ | |
| 326 | + public void setAudioIntro(String audioIntro) { | |
| 327 | + this.audioIntro = audioIntro; | |
| 328 | + } | |
| 329 | + | |
| 330 | + /** | |
| 331 | + * 获取音频标签 | |
| 332 | + * | |
| 333 | + * @return audioTag - 音频标签 | |
| 334 | + */ | |
| 335 | + public String getAudioTag() { | |
| 336 | + return audioTag; | |
| 337 | + } | |
| 338 | + | |
| 339 | + /** | |
| 340 | + * 设置音频标签 | |
| 341 | + * | |
| 342 | + * @param audioTag 音频标签 | |
| 343 | + */ | |
| 344 | + public void setAudioTag(String audioTag) { | |
| 345 | + this.audioTag = audioTag; | |
| 346 | + } | |
| 347 | + | |
| 348 | + /** | |
| 349 | + * 获取音频关键字 | |
| 350 | + * | |
| 351 | + * @return audioKeyword - 音频关键字 | |
| 352 | + */ | |
| 353 | + public String getAudioKeyword() { | |
| 354 | + return audioKeyword; | |
| 355 | + } | |
| 356 | + | |
| 357 | + /** | |
| 358 | + * 设置音频关键字 | |
| 359 | + * | |
| 360 | + * @param audioKeyword 音频关键字 | |
| 361 | + */ | |
| 362 | + public void setAudioKeyword(String audioKeyword) { | |
| 363 | + this.audioKeyword = audioKeyword; | |
| 364 | + } | |
| 365 | + | |
| 366 | + /** | |
| 367 | + * 获取上传时间 | |
| 368 | + * | |
| 369 | + * @return uploadTime - 上传时间 | |
| 370 | + */ | |
| 371 | + public Date getUploadTime() { | |
| 372 | + return uploadTime; | |
| 373 | + } | |
| 374 | + | |
| 375 | + /** | |
| 376 | + * 设置上传时间 | |
| 377 | + * | |
| 378 | + * @param uploadTime 上传时间 | |
| 379 | + */ | |
| 380 | + public void setUploadTime(Date uploadTime) { | |
| 381 | + this.uploadTime = uploadTime; | |
| 382 | + } | |
| 383 | + | |
| 384 | + /** | |
| 385 | + * @return priority | |
| 386 | + */ | |
| 387 | + public Integer getPriority() { | |
| 388 | + return priority; | |
| 389 | + } | |
| 390 | + | |
| 391 | + /** | |
| 392 | + * @param priority | |
| 393 | + */ | |
| 394 | + public void setPriority(Integer priority) { | |
| 395 | + this.priority = priority; | |
| 396 | + } | |
| 397 | + | |
| 398 | + /** | |
| 399 | + * 获取回调函数 | |
| 400 | + * | |
| 401 | + * @return callback - 回调函数 | |
| 402 | + */ | |
| 403 | + public String getCallback() { | |
| 404 | + return callback; | |
| 405 | + } | |
| 406 | + | |
| 407 | + /** | |
| 408 | + * 设置回调函数 | |
| 409 | + * | |
| 410 | + * @param callback 回调函数 | |
| 411 | + */ | |
| 412 | + public void setCallback(String callback) { | |
| 413 | + this.callback = callback; | |
| 414 | + } | |
| 415 | + | |
| 416 | + /** | |
| 417 | + * 获取spId | |
| 418 | + * | |
| 419 | + * @return spId - spId | |
| 420 | + */ | |
| 421 | + public Integer getSpId() { | |
| 422 | + return spId; | |
| 423 | + } | |
| 424 | + | |
| 425 | + /** | |
| 426 | + * 设置spId | |
| 427 | + * | |
| 428 | + * @param spId spId | |
| 429 | + */ | |
| 430 | + public void setSpId(Integer spId) { | |
| 431 | + this.spId = spId; | |
| 432 | + } | |
| 433 | + | |
| 434 | + /** | |
| 435 | + * 获取存储空间名 | |
| 436 | + * | |
| 437 | + * @return bucketName - 存储空间名 | |
| 438 | + */ | |
| 439 | + public String getBucketName() { | |
| 440 | + return bucketName; | |
| 441 | + } | |
| 442 | + | |
| 443 | + /** | |
| 444 | + * 设置存储空间名 | |
| 445 | + * | |
| 446 | + * @param bucketName 存储空间名 | |
| 447 | + */ | |
| 448 | + public void setBucketName(String bucketName) { | |
| 449 | + this.bucketName = bucketName; | |
| 450 | + } | |
| 451 | + | |
| 452 | + /** | |
| 453 | + * 获取1:金山;2:七牛 | |
| 454 | + * | |
| 455 | + * @return bucketType - 1:金山;2:七牛 | |
| 456 | + */ | |
| 457 | + public Integer getBucketType() { | |
| 458 | + return bucketType; | |
| 459 | + } | |
| 460 | + | |
| 461 | + /** | |
| 462 | + * 设置1:金山;2:七牛 | |
| 463 | + * | |
| 464 | + * @param bucketType 1:金山;2:七牛 | |
| 465 | + */ | |
| 466 | + public void setBucketType(Integer bucketType) { | |
| 467 | + this.bucketType = bucketType; | |
| 468 | + } | |
| 469 | + | |
| 470 | + /** | |
| 471 | + * 获取音频时长,单位s | |
| 472 | + * | |
| 473 | + * @return duration - 音频时长,单位s | |
| 474 | + */ | |
| 475 | + public Integer getDuration() { | |
| 476 | + return duration; | |
| 477 | + } | |
| 478 | + | |
| 479 | + /** | |
| 480 | + * 设置音频时长,单位s | |
| 481 | + * | |
| 482 | + * @param duration 音频时长,单位s | |
| 483 | + */ | |
| 484 | + public void setDuration(Integer duration) { | |
| 485 | + this.duration = duration; | |
| 486 | + } | |
| 487 | + | |
| 488 | + /** | |
| 489 | + * 获取上传人 | |
| 490 | + * | |
| 491 | + * @return uploader - 审核员名称 | |
| 492 | + */ | |
| 493 | + public String getUploader() { | |
| 494 | + return uploader; | |
| 495 | + } | |
| 496 | + | |
| 497 | + /** | |
| 498 | + * 设置上传人 | |
| 499 | + * | |
| 500 | + * @param uploader 审核员名称 | |
| 501 | + */ | |
| 502 | + public void setUploader(String uploader) { | |
| 503 | + this.uploader = uploader; | |
| 504 | + } | |
| 505 | + | |
| 506 | + /** | |
| 507 | + * 获取音频上传人联系方式 | |
| 508 | + * | |
| 509 | + * @return contactInfo - 音频上传人联系方式 | |
| 510 | + */ | |
| 511 | + public String getContactInfo() { | |
| 512 | + return contactInfo; | |
| 513 | + } | |
| 514 | + | |
| 515 | + /** | |
| 516 | + * 设置音频上传人联系方式 | |
| 517 | + * | |
| 518 | + * @param contactInfo 音频上传人联系方式 | |
| 519 | + */ | |
| 520 | + public void setContactInfo(String contactInfo) { | |
| 521 | + this.contactInfo = contactInfo; | |
| 522 | + } | |
| 523 | + | |
| 524 | + /** | |
| 525 | + * 获取扩展字段 | |
| 526 | + * | |
| 527 | + * @return extendField - 扩展字段 | |
| 528 | + */ | |
| 529 | + public String getExtendField() { | |
| 530 | + return extendField; | |
| 531 | + } | |
| 532 | + | |
| 533 | + /** | |
| 534 | + * 设置扩展字段 | |
| 535 | + * | |
| 536 | + * @param extendField 扩展字段 | |
| 537 | + */ | |
| 538 | + public void setExtendField(String extendField) { | |
| 539 | + this.extendField = extendField; | |
| 540 | + } | |
| 541 | + | |
| 542 | + /** | |
| 543 | + * 获取审核员id | |
| 544 | + * | |
| 545 | + * @return auditor_id - 审核员id | |
| 546 | + */ | |
| 547 | + public String getAuditor_id() { | |
| 548 | + return auditor_id; | |
| 549 | + } | |
| 550 | + | |
| 551 | + /** | |
| 552 | + * 设置审核员id | |
| 553 | + * | |
| 554 | + * @param auditor_id 审核员id | |
| 555 | + */ | |
| 556 | + public void setAuditor_id(String auditor_id) { | |
| 557 | + this.auditor_id = auditor_id; | |
| 558 | + } | |
| 559 | + | |
| 560 | + /** | |
| 561 | + * 获取常用审核意见 | |
| 562 | + * | |
| 563 | + * @return attr_tags - 常用审核意见 | |
| 564 | + */ | |
| 565 | + public String getAttr_tags() { | |
| 566 | + return attr_tags; | |
| 567 | + } | |
| 568 | + | |
| 569 | + /** | |
| 570 | + * 设置常用审核意见 | |
| 571 | + * | |
| 572 | + * @param attr_tags 常用审核意见 | |
| 573 | + */ | |
| 574 | + public void setAttr_tags(String attr_tags) { | |
| 575 | + this.attr_tags = attr_tags; | |
| 576 | + } | |
| 577 | + | |
| 578 | + /** | |
| 579 | + * 获取拒绝理由 | |
| 580 | + * | |
| 581 | + * @return msg - 拒绝理由 | |
| 582 | + */ | |
| 583 | + public String getMsg() { | |
| 584 | + return msg; | |
| 585 | + } | |
| 586 | + | |
| 587 | + /** | |
| 588 | + * 设置拒绝理由 | |
| 589 | + * | |
| 590 | + * @param msg 拒绝理由 | |
| 591 | + */ | |
| 592 | + public void setMsg(String msg) { | |
| 593 | + this.msg = msg; | |
| 594 | + } | |
| 595 | + | |
| 596 | + /** | |
| 597 | + * 获取1:免审,2:机审,3:人工审 | |
| 598 | + * | |
| 599 | + * @return shenhe_type - 1:免审,2:机审,3:人工审 | |
| 600 | + */ | |
| 601 | + public Integer getShenhe_type() { | |
| 602 | + return shenhe_type; | |
| 603 | + } | |
| 604 | + | |
| 605 | + /** | |
| 606 | + * 设置1:免审,2:机审,3:人工审 | |
| 607 | + * | |
| 608 | + * @param shenhe_type 1:免审,2:机审,3:人工审 | |
| 609 | + */ | |
| 610 | + public void setShenhe_type(Integer shenhe_type) { | |
| 611 | + this.shenhe_type = shenhe_type; | |
| 612 | + } | |
| 613 | + | |
| 614 | + /** | |
| 615 | + * 获取审核状态:0-未审核 1-已通过 2-拒绝 3-自动审核失败 | |
| 616 | + * | |
| 617 | + * @return state - 审核状态:0-未审核 1-已通过 2-拒绝 3-自动审核失败 | |
| 618 | + */ | |
| 619 | + public Integer getState() { | |
| 620 | + return state; | |
| 621 | + } | |
| 622 | + | |
| 623 | + /** | |
| 624 | + * 设置审核状态:0-未审核 1-已通过 2-拒绝 3-自动审核失败 | |
| 625 | + * | |
| 626 | + * @param state 审核状态:0-未审核 1-已通过 2-拒绝 3-自动审核失败 | |
| 627 | + */ | |
| 628 | + public void setState(Integer state) { | |
| 629 | + this.state = state; | |
| 630 | + } | |
| 631 | + | |
| 632 | + /** | |
| 633 | + * 获取创建时间 | |
| 634 | + * | |
| 635 | + * @return createTime - 创建时间 | |
| 636 | + */ | |
| 637 | + public Date getCreateTime() { | |
| 638 | + return createTime; | |
| 639 | + } | |
| 640 | + | |
| 641 | + /** | |
| 642 | + * 设置创建时间 | |
| 643 | + * | |
| 644 | + * @param createTime 创建时间 | |
| 645 | + */ | |
| 646 | + public void setCreateTime(Date createTime) { | |
| 647 | + this.createTime = createTime; | |
| 648 | + } | |
| 649 | + | |
| 650 | + /** | |
| 651 | + * 获取修改时间 | |
| 652 | + * | |
| 653 | + * @return updateTime - 修改时间 | |
| 654 | + */ | |
| 655 | + public Date getUpdateTime() { | |
| 656 | + return updateTime; | |
| 657 | + } | |
| 658 | + | |
| 659 | + /** | |
| 660 | + * 设置修改时间 | |
| 661 | + * | |
| 662 | + * @param updateTime 修改时间 | |
| 663 | + */ | |
| 664 | + public void setUpdateTime(Date updateTime) { | |
| 665 | + this.updateTime = updateTime; | |
| 666 | + } | |
| 667 | + | |
| 668 | + /** | |
| 669 | + * 获取领取状态:0-未领取 1-已领取 | |
| 670 | + * | |
| 671 | + * @return receive - 领取状态:0-未领取 1-已领取 | |
| 672 | + */ | |
| 673 | + public Integer getReceive() { | |
| 674 | + return receive; | |
| 675 | + } | |
| 676 | + | |
| 677 | + /** | |
| 678 | + * 设置领取状态:0-未领取 1-已领取 | |
| 679 | + * | |
| 680 | + * @param receive 领取状态:0-未领取 1-已领取 | |
| 681 | + */ | |
| 682 | + public void setReceive(Integer receive) { | |
| 683 | + this.receive = receive; | |
| 684 | + } | |
| 685 | + | |
| 686 | + /** | |
| 687 | + * 获取领取人id | |
| 688 | + * | |
| 689 | + * @return receive_user_id - 领取人id | |
| 690 | + */ | |
| 691 | + public String getReceive_user_id() { | |
| 692 | + return receive_user_id; | |
| 693 | + } | |
| 694 | + | |
| 695 | + /** | |
| 696 | + * 设置领取人id | |
| 697 | + * | |
| 698 | + * @param receive_user_id 领取人id | |
| 699 | + */ | |
| 700 | + public void setReceive_user_id(String receive_user_id) { | |
| 701 | + this.receive_user_id = receive_user_id; | |
| 702 | + } | |
| 703 | + | |
| 704 | + public String getSpid_desc() { | |
| 705 | + return spid_desc; | |
| 706 | + } | |
| 707 | + | |
| 708 | + public void setSpid_desc(String spid_desc) { | |
| 709 | + this.spid_desc = spid_desc; | |
| 710 | + } | |
| 711 | +} | |
| 0 | 712 | \ No newline at end of file | ... | ... |
src/main/java/com/cnlive/shenhe/job/AudioJob.java
0 → 100644
| 1 | +package com.cnlive.shenhe.job; | |
| 2 | + | |
| 3 | +import com.cnlive.shenhe.entity.ShyAudio; | |
| 4 | +import com.cnlive.shenhe.entity.ShyVideos; | |
| 5 | +import com.cnlive.shenhe.serviceImpl.AudioServiceImpl; | |
| 6 | +import com.cnlive.shenhe.utils.CommonConst; | |
| 7 | +import org.slf4j.Logger; | |
| 8 | +import org.slf4j.LoggerFactory; | |
| 9 | +import org.springframework.beans.factory.annotation.Autowired; | |
| 10 | +import org.springframework.scheduling.annotation.Scheduled; | |
| 11 | +import org.springframework.stereotype.Component; | |
| 12 | + | |
| 13 | +import java.util.List; | |
| 14 | + | |
| 15 | +/** | |
| 16 | + * @Author: xujincheng | |
| 17 | + * @Date: 2020/6/18 13:06 | |
| 18 | + */ | |
| 19 | +@Component | |
| 20 | +public class AudioJob { | |
| 21 | + | |
| 22 | + private static Logger logger = LoggerFactory.getLogger(AudioJob.class); | |
| 23 | + | |
| 24 | + @Autowired | |
| 25 | + AudioServiceImpl audioService; | |
| 26 | + | |
| 27 | + /** | |
| 28 | + * 白名单sp音频通过 | |
| 29 | + */ | |
| 30 | + @Scheduled(fixedRate = 60 * 1000) | |
| 31 | + public void updateVideos() { | |
| 32 | + ShyAudio shyAudio = new ShyAudio(); | |
| 33 | + // 审核类型为免审 | |
| 34 | + shyAudio.setShenhe_type(CommonConst.AUDIT_TYPE_FREE); | |
| 35 | + // 审核状态为未审核 | |
| 36 | + shyAudio.setState(CommonConst.AUDIT_INTT); | |
| 37 | + List<ShyAudio> shyAudioList = audioService.findshyAudio(shyAudio); | |
| 38 | + if (shyAudioList != null && shyAudioList.size() > 0) { | |
| 39 | + for (ShyAudio audio : shyAudioList) { | |
| 40 | + logger.info("当前白名单通过的AudioId:" + audio.getAudioId()); | |
| 41 | + shyAudio.setUploader("白名单"); | |
| 42 | + // 更新点播音频和审核的音频状态 | |
| 43 | + audioService.updateAudioAndShenhe(audio, 3); | |
| 44 | + } | |
| 45 | + } | |
| 46 | + } | |
| 47 | +} | ... | ... |
src/main/java/com/cnlive/shenhe/mapper/ShyAudioMapper.java
0 → 100644
| 1 | +package com.cnlive.shenhe.mapper; | |
| 2 | + | |
| 3 | +import com.cnlive.shenhe.entity.ShyAudio; | |
| 4 | +import org.apache.ibatis.annotations.Param; | |
| 5 | +import tk.mybatis.mapper.common.Mapper; | |
| 6 | + | |
| 7 | + | |
| 8 | +public interface ShyAudioMapper extends Mapper<ShyAudio> { | |
| 9 | + | |
| 10 | + /** | |
| 11 | + * 查询音频记录是否存在 | |
| 12 | + * | |
| 13 | + * @param audioId 音频id | |
| 14 | + * @return | |
| 15 | + */ | |
| 16 | + ShyAudio getAudioMsg(@Param(value = "audioId") String audioId); | |
| 17 | + | |
| 18 | +} | |
| 0 | 19 | \ No newline at end of file | ... | ... |
src/main/java/com/cnlive/shenhe/serviceImpl/AudioServiceImpl.java
0 → 100644
| 1 | +package com.cnlive.shenhe.serviceImpl; | |
| 2 | + | |
| 3 | +import com.alibaba.fastjson.JSONObject; | |
| 4 | +import com.cnlive.shenhe.bean.ErrorEnum; | |
| 5 | +import com.cnlive.shenhe.bean.ResponseBean; | |
| 6 | +import com.cnlive.shenhe.entity.ShyAudio; | |
| 7 | +import com.cnlive.shenhe.entity.ShyUsers; | |
| 8 | +import com.cnlive.shenhe.entity.ShyVideos; | |
| 9 | +import com.cnlive.shenhe.mapper.ShyAudioMapper; | |
| 10 | +import com.cnlive.shenhe.mapper.ShyUsersMapper; | |
| 11 | +import com.cnlive.shenhe.utils.AuditPass; | |
| 12 | +import com.cnlive.shenhe.utils.CommonConst; | |
| 13 | +import com.cnlive.shenhe.utils.CommonUtils; | |
| 14 | +import com.github.pagehelper.PageHelper; | |
| 15 | +import com.github.pagehelper.PageInfo; | |
| 16 | +import org.apache.ibatis.session.RowBounds; | |
| 17 | +import org.slf4j.Logger; | |
| 18 | +import org.slf4j.LoggerFactory; | |
| 19 | +import org.springframework.beans.factory.annotation.Autowired; | |
| 20 | +import org.springframework.stereotype.Service; | |
| 21 | +import tk.mybatis.mapper.entity.Example; | |
| 22 | +import java.util.List; | |
| 23 | + | |
| 24 | +/** | |
| 25 | + * @Author: xujincheng | |
| 26 | + * @Date: 2020/6/8 10:19 | |
| 27 | + */ | |
| 28 | +@Service | |
| 29 | +public class AudioServiceImpl { | |
| 30 | + | |
| 31 | + private static Logger logger = LoggerFactory.getLogger(AudioServiceImpl.class); | |
| 32 | + | |
| 33 | + @Autowired | |
| 34 | + ShyAudioMapper shyAudioMapper; | |
| 35 | + | |
| 36 | + @Autowired | |
| 37 | + AudioServiceImpl audioService; | |
| 38 | + | |
| 39 | + @Autowired | |
| 40 | + AuditPass Pass; | |
| 41 | + | |
| 42 | + @Autowired | |
| 43 | + ShyUsersMapper shyUsersMapper; | |
| 44 | + | |
| 45 | + @Autowired | |
| 46 | + SitesServiceImpl sitesService; | |
| 47 | + | |
| 48 | + public ShyAudio getAudioMsg(String audioId) { | |
| 49 | + return shyAudioMapper.getAudioMsg(audioId); | |
| 50 | + } | |
| 51 | + | |
| 52 | + public int importAudioMsg(ShyAudio ShyAudio) { | |
| 53 | + return shyAudioMapper.insertSelective(ShyAudio); | |
| 54 | + } | |
| 55 | + | |
| 56 | + public int updateAudioMsg(ShyAudio ShyAudio) { | |
| 57 | + return shyAudioMapper.updateByPrimaryKeySelective(ShyAudio); | |
| 58 | + } | |
| 59 | + | |
| 60 | + public ShyAudio selectByPrimaryKey(Integer id) { | |
| 61 | + ShyAudio shyAudio = shyAudioMapper.selectByPrimaryKey(id); | |
| 62 | + return shyAudio; | |
| 63 | + } | |
| 64 | + | |
| 65 | + public List<ShyAudio> findshyAudio(ShyAudio shyAudio) { | |
| 66 | + List<ShyAudio> shyAudiolist = shyAudioMapper.selectByRowBounds(shyAudio, new RowBounds(0, 100)); | |
| 67 | + return shyAudiolist; | |
| 68 | + } | |
| 69 | + | |
| 70 | + public int updateAudioAndShenhe(ShyAudio shyAudio, int audioState) { | |
| 71 | + //修改点播云音频状态 | |
| 72 | + JSONObject result = Pass.audioPass(shyAudio.getAudioId(), audioState, shyAudio.getAttr_tags(), shyAudio.getMsg(), shyAudio.getCallback()); | |
| 73 | + Integer code = result.getInteger("code"); | |
| 74 | + Integer shenheState=CommonConst.AUDIT_REFUSE; | |
| 75 | + if (0 == code) { | |
| 76 | + if(audioState==3){ | |
| 77 | + shenheState=CommonConst.AUDIT_SUCCESS; | |
| 78 | + } | |
| 79 | + //修改审核云的音频状态 | |
| 80 | + int i = audioService.updateAudio(shyAudio.getId(), null,shyAudio.getUploader(),"", shenheState, shyAudio.getMsg()); | |
| 81 | + if (i != 1) { | |
| 82 | + logger.error("点播音频更改失败,AudioId:{}", shyAudio.getAudioId()); | |
| 83 | + } | |
| 84 | + return i; | |
| 85 | + } else { | |
| 86 | + shyAudio.setMsg("点播音频回调失败,"+shyAudio.getMsg()); | |
| 87 | + audioService.updateAudio(shyAudio.getId(), null,shyAudio.getUploader(),"", CommonConst.AUDIT_CALLBACK_FAIL, shyAudio.getMsg()); | |
| 88 | + logger.error("点播音频回调失败,activity_id:{},code:{},msg:{}", shyAudio.getAudioId(), code, result.getString("msg")); | |
| 89 | + } | |
| 90 | + | |
| 91 | + return 0; | |
| 92 | + } | |
| 93 | + | |
| 94 | + //认领 | |
| 95 | + public Integer receive(String ids, Integer num, String userId, Integer spid) { | |
| 96 | + Integer n = 0; | |
| 97 | + if (CommonUtils.isNotEmpty(ids)) { | |
| 98 | + String[] cids = ids.split(","); | |
| 99 | + for (String cid : cids) { | |
| 100 | + ShyAudio shyAudio = shyAudioMapper.selectByPrimaryKey(Integer.parseInt(cid)); | |
| 101 | + if (CommonUtils.isNotNull(shyAudio) && shyAudio.getState() == CommonConst.AUDIT_INTT && shyAudio.getReceive()==CommonConst.RECEIVE_BEFORE) { | |
| 102 | + shyAudio.setReceive_user_id(userId); | |
| 103 | + shyAudio.setReceive(CommonConst.RECEIVE_AFTER); | |
| 104 | + shyAudioMapper.updateByPrimaryKeySelective(shyAudio); | |
| 105 | + n++; | |
| 106 | + } | |
| 107 | + } | |
| 108 | + } else if (CommonUtils.isNotNull(num) && num > 0) { | |
| 109 | + Example example = new Example(ShyAudio.class); | |
| 110 | + example.setOrderByClause("createTime desc"); | |
| 111 | + example.and().andEqualTo("state", CommonConst.AUDIT_INTT); | |
| 112 | + example.and().andEqualTo("receive", CommonConst.RECEIVE_BEFORE); | |
| 113 | + if (CommonUtils.isNotNull(spid) && spid != 0) example.and().andEqualTo("spid", spid); | |
| 114 | + List<ShyAudio> shyCommentsList = shyAudioMapper.selectByExampleAndRowBounds(example, new RowBounds(0, num)); | |
| 115 | + if (!shyCommentsList.isEmpty()) { | |
| 116 | + for (ShyAudio shyComments : shyCommentsList) { | |
| 117 | + shyComments.setReceive_user_id(userId); | |
| 118 | + shyComments.setReceive(CommonConst.RECEIVE_AFTER); | |
| 119 | + shyAudioMapper.updateByPrimaryKeySelective(shyComments); | |
| 120 | + n++; | |
| 121 | + } | |
| 122 | + } | |
| 123 | + } | |
| 124 | + return n; | |
| 125 | + } | |
| 126 | + | |
| 127 | + //退领 | |
| 128 | + public ResponseBean retReceive(String ids, String userId) { | |
| 129 | + String[] cids = ids.split(","); | |
| 130 | + for (String cid : cids) { | |
| 131 | + ShyAudio shyAudio = shyAudioMapper.selectByPrimaryKey(Integer.parseInt(cid)); | |
| 132 | + if (shyAudio.getState() == CommonConst.AUDIT_INTT && shyAudio.getReceive()==CommonConst.RECEIVE_AFTER && shyAudio.getReceive_user_id().equals(userId)) { | |
| 133 | + shyAudio.setReceive(CommonConst.RECEIVE_BEFORE); | |
| 134 | + shyAudio.setReceive_user_id(null); | |
| 135 | + int i = shyAudioMapper.updateByPrimaryKey(shyAudio); | |
| 136 | + if (i != 1) { | |
| 137 | + return new ResponseBean(ErrorEnum.ERROR.getErrorCode(), "退领失败,请重试"); | |
| 138 | + } | |
| 139 | + } else { | |
| 140 | + return new ResponseBean(ErrorEnum.ERROR.getErrorCode(), "退领失败,您选中的内容包含已退领的或已经审核的"); | |
| 141 | + } | |
| 142 | + } | |
| 143 | + return new ResponseBean(ErrorEnum.SUCCESS.getErrorCode(), "已退领"); | |
| 144 | + } | |
| 145 | + | |
| 146 | + public String repulse(String shyAudioId, String msg, String userId) { | |
| 147 | + String showMsg = ""; | |
| 148 | + ShyAudio shyAudio = audioService.selectByPrimaryKey(Integer.parseInt(shyAudioId)); | |
| 149 | + JSONObject result; | |
| 150 | + try { | |
| 151 | + result = Pass.audioPass(shyAudio.getAudioId(), 4, msg, msg, shyAudio.getCallback()); | |
| 152 | + } catch (Exception e) { | |
| 153 | + logger.error("音频审核失败,id==" + shyAudioId, e); | |
| 154 | + showMsg = showMsg + "," + shyAudio.getAudioTitle() + " 拒绝请求失败"; | |
| 155 | + return showMsg; | |
| 156 | + } | |
| 157 | + if (result == null) { | |
| 158 | + logger.error("音频审核失败且接口错误没有返回信息,id==" + shyAudioId); | |
| 159 | + showMsg = showMsg + "," + shyAudio.getAudioTitle() + " 拒绝请求失败"; | |
| 160 | + return showMsg; | |
| 161 | + } | |
| 162 | + Integer code = result.getInteger("code"); | |
| 163 | + if (code != 0) { | |
| 164 | + logger.error("音频审核失败,id:{},code:{}", shyAudioId, code); | |
| 165 | + showMsg = showMsg + "," + shyAudio.getAudioTitle() + " " + result.getString("msg"); | |
| 166 | + return showMsg; | |
| 167 | + } | |
| 168 | + //0.未审核,1:已审核,2.拒绝 | |
| 169 | + int i = audioService.updateAudio(Integer.parseInt(shyAudioId), userId, null, "", 2, msg); | |
| 170 | + if (i == 0) { | |
| 171 | + showMsg = showMsg + "," + shyAudio.getAudioTitle() + " 更新失败"; | |
| 172 | + return showMsg; | |
| 173 | + } | |
| 174 | + | |
| 175 | + return showMsg; | |
| 176 | + } | |
| 177 | + | |
| 178 | + public int updateAudio(Integer id, String auditor_id,String updater,String attr_tags, Integer state, String msg) { | |
| 179 | + ShyAudio shyAudio = shyAudioMapper.selectByPrimaryKey(id); | |
| 180 | + shyAudio.setAuditor_id(auditor_id); | |
| 181 | + shyAudio.setState(state); | |
| 182 | + if(CommonUtils.isNotEmpty(attr_tags)){ | |
| 183 | + shyAudio.setAttr_tags(attr_tags); | |
| 184 | + } | |
| 185 | + if(CommonUtils.isNotEmpty(msg)){ | |
| 186 | + shyAudio.setMsg(msg); | |
| 187 | + } | |
| 188 | + shyAudio.setUploader(updater); | |
| 189 | + if(CommonUtils.isNotEmpty(auditor_id)){ | |
| 190 | + shyAudio.setReceive(CommonConst.RECEIVE_AFTER); | |
| 191 | + shyAudio.setReceive_user_id(auditor_id); | |
| 192 | + shyAudio.setShenhe_type(CommonConst.AUDIT_TYPE_USER); | |
| 193 | + } | |
| 194 | + return shyAudioMapper.updateByPrimaryKey(shyAudio); | |
| 195 | + } | |
| 196 | + | |
| 197 | + //分页查询音频数据 | |
| 198 | + 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) { | |
| 199 | + Example example = new Example(ShyAudio.class); | |
| 200 | + Example.Criteria criteria = example.createCriteria(); | |
| 201 | + Example.Criteria criteria2 = example.createCriteria(); | |
| 202 | + if (CommonUtils.isNotEmpty(orderByClause)) { | |
| 203 | + example.setOrderByClause(orderByClause); | |
| 204 | + } | |
| 205 | + if (CommonUtils.isNotEmpty(start_date) && CommonUtils.isNotEmpty(end_date)) { | |
| 206 | + criteria.andGreaterThanOrEqualTo("createTime", start_date); | |
| 207 | + criteria2.andGreaterThanOrEqualTo("createTime", start_date); | |
| 208 | + criteria.andLessThanOrEqualTo("createTime", end_date); | |
| 209 | + criteria2.andLessThanOrEqualTo("createTime", end_date); | |
| 210 | + } | |
| 211 | + if (CommonUtils.isNotEmpty(video_title)) { | |
| 212 | + criteria.andLike("audioTitle", "%" + video_title + "%"); | |
| 213 | + criteria2.andLike("audioTitle", "%" + video_title + "%"); | |
| 214 | + } | |
| 215 | + | |
| 216 | + if (CommonUtils.isNotEmpty(video_priority)) { | |
| 217 | + criteria.andEqualTo("priority", video_priority); | |
| 218 | + criteria2.andEqualTo("priority", video_priority); | |
| 219 | + } | |
| 220 | + | |
| 221 | + if (CommonUtils.isNotNull(spid)) { | |
| 222 | + criteria.andEqualTo("spId", spid); | |
| 223 | + criteria2.andEqualTo("spId", spid); | |
| 224 | + } else if (CommonUtils.isNotEmpty(sp_Id)) { | |
| 225 | + criteria.andEqualTo("spId", sp_Id); | |
| 226 | + criteria2.andEqualTo("spId", sp_Id); | |
| 227 | + } | |
| 228 | + | |
| 229 | + //领取状态 0-未领取 1-已领取 | |
| 230 | + if (CommonUtils.isNotNull(receive)) { | |
| 231 | + criteria.andEqualTo("receive", receive); | |
| 232 | + criteria2.andEqualTo("receive", receive); | |
| 233 | + if (receive == CommonConst.RECEIVE_AFTER) { | |
| 234 | + criteria.andEqualTo("receive_user_id", userId); | |
| 235 | + criteria2.andEqualTo("receive_user_id", userId); | |
| 236 | + } | |
| 237 | + } | |
| 238 | + | |
| 239 | + //审核状态 0-未审核 1-已审核 2-拒绝 | |
| 240 | + if (CommonUtils.isNotNull(state) && state != 3) { | |
| 241 | + criteria.andEqualTo("state", state); | |
| 242 | + } else if (CommonUtils.isNotNull(state) && state == 3) { | |
| 243 | + criteria.andEqualTo("state", 1); | |
| 244 | + criteria2.andEqualTo("state", 2); | |
| 245 | + example.or(criteria2); | |
| 246 | + } | |
| 247 | + | |
| 248 | + //默认按上传时间倒序排序 | |
| 249 | + example.setOrderByClause("createTime desc"); | |
| 250 | + PageHelper.startPage(page, pageSize, true); | |
| 251 | + List<ShyAudio> shyAudioList = shyAudioMapper.selectByExample(example); | |
| 252 | + PageInfo<ShyAudio> pageInfo = new PageInfo<>(shyAudioList); | |
| 253 | + return pageInfo; | |
| 254 | + } | |
| 255 | + | |
| 256 | + | |
| 257 | + public ShyAudio getDetailsContent(Integer id) { | |
| 258 | + ShyAudio shyAudio = shyAudioMapper.selectByPrimaryKey(id); | |
| 259 | + if (shyAudio.getState() != CommonConst.AUDIT_INTT) { | |
| 260 | + String updater = CommonUtils.isEmpty(shyAudio.getUploader()) || "null".equals(shyAudio.getUploader())? "白名单":shyAudio.getUploader(); | |
| 261 | + String auditor_id = shyAudio.getAuditor_id(); | |
| 262 | + if (CommonUtils.isNotEmpty(auditor_id)) { | |
| 263 | + ShyUsers user = new ShyUsers(); | |
| 264 | + user.setUser_id(auditor_id); | |
| 265 | + user = shyUsersMapper.selectOne(user); | |
| 266 | + String email = CommonUtils.isEmpty(user.getEmail()) || "null".equals(user.getEmail())? "" : user.getEmail(); | |
| 267 | + String userName = CommonUtils.isEmpty(user.getUsername()) ? email: user.getUsername(); | |
| 268 | + updater = userName; | |
| 269 | + } | |
| 270 | + shyAudio.setUploader(updater); | |
| 271 | + } | |
| 272 | + return shyAudio; | |
| 273 | + } | |
| 274 | + | |
| 275 | + /** | |
| 276 | + * 根据条件导出数据excel | |
| 277 | + * | |
| 278 | + * @param video_title | |
| 279 | + * @param start_date | |
| 280 | + * @param end_date | |
| 281 | + * @param state | |
| 282 | + * @param receive | |
| 283 | + * @param video_priority | |
| 284 | + * @param orderByClause | |
| 285 | + * @param spid | |
| 286 | + * @param userId | |
| 287 | + * @return | |
| 288 | + */ | |
| 289 | + 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 | + Example example = new Example(ShyAudio.class); | |
| 291 | + Example.Criteria criteria = example.createCriteria(); | |
| 292 | + Example.Criteria criteria2 = example.createCriteria(); | |
| 293 | + if (CommonUtils.isNotEmpty(orderByClause)) { | |
| 294 | + example.setOrderByClause(orderByClause); | |
| 295 | + } | |
| 296 | + if (CommonUtils.isNotEmpty(start_date) && CommonUtils.isNotEmpty(end_date)) { | |
| 297 | + criteria.andGreaterThanOrEqualTo("createTime", start_date); | |
| 298 | + criteria.andLessThanOrEqualTo("createTime", end_date); | |
| 299 | + } | |
| 300 | + if (CommonUtils.isNotEmpty(video_title)) { | |
| 301 | + criteria.andLike("audioTitle", "%" + video_title + "%"); | |
| 302 | + } | |
| 303 | + if (CommonUtils.isNotNull(state) && state == 0) { | |
| 304 | + criteria.andEqualTo("state", state); | |
| 305 | + } else if (CommonUtils.isNotNull(state) && state == 1) { | |
| 306 | + criteria.andEqualTo("state", state); | |
| 307 | + criteria2.andEqualTo("state", 2); | |
| 308 | + example.or(criteria2); | |
| 309 | + } | |
| 310 | + if (CommonUtils.isNotEmpty(video_priority)) { | |
| 311 | + criteria.andEqualTo("priority", video_priority); | |
| 312 | + } | |
| 313 | + if (CommonUtils.isNotNull(spid)) { | |
| 314 | + criteria.andEqualTo("spId", spid); | |
| 315 | + } | |
| 316 | + if (CommonUtils.isNotNull(receive)) { | |
| 317 | + criteria.andEqualTo("receive", receive); | |
| 318 | + if (receive == CommonConst.RECEIVE_AFTER) { | |
| 319 | + criteria.andEqualTo("receive_user_id", userId); | |
| 320 | + } | |
| 321 | + } | |
| 322 | + //默认按上传时间倒序排序 | |
| 323 | + //example.setOrderByClause("video_upload_time desc"); | |
| 324 | + List<ShyAudio> shyAudioList = shyAudioMapper.selectByExample(example); | |
| 325 | + return shyAudioList; | |
| 326 | + } | |
| 327 | + | |
| 328 | + | |
| 329 | + /** | |
| 330 | + * 根据sp、栏目、用户id来判断审核类型 | |
| 331 | + * | |
| 332 | + * @param shyAudio | |
| 333 | + */ | |
| 334 | + public void getShenheType(ShyAudio shyAudio) { | |
| 335 | + //获取点播免审sp | |
| 336 | + List<Integer> sites = sitesService.getBusinessList(CommonConst.BUSINESS_AUDIO); | |
| 337 | + logger.info("sites" + sites.toString()); | |
| 338 | + //初始化一个审核状态 | |
| 339 | + //审核类型 1-免审 2-机审 3-人工审 | |
| 340 | + Integer shenheType = 3; | |
| 341 | + //如果当前sp是免审sp | |
| 342 | + if (sites.contains(shyAudio.getSpId())) { | |
| 343 | + //免审 | |
| 344 | + shenheType = 1; | |
| 345 | + } | |
| 346 | + shyAudio.setShenhe_type(shenheType); | |
| 347 | + } | |
| 348 | +} | ... | ... |
src/main/java/com/cnlive/shenhe/serviceImpl/VideosServiceImpl.java
| ... | ... | @@ -233,7 +233,6 @@ public class VideosServiceImpl { |
| 233 | 233 | } |
| 234 | 234 | |
| 235 | 235 | public ResponseBean retReceive(String ids, String userId) { |
| 236 | - boolean result = true; | |
| 237 | 236 | String[] cids = ids.split(","); |
| 238 | 237 | for (String cid : cids) { |
| 239 | 238 | ShyVideos shyVideos = shyVideosMapper.selectByPrimaryKey(Integer.parseInt(cid)); | ... | ... |
src/main/java/com/cnlive/shenhe/utils/AuditPass.java
| ... | ... | @@ -218,4 +218,30 @@ public class AuditPass { |
| 218 | 218 | Map<String, String> post = httpUtil.post(URL); |
| 219 | 219 | return JSONObject.parseObject(post.get("result")); |
| 220 | 220 | } |
| 221 | + | |
| 222 | + //音频回调 | |
| 223 | + public JSONObject audioPass(String audioId, int state, String attr_tags, String msg, String callBack) { | |
| 224 | + logger.info("点播音频回调:audioId:{},state:{},attr_tags:{},msg:{}", audioId, state, attr_tags, msg); | |
| 225 | + JSONObject params = new JSONObject(); | |
| 226 | + params.put("video_id", audioId); | |
| 227 | + //3-成功 4-失败 | |
| 228 | + params.put("state", state + ""); | |
| 229 | + params.put("attr_tags", attr_tags); | |
| 230 | + params.put("msg", msg); | |
| 231 | + HttpUtil httpUtil = HttpUtil.init(); | |
| 232 | + httpUtil.setParam("param", params.toJSONString()); | |
| 233 | + String token = ""; | |
| 234 | + try { | |
| 235 | + String cb = callBack.replace("//", ""); | |
| 236 | + cb = cb.substring(cb.indexOf("/")); | |
| 237 | + token = CommonUtils.md5(cb + platformKey + platformValue); | |
| 238 | + } catch (NoSuchAlgorithmException e) { | |
| 239 | + e.printStackTrace(); | |
| 240 | + } catch (UnsupportedEncodingException e) { | |
| 241 | + e.printStackTrace(); | |
| 242 | + } | |
| 243 | + String URL = callBack + "?platform=" + platformKey + "&token=" + token; | |
| 244 | + Map<String, String> post = httpUtil.post(URL); | |
| 245 | + return JSONObject.parseObject(post.get("result")); | |
| 246 | + } | |
| 221 | 247 | } | ... | ... |
src/main/java/com/cnlive/shenhe/utils/CommonConst.java
| ... | ... | @@ -112,9 +112,13 @@ public class CommonConst { |
| 112 | 112 | * 白名单业务:话题申请 |
| 113 | 113 | */ |
| 114 | 114 | public static Integer BUSINESS_TOPIC = 6; |
| 115 | + /** | |
| 116 | + * 白名单业务:音频 | |
| 117 | + */ | |
| 118 | + public static Integer BUSINESS_AUDIO = 7; | |
| 115 | 119 | |
| 116 | 120 | //白名单设置 |
| 117 | - public static JSONObject BUSINESS = JSONObject.parseObject("{\"1\":\"点播业务\",\"2\":\"评论业务\",\"3\":\"图文业务\",\"4\":\"频道业务\",\"5\":\"直播申请业务\",\"6\":\"话题业务\"}"); | |
| 121 | + public static JSONObject BUSINESS = JSONObject.parseObject("{\"1\":\"点播业务\",\"2\":\"评论业务\",\"3\":\"图文业务\",\"4\":\"频道业务\",\"5\":\"直播申请业务\",\"6\":\"话题业务\",\"7\":\"音频业务\"}"); | |
| 118 | 122 | |
| 119 | 123 | /** |
| 120 | 124 | * 弹窗消息:频道 | ... | ... |
src/main/resources/mapper/ShyAudioMapper.xml
0 → 100644
| 1 | +<?xml version="1.0" encoding="UTF-8"?> | |
| 2 | +<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | |
| 3 | +<mapper namespace="com.cnlive.shenhe.mapper.ShyAudioMapper"> | |
| 4 | + <resultMap id="BaseResultMap" type="com.cnlive.shenhe.entity.ShyAudio"> | |
| 5 | + <!-- | |
| 6 | + WARNING - @mbg.generated | |
| 7 | + --> | |
| 8 | + <id column="id" jdbcType="INTEGER" property="id" /> | |
| 9 | + <result column="multiplecategory" jdbcType="VARCHAR" property="multiplecategory" /> | |
| 10 | + <result column="audioClipsName" jdbcType="VARCHAR" property="audioClipsName" /> | |
| 11 | + <result column="soure" jdbcType="INTEGER" property="soure" /> | |
| 12 | + <result column="audioId" jdbcType="VARCHAR" property="audioId" /> | |
| 13 | + <result column="audioTitle" jdbcType="VARCHAR" property="audioTitle" /> | |
| 14 | + <result column="audioUrl" jdbcType="VARCHAR" property="audioUrl" /> | |
| 15 | + <result column="audioCoverUrl" jdbcType="VARCHAR" property="audioCoverUrl" /> | |
| 16 | + <result column="audioIntro" jdbcType="VARCHAR" property="audioIntro" /> | |
| 17 | + <result column="audioTag" jdbcType="VARCHAR" property="audioTag" /> | |
| 18 | + <result column="audioKeyword" jdbcType="VARCHAR" property="audioKeyword" /> | |
| 19 | + <result column="uploadTime" jdbcType="TIMESTAMP" property="uploadTime" /> | |
| 20 | + <result column="priority" jdbcType="INTEGER" property="priority" /> | |
| 21 | + <result column="callback" jdbcType="VARCHAR" property="callback" /> | |
| 22 | + <result column="spId" jdbcType="INTEGER" property="spId" /> | |
| 23 | + <result column="bucketName" jdbcType="VARCHAR" property="bucketName" /> | |
| 24 | + <result column="bucketType" jdbcType="INTEGER" property="bucketType" /> | |
| 25 | + <result column="duration" jdbcType="INTEGER" property="duration" /> | |
| 26 | + <result column="uploader" jdbcType="VARCHAR" property="uploader" /> | |
| 27 | + <result column="contactInfo" jdbcType="VARCHAR" property="contactInfo" /> | |
| 28 | + <result column="extendField" jdbcType="VARCHAR" property="extendField" /> | |
| 29 | + <result column="auditor_id" jdbcType="VARCHAR" property="auditor_id" /> | |
| 30 | + <result column="attr_tags" jdbcType="VARCHAR" property="attr_tags" /> | |
| 31 | + <result column="msg" jdbcType="VARCHAR" property="msg" /> | |
| 32 | + <result column="shenhe_type" jdbcType="INTEGER" property="shenhe_type" /> | |
| 33 | + <result column="state" jdbcType="INTEGER" property="state" /> | |
| 34 | + <result column="createTime" jdbcType="TIMESTAMP" property="createTime" /> | |
| 35 | + <result column="updateTime" jdbcType="TIMESTAMP" property="updateTime" /> | |
| 36 | + <result column="receive" jdbcType="INTEGER" property="receive" /> | |
| 37 | + <result column="receive_user_id" jdbcType="VARCHAR" property="receive_user_id" /> | |
| 38 | + </resultMap> | |
| 39 | + | |
| 40 | + <select id="getAudioMsg" resultType="com.cnlive.shenhe.entity.ShyAudio"> | |
| 41 | + SELECT * | |
| 42 | + FROM shy_audio | |
| 43 | + where audioId = #{audioId,jdbcType=VARCHAR}; | |
| 44 | + </select> | |
| 45 | +</mapper> | |
| 0 | 46 | \ No newline at end of file | ... | ... |
src/main/resources/templates/common/frame.html
| ... | ... | @@ -75,6 +75,7 @@ line-height: 2em; margin: 0 auto;font-size: 2em" th:text="${session.sessionUser. |
| 75 | 75 | </a> |
| 76 | 76 | <ul class="treeview-menu"> |
| 77 | 77 | <li class="active"><a href="/videos/page?state=0&receive=0" id="/videos/page">点播审核</a></li> |
| 78 | + <li><a href="/audio/page?shenhe_state=0" id="/audio/page"> 音频审核</a></li> | |
| 78 | 79 | <li><a href="/live/page?shenhe_state=0" id="/live/page"> 直播审核</a></li> |
| 79 | 80 | <li><a href="/comments/page?state=0&receive=0" id="/comments/page"> 评论审核</a></li> |
| 80 | 81 | <li><a href="/content/page?receive_status=0" id="/content/page"> 图文审核</a></li> | ... | ... |
src/main/resources/templates/page/audio.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: 15%;float: left;"> | |
| 80 | + <div class="col-md-5" style="padding: 0;width: 100%;"> | |
| 81 | + <label for="video_titleID" class="control-label cb-toolbar">标题:</label> | |
| 82 | + <div class="col-sm-9" style="padding: 0;"> | |
| 83 | + <input class="form-control" type="text" value="" id="video_titleID"> | |
| 84 | + </div> | |
| 85 | + </div> | |
| 86 | + </div> | |
| 87 | + | |
| 88 | + <div class="btn-group margin-bottom col-md-6" style="padding: 0;width: 10%;float: left;"> | |
| 89 | + <div class="col-md-5" style="padding: 0;width: 100%;"> | |
| 90 | + <label for="state" class="control-label cb-toolbar">状态:</label> | |
| 91 | + <div class="col-sm-8" style="padding: 0;"> | |
| 92 | + <select class="form-control" id="state" name="state"> | |
| 93 | + <option value="">全部</option> | |
| 94 | + <option value="0">未审核</option> | |
| 95 | + <option value="1">已通过</option> | |
| 96 | + <option value="2">已拒绝</option> | |
| 97 | + </select> | |
| 98 | + <!--<input class="form-control" name="video_priority" type="text" id="video_priority">--> | |
| 99 | + </div> | |
| 100 | + </div> | |
| 101 | + </div> | |
| 102 | + | |
| 103 | + <div class="btn-group margin-bottom col-md-6 pull-right" | |
| 104 | + style="position: relative;width: 75%;float: left !important;"> | |
| 105 | + <div class="col-md-18" style="width: 100%;padding: 0;"> | |
| 106 | + <div class="col-md-10" style="padding: 0;width: 25%;"> | |
| 107 | + <label for="start_date" class="control-label cb-toolbar">时间:</label> | |
| 108 | + <div class="input-group col-md-9 date"> | |
| 109 | + <input class="form-control date" name="start_date" type="text" | |
| 110 | + id="start_date"> | |
| 111 | + <span class="input-group-addon"> | |
| 112 | + <span class="glyphicon glyphicon-calendar"></span> | |
| 113 | + </span> | |
| 114 | + </div> | |
| 115 | + </div> | |
| 116 | + <div class="col-md-10" style="padding: 0;width: 25%;"> | |
| 117 | + <label for="start_date" class="control-label cb-toolbar">至</label> | |
| 118 | + <div class="input-group col-md-9 date"> | |
| 119 | + <input class="form-control date" name="end_date" type="text" | |
| 120 | + id="end_date"> | |
| 121 | + <span class="input-group-addon"> | |
| 122 | + <span class="glyphicon glyphicon-calendar"></span> | |
| 123 | + </span> | |
| 124 | + </div> | |
| 125 | + </div> | |
| 126 | + | |
| 127 | + <div class="col-md-6" style="padding: 0;width: 25%;" th:if="${session.sessionUser.spid==0}"> | |
| 128 | + <label for="sp_desc" class="control-label cb-toolbar">sp简称:</label> | |
| 129 | + <div class="col-sm-9" style="padding: 0;"> | |
| 130 | + <input class="form-control" type="text" value="" id="sp_desc"> | |
| 131 | + </div> | |
| 132 | + </div> | |
| 133 | + | |
| 134 | + <div class="col-md-6" style="padding: 0;width: 25%;" th:if="${session.sessionUser.spid==0}"> | |
| 135 | + <label for="sp_Id" class="control-label cb-toolbar">sp_Id</label> | |
| 136 | + <div class="col-sm-9" style="padding: 0;"> | |
| 137 | + <input class="form-control" type="text" value="" id="sp_Id"> | |
| 138 | + </div> | |
| 139 | + </div> | |
| 140 | + <!-- <div class="col-md-6" style="padding: 0;width: 15%;" th:if="${session.sessionUser.spid==0}"> --> | |
| 141 | + <!-- <label for="count" class="control-label cb-toolbar">每页条数:</label> --> | |
| 142 | + <!-- <div class="col-sm-5" style="padding: 0;"> --> | |
| 143 | + <!-- <input class="form-control" type="text" value="" id="count"> --> | |
| 144 | + <!-- </div> --> | |
| 145 | + <!-- </div> --> | |
| 146 | + </div> | |
| 147 | + </div> | |
| 148 | + <!-- <div class="btn-group margin-bottom col-md-6" style="padding: 0;width: 1%;float: left;"> --> | |
| 149 | + <!-- <div class="col-md-1 text-center" style="width: 12%;padding: 0;float: right;"> --> | |
| 150 | + <!-- <button type="button" class="btn btn-primary btn-sm" id="videos_query">查 询 --> | |
| 151 | + <!-- </button> --> | |
| 152 | + <!-- </div> --> | |
| 153 | + <!-- </div> --> | |
| 154 | + </div> | |
| 155 | + | |
| 156 | + <div class="fixed-table-container" style="padding-bottom: 0px;"> | |
| 157 | + <div class="fixed-table-body"> | |
| 158 | + <table id="table" data-toggle="table" class="table table-hover table-striped" | |
| 159 | + style="margin-bottom: 0; "> | |
| 160 | + <thead> | |
| 161 | + <tr> | |
| 162 | + <th class="bs-checkbox " style="width: 5%; " data-field="state" | |
| 163 | + tabindex="0"> | |
| 164 | + <div class="th-inner "><input name="btSelectAll" type="checkbox" | |
| 165 | + id="select_all"> | |
| 166 | + </div> | |
| 167 | + <div class="fht-cell"></div> | |
| 168 | + </th> | |
| 169 | + <th style="text-align: center; width: 6%; " data-field="sp_id_brief" | |
| 170 | + tabindex="0"> | |
| 171 | + <div class="th-inner ">sp简称</div> | |
| 172 | + <div class="fht-cell"></div> | |
| 173 | + </th> | |
| 174 | + <th style="text-align: center; width: 20%; " data-field="video_title" | |
| 175 | + tabindex="0"> | |
| 176 | + <div class="th-inner ">标题</div> | |
| 177 | + <div class="fht-cell"></div> | |
| 178 | + </th> | |
| 179 | + <!--<th style="text-align: center; width: 10%; " data-field="video_cover_img" tabindex="0"><div class="th-inner ">点播封面图</div><div class="fht-cell"></div></th>--> | |
| 180 | + <th style="text-align: center; width: 6%; " data-field="updater" | |
| 181 | + tabindex="0"> | |
| 182 | + <div class="th-inner ">审核员</div> | |
| 183 | + <div class="fht-cell"></div> | |
| 184 | + </th> | |
| 185 | + <th style="text-align: center; width: 3%; " data-field="is_hot_name" | |
| 186 | + tabindex="0"> | |
| 187 | + <div class="th-inner ">热点</div> | |
| 188 | + <div class="fht-cell"></div> | |
| 189 | + </th> | |
| 190 | + <th style="text-align: center; width: 3%; " data-field="state_name" | |
| 191 | + tabindex="0"> | |
| 192 | + <div class="th-inner ">审核状态</div> | |
| 193 | + <div class="fht-cell"></div> | |
| 194 | + </th> | |
| 195 | + <th style="text-align: center; width: 3%; " data-field="state_name" | |
| 196 | + tabindex="0"> | |
| 197 | + <div class="th-inner ">审核类型</div> | |
| 198 | + <div class="fht-cell"></div> | |
| 199 | + </th> | |
| 200 | + <th style="text-align: center; width: 10%; " data-field="upload_time" | |
| 201 | + tabindex="0"> | |
| 202 | + <div class="th-inner ">视频上传时间</div> | |
| 203 | + <div class="fht-cell"></div> | |
| 204 | + </th> | |
| 205 | + <th style="text-align: center; width: 10%; " data-field="created_at" | |
| 206 | + tabindex="0"> | |
| 207 | + <div class="th-inner ">视频送审时间</div> | |
| 208 | + <div class="fht-cell"></div> | |
| 209 | + </th> | |
| 210 | + <th style="text-align: center; width: 17%; " data-field="action" | |
| 211 | + tabindex="0"> | |
| 212 | + <div class="th-inner ">操作</div> | |
| 213 | + <div class="fht-cell"></div> | |
| 214 | + </th> | |
| 215 | + </tr> | |
| 216 | + </thead> | |
| 217 | + <tbody> | |
| 218 | + <tr data-index="0" th:each="audio : ${audioPage.list}"> | |
| 219 | + <td class="bs-checkbox "><input data-index="0" name="btSelectItem" | |
| 220 | + type="checkbox" th:value="${audio.id}"></td> | |
| 221 | + <td style="text-align: center; width: 6%;" | |
| 222 | + th:text="${audio.spid_desc}"></td> | |
| 223 | + <td style="text-align: center; width: 20%;" > | |
| 224 | + <a class="detail" th:href="@{'/audio/details/?id='+${audio.id}}"> | |
| 225 | + <span th:text="${audio.audioTitle}">邓建国正面PK冯小刚</span> | |
| 226 | + </a> | |
| 227 | + </td> | |
| 228 | + <!--<td style="text-align: center; width: 10%;">--> | |
| 229 | + <!--<div width="160px" height="90px"><img th:src="@{${video.video_poster}}" width="160px" alt="封面图"></div>--> | |
| 230 | + <!--</td>--> | |
| 231 | + <td style="text-align: center; width: 6%;" th:text="${audio.uploader}">审核员 | |
| 232 | + </td> | |
| 233 | + <td style="text-align: center; width: 3%;" | |
| 234 | + th:text="${audio.priority=='1'?'是':'否'}">是 | |
| 235 | + </td> | |
| 236 | + <td style="text-align: center; width: 3%;"> | |
| 237 | + <span class="btn btn-sm btn-warning" th:if="${audio.state==0}">待审</span> | |
| 238 | + <span class="btn btn-sm btn-success" th:if="${audio.state==1}">通过</span> | |
| 239 | + <span class="btn btn-sm btn-danger" th:if="${audio.state==2}">拒绝</span> | |
| 240 | + <!-- <span class="btn btn-sm btn-danger" th:if="${video.state==3}">自动审核失败</span> --> | |
| 241 | + </td> | |
| 242 | + <td style="text-align: center; width: 3%;"> | |
| 243 | + <span th:if="${audio.shenhe_type==1}">免审</span> | |
| 244 | + <span th:if="${audio.shenhe_type==2}">机审</span> | |
| 245 | + <span th:if="${audio.shenhe_type==3}">人工审</span> | |
| 246 | + </td> | |
| 247 | + <td style="text-align: center; width: 10%;" | |
| 248 | + th:text="${#dates.format(audio.updateTime, 'yyyy-MM-dd HH:mm:ss')}"> | |
| 249 | + 2018-03-07 16:56:20 | |
| 250 | + </td> | |
| 251 | + <td style="text-align: center; width: 10%;" | |
| 252 | + th:text="${#dates.format(audio.createTime, 'yyyy-MM-dd HH:mm:ss')}"> | |
| 253 | + 2018-03-07 16:56:20 | |
| 254 | + </td> | |
| 255 | + <td style="text-align: center; width: 17%;"> | |
| 256 | + <a class="detail" th:href="@{'/audio/details/?id='+${audio.id}}"> | |
| 257 | + <!--th:if="${ (video.receive==true and session.sessionUser.userId==video.receive_user_id) or (video.state==1 or video.state==2) }"--> | |
| 258 | + <button class="btn btn-info btn-sm" th:style="${state1 eq '0' && receive1 eq 'false'} ? 'display: none ' : ' '">查看</button> | |
| 259 | + </a> | |
| 260 | + <span th:if="${audio.state==0 and audio.receive==0}"> </span> | |
| 261 | + <a th:href="@{'javascript:applyReceive('+${audio.id}+')'}" | |
| 262 | + th:if="${audio.state==0 and audio.receive==0}"> | |
| 263 | + <button class="btn btn-primary btn-sm">认领</button> | |
| 264 | + </a> | |
| 265 | + <span th:if="${audio.state==0 and audio.receive==1 and session.sessionUser.userId==audio.receive_user_id}"> </span> | |
| 266 | + <a th:href="@{'javascript:applyRetReceive('+${audio.id}+')'}" | |
| 267 | + th:if="${audio.state==0 and audio.receive==1 and session.sessionUser.userId==audio.receive_user_id}"> | |
| 268 | + <button class="btn btn-warning btn-sm">退领</button> | |
| 269 | + </a> | |
| 270 | + </td> | |
| 271 | + </tr> | |
| 272 | + </tbody> | |
| 273 | + </table> | |
| 274 | + </div> | |
| 275 | + | |
| 276 | + | |
| 277 | + <!--分页处理--> | |
| 278 | + <div class="fixed-table-pagination" style="display: block;"> | |
| 279 | + <div class="pull-left pagination-detail"> | |
| 280 | + <span class="pagination-info" th:text="'共 '+${audioPage.total}+' 条记录,每页显示'">共 0 条记录</span> | |
| 281 | + <select class="" id="pageSize" name="pageSize" onchange="selectPageSize()"> | |
| 282 | + <option value="10" th:selected="${pageSize==10}">10</option> | |
| 283 | + <option value="20" th:selected="${pageSize==20}">20</option> | |
| 284 | + <option value="50" th:selected="${pageSize==50}">50</option> | |
| 285 | + <option value="100" th:selected="${pageSize==100}">100</option> | |
| 286 | + </select> | |
| 287 | + <span class="pagination-info" >条记录</span> | |
| 288 | + </div> | |
| 289 | + <div class="pull-right pagination"> | |
| 290 | + <ul class="pagination" th:if="${audioPage.pages>1}"> | |
| 291 | + <li class="page-pre"><a th:href="'javascript:fanye(1);'">‹‹</a></li> | |
| 292 | + <li class="page-pre" th:if="${!audioPage.isFirstPage}"><a | |
| 293 | + th:onclick="'javascript:fanye(\''+${audioPage.pageNum-1}+'\');'">‹</a> | |
| 294 | + </li> | |
| 295 | + | |
| 296 | + <li class="page-number" th:if="${audioPage.pageNum-3>=1}"><a | |
| 297 | + th:onclick="'javascript:fanye(\''+${audioPage.pageNum-3}+'\');'" | |
| 298 | + th:text="${audioPage.pageNum-3}">2</a></li> | |
| 299 | + <li class="page-number" th:if="${audioPage.pageNum-2>=1}"><a | |
| 300 | + th:onclick="'javascript:fanye(\''+${audioPage.pageNum-2}+'\');'" | |
| 301 | + th:text="${audioPage.pageNum-2}">2</a></li> | |
| 302 | + <li class="page-number" th:if="${audioPage.pageNum-1>=1}"><a | |
| 303 | + th:onclick="'javascript:fanye(\''+${audioPage.pageNum-1}+'\');'" | |
| 304 | + th:text="${audioPage.pageNum-1}">2</a></li> | |
| 305 | + <li class="page-number active"><a href="javaScript:void(0);" | |
| 306 | + th:text="${audioPage.pageNum}">2</a></li> | |
| 307 | + <li class="page-number" th:if="${audioPage.pageNum+1<=audioPage.pages}"><a | |
| 308 | + th:onclick="'javascript:fanye(\''+${audioPage.pageNum+1}+'\');'" | |
| 309 | + th:text="${audioPage.pageNum+1}">2</a></li> | |
| 310 | + <li class="page-number" th:if="${audioPage.pageNum+2<=audioPage.pages}"><a | |
| 311 | + th:onclick="'javascript:fanye(\''+${audioPage.pageNum+2}+'\');'" | |
| 312 | + th:text="${audioPage.pageNum+2}">2</a></li> | |
| 313 | + <li class="page-number" th:if="${audioPage.pageNum+3<=audioPage.pages}"><a | |
| 314 | + th:onclick="'javascript:fanye(\''+${audioPage.pageNum+3}+'\');'" | |
| 315 | + th:text="${audioPage.pageNum+3}">2</a></li> | |
| 316 | + | |
| 317 | + <li class="page-next" th:if="${!audioPage.isLastPage}"><a | |
| 318 | + th:onclick="'javascript:fanye(\''+${audioPage.pageNum+1}+'\');'">›</a> | |
| 319 | + </li> | |
| 320 | + <li class="page-next"><a | |
| 321 | + th:onclick="'javascript:fanye(\''+${audioPage.pages}+'\');'">››</a> | |
| 322 | + </li> | |
| 323 | + </ul> | |
| 324 | + </div> | |
| 325 | + </div> | |
| 326 | + </div> | |
| 327 | + </div> | |
| 328 | + </div> | |
| 329 | + </div> | |
| 330 | + </div> | |
| 331 | + </section> | |
| 332 | + </div> | |
| 333 | + <script th:inline="javascript"> | |
| 334 | + $(function () { | |
| 335 | + //按钮颜色设置 | |
| 336 | + var state = [[${param.state}]] ? [[${param.state}]][0] : null; | |
| 337 | + var receive = [[${param.receive}]] ? [[${param.receive}]][0] : null; | |
| 338 | + var stateIsNull = $.trim(state) == ""; | |
| 339 | + var receiveIsNull = $.trim(receive) == ""; | |
| 340 | + if (stateIsNull && receiveIsNull) { | |
| 341 | + $("#quanbu").addClass("btn-info"); | |
| 342 | + } else if (state == '0' && receive == '0') { | |
| 343 | + $("#daishen").addClass("btn-warning"); | |
| 344 | + } else if (state == '0' && receive == '1') { | |
| 345 | + $("#Mydaishen").addClass("btn-success"); | |
| 346 | + } else if (!stateIsNull && state != '0' && receive == '1') { | |
| 347 | + $("#yishen").addClass("btn-danger"); | |
| 348 | + } | |
| 349 | + | |
| 350 | + }) | |
| 351 | + | |
| 352 | + //翻页函数 | |
| 353 | + function fanye(page) { | |
| 354 | + var param = location.search; | |
| 355 | + if (param.indexOf("page=") != -1) { | |
| 356 | + var se = param.replace("?", "");//去掉问号,防止问号和要去掉的参数相连 | |
| 357 | + var split = se.split("&"); | |
| 358 | + var h = ""; | |
| 359 | + for (var i = 0; i < split.length; i++) { | |
| 360 | + var s = split[i]; | |
| 361 | + if (s.indexOf("page=") < 0) h = h + "&" + split[i]; | |
| 362 | + } | |
| 363 | + h = h.substring(1, h.length); | |
| 364 | + window.location.href = "/audio/page?" + h + "&page=" + page; | |
| 365 | + } else { | |
| 366 | + param = param.substring(1, param.length); | |
| 367 | + window.location.href = "/audio/page?" + param + "&page=" + page; | |
| 368 | + } | |
| 369 | + } | |
| 370 | + | |
| 371 | + //选择每页数量触发函数 | |
| 372 | + function selectPageSize(){ | |
| 373 | + var pageSize=$("#pageSize").val(); | |
| 374 | + var param = location.search; | |
| 375 | + if (param.indexOf("pageSize=") != -1) { | |
| 376 | + var se = param.replace("?", "");//去掉问号,防止问号和要去掉的参数相连 | |
| 377 | + var split = se.split("&"); | |
| 378 | + var h = ""; | |
| 379 | + for (var i = 0; i < split.length; i++) { | |
| 380 | + var s = split[i]; | |
| 381 | + if (s.indexOf("pageSize=") < 0 &&s.indexOf("page=") < 0) h = h + "&" + split[i]; | |
| 382 | + } | |
| 383 | + h = h.substring(1, h.length); | |
| 384 | + window.location.href = "/audio/page?" + h + "&pageSize=" + pageSize; | |
| 385 | + } else { | |
| 386 | + var se = param.replace("?", "");//去掉问号,防止问号和要去掉的参数相连 | |
| 387 | + var split = se.split("&"); | |
| 388 | + var h = ""; | |
| 389 | + for (var i = 0; i < split.length; i++) { | |
| 390 | + var s = split[i]; | |
| 391 | + if (s.indexOf("page=") < 0) h = h + "&" + split[i]; | |
| 392 | + } | |
| 393 | + h = h.substring(1, h.length); | |
| 394 | + window.location.href = "/audio/page?" + h + "&pageSize=" + pageSize; | |
| 395 | + } | |
| 396 | + } | |
| 397 | + | |
| 398 | + //导出excel | |
| 399 | + function daochu() { | |
| 400 | + var param = location.search; | |
| 401 | + window.location.href = "/audio/excel" + param; | |
| 402 | + } | |
| 403 | + | |
| 404 | + var video_priority =""; | |
| 405 | + var video_title = ""; | |
| 406 | + var start_date =""; | |
| 407 | + var end_date = ""; | |
| 408 | + var sp_desc =""; | |
| 409 | + var count = ""; | |
| 410 | + var state = ""; | |
| 411 | + var sp_Id = ""; | |
| 412 | + | |
| 413 | + | |
| 414 | + function updateValue(){ | |
| 415 | +// video_priority = $("#video_priority").val(); | |
| 416 | + video_title = $("#video_titleID").val(); | |
| 417 | + start_date = $("#start_date").val(); | |
| 418 | + end_date = $("#end_date").val(); | |
| 419 | + state = $("#state").val(); | |
| 420 | + sp_Id = $("#sp_Id").val(); | |
| 421 | + var spId=[[${session.sessionUser.spid}]]; | |
| 422 | + if(spId==0){ | |
| 423 | + sp_desc = $("#sp_desc").val(); | |
| 424 | + count = $("#pageSize").val(); | |
| 425 | + } | |
| 426 | + } | |
| 427 | + | |
| 428 | + | |
| 429 | + //全部 | |
| 430 | + function quanbu() { | |
| 431 | + updateValue(); | |
| 432 | + window.location.href = "/audio/page?video_title=" + video_title + "&start_date=" + start_date + "&end_date=" + end_date + "&state=" + state + "&video_priority=" + video_priority + "&sp_desc=" + sp_desc+"&pageSize="+count+"&sp_Id="+sp_Id; | |
| 433 | + } | |
| 434 | + | |
| 435 | + //全部待领 | |
| 436 | + $('#daishen').click(function () { | |
| 437 | + updateValue(); | |
| 438 | + if($.trim(state) == '') state=0; | |
| 439 | + var receive = 0; | |
| 440 | + window.location.href = "page?video_title=" + video_title + "&start_date=" + start_date + "&end_date=" + end_date + "&state=" + state + "&receive=" + receive + "&video_priority=" + video_priority + "&sp_desc=" + sp_desc+"&pageSize="+count+"&sp_Id="+sp_Id; | |
| 441 | + }); | |
| 442 | + //我的待审核 | |
| 443 | + $('#Mydaishen').click(function () { | |
| 444 | + updateValue(); | |
| 445 | + var receive = 1; | |
| 446 | + if($.trim(state) == '') state=0; | |
| 447 | + window.location.href = "page?video_title=" + video_title + "&start_date=" + start_date + "&end_date=" + end_date + "&state=" + state + "&receive=" + receive + "&video_priority=" + video_priority + "&sp_desc=" + sp_desc+"&pageSize="+count+"&sp_Id="+sp_Id; | |
| 448 | + }); | |
| 449 | + //我的已审核 | |
| 450 | + $('#yishen').click(function () { | |
| 451 | + updateValue(); | |
| 452 | + var receive = 1; | |
| 453 | + if($.trim(state) == '') state=3;//审核状态,3代表通过和拒绝都查询 | |
| 454 | + window.location.href = "page?video_title=" + video_title + "&start_date=" + start_date + "&end_date=" + end_date + "&state=" + state + "&receive=" + receive + "&video_priority=" + video_priority + "&sp_desc=" + sp_desc+"&pageSize="+count+"&sp_Id="+sp_Id; | |
| 455 | + }); | |
| 456 | + | |
| 457 | + | |
| 458 | + //查询 | |
| 459 | + $('#videos_query').click(function () { | |
| 460 | + window.location.href = "/audio/page?video_title=" + video_title + "&start_date=" + start_date + "&end_date=" + end_date + "&state=" + state + "&video_priority=" + video_priority + "&sp_desc=" + sp_desc+"&pageSize="+count+"&sp_Id="+sp_Id; | |
| 461 | + }); | |
| 462 | + /*全选的操作*/ | |
| 463 | + $('#select_all').click(function () { | |
| 464 | + if ($("[name=btSelectItem]:checkbox:not(:checked)").length > 0) { | |
| 465 | + $("#select_all").prop('checked', true); | |
| 466 | + $("[name=btSelectItem]:checkbox").each(function () { | |
| 467 | + $(this).prop('checked', true); | |
| 468 | + }); | |
| 469 | + } else { | |
| 470 | + $("#select_all").prop('checked', false); | |
| 471 | + $("[name=btSelectItem]:checkbox").each(function () { | |
| 472 | + $(this).prop('checked', false); | |
| 473 | + }); | |
| 474 | + } | |
| 475 | + }); | |
| 476 | + | |
| 477 | + /** | |
| 478 | + * 认领 | |
| 479 | + */ | |
| 480 | + function receive(n) { | |
| 481 | + if (n > 0) { | |
| 482 | + applyReceiveNum(n); | |
| 483 | + } else { | |
| 484 | + var rows = $("[name=btSelectItem]:checkbox:checked"); | |
| 485 | + if (rows.length > 0) { | |
| 486 | + var ids = ""; | |
| 487 | + rows.each(function (i, e) { | |
| 488 | + ids = ids + "," + e.value; | |
| 489 | + }) | |
| 490 | + ids = ids.substring(1); | |
| 491 | + applyReceive(ids); | |
| 492 | + } else { | |
| 493 | + alert("请选择要认领的内容!"); | |
| 494 | + } | |
| 495 | + } | |
| 496 | + } | |
| 497 | + | |
| 498 | + //认领选中请求 | |
| 499 | + function applyReceive(ids) { | |
| 500 | + $.post("/audio/receive?ids=" + ids, function (data) { | |
| 501 | + if (data.errorCode == 0) { | |
| 502 | + alert(data.errorMessage); | |
| 503 | + location.href = location.href; | |
| 504 | + } else { | |
| 505 | + alert(data.errorMessage); | |
| 506 | + } | |
| 507 | + }) | |
| 508 | + } | |
| 509 | + | |
| 510 | + //认领多条请求 | |
| 511 | + function applyReceiveNum(num) { | |
| 512 | + $.post("/audio/receive?num=" + num, 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 retReceive() { | |
| 524 | + var rows = $("[name=btSelectItem]:checkbox:checked"); | |
| 525 | + if (rows.length > 0) { | |
| 526 | + var r = confirm("您确定退领选中的" + rows.length + "条内容吗?"); | |
| 527 | + if (r == true) { | |
| 528 | + var ids = ""; | |
| 529 | + rows.each(function (i, e) { | |
| 530 | + ids = ids + "," + e.value; | |
| 531 | + }) | |
| 532 | + ids = ids.substring(1); | |
| 533 | + applyRetReceive(ids); | |
| 534 | + } | |
| 535 | + } else { | |
| 536 | + alert("没有选中的数据!"); | |
| 537 | + } | |
| 538 | + } | |
| 539 | + | |
| 540 | + //退领 | |
| 541 | + function applyRetReceive(ids) { | |
| 542 | + $.post("/audio/retReceive?ids=" + ids, function (data) { | |
| 543 | + if (data.errorCode == 0) { | |
| 544 | + alert(data.errorMessage); | |
| 545 | + location.href = location.href; | |
| 546 | + } else { | |
| 547 | + alert(data.errorMessage); | |
| 548 | + } | |
| 549 | + }) | |
| 550 | + } | |
| 551 | + | |
| 552 | + //拒绝(打回) | |
| 553 | + function repulse() { | |
| 554 | + var rows = $("[name=btSelectItem]:checkbox:checked"); | |
| 555 | + if (rows.length > 0) { | |
| 556 | + var r = confirm("您确定拒绝选中的" + rows.length + "条内容吗?"); | |
| 557 | + if (r == true) { | |
| 558 | + $('#msgModal').modal('show'); | |
| 559 | + } | |
| 560 | + } else { | |
| 561 | + alert("没有选中的数据!"); | |
| 562 | + } | |
| 563 | + } | |
| 564 | + | |
| 565 | + //提交打回 | |
| 566 | + function repulseSubmit() { | |
| 567 | + var rows = $("[name=btSelectItem]:checkbox:checked"); | |
| 568 | + var ids = ""; | |
| 569 | + rows.each(function (i, e) { | |
| 570 | + ids = ids + "," + e.value; | |
| 571 | + }) | |
| 572 | + ids = ids.substring(1); | |
| 573 | + var msg = $("#reviewMsg").val(); | |
| 574 | + $.post("/audio/repulse?ids=" + ids + "&msg=" + msg, function (data) { | |
| 575 | + if (data.errorCode == 0) { | |
| 576 | + alert(data.errorMessage); | |
| 577 | + location.href = location.href; | |
| 578 | + } else { | |
| 579 | + alert(data.errorMessage); | |
| 580 | + } | |
| 581 | + }) | |
| 582 | + } | |
| 583 | + </script> | |
| 584 | + <!-- 模态框(Modal) --> | |
| 585 | + <div class="modal fade" id="msgModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"> | |
| 586 | + <div class="modal-dialog"> | |
| 587 | + <div class="modal-content" style="margin-top: 30%;"> | |
| 588 | + <div class="modal-header"> | |
| 589 | + <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> | |
| 590 | + <h4 class="modal-title" id="myModalLabel">审核意见</h4> | |
| 591 | + </div> | |
| 592 | + <div class="modal-body"> | |
| 593 | + <div class="form-group" style="margin-bottom: 0;"> | |
| 594 | + <textarea id="reviewMsg" style="width: 100%;height: 80px;"></textarea> | |
| 595 | + </div> | |
| 596 | + <div class="form-group"> | |
| 597 | + </div> | |
| 598 | + </div> | |
| 599 | + <div class="modal-footer"> | |
| 600 | + <button type="button" class="btn btn-default" data-dismiss="modal">取消</button> | |
| 601 | + <button type="button" class="btn btn-primary" onclick="javascript:repulseSubmit();">提交</button> | |
| 602 | + </div> | |
| 603 | + </div><!-- /.modal-content --> | |
| 604 | + </div><!-- /.modal-dialog --> | |
| 605 | + </div> | |
| 606 | + <!-- /.modal --> | |
| 607 | + | |
| 608 | + <!--保留之前的样式代码--> | |
| 609 | + <script> | |
| 610 | + $('#a_down').hide(); | |
| 611 | + | |
| 612 | + /*查询样式*/ | |
| 613 | + function openOrClose(id_name_str) { | |
| 614 | + var id_name = '#' + id_name_str; | |
| 615 | + if ($(id_name).css('display') == 'block') { | |
| 616 | + $(id_name).slideUp(350); | |
| 617 | + $('#a_up').show(); | |
| 618 | + $('#a_down').hide(); | |
| 619 | + } else { | |
| 620 | + $(id_name).slideDown(350); | |
| 621 | + $('#a_up').hide(); | |
| 622 | + $('#a_down').show(); | |
| 623 | + } | |
| 624 | + } | |
| 625 | + | |
| 626 | + /*时间插件*/ | |
| 627 | + $('.date').datetimepicker({ | |
| 628 | +// format: 'YYYY-MM-DD HH:mm:ss', | |
| 629 | + format: 'YYYY-MM-DD', | |
| 630 | + locale: "zh-CN", | |
| 631 | + toolbarPlacement: 'bottom', | |
| 632 | + showClear: true, | |
| 633 | + }); | |
| 634 | + </script> | |
| 635 | + <footer th:replace="../templates/common/foot::foot"></footer> | |
| 636 | + <!-- Add the sidebar's background. This div must be placed | |
| 637 | + immediately after the control sidebar --> | |
| 638 | + <div class="control-sidebar-bg" style="position: fixed; height: auto;"></div> | |
| 639 | +</div><!-- ./wrapper --> | |
| 640 | + | |
| 641 | +<!-- Resolve conflict in jQuery UI tooltip with Bootstrap tooltip --> | |
| 642 | +<script type="text/javascript"> | |
| 643 | + $('div.alert').not('.alert-danger').delay(3000).slideUp(300); | |
| 644 | +</script> | |
| 645 | + | |
| 646 | +<!-- AdminLTE App --> | |
| 647 | +<script src="./../../static/js/app.min.js"></script> | |
| 648 | +<!-- AdminLTE for demo purposes --> | |
| 649 | +<script src="./../../static/js/sidebar.js"></script> | |
| 650 | +</body> | |
| 651 | +</html> | |
| 0 | 652 | \ No newline at end of file | ... | ... |
src/main/resources/templates/page/audioDetail.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 | +<body class="skin-blue sidebar-mini"> | |
| 5 | + | |
| 6 | +<div class="wrapper"> | |
| 7 | + <div th:replace="../templates/common/frame::frame"></div> | |
| 8 | + | |
| 9 | + <div class="content-wrapper" style="min-height: 788px;"> | |
| 10 | + <section class="content-header"> | |
| 11 | + <h1> | |
| 12 | + 音频详情 | |
| 13 | + </h1> | |
| 14 | + <ol class="breadcrumb"> | |
| 15 | + <li>首页</li> | |
| 16 | + <li class="active">音频审核</li> | |
| 17 | + </ol> | |
| 18 | + </section> | |
| 19 | + <section class="content"> | |
| 20 | + <div class="row"> | |
| 21 | + <!-- right column --> | |
| 22 | + <div class="col-xs-12"> | |
| 23 | + <div class="box box-info"> | |
| 24 | + <div class="box-body form-horizontal"> | |
| 25 | + <div class="col-sm-12"> | |
| 26 | + <div class="form-group" style="margin-bottom: 6px;"> | |
| 27 | + <div style=" margin-left: -5%;"> | |
| 28 | + <label for="activity_id" class="control-label col-sm-2">音频id:</label> | |
| 29 | + <div class="col-sm-2"> | |
| 30 | + <h5 id="activity_id" th:text="${audio.audioId}"> | |
| 31 | + 82_7d92ef8192364d4891820426329801bd</h5> | |
| 32 | + </div> | |
| 33 | + </div> | |
| 34 | + <div style="margin-left: -14%;"> | |
| 35 | + <label for="spid" class="control-label col-sm-2">spId:</label> | |
| 36 | + <div class="col-sm-2"> | |
| 37 | + <h5 th:text="${audio.spId}">视讯中国</h5> | |
| 38 | + </div> | |
| 39 | + </div> | |
| 40 | + <div> | |
| 41 | + <label for="createTime" class="control-label col-sm-2" | |
| 42 | + style="margin-left: -5%">音频上传时间:</label> | |
| 43 | + <div class="col-sm-2"> | |
| 44 | + <h5 th:text="${#dates.format(audio.uploadTime, 'yyyy-MM-dd HH:mm:ss')}"> | |
| 45 | + 2017-07-12 10:16:50</h5> | |
| 46 | + </div> | |
| 47 | + </div> | |
| 48 | + </div> | |
| 49 | + <hr> | |
| 50 | + </div> | |
| 51 | + <div id="tabContents" class="tab-content"> | |
| 52 | + <div id="tabHome" class="tab-pane fade in active padding-t-15"> | |
| 53 | + <div class="col-sm-5"> | |
| 54 | + <div class="form-group"> | |
| 55 | + <div> | |
| 56 | + <label for="video_cover_img" class="control-label col-sm-4" | |
| 57 | + style="margin-left: -3%">封面图:</label> | |
| 58 | + </div> | |
| 59 | + <div style="height:110px; margin-left: 17%;"> | |
| 60 | + <div class="col-sm-4 popover-options " th:style="${imgsStat.index==0}? 'float:left;margin-right: 43px;margin-left: -18px;':''" th:if="${imgsStat.index<2}" | |
| 61 | + th:each="imgs :${images}"> | |
| 62 | + <a href="#"> | |
| 63 | + <img th:src="@{${imgs.value}}" height="100px" alt="封面图"> | |
| 64 | + </a> | |
| 65 | + <b th:text="${imgs.key}"></b> | |
| 66 | + </div> | |
| 67 | + </div> | |
| 68 | + <div style="height: 110px;margin-top: 15px;"> | |
| 69 | + <label for="" class="control-label col-sm-4" | |
| 70 | + style="width: 26.3%;"></label> | |
| 71 | + <div class="col-sm-4 popover-options " th:style="${imgsStat.index==2}?'float:left;margin-right: 15px;':'float:left;'" | |
| 72 | + th:if="${imgsStat.index>=2&&imgsStat.index<4}" | |
| 73 | + th:each="imgs :${images}"> | |
| 74 | + <a href="#"> | |
| 75 | + <img th:src="@{${imgs.value}}" height="100px" alt="封面图"> | |
| 76 | + </a> | |
| 77 | + <b th:text="${imgs.key}"></b> | |
| 78 | + </div> | |
| 79 | + </div> | |
| 80 | + <div style="height: 110px;margin-top: 15px;"> | |
| 81 | + <label for="" class="control-label col-sm-4" | |
| 82 | + style="width: 26.3%;"></label> | |
| 83 | + <div class="col-sm-4 popover-options" th:style="${imgsStat.index==4}?'float:left;margin-right: 15px;':'float:left;'" | |
| 84 | + th:if="${imgsStat.index>=4}" | |
| 85 | + th:each="imgs :${images}"> | |
| 86 | + <a href="#"> | |
| 87 | + <img th:src="@{${imgs.value}}" height="100px" alt="封面图"> | |
| 88 | + </a> | |
| 89 | + <b th:text="${imgs.key}"></b> | |
| 90 | + </div> | |
| 91 | + </div> | |
| 92 | + </div> | |
| 93 | + <div class="form-group" style="margin-bottom: 6px;"> | |
| 94 | + <label for="audioTitle" class="control-label col-sm-4">音频标题:</label> | |
| 95 | + <div class="col-sm-8"> | |
| 96 | + <h5 style="font-size:1.5em; font-weight: bold;" | |
| 97 | + th:text="${audio.audioTitle}">标题</h5> | |
| 98 | + </div> | |
| 99 | + </div> | |
| 100 | + <div class="form-group intro" style="margin-bottom: 6px;"> | |
| 101 | + <label for="audioIntro" class="control-label col-sm-4">音频简介:</label> | |
| 102 | + <div class="col-sm-8"> | |
| 103 | + <h5 style="font-size:1.5em; font-weight: bold; width:100%" | |
| 104 | + th:text="${audio.audioIntro}">简介</h5> | |
| 105 | + </div> | |
| 106 | + </div> | |
| 107 | + <div class="form-group"> | |
| 108 | + <label for="audioTag" class="control-label col-sm-4">音频标签:</label> | |
| 109 | + <div class="col-sm-8"> | |
| 110 | + <h5 style="font-size:1.5em; font-weight: bold;" id="audioTag" | |
| 111 | + th:text="${audio.audioTag}">音频标签</h5> | |
| 112 | + </div> | |
| 113 | + </div> | |
| 114 | + <div class="form-group"> | |
| 115 | + <label for="audioKeyword" class="control-label col-sm-4">音频关键字:</label> | |
| 116 | + <div class="col-sm-8"> | |
| 117 | + <h5 style="font-size:1.5em; font-weight: bold;" | |
| 118 | + th:text="${audio.audioKeyword}">关键字</h5> | |
| 119 | + </div> | |
| 120 | + </div> | |
| 121 | + <hr> | |
| 122 | + | |
| 123 | + <div class="form-group"> | |
| 124 | + <div class="col-sm-12"> | |
| 125 | + <div class="modal-body" id="videoBox" style="height:450px"> | |
| 126 | + <script type="text/javascript" | |
| 127 | + src="//resweb.cnliveimg.com/sites/common/cnlive_video.min.js"></script> | |
| 128 | + <script th:inline="javascript"> | |
| 129 | + var audioUrl = [[${audio.audioUrl}]]; | |
| 130 | + cnliveVideo.init({ | |
| 131 | + "eleId": "videoBox", | |
| 132 | + "width": 800,//指定放入指定ID元素内 | |
| 133 | + "height": 450, | |
| 134 | + "model": 3, | |
| 135 | + "autoplay": 1, | |
| 136 | + "currRate": 3, | |
| 137 | + "cover": "http://sxzg.ys1.cnliveimg.com/82/img/2018/0426/82_20180426164129.png", | |
| 138 | + "videoUrl_3": audioUrl | |
| 139 | + }); | |
| 140 | + </script> | |
| 141 | + | |
| 142 | + </div> | |
| 143 | + </div> | |
| 144 | + </div> | |
| 145 | + <br> | |
| 146 | + <hr> | |
| 147 | + | |
| 148 | + <div class="form-group"> | |
| 149 | + <label for="state" class="control-label col-sm-3">审核状态:</label> | |
| 150 | + <div class="col-sm-9"> | |
| 151 | + <h5 th:if="${audio.state==0}">未审核</h5> | |
| 152 | + <h5 th:if="${audio.state==1}">已审 通过</h5> | |
| 153 | + <h5 th:if="${audio.state==2}">拒绝</h5> | |
| 154 | + <h5 th:if="${audio.state==3}">自动审核失败</h5> | |
| 155 | + </div> | |
| 156 | + </div> | |
| 157 | + | |
| 158 | + <!--<div class="form-group ">--> | |
| 159 | + <!--<label for="state" class="control-label col-sm-3">审核日志:</label>--> | |
| 160 | + <!--<div class="col-sm-9 ">--> | |
| 161 | + <!--<h5 id="state">1:系统审核;2017-07-12 11:54:01;点播审核可信,系统自动审核--> | |
| 162 | + <!--<br></h5>--> | |
| 163 | + <!--</div>--> | |
| 164 | + <!--</div>--> | |
| 165 | + | |
| 166 | + | |
| 167 | + <div class="form-group "> | |
| 168 | + <label for="auditor_id" class="control-label col-sm-3">审核员:</label> | |
| 169 | + <div class="col-sm-9 "> | |
| 170 | + <h5 id="auditor_id" th:text="${audio.uploader}">系统审核 </h5> | |
| 171 | + </div> | |
| 172 | + </div> | |
| 173 | + | |
| 174 | + | |
| 175 | + <div class="form-group file"> | |
| 176 | + <label class="control-label col-sm-3" for="attr_tags">常用审核意见:</label> | |
| 177 | + | |
| 178 | + <div class="col-sm-9"> | |
| 179 | + <select class="form-control select2 select2-hidden-accessible" | |
| 180 | + onchange="change()" multiple="" data-placeholder="选择常用审核意见,可多选" | |
| 181 | + name="attr_tags[]" id="attr_tags" style="width: 100%;" | |
| 182 | + tabindex="-1" aria-hidden="true"> | |
| 183 | + <option value="其他" th:selected="${audio.attr_tags.indexOf('其他')!=-1}">其他</option> | |
| 184 | + <option value="不符" th:selected="${audio.attr_tags.indexOf('不符')!=-1}">不符</option> | |
| 185 | + <option value="规范" th:selected="${audio.attr_tags.indexOf('规范')!=-1}">规范</option> | |
| 186 | + <option value="建议" th:selected="${audio.attr_tags.indexOf('建议')!=-1}">建议</option> | |
| 187 | + <option value="错字" th:selected="${audio.attr_tags.indexOf('错字')!=-1}">错字</option> | |
| 188 | + <option value="要求" th:selected="${audio.attr_tags.indexOf('要求')!=-1}">要求</option> | |
| 189 | + <option value="图片" th:selected="${audio.attr_tags.indexOf('图片')!=-1}">图片</option> | |
| 190 | + <option value="敏感" th:selected="${audio.attr_tags.indexOf('敏感')!=-1}">敏感</option> | |
| 191 | + <option value="视频" th:selected="${audio.attr_tags.indexOf('视频')!=-1}">视频</option> | |
| 192 | + <option value="提交" th:selected="${audio.attr_tags.indexOf('提交')!=-1}">提交</option> | |
| 193 | + </select> | |
| 194 | + </div> | |
| 195 | + </div> | |
| 196 | + <div class="form-group"> | |
| 197 | + <label for="msg" class="control-label col-sm-3">审核备注</label> | |
| 198 | + <div class="col-sm-9"> | |
| 199 | + <textarea name="msg" id="msg" cols="5" rows="5" class="form-control" | |
| 200 | + th:text="${audio.msg}"></textarea> | |
| 201 | + </div> | |
| 202 | + </div> | |
| 203 | + </div> | |
| 204 | + </div> | |
| 205 | + | |
| 206 | + <!--不能删,此处已隐藏,起一个格式作用,使通过,拒绝,返回列表能顶到底部--> | |
| 207 | + <div class="form-group"> | |
| 208 | + <input type="text" hidden="hidden" id="video_id" value=""> | |
| 209 | + </div> | |
| 210 | + | |
| 211 | + <div class="box-footer"> | |
| 212 | + <div class="col-sm-5"> | |
| 213 | + <button type="button" class="btn btn-danger pull-right" id="reject">拒 绝</button> | |
| 214 | + </div> | |
| 215 | + | |
| 216 | + <div class="col-sm-1" style="margin-right:26px;"> | |
| 217 | + <button type="button" class="btn btn-primary pull-right" id="pass">通 过</button> | |
| 218 | + </div> | |
| 219 | + | |
| 220 | + <div class="col-sm-1"> | |
| 221 | + <button type="submit" class="btn btn-info pull-right" id="back">返回列表</button> | |
| 222 | + </div> | |
| 223 | + </div> | |
| 224 | + | |
| 225 | + <!-- 拒绝确认弹出框 --> | |
| 226 | + <div class="modal" id="action_note" role="dialog" aria-labelledby="myModalLabel"> | |
| 227 | + <div class="modal-dialog"> | |
| 228 | + <div class="modal-content"> | |
| 229 | + <div class="modal-header"> | |
| 230 | + <button type="button" class="close" data-dismiss="modal"> ×</button> | |
| 231 | + <h4 class="modal-title">温馨提示</h4> | |
| 232 | + </div> | |
| 233 | + <div class="modal-body" id="msg2"></div> | |
| 234 | + <div class="modal-footer"> | |
| 235 | + <button type="button" class="btn btn-default " data-dismiss="modal" | |
| 236 | + id="action_note_no">取消 | |
| 237 | + </button> | |
| 238 | + <button type="button" class="btn btn-primary" id="action_note_yes">确认 | |
| 239 | + </button> | |
| 240 | + <input type="hidden" name="action_note_type" id="action_note_type" | |
| 241 | + value=""> | |
| 242 | + <input type="hidden" name="action_note_id" id="action_note_id" value=""> | |
| 243 | + </div> | |
| 244 | + </div> | |
| 245 | + </div> | |
| 246 | + </div> | |
| 247 | + <script th:inline="javascript"> | |
| 248 | + //使常用审核意见回显到下方的备注中 | |
| 249 | + function change() { | |
| 250 | +// $("#msg").val($("#attr_tags").val()); | |
| 251 | + } | |
| 252 | + | |
| 253 | + /*拒绝*/ | |
| 254 | + $("#reject").click(function () { | |
| 255 | + var attr_tags = $('#attr_tags').val();//获取标签属性信息 | |
| 256 | + var msg = $('#msg').val(); //获取审核msg | |
| 257 | + if (attr_tags == null && msg == '') { //两个都为空 不行 | |
| 258 | + alert('请输入审核备注或者常用审核意见!'); | |
| 259 | + return false; | |
| 260 | + } | |
| 261 | + //拒绝弹出框 | |
| 262 | + $('#msg2').html('您确认拒绝此条点播吗?'); | |
| 263 | + $('#action_note').show(); | |
| 264 | + $("#action_note_type").val('reject'); | |
| 265 | + $("#action_note_id").val(); | |
| 266 | + }); | |
| 267 | + | |
| 268 | + //弹出框取消 | |
| 269 | + $("#action_note_no, .close").click(function () { | |
| 270 | + $("#action_note").hide(); | |
| 271 | + }); | |
| 272 | + //弹出框确认 | |
| 273 | + $("#action_note_yes").click(function () { | |
| 274 | + var id = [[${audio.id}]]; | |
| 275 | + var activity_id = [[${audio.audioId}]]; | |
| 276 | + var state = 4; | |
| 277 | + var row_id = $("#video_id").val(); | |
| 278 | + var attr_tags = $('#attr_tags').val();//获取标签属性信息 | |
| 279 | + var msg = $('#msg').val(); //获取审核msg | |
| 280 | + var callback = [[${audio.callback}]]; | |
| 281 | + if (attr_tags == null && msg == '') { //两个都为空 不行 | |
| 282 | + alert('请输入审核备注或者常用审核意见!'); | |
| 283 | + return false; | |
| 284 | + } | |
| 285 | + if (typeof(row_id) == "undefined") { | |
| 286 | + return false; | |
| 287 | + } | |
| 288 | + //拒绝 | |
| 289 | + $("#action_note").hide();//隐藏弹出框 | |
| 290 | + var action_note_type = $("#action_note_type").val(); | |
| 291 | + if (action_note_type == 'reject') { | |
| 292 | + $.post("/audio/shenheAudio", { | |
| 293 | + id: id, | |
| 294 | + activity_id: activity_id, | |
| 295 | + state: state, | |
| 296 | + attr_tags: attr_tags+"", | |
| 297 | + msg: msg, | |
| 298 | + callback: callback | |
| 299 | + }, | |
| 300 | + function (data) { | |
| 301 | + if (data.errorCode == 0) { | |
| 302 | + alert(data.errorMessage); | |
| 303 | + self.location = document.referrer; | |
| 304 | + } else { | |
| 305 | + alert(data.errorMessage); | |
| 306 | + } | |
| 307 | + }) | |
| 308 | + } | |
| 309 | + }); | |
| 310 | + | |
| 311 | + /*通过*/ | |
| 312 | + $("#pass").click(function () { | |
| 313 | + var id = [[${audio.id}]]; | |
| 314 | + var state = 3; | |
| 315 | + var activity_id = [[${audio.audioId}]]; | |
| 316 | + var attr_tags = $('#attr_tags').val();//获取标签属性信息 | |
| 317 | + var msg = $('#msg').val(); //获取审核msg | |
| 318 | + var callback = [[${audio.callback}]]; | |
| 319 | + if (typeof(activity_id) == "undefined") { | |
| 320 | + return false; | |
| 321 | + } | |
| 322 | + if (confirm("您确认通过此条点播吗?")) { | |
| 323 | + $.post("/audio/shenheAudio", { | |
| 324 | + id: id, | |
| 325 | + activity_id: activity_id, | |
| 326 | + state: state, | |
| 327 | + attr_tags: attr_tags+"", | |
| 328 | + msg: msg, | |
| 329 | + callback: callback | |
| 330 | + }, | |
| 331 | + function (data) { | |
| 332 | + if (data.errorCode == 0) { | |
| 333 | + alert(data.errorMessage); | |
| 334 | + self.location = document.referrer; | |
| 335 | + } else { | |
| 336 | + alert(data.errorMessage); | |
| 337 | + } | |
| 338 | + }); | |
| 339 | + } | |
| 340 | + }); | |
| 341 | + | |
| 342 | + /*返回列表 */ | |
| 343 | + | |
| 344 | + $("#back").click(function () { | |
| 345 | + // window.location.href = '/videos/page'; | |
| 346 | + self.location = document.referrer; | |
| 347 | + }); | |
| 348 | + | |
| 349 | + </script> | |
| 350 | + <!-- Select2 todo xiaohu --> | |
| 351 | + <script src="../../static/js/select2.full.min.js"></script> | |
| 352 | + <!-- Select2 todo xiaohu --> | |
| 353 | + <link rel="stylesheet" href="../../static/css/select2.min.css"> | |
| 354 | + <link rel="stylesheet" href="../../static/css/AdminLTE.min.css"> | |
| 355 | + <script> | |
| 356 | + $(function () { | |
| 357 | + $(".select2").select2(); | |
| 358 | + }); | |
| 359 | + </script> | |
| 360 | + </div> | |
| 361 | + </div> | |
| 362 | + </div> | |
| 363 | + </div> | |
| 364 | + </div> | |
| 365 | + </section> | |
| 366 | + </div> | |
| 367 | + <footer th:replace="../templates/common/foot::foot"></footer> | |
| 368 | + <div class="control-sidebar-bg" style="position: fixed; height: auto;"></div> | |
| 369 | +</div> | |
| 370 | +<!-- Resolve conflict in jQuery UI tooltip with Bootstrap tooltip --> | |
| 371 | +<script type="text/javascript"> | |
| 372 | + $('div.alert').not('.alert-danger').delay(3000).slideUp(300); | |
| 373 | +</script> | |
| 374 | + | |
| 375 | +<!-- AdminLTE App --> | |
| 376 | +<script src="../../static/js/app.min.js"></script> | |
| 377 | +<!-- AdminLTE for demo purposes --> | |
| 378 | +<script src="../../static/js/sidebar.js"></script> | |
| 379 | + | |
| 380 | +</body> | |
| 381 | +</html> | |
| 0 | 382 | \ No newline at end of file | ... | ... |