Commit 3cec996b61121d2191ff5678db0d074f925fa4d7

Authored by liwei2917
2 parents c966b450 ab78fc0f

Merge branch 'dev'

src/main/java/com/cnlive/shenhe/ShenheApplication.java
@@ -11,6 +11,7 @@ import org.springframework.beans.factory.annotation.Value; @@ -11,6 +11,7 @@ import org.springframework.beans.factory.annotation.Value;
11 import org.springframework.boot.ApplicationRunner; 11 import org.springframework.boot.ApplicationRunner;
12 import org.springframework.boot.SpringApplication; 12 import org.springframework.boot.SpringApplication;
13 import org.springframework.boot.autoconfigure.SpringBootApplication; 13 import org.springframework.boot.autoconfigure.SpringBootApplication;
  14 +import org.springframework.boot.builder.SpringApplicationBuilder;
14 import org.springframework.boot.web.servlet.FilterRegistrationBean; 15 import org.springframework.boot.web.servlet.FilterRegistrationBean;
15 import org.springframework.boot.web.servlet.support.SpringBootServletInitializer; 16 import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
16 import org.springframework.context.annotation.Bean; 17 import org.springframework.context.annotation.Bean;
@@ -259,7 +260,11 @@ public class ShenheApplication extends SpringBootServletInitializer { @@ -259,7 +260,11 @@ public class ShenheApplication extends SpringBootServletInitializer {
259 260
260 261
261 public static void main(String[] args) { 262 public static void main(String[] args) {
262 - SpringApplication.run(ShenheApplication.class, args); 263 +// SpringApplication.run(ShenheApplication.class, args);
  264 + SpringApplicationBuilder builder=new SpringApplicationBuilder(ShenheApplication.class);
  265 + builder.headless(true).run(args);
  266 + // 设置Headless模式,linux系统下
  267 + System.setProperty("java.awt.headless", "true");
263 } 268 }
264 269
265 /** 270 /**
src/main/java/com/cnlive/shenhe/api/ChannelControllerApi.java
@@ -11,17 +11,23 @@ import com.cnlive.shenhe.utils.CommonUtils; @@ -11,17 +11,23 @@ import com.cnlive.shenhe.utils.CommonUtils;
11 import org.slf4j.Logger; 11 import org.slf4j.Logger;
12 import org.slf4j.LoggerFactory; 12 import org.slf4j.LoggerFactory;
13 import org.springframework.beans.factory.annotation.Autowired; 13 import org.springframework.beans.factory.annotation.Autowired;
  14 +import org.springframework.beans.factory.annotation.Value;
14 import org.springframework.stereotype.Controller; 15 import org.springframework.stereotype.Controller;
  16 +import org.springframework.web.bind.annotation.GetMapping;
15 import org.springframework.web.bind.annotation.PostMapping; 17 import org.springframework.web.bind.annotation.PostMapping;
16 import org.springframework.web.bind.annotation.RequestMapping; 18 import org.springframework.web.bind.annotation.RequestMapping;
17 import org.springframework.web.bind.annotation.ResponseBody; 19 import org.springframework.web.bind.annotation.ResponseBody;
18 20
  21 +import java.util.HashMap;
19 import java.util.List; 22 import java.util.List;
  23 +import java.util.Map;
20 24
21 @Controller 25 @Controller
22 @RequestMapping("/api/channel") 26 @RequestMapping("/api/channel")
23 public class ChannelControllerApi { 27 public class ChannelControllerApi {
24 private static Logger logger = LoggerFactory.getLogger(ChannelControllerApi.class); 28 private static Logger logger = LoggerFactory.getLogger(ChannelControllerApi.class);
  29 + @Value("${spring.localhost.url}")
  30 + private String localhost_url;//本机地址
25 @Autowired 31 @Autowired
26 AuditPass Pass; 32 AuditPass Pass;
27 @Autowired 33 @Autowired
@@ -85,5 +91,29 @@ public class ChannelControllerApi { @@ -85,5 +91,29 @@ public class ChannelControllerApi {
85 return new ResponseBean(ErrorEnum.ERROR.getErrorCode(),"审核请求收到失败(新增)"); 91 return new ResponseBean(ErrorEnum.ERROR.getErrorCode(),"审核请求收到失败(新增)");
86 } 92 }
87 } 93 }
  94 +
  95 + /**
  96 + * @Auther: liwei
  97 + * @Date: 2019/08/17 11:17
  98 + * @Description: 频道前台通知接口
  99 + */
  100 + @GetMapping("/channelNotice")
  101 + @ResponseBody
  102 + public Map<String,Object> channelNotice() {
  103 + Map<String,Object> map=new HashMap<>();
  104 + ShyChannel shyChannel = new ShyChannel();
  105 + shyChannel.setShenhe_type(CommonConst.AUDIT_TYPE_USER);// 审核类型为人工审
  106 + shyChannel.setShenhe_status(CommonConst.AUDIT_INTT);
  107 + List<ShyChannel> channelList = channelService.findshyChannel(shyChannel);
  108 + if (channelList.size() > 0) {
  109 + logger.info("您有"+channelList.size()+"条新的频道审核申请,请注意查看!");
  110 + map.put("id", "1");//第一个提示框,避免冲突
  111 + map.put("title", "新频道审核通知");
  112 + map.put("content","您有"+channelList.size()+"条新的频道审核申请,请注意查看!" );
  113 + map.put("url",localhost_url+"/channel/page?shenhe_status=0&receive=0" );
  114 + return map;
  115 + }
  116 + return null;
  117 + }
88 118
89 } 119 }
src/main/java/com/cnlive/shenhe/controller/UsersController.java
@@ -23,8 +23,11 @@ import org.springframework.web.bind.annotation.PostMapping; @@ -23,8 +23,11 @@ import org.springframework.web.bind.annotation.PostMapping;
23 import org.springframework.web.bind.annotation.RequestMapping; 23 import org.springframework.web.bind.annotation.RequestMapping;
24 import org.springframework.web.bind.annotation.ResponseBody; 24 import org.springframework.web.bind.annotation.ResponseBody;
25 25
  26 +import java.util.HashMap;
26 import java.util.List; 27 import java.util.List;
  28 +import java.util.Map;
27 29
  30 +import javax.print.attribute.HashAttributeSet;
