Commit e0af38fbb2fe3ce90ad4df751a6eaa57273b2602

Authored by 徐近程
1 parent 0ceaee60

音频数据列表页

src/main/java/com/cnlive/shenhe/controller/AudioController.java 0 → 100644
  1 +package com.cnlive.shenhe.controller;
  2 +
  3 +import com.cnlive.shenhe.bean.SessionUser;
  4 +import com.cnlive.shenhe.entity.ShyAudio;
  5 +import com.cnlive.shenhe.entity.ShySites;
  6 +import com.cnlive.shenhe.entity.ShyUsers;
  7 +import com.cnlive.shenhe.serviceImpl.AudioServiceImpl;
  8 +import com.cnlive.shenhe.serviceImpl.SitesServiceImpl;
  9 +import com.cnlive.shenhe.serviceImpl.UsersServiceImpl;
  10 +import com.cnlive.shenhe.utils.CommonConst;
  11 +import com.cnlive.shenhe.utils.CommonUtils;
  12 +import com.github.pagehelper.PageInfo;
  13 +import org.slf4j.Logger;
  14 +import org.slf4j.LoggerFactory;
  15 +import org.springframework.beans.factory.annotation.Autowired;
  16 +import org.springframework.stereotype.Controller;
  17 +import org.springframework.ui.Model;
  18 +import org.springframework.web.bind.annotation.GetMapping;
  19 +import org.springframework.web.bind.annotation.RequestMapping;
  20 +
  21 +import javax.servlet.http.HttpSession;
  22 +import java.util.List;
  23 +
  24 +/**
  25 + * @Author: xujincheng
  26 + * @Date: 2020/6/9 9:35
  27 + */
  28 +@Controller
  29 +@RequestMapping("/audio")
  30 +public class AudioController extends BaseController {
  31 +
  32 + private static Logger logger = LoggerFactory.getLogger(AudioController.class);
  33 +
  34 + @Autowired
  35 + SitesServiceImpl sitesService;
  36 +
  37 + @Autowired
  38 + AudioServiceImpl audioService;
  39 +
  40 + @Autowired
  41 + UsersServiceImpl usersService;
  42 +
  43 + /**
  44 + * 音频数据分页获取
  45 + *
  46 + * @param model
  47 + * @param video_title
  48 + * @param start_date
  49 + * @param end_date
  50 + * @param state
  51 + * @param receive
  52 + * @param page
  53 + * @param pageSize
  54 + * @param video_priority
  55 + * @param orderByClause
  56 + * @param sp_desc
  57 + * @param sp_Id
  58 + * @param session
  59 + * @return
  60 + */
  61 + @GetMapping("/page")
  62 + 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) {
  63 + SessionUser sessionUser = (SessionUser) session.getAttribute(SessionUser.getSessionKey());
  64 + if (CommonUtils.isNull(sessionUser)) {
  65 + return "redirect:/users/login";
  66 + }
  67 + Integer spid = sessionUser.getSpid();
  68 + logger.info("sp_Id:{},spid:{}", sp_Id, spid);
  69 + String userId = sessionUser.getUserId();
  70 + if (CommonUtils.isNull(page)) page = 1;
  71 + if (CommonUtils.isNull(pageSize)) pageSize = 10;
  72 + if (CommonUtils.isNotEmpty(sp_desc) && spid == 0) {
  73 + ShySites shySite = sitesService.findspidBySpdesc(sp_desc);
  74 + if (CommonUtils.isNotNull(shySite)) {
  75 + spid = shySite.getSpid();
  76 + } else {
  77 + setmodel_site(model);
  78 + return "error.html";
  79 + }
  80 + } else if (CommonUtils.isEmpty(sp_desc) && spid == 0) {
  81 + spid = null;
  82 + }
  83 +
  84 + PageInfo<ShyAudio> audioPage = audioService.getListContent(video_title, start_date, end_date, state, receive, page, pageSize, video_priority, orderByClause, spid, userId, sp_Id);
  85 + if (audioPage != null && audioPage.getSize() > 0) {
  86 + List<ShyAudio> list = audioPage.getList();
  87 + if (list != null && list.size() > 0) {
  88 + for (ShyAudio shyAudio : list) {
  89 + //审核状态 0-未审核 1-已审核 2-拒绝
  90 + //已审+已拒绝
  91 + if (CommonConst.AUDIT_INTT.equals(shyAudio.getState())) {
  92 + String updater = CommonUtils.isEmpty(shyAudio.getUploader()) ? "白名单" : shyAudio.getUploader();
  93 + String audioId = shyAudio.getAudioId();
  94 + if (CommonUtils.isNotEmpty(audioId)) {
  95 + ShyUsers user = new ShyUsers();
  96 + user.setUser_id(audioId);
  97 + user = usersService.select(user);
  98 + if (CommonUtils.isNotNull(user)) {
  99 + String email = CommonUtils.isEmpty(user.getEmail()) ? "" : user.getEmail();
  100 + String userName = CommonUtils.isEmpty(user.getUsername()) ? email : user.getUsername();
  101 + updater = userName;
  102 + }
  103 + }
  104 + shyAudio.setUploader(updater);
  105 + }
  106 + //显示spid简称
  107 + ShySites shySites = sitesService.findspidDescByspid(shyAudio.getSpId());
  108 + if (CommonUtils.isNotNull(shySites)) {
  109 + shyAudio.setSpid_desc(shySites.getName());
  110 + }
  111 + }
  112 + }
  113 + }
  114 +
  115 + //获取参数值给前台 用来判断是否需要把查看显示出来 state recive
  116 + String state1 = state == null ? "" : state.toString();
  117 + String receive1 = "";
  118 + if (CommonUtils.isNotNull(receive)) {
  119 + receive1 = receive == CommonConst.RECEIVE_AFTER ? "true" : "false";
  120 + } else {
  121 + receive1 = "";
  122 + }
  123 + model.addAttribute("state1", state1);
  124 + model.addAttribute("receive1", receive1);
  125 + model.addAttribute("pageSize", pageSize);
  126 + model.addAttribute("audioPage", audioPage);
  127 + return "page/audio.html";
  128 + }
  129 +
  130 +}
src/main/java/com/cnlive/shenhe/controller/UsersController.java
@@ -55,7 +55,7 @@ public class UsersController extends BaseController { @@ -55,7 +55,7 @@ public class UsersController extends BaseController {
55 public String index(HttpServletRequest request) { 55 public String index(HttpServletRequest request) {
56 AttributePrincipal principal = (AttributePrincipal) request.getUserPrincipal(); 56 AttributePrincipal principal = (AttributePrincipal) request.getUserPrincipal();
57 if (CommonUtils.isNull(principal)) { 57 if (CommonUtils.isNull(principal)) {
58 - return "redirect:https://user.cnlive.com/OpenSSO2/login?service=http://test.shen.cnlive.com/users/login"; 58 + return "redirect:https://user.cnlive.com/OpenSSO2/login?service=http://test.shen.cnlive.com:82/users/login";
59 } 59 }
60 //用户ID 60 //用户ID
61 String id = principal.getName(); 61 String id = principal.getName();
@@ -71,7 +71,7 @@ public class UsersController extends BaseController { @@ -71,7 +71,7 @@ public class UsersController extends BaseController {
71 sessionUser.setLogo(user.getUser_logo()); 71 sessionUser.setLogo(user.getUser_logo());
72 sessionUser.setMaster(user.getMaster()); 72 sessionUser.setMaster(user.getMaster());
73 request.getSession().setAttribute(SessionUser.SESSION_KEY, sessionUser); 73 request.getSession().setAttribute(SessionUser.SESSION_KEY, sessionUser);
74 - return "redirect:http://test.shen.cnlive.com/videos/page?video_title=&start_date=&end_date=&state=0&receive=0&video_priority="; 74 + return "redirect:http://test.shen.cnlive.com:82/videos/page?video_title=&start_date=&end_date=&state=0&receive=0&video_priority=";
75 } 75 }
76 } 76 }
77 return "page/error.html"; 77 return "page/error.html";
@@ -80,7 +80,7 @@ public class UsersController extends BaseController { @@ -80,7 +80,7 @@ public class UsersController extends BaseController {
80 @RequestMapping("/logout") 80 @RequestMapping("/logout")
81 public String logout(HttpSession session) { 81 public String logout(HttpSession session) {
82 session.invalidate(); 82 session.invalidate();
83 - return "redirect:https://user.cnlive.com/OpenSSO2/logout?service=http://test.shen.cnlive.com/users/login"; 83 + return "redirect:https://user.cnlive.com/OpenSSO2/logout?service=http://test.shen.cnlive.com:82/users/login";
84 } 84 }
85 85
86 86
src/main/java/com/cnlive/shenhe/entity/ShyAudio.java
@@ -166,6 +166,9 @@ public class ShyAudio { @@ -166,6 +166,9 @@ public class ShyAudio {
166 */ 166 */
167 private String receive_user_id; 167 private String receive_user_id;
168 168
  169 + @Transient
  170 + private String spid_desc;
  171 +
169 /** 172 /**
170 * @return id 173 * @return id
171 */ 174 */
@@ -697,4 +700,12 @@ public class ShyAudio { @@ -697,4 +700,12 @@ public class ShyAudio {
697 public void setReceive_user_id(String receive_user_id) { 700 public void setReceive_user_id(String receive_user_id) {
698 this.receive_user_id = receive_user_id; 701 this.receive_user_id = receive_user_id;
699 } 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 + }
700 } 711 }
701 \ No newline at end of file 712 \ No newline at end of file
src/main/java/com/cnlive/shenhe/serviceImpl/AudioServiceImpl.java
@@ -2,8 +2,14 @@ package com.cnlive.shenhe.serviceImpl; @@ -2,8 +2,14 @@ package com.cnlive.shenhe.serviceImpl;
2 2
3 import com.cnlive.shenhe.entity.ShyAudio; 3 import com.cnlive.shenhe.entity.ShyAudio;
4 import com.cnlive.shenhe.mapper.ShyAudioMapper; 4 import com.cnlive.shenhe.mapper.ShyAudioMapper;
  5 +import com.cnlive.shenhe.utils.CommonConst;
  6 +import com.cnlive.shenhe.utils.CommonUtils;
  7 +import com.github.pagehelper.PageHelper;
  8 +import com.github.pagehelper.PageInfo;
5 import org.springframework.beans.factory.annotation.Autowired; 9 import org.springframework.beans.factory.annotation.Autowired;
6 import org.springframework.stereotype.Service; 10 import org.springframework.stereotype.Service;
  11 +import tk.mybatis.mapper.entity.Example;
  12 +import java.util.List;
7 13
8 /** 14 /**
9 * @Author: xujincheng 15 * @Author: xujincheng
@@ -26,4 +32,63 @@ public class AudioServiceImpl { @@ -26,4 +32,63 @@ public class AudioServiceImpl {
26 public int updateAudioMsg(ShyAudio ShyAudio) { 32 public int updateAudioMsg(ShyAudio ShyAudio) {
27 return shyAudioMapper.updateByPrimaryKeySelective(ShyAudio); 33 return shyAudioMapper.updateByPrimaryKeySelective(ShyAudio);
28 } 34 }
  35 +
  36 + //分页查询音频数据
  37 + 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) {
  38 + Example example = new Example(ShyAudio.class);
  39 + Example.Criteria criteria = example.createCriteria();
  40 + Example.Criteria criteria2 = example.createCriteria();
  41 + if (CommonUtils.isNotEmpty(orderByClause)) {
  42 + example.setOrderByClause(orderByClause);
  43 + }
  44 + if (CommonUtils.isNotEmpty(start_date) && CommonUtils.isNotEmpty(end_date)) {
  45 + criteria.andGreaterThanOrEqualTo("createTime", start_date);
  46 + criteria2.andGreaterThanOrEqualTo("createTime", start_date);
  47 + criteria.andLessThanOrEqualTo("createTime", end_date);
  48 + criteria2.andLessThanOrEqualTo("createTime", end_date);
  49 + }
  50 + if (CommonUtils.isNotEmpty(video_title)) {
  51 + criteria.andLike("audioTitle", "%" + video_title + "%");
  52 + criteria2.andLike("audioTitle", "%" + video_title + "%");
  53 + }
  54 +
  55 + if (CommonUtils.isNotEmpty(video_priority)) {
  56 + criteria.andEqualTo("priority", video_priority);
  57 + criteria2.andEqualTo("priority", video_priority);
  58 + }
  59 +
  60 + if (CommonUtils.isNotNull(spid)) {
  61 + criteria.andEqualTo("spId", spid);
  62 + criteria2.andEqualTo("spId", spid);
  63 + } else if (CommonUtils.isNotEmpty(sp_Id)) {
  64 + criteria.andEqualTo("spId", sp_Id);
  65 + criteria2.andEqualTo("spId", sp_Id);
  66 + }
  67 +
  68 + //领取状态 0-未领取 1-已领取
  69 + if (CommonUtils.isNotNull(receive)) {
  70 + criteria.andEqualTo("receive", receive);
  71 + criteria2.andEqualTo("receive", receive);
  72 + if (receive == CommonConst.RECEIVE_AFTER) {
  73 + criteria.andEqualTo("receive_user_id", userId);
  74 + criteria2.andEqualTo("receive_user_id", userId);
  75 + }
  76 + }
  77 +
  78 + //审核状态 0-未审核 1-已审核 2-拒绝
  79 + if (CommonUtils.isNotNull(state) && state != 3) {
  80 + criteria.andEqualTo("state", state);
  81 + } else if (CommonUtils.isNotNull(state) && state == 3) {
  82 + criteria.andEqualTo("state", 1);
  83 + criteria2.andEqualTo("state", 2);
  84 + example.or(criteria2);
  85 + }
  86 +
  87 + //默认按上传时间倒序排序
  88 + example.setOrderByClause("createTime desc");
  89 + PageHelper.startPage(page, pageSize, true);
  90 + List<ShyAudio> shyAudioList = shyAudioMapper.selectByExample(example);
  91 + PageInfo<ShyAudio> pageInfo = new PageInfo<>(shyAudioList);
  92 + return pageInfo;
  93 + }
29 } 94 }
src/main/resources/application.properties
@@ -37,7 +37,7 @@ mybatis.type-aliases-package=com.cnlive.shenhe.entity @@ -37,7 +37,7 @@ mybatis.type-aliases-package=com.cnlive.shenhe.entity
37 server.port=82 37 server.port=82
38 38
39 #rabbitmq\u76f8\u5173\u914d\u7f6e 39 #rabbitmq\u76f8\u5173\u914d\u7f6e
40 -spring.rabbitmq.host=120.92.4.80 40 +spring.rabbitmq.host=10.254.174.131
41 spring.rabbitmq.port=5672 41 spring.rabbitmq.port=5672
42 spring.rabbitmq.username=test 42 spring.rabbitmq.username=test
43 spring.rabbitmq.password=password 43 spring.rabbitmq.password=password
src/main/resources/templates/common/frame.html
@@ -75,6 +75,7 @@ line-height: 2em; margin: 0 auto;font-size: 2em&quot; th:text=&quot;${session.sessionUser. @@ -75,6 +75,7 @@ line-height: 2em; margin: 0 auto;font-size: 2em&quot; th:text=&quot;${session.sessionUser.
75 </a> 75 </a>
76 <ul class="treeview-menu"> 76 <ul class="treeview-menu">
77 <li class="active"><a href="/videos/page?state=0&receive=0" id="/videos/page">点播审核</a></li> 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 <li><a href="/live/page?shenhe_state=0" id="/live/page"> 直播审核</a></li> 79 <li><a href="/live/page?shenhe_state=0" id="/live/page"> 直播审核</a></li>
79 <li><a href="/comments/page?state=0&receive=0" id="/comments/page"> 评论审核</a></li> 80 <li><a href="/comments/page?state=0&receive=0" id="/comments/page"> 评论审核</a></li>
80 <li><a href="/content/page?receive_status=0" id="/content/page"> 图文审核</a></li> 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(&#39;forms&#39;)">查询
  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}"> &nbsp;</span>
  261 + <a th:href="@{'javascript:applyReceive('+${video.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==video.receive_user_id}"> &nbsp;</span>
  266 + <a th:href="@{'javascript:applyRetReceive('+${video.id}+')'}"
  267 + th:if="${audio.state==0 and audio.receive==1 and session.sessionUser.userId==video.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 \ No newline at end of file 652 \ No newline at end of file