28 import javax.servlet.http.HttpServletRequest; 31 import javax.servlet.http.HttpServletRequest;
29 import javax.servlet.http.HttpSession; 32 import javax.servlet.http.HttpSession;
30 33
@@ -97,6 +100,7 @@ public class UsersController { @@ -97,6 +100,7 @@ public class UsersController {
97 if (CommonUtils.isNull(pageSize)) pageSize = 10; 100 if (CommonUtils.isNull(pageSize)) pageSize = 10;
98 PageInfo<ShyUsers> usersPage = usersService.getPage(page, pageSize, orderByClause, username,mobile,sp_id,company_brief); 101 PageInfo<ShyUsers> usersPage = usersService.getPage(page, pageSize, orderByClause, username,mobile,sp_id,company_brief);
99 List<ShyUsers> list = usersPage.getList(); 102 List<ShyUsers> list = usersPage.getList();
  103 + JSONObject notice = CommonConst.NOTICE;
100 if (!list.isEmpty()) { 104 if (!list.isEmpty()) {
101 for (ShyUsers users : list) { 105 for (ShyUsers users : list) {
102 //显示spid简称 106 //显示spid简称
@@ -108,7 +112,60 @@ public class UsersController { @@ -108,7 +112,60 @@ public class UsersController {
108 } 112 }
109 model.addAttribute("usersPage", usersPage); 113 model.addAttribute("usersPage", usersPage);
110 model.addAttribute("pageSize", pageSize); 114 model.addAttribute("pageSize", pageSize);
  115 + model.addAttribute("notice", notice);
111 return "page/users.html"; 116 return "page/users.html";
112 } 117 }
113 118
  119 + /**
  120 + * 获取通知是否显示
  121 + * @param showType
  122 + * @param session
  123 + * @return
  124 + */
  125 + @PostMapping(value = "/getNoticeShow")
  126 + @ResponseBody
  127 + public Map<String,Object> getNoticeShow( HttpSession session) {
  128 + SessionUser sessionUser = (SessionUser) session.getAttribute(SessionUser.getSessionKey());
  129 + ShyUsers shyUser = new ShyUsers();
  130 + shyUser.setUser_id(sessionUser.getUserId());
  131 + shyUser =usersService.select(shyUser);
  132 + boolean isShow_chinnal=false;//是否显示频道消息框
  133 + boolean isShow_liveApply=false;//是否显示直播申请消息框
  134 + if(shyUser.getNotice_show().contains("1")){
  135 + isShow_chinnal=true;
  136 + }
  137 + if(shyUser.getNotice_show().contains("2")){
  138 + isShow_liveApply=true;
  139 + }
  140 + Map<String,Object> map=new HashMap<>();
  141 + map.put("isShow_chinnal", isShow_chinnal);
  142 + map.put("isShow_liveApply", isShow_liveApply);
  143 + return map;
  144 + }
  145 +
  146 +
  147 + @PostMapping(value = "/write")
  148 + public String write(Integer userId, String[] write_notice, HttpSession session, String redirect_url) {
  149 + SessionUser sessionUser = (SessionUser) session.getAttribute(SessionUser.getSessionKey());
  150 + Integer spid = sessionUser.getSpid();
  151 + if (spid != 0) {
  152 + return "page/error.html";
  153 + }
  154 + ShyUsers user = usersService.get(userId);
  155 + String write = "";
  156 + if (CommonUtils.isNotNull(write_notice) && write_notice.length > 0) {
  157 + for (String w : write_notice) {
  158 + write = write + "," + w;
  159 + }
  160 + write = write.substring(1);
  161 + }
  162 + user.setNotice_show(write);
  163 + boolean success = usersService.update(user);
  164 + if (success) {
  165 + return "redirect:" + redirect_url;
  166 + } else {
  167 + return "error.html";
  168 + }
  169 + }
  170 +
114 } 171 }
src/main/java/com/cnlive/shenhe/controller/VideosController.java
@@ -18,6 +18,7 @@ import com.cnlive.shenhe.serviceImpl.VideosServiceImpl; @@ -18,6 +18,7 @@ import com.cnlive.shenhe.serviceImpl.VideosServiceImpl;
18 import com.cnlive.shenhe.utils.AuditPass; 18 import com.cnlive.shenhe.utils.AuditPass;
19 import com.cnlive.shenhe.utils.CommonConst; 19 import com.cnlive.shenhe.utils.CommonConst;
20 import com.cnlive.shenhe.utils.CommonUtils; 20 import com.cnlive.shenhe.utils.CommonUtils;
  21 +import com.cnlive.shenhe.utils.InfoUtil;
21 import com.github.pagehelper.PageInfo; 22 import com.github.pagehelper.PageInfo;
22 import org.slf4j.Logger; 23 import org.slf4j.Logger;
23 import org.slf4j.LoggerFactory; 24 import org.slf4j.LoggerFactory;
@@ -43,6 +44,8 @@ public class VideosController extends BaseController { @@ -43,6 +44,8 @@ public class VideosController extends BaseController {
43 @Autowired 44 @Autowired
44 AuditPass Pass; 45 AuditPass Pass;
45 @Autowired 46 @Autowired
  47 + InfoUtil infoUtil;
  48 + @Autowired
46 VideosServiceImpl videosService; 49 VideosServiceImpl videosService;
47 @Autowired 50 @Autowired
48 UsersServiceImpl usersService; 51 UsersServiceImpl usersService;
@@ -154,9 +157,9 @@ public class VideosController extends BaseController { @@ -154,9 +157,9 @@ public class VideosController extends BaseController {
154 ShySites shySites = sitesService.findspidDescByspid(videos.getSpid()); 157 ShySites shySites = sitesService.findspidDescByspid(videos.getSpid());
155 if (CommonUtils.isNotNull(shySites)) { 158 if (CommonUtils.isNotNull(shySites)) {
156 if(CommonUtils.isNotEmpty(videos.getCategory())&&videos.getCategory().equals(CommonConst.CATEGORY_WITNESS)){ 159 if(CommonUtils.isNotEmpty(videos.getCategory())&&videos.getCategory().equals(CommonConst.CATEGORY_WITNESS)){
157 - videos.setSpid_desc(shySites.getName()+"目击者"); 160 + videos.setSpid_desc(shySites.getName()+"(目击者)");
158 }else if(CommonUtils.isNotEmpty(videos.getCategory())&&videos.getCategory().equals(CommonConst.CATEGORY_MOMENT)){ 161 }else if(CommonUtils.isNotEmpty(videos.getCategory())&&videos.getCategory().equals(CommonConst.CATEGORY_MOMENT)){
159 - videos.setSpid_desc(shySites.getName()+"朋友圈"); 162 + videos.setSpid_desc(shySites.getName()+"(朋友圈)");
160 }else{ 163 }else{
161 videos.setSpid_desc(shySites.getName()); 164 videos.setSpid_desc(shySites.getName());
162 } 165 }
@@ -460,12 +463,13 @@ public class VideosController extends BaseController { @@ -460,12 +463,13 @@ public class VideosController extends BaseController {
460 return responseBean; 463 return responseBean;
461 } 464 }
462 465
463 - @PostMapping("/ceshi") 466 + @GetMapping("/ceshi")
464 @ResponseBody 467 @ResponseBody
465 - public static String ceshi(String name) {  
466 - 468 + public void ceshi() {
  469 + System.out.println("进入测试");
  470 +// InfoUtil test = new InfoUtil();
  471 +// infoUtil.show("测试通知", "这是一个弹窗测试!",localhost_url+"/channel/page?shenhe_status=0&receive=0");
467 472
468 - return name;  
469 } 473 }
470 474
471 } 475 }
src/main/java/com/cnlive/shenhe/entity/ShyLiveapply.java 0 → 100644
  1 +package com.cnlive.shenhe.entity;
  2 +
  3 +import java.util.Date;
  4 +import javax.persistence.*;
  5 +
  6 +@Table(name = "shy_liveapply")
  7 +public class ShyLiveapply {
  8 + /**
  9 + * id
  10 + */
  11 + @Id
  12 + private Integer id;
  13 +
  14 + /**
  15 + * 直播活动id
  16 + */
  17 + private String activity_id;
  18 +
  19 + /**
  20 + * 直播频道id
  21 + */
  22 + private String channel_id;
  23 +
  24 + /**
  25 + * spId
  26 + */
  27 + private Integer sp_id;
  28 +
  29 + /**
  30 + * 直播发起人
  31 + */
  32 + private String sender;
  33 +
  34 + /**
  35 + * 联系方式
  36 + */
  37 + private String mobile;
  38 +
  39 + /**
  40 + * 直播发起单位
  41 + */
  42 + private String organization;
  43 +
  44 + /**
  45 + * 直播主题
  46 + */
  47 + private String theme;
  48 +
  49 + /**
  50 + * 预计开始时间
  51 + */
  52 + private Date preStartTime;
  53 +
  54 + /**
  55 + * 预计结束时间
  56 + */
  57 + private Date preEndTime;
  58 +
  59 + /**
  60 + * 商务模式:0免费 1收费
  61 + */
  62 + private Integer businessModel;
  63 +
  64 + /**
  65 + * 内容属性:1商业类活动 0非商业活动
  66 + */
  67 + private Integer contentProperty;
  68 +
  69 + /**
  70 + * 要点报备:0品牌植入 1广告植入 2商品推销 3网家家独家麦标
  71 + */
  72 + private String keys;
  73 +
  74 + /**
  75 + * 直播地点
  76 + */
  77 + private String livePlace;
  78 +
  79 + /**
  80 + * 推流地址
  81 + */
  82 + private String pushUrl;
  83 +
  84 + /**
  85 + * 拉流地址
  86 + */
  87 + private String pullUrl;
  88 +
  89 + /**
  90 + * 播出平台及通道:0网家家 1CNLive网站 2@TV互动电视
  91 + */
  92 + private String platforms;
  93 +
  94 + /**
  95 + * 回调地址
  96 + */
  97 + private String callback;
  98 +
  99 + /**
  100 + * 审核类型,1:免审,2:机审,3:人工审
  101 + */
  102 + private Integer shenhe_type;
  103 +
  104 + /**
  105 + * 领取状态。0:未领取;1:已领取
  106 + */
  107 + private Integer receive;
  108 +
  109 + /**
  110 + * 审核状态:0.未审核,1:已审核,2.拒绝
  111 + */
  112 + private Integer shenhe_state;
  113 +
  114 + /**
  115 + * 更新者
  116 + */
  117 + private String updater;
  118 +
  119 + /**
  120 + * 审核员
  121 + */
  122 + private String auditor;
  123 +
  124 + /**
  125 + * 审核信息
  126 + */
  127 + private String shenhe_msg;
  128 +
  129 + /**
  130 + * 创建时间
  131 + */
  132 + private Date created_at;
  133 +
  134 + /**
  135 + * 更新时间
  136 + */
  137 + private Date updated_at;
  138 +
  139 + /**
  140 + * 内容简述
  141 + */
  142 + private String simpleContent;
  143 +
  144 + /**
  145 + * 获取id
  146 + *
  147 + * @return id - id
  148 + */
  149 + public Integer getId() {
  150 + return id;
  151 + }
  152 +
  153 + /**
  154 + * 设置id
  155 + *
  156 + * @param id id
  157 + */
  158 + public void setId(Integer id) {
  159 + this.id = id;
  160 + }
  161 +
  162 + /**
  163 + * 获取直播活动id
  164 + *
  165 + * @return activity_id - 直播活动id
  166 + */
  167 + public String getActivity_id() {
  168 + return activity_id;
  169 + }
  170 +
  171 + /**
  172 + * 设置直播活动id
  173 + *
  174 + * @param activity_id 直播活动id
  175 + */
  176 + public void setActivity_id(String activity_id) {
  177 + this.activity_id = activity_id;
  178 + }
  179 +
  180 + /**
  181 + * 获取直播频道id
  182 + *
  183 + * @return channel_id - 直播频道id
  184 + */
  185 + public String getChannel_id() {
  186 + return channel_id;
  187 + }
  188 +
  189 + /**
  190 + * 设置直播频道id
  191 + *
  192 + * @param channel_id 直播频道id
  193 + */
  194 + public void setChannel_id(String channel_id) {
  195 + this.channel_id = channel_id;
  196 + }
  197 +
  198 + /**
  199 + * 获取spId
  200 + *
  201 + * @return sp_id - spId
  202 + */
  203 + public Integer getSp_id() {
  204 + return sp_id;
  205 + }
  206 +
  207 + /**
  208 + * 设置spId
  209 + *
  210 + * @param sp_id spId
  211 + */
  212 + public void setSp_id(Integer sp_id) {
  213 + this.sp_id = sp_id;
  214 + }
  215 +
  216 + /**
  217 + * 获取直播发起人
  218 + *
  219 + * @return sender - 直播发起人
  220 + */
  221 + public String getSender() {
  222 + return sender;
  223 + }
  224 +
  225 + /**
  226 + * 设置直播发起人
  227 + *
  228 + * @param sender 直播发起人
  229 + */
  230 + public void setSender(String sender) {
  231 + this.sender = sender;
  232 + }
  233 +
  234 + /**
  235 + * 获取联系方式
  236 + *
  237 + * @return mobile - 联系方式
  238 + */
  239 + public String getMobile() {
  240 + return mobile;
  241 + }
  242 +
  243 + /**
  244 + * 设置联系方式
  245 + *
  246 + * @param mobile 联系方式
  247 + */
  248 + public void setMobile(String mobile) {
  249 + this.mobile = mobile;
  250 + }
  251 +
  252 + /**
  253 + * 获取直播发起单位
  254 + *
  255 + * @return organization - 直播发起单位
  256 + */
  257 + public String getOrganization() {
  258 + return organization;
  259 + }
  260 +
  261 + /**
  262 + * 设置直播发起单位
  263 + *
  264 + * @param organization 直播发起单位
  265 + */
  266 + public void setOrganization(String organization) {
  267 + this.organization = organization;
  268 + }
  269 +
  270 + /**
  271 + * 获取直播主题
  272 + *
  273 + * @return theme - 直播主题
  274 + */
  275 + public String getTheme() {
  276 + return theme;
  277 + }
  278 +
  279 + /**
  280 + * 设置直播主题
  281 + *
  282 + * @param theme 直播主题
  283 + */
  284 + public void setTheme(String theme) {
  285 + this.theme = theme;
  286 + }
  287 +
  288 + /**
  289 + * 获取预计开始时间
  290 + *
  291 + * @return preStartTime - 预计开始时间
  292 + */
  293 + public Date getPreStartTime() {
  294 + return preStartTime;
  295 + }
  296 +
  297 + /**
  298 + * 设置预计开始时间
  299 + *
  300 + * @param preStartTime 预计开始时间
  301 + */
  302 + public void setPreStartTime(Date preStartTime) {
  303 + this.preStartTime = preStartTime;
  304 + }
  305 +
  306 + /**
  307 + * 获取预计结束时间
  308 + *
  309 + * @return preEndTime - 预计结束时间
  310 + */
  311 + public Date getPreEndTime() {
  312 + return preEndTime;
  313 + }
  314 +
  315 + /**
  316 + * 设置预计结束时间
  317 + *
  318 + * @param preEndTime 预计结束时间
  319 + */
  320 + public void setPreEndTime(Date preEndTime) {
  321 + this.preEndTime = preEndTime;
  322 + }
  323 +
  324 + /**
  325 + * 获取商务模式:0免费 1收费
  326 + *
  327 + * @return businessModel - 商务模式:0免费 1收费
  328 + */
  329 + public Integer getBusinessModel() {
  330 + return businessModel;
  331 + }
  332 +
  333 + /**
  334 + * 设置商务模式:0免费 1收费
  335 + *
  336 + * @param businessModel 商务模式:0免费 1收费
  337 + */
  338 + public void setBusinessModel(Integer businessModel) {
  339 + this.businessModel = businessModel;
  340 + }
  341 +
  342 + /**
  343 + * 获取内容属性:1商业类活动 0非商业活动
  344 + *
  345 + * @return contentProperty - 内容属性:1商业类活动 0非商业活动
  346 + */
  347 + public Integer getContentProperty() {
  348 + return contentProperty;
  349 + }
  350 +
  351 + /**
  352 + * 设置内容属性:1商业类活动 0非商业活动
  353 + *
  354 + * @param contentProperty 内容属性:1商业类活动 0非商业活动
  355 + */
  356 + public void setContentProperty(Integer contentProperty) {
  357 + this.contentProperty = contentProperty;
  358 + }
  359 +
  360 + /**
  361 + * 获取要点报备:0品牌植入 1广告植入 2商品推销 3网家家独家麦标
  362 + *
  363 + * @return keys - 要点报备:0品牌植入 1广告植入 2商品推销 3网家家独家麦标
  364 + */
  365 + public String getKeys() {
  366 + return keys;
  367 + }
  368 +
  369 + /**
  370 + * 设置要点报备:0品牌植入 1广告植入 2商品推销 3网家家独家麦标
  371 + *
  372 + * @param keys 要点报备:0品牌植入 1广告植入 2商品推销 3网家家独家麦标
  373 + */
  374 + public void setKeys(String keys) {
  375 + this.keys = keys;
  376 + }
  377 +
  378 + /**
  379 + * 获取直播地点
  380 + *
  381 + * @return livePlace - 直播地点
  382 + */
  383 + public String getLivePlace() {
  384 + return livePlace;
  385 + }
  386 +
  387 + /**
  388 + * 设置直播地点
  389 + *
  390 + * @param livePlace 直播地点
  391 + */
  392 + public void setLivePlace(String livePlace) {
  393 + this.livePlace = livePlace;
  394 + }
  395 +
  396 + /**
  397 + * 获取推流地址
  398 + *
  399 + * @return pushUrl - 推流地址
  400 + */
  401 + public String getPushUrl() {
  402 + return pushUrl;
  403 + }
  404 +
  405 + /**
  406 + * 设置推流地址
  407 + *
  408 + * @param pushUrl 推流地址
  409 + */
  410 + public void setPushUrl(String pushUrl) {
  411 + this.pushUrl = pushUrl;
  412 + }
  413 +
  414 + /**
  415 + * 获取拉流地址
  416 + *
  417 + * @return pullUrl - 拉流地址
  418 + */
  419 + public String getPullUrl() {
  420 + return pullUrl;
  421 + }
  422 +
  423 + /**
  424 + * 设置拉流地址
  425 + *
  426 + * @param pullUrl 拉流地址
  427 + */
  428 + public void setPullUrl(String pullUrl) {
  429 + this.pullUrl = pullUrl;
  430 + }
  431 +
  432 + /**
  433 + * 获取播出平台及通道:0网家家 1CNLive网站 2@TV互动电视
  434 + *
  435 + * @return platforms - 播出平台及通道:0网家家 1CNLive网站 2@TV互动电视
  436 + */
  437 + public String getPlatforms() {
  438 + return platforms;
  439 + }
  440 +
  441 + /**
  442 + * 设置播出平台及通道:0网家家 1CNLive网站 2@TV互动电视
  443 + *
  444 + * @param platforms 播出平台及通道:0网家家 1CNLive网站 2@TV互动电视
  445 + */
  446 + public void setPlatforms(String platforms) {
  447 + this.platforms = platforms;
  448 + }
  449 +
  450 + /**
  451 + * 获取回调地址
  452 + *
  453 + * @return callback - 回调地址
  454 + */
  455 + public String getCallback() {
  456 + return callback;
  457 + }
  458 +
  459 + /**
  460 + * 设置回调地址
  461 + *
  462 + * @param callback 回调地址
  463 + */
  464 + public void setCallback(String callback) {
  465 + this.callback = callback;
  466 + }
  467 +
  468 + /**
  469 + * 获取审核类型,1:免审,2:机审,3:人工审
  470 + *
  471 + * @return shenhe_type - 审核类型,1:免审,2:机审,3:人工审
  472 + */
  473 + public Integer getShenhe_type() {
  474 + return shenhe_type;
  475 + }
  476 +
  477 + /**
  478 + * 设置审核类型,1:免审,2:机审,3:人工审
  479 + *
  480 + * @param shenhe_type 审核类型,1:免审,2:机审,3:人工审
  481 + */
  482 + public void setShenhe_type(Integer shenhe_type) {
  483 + this.shenhe_type = shenhe_type;
  484 + }
  485 +
  486 + /**
  487 + * 获取领取状态。0:未领取;1:已领取
  488 + *
  489 + * @return receive - 领取状态。0:未领取;1:已领取
  490 + */
  491 + public Integer getReceive() {
  492 + return receive;
  493 + }
  494 +
  495 + /**
  496 + * 设置领取状态。0:未领取;1:已领取
  497 + *
  498 + * @param receive 领取状态。0:未领取;1:已领取
  499 + */
  500 + public void setReceive(Integer receive) {
  501 + this.receive = receive;
  502 + }
  503 +
  504 + /**
  505 + * 获取审核状态:0.未审核,1:已审核,2.拒绝
  506 + *
  507 + * @return shenhe_state - 审核状态:0.未审核,1:已审核,2.拒绝
  508 + */
  509 + public Integer getShenhe_state() {
  510 + return shenhe_state;
  511 + }
  512 +
  513 + /**
  514 + * 设置审核状态:0.未审核,1:已审核,2.拒绝
  515 + *
  516 + * @param shenhe_state 审核状态:0.未审核,1:已审核,2.拒绝
  517 + */
  518 + public void setShenhe_state(Integer shenhe_state) {
  519 + this.shenhe_state = shenhe_state;
  520 + }
  521 +
  522 + /**
  523 + * 获取更新者
  524 + *
  525 + * @return updater - 更新者
  526 + */
  527 + public String getUpdater() {
  528 + return updater;
  529 + }
  530 +
  531 + /**
  532 + * 设置更新者
  533 + *
  534 + * @param updater 更新者
  535 + */
  536 + public void setUpdater(String updater) {
  537 + this.updater = updater;
  538 + }
  539 +
  540 + /**
  541 + * 获取审核员
  542 + *
  543 + * @return auditor - 审核员
  544 + */
  545 + public String getAuditor() {
  546 + return auditor;
  547 + }
  548 +
  549 + /**
  550 + * 设置审核员
  551 + *
  552 + * @param auditor 审核员
  553 + */
  554 + public void setAuditor(String auditor) {
  555 + this.auditor = auditor;
  556 + }
  557 +
  558 + /**
  559 + * 获取审核信息
  560 + *
  561 + * @return shenhe_msg - 审核信息
  562 + */
  563 + public String getShenhe_msg() {
  564 + return shenhe_msg;
  565 + }
  566 +
  567 + /**
  568 + * 设置审核信息
  569 + *
  570 + * @param shenhe_msg 审核信息
  571 + */
  572 + public void setShenhe_msg(String shenhe_msg) {
  573 + this.shenhe_msg = shenhe_msg;
  574 + }
  575 +
  576 + /**
  577 + * 获取创建时间
  578 + *
  579 + * @return created_at - 创建时间
  580 + */
  581 + public Date getCreated_at() {
  582 + return created_at;
  583 + }
  584 +
  585 + /**
  586 + * 设置创建时间
  587 + *
  588 + * @param created_at 创建时间
  589 + */
  590 + public void setCreated_at(Date created_at) {
  591 + this.created_at = created_at;
  592 + }
  593 +
  594 + /**
  595 + * 获取更新时间
  596 + *
  597 + * @return updated_at - 更新时间
  598 + */
  599 + public Date getUpdated_at() {
  600 + return updated_at;
  601 + }
  602 +
  603 + /**
  604 + * 设置更新时间
  605 + *
  606 + * @param updated_at 更新时间
  607 + */
  608 + public void setUpdated_at(Date updated_at) {
  609 + this.updated_at = updated_at;
  610 + }
  611 +
  612 + /**
  613 + * 获取内容简述
  614 + *
  615 + * @return simpleContent - 内容简述
  616 + */
  617 + public String getSimpleContent() {
  618 + return simpleContent;
  619 + }
  620 +
  621 + /**
  622 + * 设置内容简述
  623 + *
  624 + * @param simpleContent 内容简述
  625 + */
  626 + public void setSimpleContent(String simpleContent) {
  627 + this.simpleContent = simpleContent;
  628 + }
  629 +}
0 \ No newline at end of file 630 \ No newline at end of file
src/main/java/com/cnlive/shenhe/entity/ShyUsers.java
@@ -53,6 +53,11 @@ public class ShyUsers { @@ -53,6 +53,11 @@ public class ShyUsers {
53 */ 53 */
54 private Boolean state; 54 private Boolean state;
55 55
  56 + /**
  57 + * 通知显示 1:频道 2:直播申请
  58 + */
  59 + private String notice_show;
  60 +
56 private Date created_at; 61 private Date created_at;
57 62
58 private Date updated_at; 63 private Date updated_at;
@@ -244,6 +249,24 @@ public class ShyUsers { @@ -244,6 +249,24 @@ public class ShyUsers {
244 } 249 }
245 250
246 /** 251 /**
  252 + * 获取通知显示 1:频道 2:直播申请
  253 + *
  254 + * @return notice_show - 通知显示 1:频道 2:直播申请
  255 + */
  256 + public String getNotice_show() {
  257 + return notice_show;
  258 + }
  259 +
  260 + /**
  261 + * 设置通知显示 1:频道 2:直播申请
  262 + *
  263 + * @param notice_show 通知显示 1:频道 2:直播申请
  264 + */
  265 + public void setNotice_show(String notice_show) {
  266 + this.notice_show = notice_show;
  267 + }
  268 +
  269 + /**
247 * @return created_at 270 * @return created_at
248 */ 271 */
249 public Date getCreated_at() { 272 public Date getCreated_at() {
src/main/java/com/cnlive/shenhe/job/ChannelJob.java
@@ -8,9 +8,12 @@ import com.cnlive.shenhe.serviceImpl.SitesServiceImpl; @@ -8,9 +8,12 @@ import com.cnlive.shenhe.serviceImpl.SitesServiceImpl;
8 import com.cnlive.shenhe.serviceImpl.UsersServiceImpl; 8 import com.cnlive.shenhe.serviceImpl.UsersServiceImpl;
9 import com.cnlive.shenhe.utils.AuditPass; 9 import com.cnlive.shenhe.utils.AuditPass;
10 import com.cnlive.shenhe.utils.CommonConst; 10 import com.cnlive.shenhe.utils.CommonConst;
  11 +import com.cnlive.shenhe.utils.InfoUtil;
  12 +
11 import org.slf4j.Logger; 13 import org.slf4j.Logger;
12 import org.slf4j.LoggerFactory; 14 import org.slf4j.LoggerFactory;
13 import org.springframework.beans.factory.annotation.Autowired; 15 import org.springframework.beans.factory.annotation.Autowired;
  16 +import org.springframework.beans.factory.annotation.Value;
14 import org.springframework.scheduling.annotation.Scheduled; 17 import org.springframework.scheduling.annotation.Scheduled;
15 import org.springframework.stereotype.Component; 18 import org.springframework.stereotype.Component;
16 19
@@ -19,11 +22,16 @@ import java.util.List; @@ -19,11 +22,16 @@ import java.util.List;
19 @Component 22 @Component
20 public class ChannelJob { 23 public class ChannelJob {
21 private static Logger logger = LoggerFactory.getLogger(ChannelJob.class); 24 private static Logger logger = LoggerFactory.getLogger(ChannelJob.class);
  25 + @Value("${spring.localhost.url}")
  26 + private String localhost_url;//本机地址
  27 +
22 @Autowired 28 @Autowired
23 SitesServiceImpl sitesService; 29 SitesServiceImpl sitesService;
24 @Autowired 30 @Autowired
25 AuditPass Pass; 31 AuditPass Pass;
26 @Autowired 32 @Autowired
  33 + InfoUtil infoUtil;
  34 + @Autowired
27 ChannelServiceImpl channelService; 35 ChannelServiceImpl channelService;
28 36
29 @Autowired 37 @Autowired
@@ -45,5 +53,23 @@ public class ChannelJob { @@ -45,5 +53,23 @@ public class ChannelJob {
45 } 53 }
46 } 54 }
47 55
  56 + /**
  57 + * 频道审核通知
  58 + */
  59 +// @Scheduled(fixedRate = 60 * 1000)
  60 + public void channelNotice() {
  61 + ShyChannel shyChannel = new ShyChannel();
  62 + shyChannel.setShenhe_type(CommonConst.AUDIT_TYPE_USER);// 审核类型为人工审
  63 + shyChannel.setShenhe_status(CommonConst.AUDIT_INTT);
  64 + List<ShyChannel> channelList = channelService.findshyChannel(shyChannel);
  65 + if (channelList.size() > 0) {
  66 + logger.info("您有"+channelList.size()+"条新的频道审核申请,请注意查看!");
  67 + // 设置Headless模式,linux系统下
  68 + System.setProperty("java.awt.headless", "false");
  69 + infoUtil.show("新频道申请", "您有"+channelList.size()+"条新的频道审核申请,请注意查看!",localhost_url+"/channel/page?shenhe_status=0&receive=0");
  70 + }
  71 +
  72 + }
  73 +
48 74
49 } 75 }
src/main/java/com/cnlive/shenhe/mapper/ShyLiveapplyMapper.java 0 → 100644
  1 +package com.cnlive.shenhe.mapper;
  2 +
  3 +import com.cnlive.shenhe.entity.ShyLiveapply;
  4 +import tk.mybatis.mapper.common.Mapper;
  5 +
  6 +public interface ShyLiveapplyMapper extends Mapper<ShyLiveapply> {
  7 +}
0 \ No newline at end of file 8 \ No newline at end of file
src/main/java/com/cnlive/shenhe/serviceImpl/UsersServiceImpl.java
1 package com.cnlive.shenhe.serviceImpl; 1 package com.cnlive.shenhe.serviceImpl;
2 2
  3 +import com.cnlive.shenhe.entity.ShySites;
3 import com.cnlive.shenhe.entity.ShyUsers; 4 import com.cnlive.shenhe.entity.ShyUsers;
4 import com.cnlive.shenhe.mapper.ShyUsersMapper; 5 import com.cnlive.shenhe.mapper.ShyUsersMapper;
5 import com.cnlive.shenhe.utils.CommonUtils; 6 import com.cnlive.shenhe.utils.CommonUtils;
@@ -56,4 +57,8 @@ public class UsersServiceImpl { @@ -56,4 +57,8 @@ public class UsersServiceImpl {
56 public ShyUsers select(ShyUsers shyUsers) { 57 public ShyUsers select(ShyUsers shyUsers) {
57 return shyUsersMapper.selectOne(shyUsers); 58 return shyUsersMapper.selectOne(shyUsers);
58 } 59 }
  60 +
  61 + public boolean update(ShyUsers shyUsers) {
  62 + return shyUsersMapper.updateByPrimaryKeySelective(shyUsers) == 1;
  63 + }
59 } 64 }
src/main/java/com/cnlive/shenhe/serviceImpl/VideosServiceImpl.java
@@ -411,22 +411,21 @@ public class VideosServiceImpl { @@ -411,22 +411,21 @@ public class VideosServiceImpl {
411 Integer shenheType=3;//审核类型,1:免审,2:机审,3:人工审 411 Integer shenheType=3;//审核类型,1:免审,2:机审,3:人工审
412 //如果当前sp是免审sp 412 //如果当前sp是免审sp
413 if(sites.contains(shyVideo.getSpid())){ 413 if(sites.contains(shyVideo.getSpid())){
414 - //如果栏目是“目击者”  
415 - if(CommonUtils.isNotEmpty(shyVideo.getCategory()) && shyVideo.getCategory().equals(CommonConst.CATEGORY_WITNESS)){  
416 - //如果用户id存在  
417 - if(CommonUtils.isNotEmpty(shyVideo.getVideo_user_id())){  
418 - ShyUsersfree shyUserfree=usersfreeServiceImpl.selectUser(shyVideo.getSpid(), shyVideo.getCategory(), shyVideo.getVideo_user_id());  
419 - //如果存在免审用户  
420 - if(CommonUtils.isNotNull(shyUserfree)){  
421 - shenheType=1;//免审  
422 - }else{//用户不免审  
423 - shenheType=2;//机审  
424 - }  
425 - }else{//如果用户id不存在 414 + shenheType=1;//免审
  415 + }
  416 + //如果栏目是“目击者”
  417 + if(CommonUtils.isNotEmpty(shyVideo.getCategory()) && shyVideo.getCategory().equals(CommonConst.CATEGORY_WITNESS)){
  418 + //如果用户id存在
  419 + if(CommonUtils.isNotEmpty(shyVideo.getVideo_user_id())){
  420 + ShyUsersfree shyUserfree=usersfreeServiceImpl.selectUser(shyVideo.getSpid(), shyVideo.getCategory(), shyVideo.getVideo_user_id());
  421 + //如果存在免审用户
  422 + if(CommonUtils.isNotNull(shyUserfree)){
  423 + shenheType=1;//免审
  424 + }else{//用户不免审
426 shenheType=2;//机审 425 shenheType=2;//机审
427 } 426 }
428 - }else{//如果栏目不存在或者不是非免审栏目  
429 - shenheType=1;//免审 427 + }else{//如果用户id不存在
  428 + shenheType=2;//机审
430 } 429 }
431 } 430 }
432 shyVideo.setShenhe_type(shenheType); 431 shyVideo.setShenhe_type(shenheType);
src/main/java/com/cnlive/shenhe/utils/CommonConst.java
@@ -83,8 +83,10 @@ public class CommonConst { @@ -83,8 +83,10 @@ public class CommonConst {
83 */ 83 */
84 public static Integer BUSINESS_CHANNEL = 4; 84 public static Integer BUSINESS_CHANNEL = 4;
85 85
86 - 86 + //白名单设置
87 public static JSONObject BUSINESS = JSONObject.parseObject("{\"1\":\"点播业务\",\"2\":\"评论业务\",\"3\":\"图文业务\",\"4\":\"频道业务\"}"); 87 public static JSONObject BUSINESS = JSONObject.parseObject("{\"1\":\"点播业务\",\"2\":\"评论业务\",\"3\":\"图文业务\",\"4\":\"频道业务\"}");
  88 + //通知消息设置
  89 + public static JSONObject NOTICE = JSONObject.parseObject("{\"1\":\"频道通知\",\"2\":\"直播申请通知\"}");
88 90
89 /** 91 /**
90 * 抽帧状态:未抽帧 92 * 抽帧状态:未抽帧
src/main/java/com/cnlive/shenhe/utils/InfoUtil.java 0 → 100644
  1 +package com.cnlive.shenhe.utils;
  2 +
  3 +import java.awt.BorderLayout;
  4 +import java.awt.Color;
  5 +import java.awt.Cursor;
  6 +import java.awt.Desktop;
  7 +import java.awt.Dimension;
  8 +import java.awt.FlowLayout;
  9 +import java.awt.Font;
  10 +import java.awt.Point;
  11 +import java.awt.event.MouseAdapter;
  12 +import java.awt.event.MouseEvent;
  13 +import java.net.URI;
  14 +
  15 +import javax.swing.BorderFactory;
  16 +import javax.swing.JButton;
  17 +import javax.swing.JLabel;
  18 +import javax.swing.JPanel;
  19 +import javax.swing.JScrollPane;
  20 +import javax.swing.JTextArea;
  21 +import javax.swing.SwingConstants;
  22 +
  23 +import org.springframework.beans.factory.annotation.Value;
  24 +import org.springframework.boot.context.properties.ConfigurationProperties;
  25 +import org.springframework.context.annotation.PropertySource;
  26 +import org.springframework.stereotype.Component;
  27 +
  28 +import java.awt.Insets;
  29 +import java.awt.Toolkit;
  30 +import javax.swing.JDialog;
  31 +
  32 +/**
  33 + * @author Administrator 此工具类用法:实例化出对象,调用 void show("标题","内容") 方法. InfoUtil tool
  34 + *         = new InfoUtil(); tool.show("标题","内容")
  35 + */
  36 +@Component
  37 +public class InfoUtil {
  38 + private TipWindow tw = null; // 提示框
  39 + private JPanel headPan = null;
  40 + private JPanel feaPan = null;
  41 + private JPanel btnPan = null;
  42 + private JLabel title = null; // 栏目名称
  43 + private JLabel head = null; // 蓝色标题
  44 + private JLabel close = null; // 关闭按钮
  45 + private JTextArea feature = null; // 内容
  46 + private JScrollPane jfeaPan = null;
  47 + private JButton sure = null;
  48 + private String titleT = null;
  49 + private String word = null;
  50 + private Desktop desktop = null;
  51 +
  52 + // private SimpleDateFormat sdf = new
  53 + // SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
  54 +
  55 + public void init() {
  56 + // 新建300x180的消息提示框
  57 + tw = new TipWindow(300, 180);
  58 + headPan = new JPanel(new FlowLayout(FlowLayout.CENTER, 0, 0));
  59 + feaPan = new JPanel(new FlowLayout(FlowLayout.CENTER, 0, 0));
  60 + btnPan = new JPanel(new FlowLayout(FlowLayout.CENTER, 0, 0));
  61 + title = new JLabel("欢迎使用本系统");
  62 + head = new JLabel(titleT);
  63 + close = new JLabel(" x");
  64 + feature = new JTextArea(word);
  65 + jfeaPan = new JScrollPane(feature);
  66 + sure = new JButton("查看");
  67 + sure.setHorizontalAlignment(SwingConstants.CENTER);
  68 +
  69 + // 设置提示框的边框,宽度和颜色
  70 + tw.getRootPane().setBorder(
  71 + BorderFactory.createMatteBorder(1, 1, 1, 1, Color.white));
  72 + title.setPreferredSize(new Dimension(260, 26));
  73 + title.setVerticalTextPosition(JLabel.CENTER);
  74 + title.setHorizontalTextPosition(JLabel.CENTER);
  75 + title.setFont(new Font("宋体", Font.PLAIN, 12));
  76 + title.setForeground(Color.black);
  77 +
  78 + close.setFont(new Font("Arial", Font.BOLD, 15));
  79 + close.setPreferredSize(new Dimension(20, 20));
  80 + close.setVerticalTextPosition(JLabel.CENTER);
  81 + close.setHorizontalTextPosition(JLabel.CENTER);
  82 + close.setCursor(new Cursor(12));
  83 + close.setToolTipText("关闭");
  84 +
  85 + head.setPreferredSize(new Dimension(250, 35));
  86 + head.setVerticalTextPosition(JLabel.CENTER);
  87 + head.setHorizontalTextPosition(JLabel.CENTER);
  88 + head.setFont(new Font("宋体", Font.PLAIN, 14));
  89 + head.setForeground(Color.black);
  90 +
  91 + feature.setEditable(false);
  92 + feature.setForeground(Color.BLACK);
  93 + feature.setFont(new Font("宋体", Font.PLAIN, 13));
  94 + feature.setBackground(new Color(255, 255, 255));
  95 + // 设置文本域自动换行
  96 + feature.setLineWrap(true);
  97 +
  98 + jfeaPan.setPreferredSize(new Dimension(260, 100));
  99 + jfeaPan.setBorder(null);
  100 + jfeaPan.setBackground(Color.black);
  101 + tw.setBackground(Color.white);
  102 +
  103 + // 为了隐藏文本域,加个空的JLabel将他挤到下面去
  104 + JLabel jsp = new JLabel();
  105 + jsp.setPreferredSize(new Dimension(300, 15));
  106 +
  107 + sure.setPreferredSize(new Dimension(60, 30));
  108 + // 设置标签鼠标手形
  109 + sure.setCursor(new Cursor(12));
  110 + // 设置button外观
  111 + sure.setContentAreaFilled(false);
  112 + sure.setBorder(BorderFactory.createRaisedBevelBorder());
  113 + sure.setBackground(Color.gray);
  114 +
  115 + // headPan.add(title);
  116 + headPan.add(head);
  117 + headPan.add(close);
  118 +
  119 + feaPan.add(jsp);
  120 + feaPan.add(jfeaPan);
  121 +
  122 + // feaPan.add(releaseLabel);
  123 +
  124 + btnPan.add(sure);
  125 +
  126 + headPan.setBackground(new Color(104, 141, 177));
  127 + feaPan.setBackground(Color.white);
  128 + btnPan.setBackground(Color.white);
  129 +
  130 + tw.add(headPan, BorderLayout.NORTH);
  131 + tw.add(feaPan, BorderLayout.CENTER);
  132 + tw.add(btnPan, BorderLayout.SOUTH);
  133 + }
  134 +
  135 + public void handle(String url) {
  136 + // 为更新按钮增加相应的事件
  137 + desktop = Desktop.getDesktop();
  138 + sure.addMouseListener(new MouseAdapter() {
  139 + public void mouseClicked(MouseEvent e) {
  140 + //注释代码为点击确认之后跳转到指定网页
  141 + try {
  142 + desktop.browse(new URI(url));
  143 + } catch (Exception e1) {
  144 + e1.printStackTrace();
  145 + }
  146 + tw.close();
  147 + }
  148 +
  149 + public void mouseEntered(MouseEvent e) {
  150 + sure.setBorder(BorderFactory.createLineBorder(Color.gray));
  151 + }
  152 +
  153 + public void mouseExited(MouseEvent e) {
  154 + sure.setBorder(null);
  155 + }
  156 + });
  157 + // 右上角关闭按钮事件
  158 + close.addMouseListener(new MouseAdapter() {
  159 + public void mouseClicked(MouseEvent e) {
  160 + tw.close();
  161 + }
  162 +
  163 + public void mouseEntered(MouseEvent e) {
  164 + close.setBorder(BorderFactory.createLineBorder(Color.gray));
  165 + }
  166 +
  167 + public void mouseExited(MouseEvent e) {
  168 + close.setBorder(null);
  169 + }
  170 + });
  171 + }
  172 +
  173 + public void show(String titleT, String word,String url) {
  174 + this.titleT = titleT;
  175 + this.word = word;
  176 + // time = sdf.format(new Date());
  177 + init();
  178 + handle(url);
  179 + tw.setAlwaysOnTop(true);
  180 + tw.setUndecorated(true);
  181 + tw.setResizable(false);
  182 + tw.setVisible(true);
  183 + tw.run();
  184 + }
  185 +
  186 + public void close() {
  187 + tw.close();
  188 + }
  189 +}
  190 +
  191 +class TipWindow extends JDialog {
  192 + private static final long serialVersionUID = 8541659783234673950L;
  193 + private static Dimension dim;
  194 + private int x, y;
  195 + private int width, height;
  196 + private static Insets screenInsets;
  197 +
  198 + public TipWindow(int width, int height) {
  199 + this.width = width;
  200 + this.height = height;
  201 + dim = Toolkit.getDefaultToolkit().getScreenSize();
  202 + screenInsets = Toolkit.getDefaultToolkit().getScreenInsets(
  203 + this.getGraphicsConfiguration());
  204 + x = (int) (dim.getWidth() - width - 3);
  205 + y = (int) (dim.getHeight() - screenInsets.bottom - 3);
  206 + initComponents();
  207 + }
  208 +
  209 + public void run() {
  210 + for (int i = 0; i <= height; i += 10) {
  211 + try {
  212 + this.setLocation(x, y - i);
  213 + Thread.sleep(50);
  214 + } catch (InterruptedException ex) {
  215 + }
  216 + }
  217 + // 此处代码用来实现让消息提示框10秒后自动消失
  218 + try {
  219 + Thread.sleep(10000);
  220 + } catch (InterruptedException e) {
  221 + e.printStackTrace();
  222 + }
  223 + close();
  224 + }
  225 +
  226 + private void initComponents() {
  227 + this.setSize(width, height);
  228 + this.setLocation(x, y);
  229 + this.setBackground(Color.black);
  230 + }
  231 +
  232 + public void close() {
  233 + x = this.getX();
  234 + y = this.getY();
  235 + int ybottom = (int) dim.getHeight() - screenInsets.bottom;
  236 + for (int i = 0; i <= ybottom - y; i += 10) {
  237 + try {
  238 + setLocation(x, y + i);
  239 + Thread.sleep(50);
  240 + } catch (InterruptedException ex) {
  241 + }
  242 + }
  243 + dispose();
  244 + }
  245 +
  246 +}
src/main/resources/mapper/ShyContentMapper.xml
@@ -11,7 +11,6 @@ @@ -11,7 +11,6 @@
11 <result column="title_image" jdbcType="VARCHAR" property="title_image" /> 11 <result column="title_image" jdbcType="VARCHAR" property="title_image" />
12 <result column="content_tag" jdbcType="VARCHAR" property="content_tag" /> 12 <result column="content_tag" jdbcType="VARCHAR" property="content_tag" />
13 <result column="content_url" jdbcType="VARCHAR" property="content_url" /> 13 <result column="content_url" jdbcType="VARCHAR" property="content_url" />
14 - <result column="content_pc_url" jdbcType="VARCHAR" property="content_pc_url" />  
15 <result column="shenhe_type" jdbcType="INTEGER" property="shenhe_type" /> 14 <result column="shenhe_type" jdbcType="INTEGER" property="shenhe_type" />
16 <result column="content_status" jdbcType="INTEGER" property="content_status" /> 15 <result column="content_status" jdbcType="INTEGER" property="content_status" />
17 <result column="callback" jdbcType="VARCHAR" property="callback" /> 16 <result column="callback" jdbcType="VARCHAR" property="callback" />
@@ -26,6 +25,7 @@ @@ -26,6 +25,7 @@
26 <result column="updater" jdbcType="VARCHAR" property="updater" /> 25 <result column="updater" jdbcType="VARCHAR" property="updater" />
27 <result column="shenhe_msg" jdbcType="VARCHAR" property="shenhe_msg" /> 26 <result column="shenhe_msg" jdbcType="VARCHAR" property="shenhe_msg" />
28 <result column="title" jdbcType="LONGVARCHAR" property="title" /> 27 <result column="title" jdbcType="LONGVARCHAR" property="title" />
  28 + <result column="content_pc_url" jdbcType="LONGVARCHAR" property="content_pc_url" />
29 <result column="content_text" jdbcType="LONGVARCHAR" property="content_text" /> 29 <result column="content_text" jdbcType="LONGVARCHAR" property="content_text" />
30 </resultMap> 30 </resultMap>
31 </mapper> 31 </mapper>
32 \ No newline at end of file 32 \ No newline at end of file
src/main/resources/mapper/ShyLiveapplyMapper.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.ShyLiveapplyMapper">
  4 + <resultMap id="BaseResultMap" type="com.cnlive.shenhe.entity.ShyLiveapply">
  5 + <!--
  6 + WARNING - @mbg.generated
  7 + -->
  8 + <id column="id" jdbcType="INTEGER" property="id" />
  9 + <result column="activity_id" jdbcType="VARCHAR" property="activity_id" />
  10 + <result column="channel_id" jdbcType="VARCHAR" property="channel_id" />
  11 + <result column="sp_id" jdbcType="INTEGER" property="sp_id" />
  12 + <result column="sender" jdbcType="VARCHAR" property="sender" />
  13 + <result column="mobile" jdbcType="VARCHAR" property="mobile" />
  14 + <result column="organization" jdbcType="VARCHAR" property="organization" />
  15 + <result column="theme" jdbcType="VARCHAR" property="theme" />
  16 + <result column="preStartTime" jdbcType="TIMESTAMP" property="preStartTime" />
  17 + <result column="preEndTime" jdbcType="TIMESTAMP" property="preEndTime" />
  18 + <result column="businessModel" jdbcType="INTEGER" property="businessModel" />
  19 + <result column="contentProperty" jdbcType="INTEGER" property="contentProperty" />
  20 + <result column="keys" jdbcType="VARCHAR" property="keys" />
  21 + <result column="livePlace" jdbcType="VARCHAR" property="livePlace" />
  22 + <result column="pushUrl" jdbcType="VARCHAR" property="pushUrl" />
  23 + <result column="pullUrl" jdbcType="VARCHAR" property="pullUrl" />
  24 + <result column="platforms" jdbcType="VARCHAR" property="platforms" />
  25 + <result column="callback" jdbcType="VARCHAR" property="callback" />
  26 + <result column="shenhe_type" jdbcType="INTEGER" property="shenhe_type" />
  27 + <result column="receive" jdbcType="INTEGER" property="receive" />
  28 + <result column="shenhe_state" jdbcType="INTEGER" property="shenhe_state" />
  29 + <result column="updater" jdbcType="VARCHAR" property="updater" />
  30 + <result column="auditor" jdbcType="VARCHAR" property="auditor" />
  31 + <result column="shenhe_msg" jdbcType="VARCHAR" property="shenhe_msg" />
  32 + <result column="created_at" jdbcType="TIMESTAMP" property="created_at" />
  33 + <result column="updated_at" jdbcType="TIMESTAMP" property="updated_at" />
  34 + <result column="simpleContent" jdbcType="LONGVARCHAR" property="simpleContent" />
  35 + </resultMap>
  36 +</mapper>
0 \ No newline at end of file 37 \ No newline at end of file
src/main/resources/mapper/ShyUsersMapper.xml
@@ -15,6 +15,7 @@ @@ -15,6 +15,7 @@
15 <result column="company_brief" jdbcType="VARCHAR" property="company_brief" /> 15 <result column="company_brief" jdbcType="VARCHAR" property="company_brief" />
16 <result column="company_name" jdbcType="VARCHAR" property="company_name" /> 16 <result column="company_name" jdbcType="VARCHAR" property="company_name" />
17 <result column="state" jdbcType="BIT" property="state" /> 17 <result column="state" jdbcType="BIT" property="state" />
  18 + <result column="notice_show" jdbcType="VARCHAR" property="notice_show" />
18 <result column="created_at" jdbcType="TIMESTAMP" property="created_at" /> 19 <result column="created_at" jdbcType="TIMESTAMP" property="created_at" />
19 <result column="updated_at" jdbcType="TIMESTAMP" property="updated_at" /> 20 <result column="updated_at" jdbcType="TIMESTAMP" property="updated_at" />
20 <result column="tm" jdbcType="BIGINT" property="tm" /> 21 <result column="tm" jdbcType="BIGINT" property="tm" />
src/main/resources/static/js/notice.js 0 → 100644
  1 + var x0=0,y0=0,x1=0,y1=0;
  2 +// var offx=6,offy=6;
  3 + var moveable=false;//鼠标是否是按下状态
  4 +// var hover='orange',normal='slategray';//color;
  5 + var hover='slategray',normal='slategray';//color;
  6 + var index=10000;//z-index;
  7 +
  8 + //创建一个对象;
  9 + function xWin(id,tit,msg,url){
  10 +  index = index+2;
  11 + if(id==1){
  12 + isShow_chinnal=false;
  13 + }else if(id==2){
  14 + isShow_liveApply=false;
  15 + }
  16 +  this.id      = id;
  17 +  this.width   = 300;//主窗体宽度
  18 +  this.height  = 200;//主窗体高度
  19 +  this.right   = 0;//位置距右
  20 +  this.bottom  = 0;//位置距下
  21 +  this.zIndex  = index;
  22 +  this.title   = tit;//标题
  23 +  this.message = msg;//消息体
  24 +  this.url = url;//url
  25 +  this.obj     = null;
  26 +  this.bulid   = bulid;
  27 +  this.bulid();
  28 + }
  29 + //初始化;
  30 + function bulid(){
  31 +  var str = ""
  32 +   + "<div id=xMsg" + this.id + " "
  33 +   + "style='"
  34 +   + "z-index:" + this.zIndex + ";"
  35 +   + "width:" + this.width + "px;"
  36 +   + "height:" + this.height + "px;"
  37 +   + "right:" + this.right + ";"
  38 +   + "bottom:" + this.bottom + ";"
  39 +   + "background-color:white;"
  40 +   + "color:" + normal + ";"
  41 +   + "font-size:18px;"
  42 +   + "font-family:Verdana;"
  43 +   + "position:fixed;"
  44 +   + "cursor:default;"
  45 +   + "-webkit-user-select:none;"
  46 +   + "-moz-user-select:none;"
  47 +   + "-ms-user-select:none;"
  48 +   + "user-select:none;"
  49 +   + "border:2px solid " + normal + ";"
  50 +   + "' "
  51 +   + "οnmοusedοwn='getFocus(this)'"
  52 + +">"
  53 +// 标题开始
  54 +    + "<div "
  55 +    + "style='"
  56 +    + "background-color:" + normal + ";"
  57 +    + "width:" + (this.width-2*2) + "px;"
  58 +    + "height:28px;"
  59 +    + "color:white;"
  60 +    + "' "
  61 +    + "onmousedown='startDrag(this)' "
  62 +    + "onmouseup='stopDrag(this)' "
  63 +    + "onmousemove='drag(this)' "
  64 +    + "ondblclick='min(this.childNodes[1])'"
  65 +    + ">"
  66 +     + "<span style='width:" + (this.width-2*25-4) + "px;padding-left:3px; display:-moz-inline-box; display:inline-block;'>" + this.title + "</span>"
  67 +     + "<span style='width:25px;border-width:0px;color:white;font-family:webdings;display:-moz-inline-box; display:inline-block;' onclick='min(this)'>0</span>"
  68 +     + "<span style='width:25px;border-width:0px;color:white;font-family:webdings;display:-moz-inline-box; display:inline-block;' onclick='cls(this," + this.id + ")'>r</span>"
  69 +    + "</div>"
  70 +//     主窗体开始
  71 + + "<div style='"
  72 +     + "width:100%;"
  73 +     + "height:" + (this.height-28-4) + "px;"
  74 +     + "min-height:" + (this.height-28-4) + "px;"
  75 +     + "background-color:white;"
  76 +     + "word-break:break-all;"
  77 +     + "padding:3px;"
  78 +     + "'>"
  79 +// 主窗体的内容部分
  80 + + "<div style='"
  81 +     + "width:100%;"
  82 +     + "height:" + (this.height-28-4-50) + "px;"
  83 +     + "min-height:" + (this.height-28-4-50) + "px;"
  84 +     + "line-height:20px;"
  85 +     + "text-align: center;"
  86 +     + "word-break:break-all;"
  87 +     + "padding:3px;"
  88 +     + "padding-top: 40px;"
  89 + + "color:red;"
  90 +     + "'>"
  91 + + this.message
  92 + + "</div>"
  93 +// 主窗体的按钮部分(按钮1)
  94 + + "<div style='"
  95 +    + "width:60px;"
  96 +    + "height:30px;"
  97 +    + "color: #fff;"
  98 +    + "line-height: 30px;"
  99 +    + "text-align: center;"
  100 +    + "font-size: 15px;"
  101 +    + "float:left;"
  102 +    + "margin-left: 120px;"
  103 +   + "background-color:" + normal + ";"
  104 +   + "'"
  105 + +" type='button'"
  106 + +" onclick='cls(this," + this.id + ")'"
  107 + +">确定</div>"
  108 +// 主窗体的按钮部分(按钮2)
  109 + + "<div style='"
  110 +    + "width:60px;"
  111 +    + "height:30px;"
  112 +    + "color: #fff;"
  113 +    + "line-height: 30px;"
  114 +    + "text-align: center;"
  115 +    + "font-size: 15px;"
  116 +    + "float:right;"
  117 +    + "margin-right:20px;"
  118 +   + "background-color:" + normal + ";"
  119 +   + "'"
  120 + +" type='button'"
  121 + +" onclick=\"toLink('"+this.url+"'," + this.id + ")\""
  122 + +">查看</div>"
  123 + + "</div>"
  124 +   
  125 +  
  126 + + "</div>";
  127 +  document.body.insertAdjacentHTML("beforeEnd",str);
  128 + }
  129 +
  130 + //开始拖动;
  131 + function startDrag(obj){
  132 +  if(event.button==0){
  133 +   //锁定标题栏;
  134 +//   obj.setCapture();
  135 +   //定义对象;
  136 +   var win = obj.parentNode;
  137 +//   var sha = win.nextSibling;
  138 +   //记录鼠标和层位置;
  139 +   x0 = event.clientX;
  140 +   y0 = event.clientY;
  141 +   x1 = parseInt(win.style.right.replace("px",""));
  142 +   y1 = parseInt(win.style.bottom.replace("px",""));
  143 +   //记录颜色;
  144 +   normal = obj.style.backgroundColor;
  145 +   //改变风格;
  146 +   obj.style.backgroundColor = hover;
  147 +   win.style.borderColor = hover;
  148 +   obj.nextSibling.style.color = hover;
  149 +//   sha.style.right = (x1 - offx)+"px";
  150 +//   sha.style.bottom  = (y1 - offy)+"px";
  151 +   moveable = true;
  152 +  }
  153 + }
  154 + //拖动;
  155 + function drag(obj){
  156 +  if(moveable){
  157 +   var win = obj.parentNode;
  158 +//   var sha = win.nextSibling;
  159 +   win.style.right = ( x1+x0-event.clientX)+"px";
  160 +   win.style.bottom  = ( y1+y0-event.clientY)+"px";
  161 +//   sha.style.right = (parseInt(win.style.right.replace("px","")) - offx)+"px";
  162 +//   sha.style.bottom  = (parseInt(win.style.bottom.replace("px","")) - offy)+"px";
  163 +  }
  164 + }
  165 + //停止拖动;
  166 + function stopDrag(obj){
  167 +  if(moveable){
  168 +   var win = obj.parentNode;
  169 +//   var sha = win.nextSibling;
  170 +   var msg = obj.nextSibling;
  171 +   win.style.borderColor     = normal;
  172 +   obj.style.backgroundColor = normal;
  173 +   msg.style.color           = normal;
  174 +//   sha.style.right = obj.parentNode.style.right;
  175 +//   sha.style.bottom  = obj.parentNode.style.bottom;
  176 +//   obj.releaseCapture();
  177 +   moveable = false;
  178 +  }
  179 + }
  180 + //获得焦点;
  181 + function getFocus(obj)
  182 + {
  183 +  if(obj.style.zIndex!=index)
  184 +  {
  185 +   index = index + 2;
  186 +   var idx = index;
  187 +   obj.style.zIndex=idx;
  188 +   obj.nextSibling.style.zIndex=idx-1;
  189 +  }
  190 + }
  191 + //最小化;
  192 + function min(obj){
  193 +  var win = obj.parentNode.parentNode;
  194 +//  var sha = win.nextSibling;
  195 +  var tit = obj.parentNode;
  196 +  var msg = tit.nextSibling;
  197 +  var flg = msg.style.display=="none";
  198 +  if(flg)
  199 +  {
  200 +   win.style.height  = (parseInt(msg.style.height.replace("px","")) + parseInt(tit.style.height.replace("px","")) + 2*2)+"px";
  201 +//   sha.style.height  = win.style.height;
  202 +   msg.style.display = "block";
  203 +   obj.innerHTML = "0";
  204 +  }
  205 +  else
  206 +  {
  207 +   win.style.height  = (parseInt(tit.style.height.replace("px","")) + 2*2)+"px";
  208 +//   sha.style.height  = win.style.height;
  209 +   obj.innerHTML = "2";
  210 +   msg.style.display = "none";
  211 +  }
  212 + }
  213 + //关闭;
  214 + function cls(obj,id){
  215 +  var win = obj.parentNode.parentNode;
  216 +//  var sha = win.nextSibling;
  217 +  win.style.visibility = "hidden";
  218 +//  sha.style.visibility = "hidden";
  219 + if(id==1){
  220 + isShow_chinnal=true;
  221 + }else if(id==2){
  222 + isShow_liveApply=true;
  223 + }
  224 + }
  225 + //点击查看跳转链接
  226 + function toLink(url,id){
  227 + if(id==1){
  228 + isShow_chinnal=true;
  229 + }else if(id==2){
  230 + isShow_liveApply=true;
  231 + } window.location.href= url;
  232 +// window.location.href= window.location.protocol+"//"+window.location.host+"/channel/page?shenhe_status=0&receive=0";
  233 + }
0 \ No newline at end of file 234 \ No newline at end of file
src/main/resources/templates/common/frame.html
@@ -48,7 +48,7 @@ line-height: 2em; margin: 0 auto;font-size: 2em&quot; th:text=&quot;${session.sessionUser. @@ -48,7 +48,7 @@ line-height: 2em; margin: 0 auto;font-size: 2em&quot; th:text=&quot;${session.sessionUser.
48 </p> 48 </p>
49 </li> 49 </li>
50 <li class="user-footer" > 50 <li class="user-footer" >
51 - <div class="pull-left" th:if="${session.sessionUser.spid==0 or session.sessionUser.master}"> 51 + <div class="pull-left" th:if="${session.sessionUser.spid==0 }">
52 <a style="background:#3c8dbc" href="http://console.open.cnlive.com/open/console/user/info" target="black" class="btn btn-default btn-flat">账号管理</a> 52 <a style="background:#3c8dbc" href="http://console.open.cnlive.com/open/console/user/info" target="black" class="btn btn-default btn-flat">账号管理</a>
53 </div> 53 </div>
54 <div class="pull-right"> 54 <div class="pull-right">
src/main/resources/templates/common/head.html
@@ -81,8 +81,69 @@ @@ -81,8 +81,69 @@
81 <script src="../../static/js/app.js"></script> 81 <script src="../../static/js/app.js"></script>
82 82
83 <!-- 最新的 Bootstrap 核心 JavaScript 文件 --> 83 <!-- 最新的 Bootstrap 核心 JavaScript 文件 -->
84 - <script src="https://cdn.bootcss.com/bootstrap/3.3.7/js/bootstrap.min.js"  
85 - integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa"  
86 - crossorigin="anonymous"></script> 84 +<!-- <script src="https://cdn.bootcss.com/bootstrap/3.3.7/js/bootstrap.min.js" -->
  85 +<!-- integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" -->
  86 +<!-- crossorigin="anonymous"></script> -->
  87 +
  88 + <!--添加Dialog 的js-->
  89 +<!-- <script type="text/javascript" src="http://resweb.cnliveimg.com/system/dialog/zDrag.js"></script> -->
  90 +<!-- <script type="text/javascript" src="http://resweb.cnliveimg.com/system/dialog/zDialog.js"></script> -->
  91 +<!-- <link href="../../static/css/dialog.css" rel="stylesheet"> -->
  92 +
  93 +<!-- 右下角弹窗js -->
  94 + <script src="../../static/js/notice.js"></script>
  95 +
  96 + <script language='JScript'>
  97 +
  98 + var isShow_chinnal=false;//是否显示频道消息框
  99 + var isShow_liveApply=false;//是否显示直播申请消息框
  100 +
  101 + function initialize(){
  102 + $.ajax({
  103 + type:'post',
  104 + dataType:'json',
  105 + data:'',
  106 + url: "/users/getNoticeShow",
  107 + success:function(data){
  108 + if(data.isShow_chinnal){
  109 + isShow_chinnal=true;
  110 + notice_channel();//第一次进来就弹窗
  111 + }
  112 + if(data.isShow_liveApply){
  113 + isShow_liveApply=true;
  114 + }
  115 + }
  116 + });
  117 + }
  118 +
  119 + var t1;
  120 + $(function(){
  121 + initialize();
  122 + t1 = window.setInterval(
  123 + function(){
  124 + if(((parseInt(new Date().getTime()/1000))%(5*60)==0) && isShow_chinnal){
  125 + notice_channel()
  126 + }
  127 + },1000);
  128 + });
  129 +
  130 + function notice_channel(){
  131 + $.ajax({
  132 + type:'get',
  133 + dataType:'json',
  134 + data:'',
  135 + url: "/api/channel/channelNotice",
  136 + success:function(data){
  137 + if(data!=null && data!="" ){
  138 + new xWin(data.id,data.title,data.content,data.url);
  139 + }
  140 + }
  141 + });
  142 + }
  143 +
  144 +//去掉定时器的方法
  145 +//window.clearInterval(t1);
  146 +
  147 +</script>
87 </head> 148 </head>
88 </html> 149 </html>
89 \ No newline at end of file 150 \ No newline at end of file
src/main/resources/templates/page/content.html
@@ -13,7 +13,7 @@ @@ -13,7 +13,7 @@
13 <h1> 13 <h1>
14 图文审核 14 图文审核
15 </h1> 15 </h1>
16 - <div th:text="${T(com.cnlive.shenhe.controller.VideosController).ceshi('')}">JAN</div> 16 +<!-- <div th:text="${T(com.cnlive.shenhe.controller.VideosController).ceshi('')}">JAN</div> -->
17 <ol class="breadcrumb"> 17 <ol class="breadcrumb">
18 <li>首页</li> 18 <li>首页</li>
19 <li class="active">图文审核</li> 19 <li class="active">图文审核</li>
src/main/resources/templates/page/users.html
@@ -160,7 +160,7 @@ @@ -160,7 +160,7 @@
160 <td style="text-align: center; width: 12%;" th:text="${#dates.format(users.created_at, 'yyyy-MM-dd HH:mm:ss')}">2018-11-22 23:08:48</td> 160 <td style="text-align: center; width: 12%;" th:text="${#dates.format(users.created_at, 'yyyy-MM-dd HH:mm:ss')}">2018-11-22 23:08:48</td>
161 <td style="text-align: center; width: 12%;" th:text="${#dates.format(users.updated_at, 'yyyy-MM-dd HH:mm:ss')}">2016-08-03 14:27:17</td> 161 <td style="text-align: center; width: 12%;" th:text="${#dates.format(users.updated_at, 'yyyy-MM-dd HH:mm:ss')}">2016-08-03 14:27:17</td>
162 <td style="text-align: center; width: 10%;"><span>&nbsp;</span><a 162 <td style="text-align: center; width: 10%;"><span>&nbsp;</span><a
163 - class="edit" th:href="'javascript:edit('+${users.id}+',\''+${users.company_brief}+'\',\''+${users.state} +'\')'"> 163 + class="edit" th:href="'javascript:edit('+${users.id}+',\''+${users.company_brief}+'\',\''+${users.notice_show} +'\')'">
164 <button class="btn btn-primary btn-xs">设置</button> 164 <button class="btn btn-primary btn-xs">设置</button>
165 </a><span> </span><span>&nbsp;</span></td> 165 </a><span> </span><span>&nbsp;</span></td>
166 </tr> 166 </tr>
@@ -244,14 +244,14 @@ @@ -244,14 +244,14 @@
244 </div> 244 </div>
245 245
246 <div class="form-group"> 246 <div class="form-group">
247 - <label class="control-label col-sm-2" style="font-size: 15px;">:</label> 247 + <label class="control-label col-sm-2" style="font-size: 15px;">提醒业务:</label>
248 <form action="/users/write" method="post" id="editWrite"> 248 <form action="/users/write" method="post" id="editWrite">
249 - <input type="text" name="siteId" value="" class="hide" id="edit_id"/> 249 + <input type="text" name="userId" value="" class="hide" id="edit_id"/>
250 <input type="text" name="redirect_url" value="" class="hide" id="redirect_url"/> 250 <input type="text" name="redirect_url" value="" class="hide" id="redirect_url"/>
251 <div class="col-sm-10" style="float: left"> 251 <div class="col-sm-10" style="float: left">
252 - <div th:each="bu:${business}" style="padding-right: 30px;" class="write_check"> 252 + <div th:each="bu:${notice}" style="padding-right: 30px;" class="write_check">
253 <span th:text="${bu.value}" style="font-size: 15px"></span> 253 <span th:text="${bu.value}" style="font-size: 15px"></span>
254 - <input type="checkbox" name="write_business" th:value="${bu.key}" th:id="'write_check_'+${bu.key}"> 254 + <input type="checkbox" name="write_notice" th:value="${bu.key}" th:id="'write_check_'+${bu.key}">
255 </div> 255 </div>
256 </div> 256 </div>
257 </form> 257 </form>
@@ -260,7 +260,7 @@ @@ -260,7 +260,7 @@
260 </div> 260 </div>
261 <div class="modal-footer"> 261 <div class="modal-footer">
262 <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button> 262 <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
263 -<!-- <button type="button" class="btn btn-primary" onclick="javascript:$('#editWrite').submit();">提交更改</button> --> 263 + <button type="button" class="btn btn-primary" onclick="javascript:$('#editWrite').submit();">提交更改</button>
264 </div> 264 </div>
265 </div><!-- /.modal-content --> 265 </div><!-- /.modal-content -->
266 </div><!-- /.modal-dialog --> 266 </div><!-- /.modal-dialog -->
@@ -268,13 +268,13 @@ @@ -268,13 +268,13 @@
268 <!-- /.modal --> 268 <!-- /.modal -->
269 <script> 269 <script>
270 //打开编辑窗口 270 //打开编辑窗口
271 - function edit(id,company,write_business){ 271 + function edit(id,company,notice_show){
272 $("#edit_company").text(company); 272 $("#edit_company").text(company);
273 $("#edit_id").val(id); 273 $("#edit_id").val(id);
274 $("#redirect_url").val(location.pathname+location.search); 274 $("#redirect_url").val(location.pathname+location.search);
275 $(".write_check input").prop("checked",false); 275 $(".write_check input").prop("checked",false);
276 - if($.trim(write_business)!=''){  
277 - var array = write_business.split(",") 276 + if($.trim(notice_show)!=''){
  277 + var array = notice_show.split(",")
278 for (var i=0;i<array.length;i++){ 278 for (var i=0;i<array.length;i++){
279 $("#write_check_"+array[i]).prop("checked",true); 279 $("#write_check_"+array[i]).prop("checked",true);
280 } 280 }
@@ -337,6 +337,12 @@ @@ -337,6 +337,12 @@
337 var pageSize = $("#pageSize").val(); 337 var pageSize = $("#pageSize").val();
338 window.location.href = "/users/page?company_brief=" + company_brief + "&username=" + username+ "&sp_id=" + sp_id+ "&mobile=" + mobile+ "&pageSize=" + pageSize; 338 window.location.href = "/users/page?company_brief=" + company_brief + "&username=" + username+ "&sp_id=" + sp_id+ "&mobile=" + mobile+ "&pageSize=" + pageSize;
339 }); 339 });
  340 + //鼠标回车事件
  341 + $(document).keyup(function(event){
  342 + if(event.keyCode ==13){
  343 + $("#users_query").trigger("click");
  344 + }
  345 + });
340 346
341 </script> 347 </script>
342 348
src/main/resources/templates/page/usersFree.html
@@ -408,6 +408,12 @@ input:checked + .slider:before { @@ -408,6 +408,12 @@ input:checked + .slider:before {
408 window.location.href = "/usersFree/page?userId=" + userId + "&mobile=" + mobile+ "&pageSize=" + pageSize; 408 window.location.href = "/usersFree/page?userId=" + userId + "&mobile=" + mobile+ "&pageSize=" + pageSize;
409 }); 409 });
410 410
  411 + //鼠标回车事件
  412 + $(document).keyup(function(event){
  413 + if(event.keyCode ==13){
  414 + $("#users_query").trigger("click");
  415 + }
  416 + });
411 </script> 417 </script>
412 418
413 <footer th:replace="../templates/common/foot::foot" ></footer> 419 <footer th:replace="../templates/common/foot::foot" ></footer>