Commit 8f62499fc1757e1a65e896213b419888e48ead39

Authored by 王言钊
1 parent 90ec071e

开发用户白名单、用户管理service接口并优化

Showing 25 changed files with 262 additions and 140 deletions
src/main/java/com/cnlive/shenhe/controller/AudioController.java
... ... @@ -11,7 +11,7 @@ import com.cnlive.shenhe.entity.ShySites;
11 11 import com.cnlive.shenhe.entity.ShyUsers;
12 12 import com.cnlive.shenhe.service.AudioService;
13 13 import com.cnlive.shenhe.service.SitesService;
14   -import com.cnlive.shenhe.service.serviceImpl.UsersServiceImpl;
  14 +import com.cnlive.shenhe.service.UsersService;
15 15 import com.cnlive.shenhe.utils.AuditPass;
16 16 import com.cnlive.shenhe.utils.CommonConst;
17 17 import com.cnlive.shenhe.utils.CommonUtils;
... ... @@ -54,7 +54,7 @@ public class AudioController extends BaseController {
54 54 AudioService audioService;
55 55  
56 56 @Autowired
57   - UsersServiceImpl usersService;
  57 + UsersService usersService;
58 58  
59 59 @Value("${qn_domain}")
60 60 String qn_domain;
... ... @@ -427,20 +427,20 @@ public class AudioController extends BaseController {
427 427 /**
428 428 * 审核结果更新并通知点播音频
429 429 *
430   - * @param activityId 音频id(audioId)
  430 + * @param activity_id 音频id(audioId)
431 431 * @param state 状态码
432   - * @param attrTags 常用审核意见(标签)
  432 + * @param attr_tags 常用审核意见(标签)
433 433 * @param msg 审核备注
434 434 * @return
435 435 */
436 436 @PostMapping("/shenheAudio")
437 437 @ResponseBody
438   - public ResponseBean shenheInfo(Integer id, String activityId, Integer state, String attrTags, String msg, String callback, HttpSession session) {
  438 + public ResponseBean shenheInfo(Integer id, String activity_id, Integer state, String attr_tags, String msg, String callback, HttpSession session) {
439 439 SessionUser sessionUser = (SessionUser) session.getAttribute(SessionUser.getSessionKey());
440 440 String userId = sessionUser.getUserId();
441 441 JSONObject result;
442 442 try {
443   - result = pass.audioPass(activityId, state, attrTags, msg, callback);
  443 + result = pass.audioPass(activity_id, state, attr_tags, msg, callback);
444 444 } catch (Exception e) {
445 445 e.printStackTrace();
446 446 System.out.println("音频审核失败");
... ... @@ -456,7 +456,7 @@ public class AudioController extends BaseController {
456 456 return new ResponseBean(code, result.getString("msg"));
457 457 }
458 458 state = state == 4 ? 2 : 1;
459   - int i = audioService.updateAudio(id, userId, null, attrTags, state, msg);
  459 + int i = audioService.updateAudio(id, userId, null, attr_tags, state, msg);
460 460 if (i == 0) {
461 461 return new ResponseBean(ErrorEnum.ERROR);
462 462 }
... ...
src/main/java/com/cnlive/shenhe/controller/ChannelController.java
... ... @@ -11,7 +11,7 @@ import com.cnlive.shenhe.entity.ShySites;
11 11 import com.cnlive.shenhe.entity.ShyUsers;
12 12 import com.cnlive.shenhe.service.ChannelService;
13 13 import com.cnlive.shenhe.service.SitesService;
14   -import com.cnlive.shenhe.service.serviceImpl.UsersServiceImpl;
  14 +import com.cnlive.shenhe.service.UsersService;
15 15 import com.cnlive.shenhe.utils.AuditPass;
16 16 import com.cnlive.shenhe.utils.CommonConst;
17 17 import com.cnlive.shenhe.utils.CommonUtils;
... ... @@ -45,7 +45,7 @@ public class ChannelController extends BaseController {
45 45 ChannelService channelService;
46 46  
47 47 @Autowired
48   - UsersServiceImpl usersService;
  48 + UsersService usersService;
49 49  
50 50 @Autowired
51 51 SitesService sitesService;
... ...
src/main/java/com/cnlive/shenhe/controller/CommentsController.java
... ... @@ -13,7 +13,7 @@ import com.cnlive.shenhe.entity.ShyUsers;
13 13 import com.cnlive.shenhe.service.CommentsService;
14 14 import com.cnlive.shenhe.service.ContentService;
15 15 import com.cnlive.shenhe.service.SitesService;
16   -import com.cnlive.shenhe.service.serviceImpl.UsersServiceImpl;
  16 +import com.cnlive.shenhe.service.UsersService;
17 17 import com.cnlive.shenhe.utils.AuditPass;
18 18 import com.cnlive.shenhe.utils.CommonConst;
19 19 import com.cnlive.shenhe.utils.CommonUtils;
... ... @@ -46,7 +46,7 @@ public class CommentsController extends BaseController {
46 46 CommentsService commentsService;
47 47  
48 48 @Autowired
49   - UsersServiceImpl usersService;
  49 + UsersService usersService;
50 50  
51 51 @Autowired
52 52 SitesService sitesService;
... ...
src/main/java/com/cnlive/shenhe/controller/ContentController.java
... ... @@ -10,7 +10,7 @@ import com.cnlive.shenhe.entity.ShySites;
10 10 import com.cnlive.shenhe.entity.ShyUsers;
11 11 import com.cnlive.shenhe.service.ContentService;
12 12 import com.cnlive.shenhe.service.SitesService;
13   -import com.cnlive.shenhe.service.serviceImpl.UsersServiceImpl;
  13 +import com.cnlive.shenhe.service.UsersService;
14 14 import com.cnlive.shenhe.utils.CommonConst;
15 15 import com.cnlive.shenhe.utils.CommonUtils;
16 16 import com.github.pagehelper.PageInfo;
... ... @@ -45,7 +45,7 @@ public class ContentController extends BaseController {
45 45 SitesService sitesService;
46 46  
47 47 @Autowired
48   - UsersServiceImpl usersService;
  48 + UsersService usersService;
49 49  
50 50 /**
51 51 * 图文列表
... ...
src/main/java/com/cnlive/shenhe/controller/EmailController.java
... ... @@ -9,7 +9,7 @@ import com.cnlive.shenhe.dto.EmailDTO;
9 9 import com.cnlive.shenhe.entity.ShyEmail;
10 10 import com.cnlive.shenhe.entity.ShyUsers;
11 11 import com.cnlive.shenhe.service.EmailService;
12   -import com.cnlive.shenhe.service.serviceImpl.UsersServiceImpl;
  12 +import com.cnlive.shenhe.service.UsersService;
13 13 import com.cnlive.shenhe.utils.CommonConst;
14 14 import com.cnlive.shenhe.utils.CommonUtils;
15 15 import com.github.pagehelper.PageInfo;
... ... @@ -39,7 +39,7 @@ public class EmailController extends BaseController {
39 39 @Autowired
40 40 EmailService emailService;
41 41 @Autowired
42   - UsersServiceImpl usersService;
  42 + UsersService usersService;
43 43  
44 44 /**
45 45 * 展示分页 条件查询结果
... ... @@ -69,8 +69,7 @@ public class EmailController extends BaseController {
69 69 user = usersService.select(user);
70 70 if (CommonUtils.isNotNull(user)) {
71 71 String emailAdd = CommonUtils.isEmpty(user.getEmail()) || "null".equals(user.getEmail()) ? "" : user.getEmail();
72   - String userName = CommonUtils.isEmpty(user.getUsername()) ? emailAdd : user.getUsername();
73   - updater = userName;
  72 + updater = CommonUtils.isEmpty(user.getUsername()) ? emailAdd : user.getUsername();
74 73 }
75 74 }
76 75 shyEmail.setUpdater(updater);
... ... @@ -106,7 +105,7 @@ public class EmailController extends BaseController {
106 105 SessionUser sessionUser = (SessionUser) session.getAttribute(SessionUser.getSessionKey());
107 106 Integer n = emailService.updateState(id, isEnable, sessionUser.getUserId());
108 107 if (n > 0) {
109   - return new ResponseBean(ErrorEnum.SUCCESS.getErrorCode(), "当前用户" + (isEnable == true ? "启用" : "禁用") + "成功");
  108 + return new ResponseBean(ErrorEnum.SUCCESS.getErrorCode(), "当前用户" + (isEnable ? "启用" : "禁用") + "成功");
110 109 }
111 110 return new ResponseBean(ErrorEnum.ERROR.getErrorCode(), "操作失败,请重试");
112 111 }
... ... @@ -148,14 +147,14 @@ public class EmailController extends BaseController {
148 147 return "error.html";
149 148 }
150 149 SessionUser sessionUser = (SessionUser) session.getAttribute(SessionUser.getSessionKey());
151   - String write = "";
  150 + StringBuilder write = new StringBuilder();
152 151 if (CommonUtils.isNotNull(write_business) && write_business.length > 0) {
153 152 for (String w : write_business) {
154   - write = write + "," + w;
  153 + write.append(",").append(w);
155 154 }
156   - write = write.substring(1);
  155 + write = new StringBuilder(write.substring(1));
157 156 }
158   - boolean success = emailService.update(id, email, remark, write, sessionUser.getUserId());
  157 + boolean success = emailService.update(id, email, remark, write.toString(), sessionUser.getUserId());
159 158 if (success) {
160 159 return "redirect:" + redirect_url;
161 160 } else {
... ...
src/main/java/com/cnlive/shenhe/controller/LiveApplyController.java
... ... @@ -12,7 +12,7 @@ import com.cnlive.shenhe.entity.ShyUsers;
12 12 import com.cnlive.shenhe.service.LiveApplyService;
13 13 import com.cnlive.shenhe.service.LiveService;
14 14 import com.cnlive.shenhe.service.SitesService;
15   -import com.cnlive.shenhe.service.serviceImpl.UsersServiceImpl;
  15 +import com.cnlive.shenhe.service.UsersService;
16 16 import com.cnlive.shenhe.utils.AuditPass;
17 17 import com.cnlive.shenhe.utils.CommonConst;
18 18 import com.cnlive.shenhe.utils.CommonUtils;
... ... @@ -50,7 +50,7 @@ public class LiveApplyController extends BaseController {
50 50 @Autowired
51 51 AuditPass pass;
52 52 @Autowired
53   - UsersServiceImpl usersService;
  53 + UsersService usersService;
54 54 @Autowired
55 55 SitesService sitesService;
56 56 @Autowired
... ... @@ -268,7 +268,7 @@ public class LiveApplyController extends BaseController {
268 268 String showMsg = "";
269 269 for (String shyLiveId : shyLiveIds) {
270 270 ShyLiveapply shyLiveapply = liveApplyService.selectByPrimaryKey(Integer.parseInt(shyLiveId));
271   - JSONObject result = null;
  271 + JSONObject result;
272 272 try {
273 273 result = pass.liveApplyPass(shyLiveapply.getActivity_id(), 4, msg, msg, shyLiveapply.getCallback());
274 274 } catch (Exception e) {
... ...
src/main/java/com/cnlive/shenhe/controller/LiveController.java
... ... @@ -11,7 +11,7 @@ import com.cnlive.shenhe.entity.ShySites;
11 11 import com.cnlive.shenhe.entity.ShyUsers;
12 12 import com.cnlive.shenhe.service.LiveService;
13 13 import com.cnlive.shenhe.service.SitesService;
14   -import com.cnlive.shenhe.service.serviceImpl.UsersServiceImpl;
  14 +import com.cnlive.shenhe.service.UsersService;
15 15 import com.cnlive.shenhe.service.serviceImpl.VideosServiceImpl;
16 16 import com.cnlive.shenhe.utils.AuditPass;
17 17 import com.cnlive.shenhe.utils.CommonConst;
... ... @@ -53,7 +53,7 @@ public class LiveController extends BaseController {
53 53 @Autowired
54 54 VideosServiceImpl videosService;
55 55 @Autowired
56   - UsersServiceImpl usersService;
  56 + UsersService usersService;
57 57 @Autowired
58 58 SitesService sitesService;
59 59 @Autowired
... ... @@ -71,20 +71,20 @@ public class LiveController extends BaseController {
71 71 /**
72 72 * 审核信息返回接口
73 73 *
74   - * @param activityId 视频id
  74 + * @param activity_id 视频id
75 75 * @param state 状态码
76   - * @param attrTags 标签
  76 + * @param attr_tags 标签
77 77 * @param msg 备注信息
78 78 * @return
79 79 */
80 80 @PostMapping("/shenheVideo")
81 81 @ResponseBody
82   - public ResponseBean shenheInfo(Integer id, String activityId, Integer state, String attrTags, String msg, String callback, HttpSession session) {
  82 + public ResponseBean shenheInfo(Integer id, String activity_id, Integer state, String attr_tags, String msg, String callback, HttpSession session) {
83 83 SessionUser sessionUser = (SessionUser) session.getAttribute(SessionUser.getSessionKey());
84 84 String userId = sessionUser.getUserId();
85   - JSONObject result = null;
  85 + JSONObject result;
86 86 try {
87   - result = pass.auditPass(activityId, state, attrTags, msg, callback);
  87 + result = pass.auditPass(activity_id, state, attr_tags, msg, callback);
88 88 } catch (Exception e) {
89 89 e.printStackTrace();
90 90 System.out.println("视频审核失败");
... ... @@ -100,7 +100,7 @@ public class LiveController extends BaseController {
100 100 return new ResponseBean(code, result.getString("msg"));
101 101 }
102 102 state = state == 4 ? 2 : 1;
103   - int i = videosService.updateVideo(id, userId, null, attrTags, state, msg);
  103 + int i = videosService.updateVideo(id, userId, null, attr_tags, state, msg);
104 104 if (i == 0) {
105 105 return new ResponseBean(ErrorEnum.ERROR);
106 106 }
... ... @@ -540,6 +540,4 @@ public class LiveController extends BaseController {
540 540 }
541 541 }
542 542 }
543   -
544   -
545 543 }
... ...
src/main/java/com/cnlive/shenhe/controller/NotSpeakController.java
... ... @@ -10,7 +10,7 @@ import com.cnlive.shenhe.entity.ShySites;
10 10 import com.cnlive.shenhe.entity.ShyUsers;
11 11 import com.cnlive.shenhe.service.NotspeakService;
12 12 import com.cnlive.shenhe.service.SitesService;
13   -import com.cnlive.shenhe.service.serviceImpl.UsersServiceImpl;
  13 +import com.cnlive.shenhe.service.UsersService;
14 14 import com.cnlive.shenhe.utils.CommonUtils;
15 15 import com.github.pagehelper.PageInfo;
16 16 import org.slf4j.Logger;
... ... @@ -37,7 +37,7 @@ public class NotSpeakController extends BaseController {
37 37 @Autowired
38 38 NotspeakService notSpeakService;
39 39 @Autowired
40   - UsersServiceImpl usersService;
  40 + UsersService usersService;
41 41 @Autowired
42 42 SitesService sitesService;
43 43  
... ...
src/main/java/com/cnlive/shenhe/controller/SitesController.java
... ... @@ -65,15 +65,15 @@ public class SitesController extends BaseController {
65 65 if (!list.isEmpty()) {
66 66 for (ShySites site : list) {
67 67  
68   - String writeBusinessName = site.getWrite_business();
69   - if (CommonUtils.isNotEmpty(writeBusinessName)) {
  68 + String write_businessName = site.getWrite_business();
  69 + if (CommonUtils.isNotEmpty(write_businessName)) {
70 70 for (String bkey : business.keySet()) {
71   - writeBusinessName = writeBusinessName.replace(bkey, business.getString(bkey));
  71 + write_businessName = write_businessName.replace(bkey, business.getString(bkey));
72 72 }
73 73 } else {
74   - writeBusinessName = "无";
  74 + write_businessName = "无";
75 75 }
76   - site.setWrite_business_name(writeBusinessName);
  76 + site.setWrite_business_name(write_businessName);
77 77 }
78 78 }
79 79 model.addAttribute("sitePage", sitePage);
... ... @@ -84,15 +84,15 @@ public class SitesController extends BaseController {
84 84  
85 85  
86 86 @PostMapping(value = "/write")
87   - public String write(Model model, Integer siteId, String[] writeBusiness, HttpSession session, String redirectUrl) {
  87 + public String write(Model model, Integer siteId, String[] write_business, HttpSession session, String redirect_url) {
88 88 ShySites site = sitesService.get(siteId);
89 89 SessionUser sessionUser = (SessionUser) session.getAttribute(SessionUser.getSessionKey());
90 90 if (CommonUtils.isNull(sessionUser)) {
91 91 return "redirect:/users/login";
92 92 }
93 93 StringBuilder write = new StringBuilder();
94   - if (CommonUtils.isNotNull(writeBusiness) && writeBusiness.length > 0) {
95   - for (String w : writeBusiness) {
  94 + if (CommonUtils.isNotNull(write_business) && write_business.length > 0) {
  95 + for (String w : write_business) {
96 96 write.append(",").append(w);
97 97 }
98 98 write = new StringBuilder(write.substring(1));
... ... @@ -100,7 +100,7 @@ public class SitesController extends BaseController {
100 100 site.setWrite_business(write.toString());
101 101 boolean success = sitesService.update(site);
102 102 if (success) {
103   - return "redirect:" + redirectUrl;
  103 + return "redirect:" + redirect_url;
104 104 } else {
105 105 setmodelResult(model);
106 106 return "error.html";
... ...
src/main/java/com/cnlive/shenhe/controller/UsersController.java
... ... @@ -9,7 +9,7 @@ import com.cnlive.shenhe.entity.ShySites;
9 9 import com.cnlive.shenhe.entity.ShyUsers;
10 10 import com.cnlive.shenhe.service.ShyLogService;
11 11 import com.cnlive.shenhe.service.SitesService;
12   -import com.cnlive.shenhe.service.serviceImpl.UsersServiceImpl;
  12 +import com.cnlive.shenhe.service.UsersService;
13 13 import com.cnlive.shenhe.utils.CommonConst;
14 14 import com.cnlive.shenhe.utils.CommonUtils;
15 15 import com.github.pagehelper.PageInfo;
... ... @@ -40,7 +40,7 @@ public class UsersController extends BaseController {
40 40 private static Logger logger = LoggerFactory.getLogger(UsersController.class);
41 41  
42 42 @Autowired
43   - private UsersServiceImpl usersService;
  43 + private UsersService usersService;
44 44 @Autowired
45 45 private SitesService sitesService;
46 46 @Autowired
... ... @@ -62,7 +62,7 @@ public class UsersController extends BaseController {
62 62 * 本机的名称
63 63 */
64 64 @Value("${spring.localhost.url}")
65   - private String redirectURL;
  65 + private String redirect_url;
66 66  
67 67 @Value("${CAS_SERVER_LOGIN_URL}")
68 68 private String CAS_SERVER_LOGIN_URL;
... ... @@ -111,7 +111,7 @@ public class UsersController extends BaseController {
111 111 shyLog.setOperationType("登录");
112 112 shyLog.setRemark(user.getUsername() + "--" + "登录");
113 113 shyLogService.addShyLog(shyLog);
114   - return "redirect:" + redirectURL + "/videos/page?video_title=&start_date=&end_date=&state=0&receive=0&video_priority=";
  114 + return "redirect:" + redirect_url + "/videos/page?video_title=&start_date=&end_date=&state=0&receive=0&video_priority=";
115 115 }
116 116 }
117 117  
... ... @@ -221,12 +221,12 @@ public class UsersController extends BaseController {
221 221  
222 222  
223 223 @PostMapping(value = "/users/write")
224   - public String write(Model model, Integer userId, String[] writeNotice, HttpSession session, String redirectUrl) {
  224 + public String write(Model model, Integer userId, String[] write_notice, HttpSession session, String redirect_url) {
225 225 SessionUser sessionUser = (SessionUser) session.getAttribute(SessionUser.getSessionKey());
226 226 ShyUsers user = usersService.get(userId);
227 227 StringBuilder write = new StringBuilder();
228   - if (CommonUtils.isNotNull(writeNotice) && writeNotice.length > 0) {
229   - for (String w : writeNotice) {
  228 + if (CommonUtils.isNotNull(write_notice) && write_notice.length > 0) {
  229 + for (String w : write_notice) {
230 230 write.append(",").append(w);
231 231 }
232 232 write = new StringBuilder(write.substring(1));
... ... @@ -234,7 +234,7 @@ public class UsersController extends BaseController {
234 234 user.setNotice_show(write.toString());
235 235 boolean success = usersService.update(user);
236 236 if (success) {
237   - return "redirect:" + redirectUrl;
  237 + return "redirect:" + redirect_url;
238 238 } else {
239 239 setmodelResult(model);
240 240 return "error.html";
... ...
src/main/java/com/cnlive/shenhe/controller/UsersFreeController.java
... ... @@ -9,7 +9,7 @@ import com.cnlive.shenhe.dto.UsersFreeDTO;
9 9 import com.cnlive.shenhe.entity.ShySites;
10 10 import com.cnlive.shenhe.entity.ShyUsersfree;
11 11 import com.cnlive.shenhe.service.SitesService;
12   -import com.cnlive.shenhe.service.serviceImpl.UsersfreeServiceImpl;
  12 +import com.cnlive.shenhe.service.UsersfreeService;
13 13 import com.cnlive.shenhe.utils.CommonConst;
14 14 import com.cnlive.shenhe.utils.CommonUtils;
15 15 import com.github.pagehelper.PageInfo;
... ... @@ -39,7 +39,7 @@ public class UsersFreeController extends BaseController {
39 39 private static Logger logger = LoggerFactory.getLogger(UsersFreeController.class);
40 40  
41 41 @Autowired
42   - UsersfreeServiceImpl usersfreeService;
  42 + UsersfreeService usersfreeService;
43 43 @Autowired
44 44 SitesService sitesService;
45 45  
... ... @@ -66,7 +66,7 @@ public class UsersFreeController extends BaseController {
66 66 if (spid == 0) {
67 67 usersFreeDTO.setSpid(null);
68 68 }
69   - PageInfo<ShyUsersfree> usersPage = usersfreeService.getpage(usersFreeDTO);
  69 + PageInfo<ShyUsersfree> usersPage = usersfreeService.getPage(usersFreeDTO);
70 70 List<ShyUsersfree> list = usersPage.getList();
71 71 JSONObject category = CommonConst.CATEGORY;
72 72 if (!list.isEmpty()) {
... ... @@ -115,22 +115,22 @@ public class UsersFreeController extends BaseController {
115 115  
116 116  
117 117 @PostMapping(value = "/write")
118   - public String write(Model model, String userId, String userMobile, Integer spId, String[] writeBusiness, HttpSession session, String redirectUrl) {
  118 + public String write(Model model, String userId, String userMobile, Integer spId, String[] write_business, HttpSession session, String redirect_url) {
119 119 if (CommonUtils.isEmpty(userId) && CommonUtils.isEmpty(userMobile)) {
120 120 setmodelParam(model, "userId,userMobile不能为空!");
121 121 return "error.html";
122 122 }
123 123 SessionUser sessionUser = (SessionUser) session.getAttribute(SessionUser.getSessionKey());
124 124 StringBuilder write = new StringBuilder();
125   - if (CommonUtils.isNotNull(writeBusiness) && writeBusiness.length > 0) {
126   - for (String w : writeBusiness) {
  125 + if (CommonUtils.isNotNull(write_business) && write_business.length > 0) {
  126 + for (String w : write_business) {
127 127 write.append(",").append(w);
128 128 }
129 129 write = new StringBuilder(write.substring(1));
130 130 }
131 131 boolean success = usersfreeService.update(userId, userMobile, write.toString(), spId, sessionUser.getUserId());
132 132 if (success) {
133   - return "redirect:" + redirectUrl;
  133 + return "redirect:" + redirect_url;
134 134 } else {
135 135 setmodelResult(model);
136 136 return "error.html";
... ...
src/main/java/com/cnlive/shenhe/controller/VideosController.java
... ... @@ -10,7 +10,7 @@ import com.cnlive.shenhe.entity.*;
10 10 import com.cnlive.shenhe.service.ShyActivityService;
11 11 import com.cnlive.shenhe.service.ShyLogService;
12 12 import com.cnlive.shenhe.service.SitesService;
13   -import com.cnlive.shenhe.service.serviceImpl.UsersServiceImpl;
  13 +import com.cnlive.shenhe.service.UsersService;
14 14 import com.cnlive.shenhe.service.serviceImpl.VideosServiceImpl;
15 15 import com.cnlive.shenhe.utils.AuditPass;
16 16 import com.cnlive.shenhe.utils.CommonConst;
... ... @@ -53,7 +53,7 @@ public class VideosController extends BaseController {
53 53 @Autowired
54 54 private VideosServiceImpl videosService;
55 55 @Autowired
56   - private UsersServiceImpl usersService;
  56 + private UsersService usersService;
57 57 @Autowired
58 58 private SitesService sitesService;
59 59 @Autowired
... ... @@ -140,7 +140,7 @@ public class VideosController extends BaseController {
140 140 logger.info("列表请求参数:{}", JSON.toJSONString(videosDTO));
141 141 if (!StringUtils.isEmpty(videosDTO.getShen_auditor_id())) {
142 142 if ((!"自动审核".equals(videosDTO.getShen_auditor_id())) && (!"白名单".equals(videosDTO.getShen_auditor_id()))) {
143   - videosDTO.setShen_auditor_id(usersService.findspidByName(videosDTO.getShen_auditor_id()));
  143 + videosDTO.setShen_auditor_id(usersService.findSpIdByName(videosDTO.getShen_auditor_id()));
144 144 }
145 145 }
146 146 SessionUser sessionUser = (SessionUser) session.getAttribute(SessionUser.getSessionKey());
... ...
src/main/java/com/cnlive/shenhe/service/AudioService.java
... ... @@ -57,9 +57,8 @@ public interface AudioService {
57 57 *
58 58 * @param shyAudio
59 59 * @param audioState 视频状态,1通过,2不通过
60   - * @return
61 60 */
62   - int updateAudioAndShenhe(ShyAudio shyAudio, int audioState);
  61 + void updateAudioAndShenhe(ShyAudio shyAudio, int audioState);
63 62  
64 63 /**
65 64 * 认领
... ... @@ -95,14 +94,14 @@ public interface AudioService {
95 94 * 根据id查询到音频对象进行修改
96 95 *
97 96 * @param id
98   - * @param auditor_id
  97 + * @param auditorId
99 98 * @param updater
100   - * @param attr_tags
  99 + * @param attrTags
101 100 * @param state
102 101 * @param msg
103 102 * @return
104 103 */
105   - int updateAudio(Integer id, String auditor_id, String updater, String attr_tags, Integer state, String msg);
  104 + int updateAudio(Integer id, String auditorId, String updater, String attrTags, Integer state, String msg);
106 105  
107 106 /**
108 107 * 分页查询音频数据
... ...
src/main/java/com/cnlive/shenhe/service/ContentService.java
... ... @@ -126,10 +126,10 @@ public interface ContentService {
126 126 * 获取审核类型
127 127 *
128 128 * @param spId
129   - * @param ContentTag
  129 + * @param contentTag
130 130 * @return
131 131 */
132   - Integer getShenheType(Integer spId, String ContentTag);
  132 + Integer getShenheType(Integer spId, String contentTag);
133 133  
134 134 /**
135 135 * 易盾网站过滤
... ...
src/main/java/com/cnlive/shenhe/service/LiveApplyService.java
... ... @@ -48,13 +48,13 @@ public interface LiveApplyService {
48 48 * 修改直播申请对象 返回int类型
49 49 *
50 50 * @param id
51   - * @param auditor_id
  51 + * @param auditorId
52 52 * @param updater
53 53 * @param status
54 54 * @param msg
55 55 * @return
56 56 */
57   - int updateLiveApply(Integer id, String auditor_id, String updater, Integer status, String msg);
  57 + int updateLiveApply(Integer id, String auditorId, String updater, Integer status, String msg);
58 58  
59 59 /**
60 60 * 获取分页、条件查询
... ...
src/main/java/com/cnlive/shenhe/service/LiveService.java
... ... @@ -48,13 +48,13 @@ public interface LiveService {
48 48 * 根据id查询,修改对象的关键信息 返回int类型
49 49 *
50 50 * @param id
51   - * @param auditor_id
  51 + * @param auditorId
52 52 * @param updater
53   - * @param activity_status
  53 + * @param activityStatus
54 54 * @param msg
55 55 * @return
56 56 */
57   - int updateLive(Integer id, String auditor_id, String updater, Integer activity_status, String msg);
  57 + int updateLive(Integer id, String auditorId, String updater, Integer activityStatus, String msg);
58 58  
59 59 /**
60 60 * 分页、条件查询、返回分页结果集合
... ...
src/main/java/com/cnlive/shenhe/service/SitesService.java
... ... @@ -46,10 +46,10 @@ public interface SitesService {
46 46 /**
47 47 * 根据name查询白名单对象
48 48 *
49   - * @param sp_desc
  49 + * @param spDesc
50 50 * @return
51 51 */
52   - ShySites findspidBySpdesc(String sp_desc);
  52 + ShySites findspidBySpdesc(String spDesc);
53 53  
54 54 /**
55 55 * 获取免审白名单列表(点播)
... ... @@ -63,8 +63,8 @@ public interface SitesService {
63 63 * 获取用户(操作人)
64 64 *
65 65 * @param updater
66   - * @param auditor_id
  66 + * @param auditorId
67 67 * @return
68 68 */
69   - String getUpdater(String updater, String auditor_id);
  69 + String getUpdater(String updater, String auditorId);
70 70 }
... ...
src/main/java/com/cnlive/shenhe/service/UsersService.java 0 → 100644
  1 +package com.cnlive.shenhe.service;
  2 +
  3 +import com.cnlive.shenhe.dto.UsersDTO;
  4 +import com.cnlive.shenhe.entity.ShyUsers;
  5 +import com.github.pagehelper.PageInfo;
  6 +
  7 +/**
  8 + * @Author: yan-zhao-wang
  9 + * @DateTime: 2022-11-08 9:15
  10 + */
  11 +public interface UsersService {
  12 + /**
  13 + * 用户分页列表
  14 + *
  15 + * @param usersDTO
  16 + * @return
  17 + */
  18 + PageInfo<ShyUsers> getPage(UsersDTO usersDTO);
  19 +
  20 + /**
  21 + * 根据spid查询名字
  22 + *
  23 + * @param shenAuditorId
  24 + * @return
  25 + */
  26 +
  27 + String findSpIdByName(String shenAuditorId);
  28 +
  29 + /**
  30 + * 根据主键id查询用户对象
  31 + *
  32 + * @param id
  33 + * @return
  34 + */
  35 + ShyUsers get(Integer id);
  36 +
  37 + /**
  38 + * 根据对象查询
  39 + *
  40 + * @param shyUsers
  41 + * @return
  42 + */
  43 + ShyUsers select(ShyUsers shyUsers);
  44 +
  45 + /**
  46 + * 修改用户
  47 + *
  48 + * @param shyUsers
  49 + * @return
  50 + */
  51 + boolean update(ShyUsers shyUsers);
  52 +}
... ...
src/main/java/com/cnlive/shenhe/service/UsersfreeService.java 0 → 100644
  1 +package com.cnlive.shenhe.service;
  2 +
  3 +import com.cnlive.shenhe.dto.UsersFreeDTO;
  4 +import com.cnlive.shenhe.entity.ShyUsersfree;
  5 +import com.github.pagehelper.PageInfo;
  6 +
  7 +/**
  8 + * @Author: yan-zhao-wang
  9 + * @DateTime: 2022-11-08 9:15
  10 + */
  11 +public interface UsersfreeService {
  12 + /**
  13 + * 根据主键id查询用户白名单
  14 + *
  15 + * @param id
  16 + * @return
  17 + */
  18 + ShyUsersfree get(Integer id);
  19 +
  20 + /**
  21 + * 根据用户白名单对象查询
  22 + *
  23 + * @param shyUsersfree
  24 + * @return
  25 + */
  26 + ShyUsersfree select(ShyUsersfree shyUsersfree);
  27 +
  28 + /**
  29 + * 修改白名单状态
  30 + *
  31 + * @param id
  32 + * @param isEnable
  33 + * @return
  34 + */
  35 + Integer updateState(Integer id, Boolean isEnable);
  36 +
  37 + /**
  38 + * 分页、条件查询列表
  39 + *
  40 + * @param usersFreeDTO
  41 + * @return
  42 + */
  43 + PageInfo<ShyUsersfree> getPage(UsersFreeDTO usersFreeDTO);
  44 +
  45 + /**
  46 + * 通过spid、栏目、用户id来查看是否是免审
  47 + *
  48 + * @param spId
  49 + * @param category
  50 + * @param userId
  51 + * @return
  52 + */
  53 + ShyUsersfree selectUser(Integer spId, String category, String userId);
  54 +
  55 + /**
  56 + * 回调
  57 + *
  58 + * @param userId
  59 + * @param userMobile
  60 + * @param write
  61 + * @param spId
  62 + * @param updater
  63 + * @return
  64 + */
  65 + boolean update(String userId, String userMobile, String write, Integer spId, String updater);
  66 +}
... ...
src/main/java/com/cnlive/shenhe/service/serviceImpl/AudioServiceImpl.java
... ... @@ -113,10 +113,9 @@ public class AudioServiceImpl implements AudioService {
113 113 *
114 114 * @param shyAudio
115 115 * @param audioState 视频状态,1通过,2不通过
116   - * @return
117 116 */
118 117 @Override
119   - public int updateAudioAndShenhe(ShyAudio shyAudio, int audioState) {
  118 + public void updateAudioAndShenhe(ShyAudio shyAudio, int audioState) {
120 119 //修改点播云音频状态
121 120 JSONObject result = pass.audioPass(shyAudio.getAudioId(), audioState, shyAudio.getAttr_tags(), shyAudio.getMsg(), shyAudio.getCallback());
122 121 Integer code = result.getInteger("code");
... ... @@ -130,13 +129,11 @@ public class AudioServiceImpl implements AudioService {
130 129 if (i != 1) {
131 130 logger.error("点播音频更改失败,AudioId:{}", shyAudio.getAudioId());
132 131 }
133   - return i;
134 132 } else {
135 133 shyAudio.setMsg("点播音频回调失败," + shyAudio.getMsg());
136 134 audioService.updateAudio(shyAudio.getId(), null, shyAudio.getUploader(), "", CommonConst.AUDIT_CALLBACK_FAIL, shyAudio.getMsg());
137 135 logger.error("点播音频回调失败,activity_id:{},code:{},msg:{}", shyAudio.getAudioId(), code, result.getString("msg"));
138 136 }
139   - return 0;
140 137 }
141 138  
142 139 /**
... ...
src/main/java/com/cnlive/shenhe/service/serviceImpl/LiveServiceImpl.java
... ... @@ -49,10 +49,7 @@ public class LiveServiceImpl implements LiveService {
49 49 @Override
50 50 public boolean impotVideo(ShyLive shyLive) {
51 51 int result = shyLiveMapper.insertSelective(shyLive);
52   - if (result == 0) {
53   - return false;
54   - }
55   - return true;
  52 + return result != 0;
56 53 }
57 54  
58 55 /**
... ... @@ -63,8 +60,7 @@ public class LiveServiceImpl implements LiveService {
63 60 */
64 61 @Override
65 62 public ShyLive selectByPrimaryKey(Integer id) {
66   - ShyLive shyLive = shyLiveMapper.selectByPrimaryKey(id);
67   - return shyLive;
  63 + return shyLiveMapper.selectByPrimaryKey(id);
68 64 }
69 65  
70 66 /**
... ... @@ -75,8 +71,7 @@ public class LiveServiceImpl implements LiveService {
75 71 */
76 72 @Override
77 73 public List<ShyLive> findShyLive(ShyLive shyLive) {
78   - List<ShyLive> shyLivelist = shyLiveMapper.selectByRowBounds(shyLive, new RowBounds(0, 100));
79   - return shyLivelist;
  74 + return shyLiveMapper.selectByRowBounds(shyLive, new RowBounds(0, 100));
80 75 }
81 76  
82 77 /**
... ... @@ -88,28 +83,25 @@ public class LiveServiceImpl implements LiveService {
88 83 @Override
89 84 public boolean updateShyLive(ShyLive shyLive) {
90 85 int i = shyLiveMapper.updateByPrimaryKey(shyLive);
91   - if (i == 0) {
92   - return false;
93   - }
94   - return true;
  86 + return i != 0;
95 87 }
96 88  
97 89 /**
98 90 * 根据id查询,修改对象的关键信息 返回int类型
99 91 *
100 92 * @param id
101   - * @param auditor_id
  93 + * @param auditorId
102 94 * @param updater
103   - * @param activity_status
  95 + * @param activityStatus
104 96 * @param msg
105 97 * @return
106 98 */
107 99 @Override
108   - public int updateLive(Integer id, String auditor_id, String updater, Integer activity_status, String msg) {
  100 + public int updateLive(Integer id, String auditorId, String updater, Integer activityStatus, String msg) {
109 101 ShyLive shyLive = shyLiveMapper.selectByPrimaryKey(id);
110   - shyLive.setAuditor(auditor_id);
  102 + shyLive.setAuditor(auditorId);
111 103 shyLive.setShenhe_state(CommonConst.RECEIVE_AUDIT);
112   - shyLive.setActivity_status(activity_status);
  104 + shyLive.setActivity_status(activityStatus);
113 105 shyLive.setShenhe_msg(msg);
114 106 shyLive.setUpdater(updater);
115 107 shyLive.setIs_hot(CommonConstStates.SHIFOU_REDIANNO);
... ... @@ -194,8 +186,7 @@ public class LiveServiceImpl implements LiveService {
194 186 user.setUser_id(auditorId);
195 187 user = shyUsersMapper.selectOne(user);
196 188 String email = CommonUtils.isEmpty(user.getEmail()) || "null".equals(user.getEmail()) ? "" : user.getEmail();
197   - String userName = CommonUtils.isEmpty(user.getUsername()) ? email : user.getUsername();
198   - updater = userName;
  189 + updater = CommonUtils.isEmpty(user.getUsername()) ? email : user.getUsername();
199 190 }
200 191 shyLive.setUpdater(updater);
201 192 }
... ... @@ -323,7 +314,6 @@ public class LiveServiceImpl implements LiveService {
323 314 criteria.andEqualTo("activity_status", liveDTO.getActivity_status());
324 315 }
325 316 criteria.andEqualTo("is_show", CommonConstStates.SHIFOU_XIANSHIYES);
326   - List<ShyLive> shyLiveList = shyLiveMapper.selectByExample(example);
327   - return shyLiveList;
  317 + return shyLiveMapper.selectByExample(example);
328 318 }
329 319 }
... ...
src/main/java/com/cnlive/shenhe/service/serviceImpl/SitesServiceImpl.java
... ... @@ -6,6 +6,7 @@ import com.cnlive.shenhe.entity.ShySites;
6 6 import com.cnlive.shenhe.entity.ShyUsers;
7 7 import com.cnlive.shenhe.mapper.ShySitesMapper;
8 8 import com.cnlive.shenhe.service.SitesService;
  9 +import com.cnlive.shenhe.service.UsersService;
9 10 import com.cnlive.shenhe.utils.CommonUtils;
10 11 import com.github.pagehelper.PageHelper;
11 12 import com.github.pagehelper.PageInfo;
... ... @@ -32,7 +33,7 @@ public class SitesServiceImpl implements SitesService {
32 33 @Autowired
33 34 ShySitesMapper shySitesMapper;
34 35 @Autowired
35   - UsersServiceImpl usersService;
  36 + UsersService usersService;
36 37  
37 38 /**
38 39 * 分页、条件查询 返回列表
... ...
src/main/java/com/cnlive/shenhe/service/serviceImpl/UsersServiceImpl.java
... ... @@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSON;
4 4 import com.cnlive.shenhe.dto.UsersDTO;
5 5 import com.cnlive.shenhe.entity.ShyUsers;
6 6 import com.cnlive.shenhe.mapper.ShyUsersMapper;
  7 +import com.cnlive.shenhe.service.UsersService;
7 8 import com.cnlive.shenhe.utils.CommonUtils;
8 9 import com.github.pagehelper.PageHelper;
9 10 import com.github.pagehelper.PageInfo;
... ... @@ -21,11 +22,18 @@ import java.util.List;
21 22 * @Description:
22 23 */
23 24 @Service
24   -public class UsersServiceImpl {
  25 +public class UsersServiceImpl implements UsersService {
25 26 private static Logger logger = LoggerFactory.getLogger(UsersServiceImpl.class);
26 27 @Autowired
27 28 ShyUsersMapper shyUsersMapper;
28 29  
  30 + /**
  31 + * 用户分页列表
  32 + *
  33 + * @param usersDTO
  34 + * @return
  35 + */
  36 + @Override
29 37 public PageInfo<ShyUsers> getPage(UsersDTO usersDTO) {
30 38 logger.info("接受参数列表为,UsersDTO:{}", JSON.toJSONString(usersDTO));
31 39 Example example = new Example(ShyUsers.class);
... ... @@ -53,15 +61,21 @@ public class UsersServiceImpl {
53 61 return pageInfo;
54 62 }
55 63  
56   - public String findspidByName(String shenAuditorId) {
  64 + /**
  65 + * 根据spid查询名字
  66 + *
  67 + * @param shenAuditorId
  68 + * @return
  69 + */
  70 + @Override
  71 + public String findSpIdByName(String shenAuditorId) {
57 72 Example example = new Example(ShyUsers.class);
58 73 Example.Criteria criteria = example.createCriteria();
59 74 criteria.andEqualTo("username", shenAuditorId);
60 75 List<ShyUsers> shyUsersList = shyUsersMapper.selectByExample(example);
61 76 if (CommonUtils.isNotNull(shyUsersList) && shyUsersList.size() > 0) {
62 77 ShyUsers shyUsers = shyUsersList.get(0);
63   - String userId = shyUsers.getUser_id();
64   - return userId;
  78 + return shyUsers.getUser_id();
65 79 }
66 80 return null;
67 81 }
... ... @@ -72,7 +86,7 @@ public class UsersServiceImpl {
72 86 * @param id
73 87 * @return
74 88 */
75   -
  89 + @Override
76 90 public ShyUsers get(Integer id) {
77 91 return shyUsersMapper.selectByPrimaryKey(id);
78 92 }
... ... @@ -83,6 +97,7 @@ public class UsersServiceImpl {
83 97 * @param shyUsers
84 98 * @return
85 99 */
  100 + @Override
86 101 public ShyUsers select(ShyUsers shyUsers) {
87 102 return shyUsersMapper.selectOne(shyUsers);
88 103 }
... ... @@ -93,6 +108,7 @@ public class UsersServiceImpl {
93 108 * @param shyUsers
94 109 * @return
95 110 */
  111 + @Override
96 112 public boolean update(ShyUsers shyUsers) {
97 113 return shyUsersMapper.updateByPrimaryKeySelective(shyUsers) == 1;
98 114 }
... ...
src/main/java/com/cnlive/shenhe/service/serviceImpl/UsersfreeServiceImpl.java
... ... @@ -6,6 +6,7 @@ import com.cnlive.shenhe.dto.UsersFreeDTO;
6 6 import com.cnlive.shenhe.entity.ShyUsers;
7 7 import com.cnlive.shenhe.entity.ShyUsersfree;
8 8 import com.cnlive.shenhe.mapper.ShyUsersfreeMapper;
  9 +import com.cnlive.shenhe.service.UsersfreeService;
9 10 import com.cnlive.shenhe.utils.AuditPass;
10 11 import com.cnlive.shenhe.utils.CommonUtils;
11 12 import com.github.pagehelper.PageHelper;
... ... @@ -24,7 +25,7 @@ import java.util.List;
24 25 * @Description:
25 26 */
26 27 @Service
27   -public class UsersfreeServiceImpl {
  28 +public class UsersfreeServiceImpl implements UsersfreeService {
28 29 private static Logger logger = LoggerFactory.getLogger(UsersfreeServiceImpl.class);
29 30 @Autowired
30 31 ShyUsersfreeMapper shyUsersfreeMapper;
... ... @@ -37,6 +38,7 @@ public class UsersfreeServiceImpl {
37 38 * @param id
38 39 * @return
39 40 */
  41 + @Override
40 42 public ShyUsersfree get(Integer id) {
41 43 return shyUsersfreeMapper.selectByPrimaryKey(id);
42 44 }
... ... @@ -47,6 +49,7 @@ public class UsersfreeServiceImpl {
47 49 * @param shyUsersfree
48 50 * @return
49 51 */
  52 + @Override
50 53 public ShyUsersfree select(ShyUsersfree shyUsersfree) {
51 54 return shyUsersfreeMapper.selectOne(shyUsersfree);
52 55 }
... ... @@ -58,6 +61,7 @@ public class UsersfreeServiceImpl {
58 61 * @param isEnable
59 62 * @return
60 63 */
  64 + @Override
61 65 public Integer updateState(Integer id, Boolean isEnable) {
62 66 ShyUsersfree shyUsersfree = get(id);
63 67 shyUsersfree.setIs_enable(isEnable);
... ... @@ -70,7 +74,8 @@ public class UsersfreeServiceImpl {
70 74 * @param usersFreeDTO
71 75 * @return
72 76 */
73   - public PageInfo<ShyUsersfree> getpage(UsersFreeDTO usersFreeDTO) {
  77 + @Override
  78 + public PageInfo<ShyUsersfree> getPage(UsersFreeDTO usersFreeDTO) {
74 79 logger.info("接受参数列表为,UsersFreeDTO:{}", JSON.toJSONString(usersFreeDTO));
75 80 Example example = new Example(ShyUsers.class);
76 81 Example.Criteria criteria = example.createCriteria();
... ... @@ -94,15 +99,16 @@ public class UsersfreeServiceImpl {
94 99 /**
95 100 * 通过spid、栏目、用户id来查看是否是免审
96 101 *
97   - * @param sp_id
  102 + * @param spId
98 103 * @param category
99   - * @param user_id
  104 + * @param userId
100 105 * @return
101 106 */
102   - public ShyUsersfree selectUser(Integer sp_id, String category, String user_id) {
  107 + @Override
  108 + public ShyUsersfree selectUser(Integer spId, String category, String userId) {
103 109 ShyUsersfree shyUserfree = new ShyUsersfree();
104   - shyUserfree.setSp_id(sp_id);
105   - shyUserfree.setUser_id(user_id);
  110 + shyUserfree.setSp_id(spId);
  111 + shyUserfree.setUser_id(userId);
106 112 shyUserfree.setIs_enable(true);
107 113 shyUserfree.setIs_delete(false);
108 114 ShyUsersfree shyUserfree1 = shyUsersfreeMapper.selectOne(shyUserfree);
... ... @@ -114,6 +120,7 @@ public class UsersfreeServiceImpl {
114 120  
115 121 /**
116 122 * 回调
  123 + *
117 124 * @param userId
118 125 * @param userMobile
119 126 * @param write
... ... @@ -121,8 +128,9 @@ public class UsersfreeServiceImpl {
121 128 * @param updater
122 129 * @return
123 130 */
  131 + @Override
124 132 public boolean update(String userId, String userMobile, String write, Integer spId, String updater) {
125   - JSONObject result = new JSONObject();
  133 + JSONObject result;
126 134 try {
127 135 result = pass.queryUser(userId, userMobile);
128 136 } catch (Exception e) {
... ... @@ -159,9 +167,7 @@ public class UsersfreeServiceImpl {
159 167 shyUserfree1.setIs_delete(false);
160 168 shyUserfree1.setIs_enable(true);
161 169 int re = shyUsersfreeMapper.updateByPrimaryKeySelective(shyUserfree1);
162   - if (re != 1) {
163   - return false;
164   - }
  170 + return re == 1;
165 171 } else {
166 172 shyUserfree.setMobile(mobile);
167 173 shyUserfree.setCategory(write);
... ... @@ -174,11 +180,8 @@ public class UsersfreeServiceImpl {
174 180 shyUserfree.setIs_delete(false);
175 181 shyUserfree.setIs_enable(true);
176 182 int re = shyUsersfreeMapper.insertSelective(shyUserfree);
177   - if (re != 1) {
178   - return false;
179   - }
  183 + return re == 1;
180 184 }
181 185 }
182   - return true;
183 186 }
184 187 }
... ...
src/main/java/com/cnlive/shenhe/service/serviceImpl/VideosServiceImpl.java
... ... @@ -14,6 +14,7 @@ import com.cnlive.shenhe.mapper.ShyUsersMapper;
14 14 import com.cnlive.shenhe.mapper.ShyVideosMapper;
15 15 import com.cnlive.shenhe.service.ShyActivityService;
16 16 import com.cnlive.shenhe.service.SitesService;
  17 +import com.cnlive.shenhe.service.UsersfreeService;
17 18 import com.cnlive.shenhe.utils.*;
18 19 import com.github.pagehelper.PageHelper;
19 20 import com.github.pagehelper.PageInfo;
... ... @@ -49,7 +50,7 @@ public class VideosServiceImpl {
49 50 @Autowired
50 51 private SitesService sitesService;
51 52 @Autowired
52   - private UsersfreeServiceImpl usersfreeServiceImpl;
  53 + private UsersfreeService usersfreeService;
53 54 @Autowired
54 55 private YiDunServiceImpl yiDunServiceImpl;
55 56 @Autowired
... ... @@ -107,27 +108,27 @@ public class VideosServiceImpl {
107 108 * 根据条件修改video 返回int类型
108 109 *
109 110 * @param id
110   - * @param auditor_id
  111 + * @param auditorId
111 112 * @param updater
112   - * @param attr_tags
  113 + * @param attrTags
113 114 * @param state
114 115 * @param msg
115 116 * @return
116 117 */
117   - public int updateVideo(Integer id, String auditor_id, String updater, String attr_tags, Integer state, String msg) {
  118 + public int updateVideo(Integer id, String auditorId, String updater, String attrTags, Integer state, String msg) {
118 119 ShyVideos shyVideos = shyVideosMapper.selectByPrimaryKey(id);
119   - shyVideos.setAuditor_id(auditor_id);
  120 + shyVideos.setAuditor_id(auditorId);
120 121 shyVideos.setState(state);
121   - if (CommonUtils.isNotEmpty(attr_tags)) {
122   - shyVideos.setAttr_tags(attr_tags);
  122 + if (CommonUtils.isNotEmpty(attrTags)) {
  123 + shyVideos.setAttr_tags(attrTags);
123 124 }
124 125 if (CommonUtils.isNotEmpty(msg)) {
125 126 shyVideos.setMsg(msg);
126 127 }
127 128 shyVideos.setUpdater(updater);
128   - if (CommonUtils.isNotEmpty(auditor_id)) {
  129 + if (CommonUtils.isNotEmpty(auditorId)) {
129 130 shyVideos.setReceive(CommonConst.RECEIVE_AFTER);
130   - shyVideos.setReceive_user_id(auditor_id);
  131 + shyVideos.setReceive_user_id(auditorId);
131 132 shyVideos.setShenhe_type(CommonConst.AUDIT_TYPE_USER);
132 133 }
133 134 return shyVideosMapper.updateByPrimaryKey(shyVideos);
... ... @@ -377,7 +378,7 @@ public class VideosServiceImpl {
377 378 } else if (plat.equals(CommonConst.KS_PLAT)) {
378 379 yuming = ks_domain + "/";
379 380 }
380   - String url = "";
  381 + StringBuilder url = new StringBuilder();
381 382 JSONArray jsonArray = new JSONArray();
382 383 List<String> imgList = JSONArray.parseArray(shyVideos.getAvsample_imgs(), String.class);
383 384 for (String imgStr : imgList) {
... ... @@ -388,7 +389,7 @@ public class VideosServiceImpl {
388 389 image.put("type", 1);
389 390 image.put("data", imgUrl);
390 391 jsonArray.add(image);
391   - url = url + "(" + uuid + ")";
  392 + url.append("(").append(uuid).append(")");
392 393 }
393 394 //易盾返回结果的类型
394 395 //调用易盾智能图片审核接口
... ... @@ -415,7 +416,7 @@ public class VideosServiceImpl {
415 416 ShyYidun shyYidun = new ShyYidun();
416 417 shyYidun.setId(UUID.randomUUID().toString());
417 418 shyYidun.setContent_id(cid.toString());
418   - shyYidun.setUrl(url);
  419 + shyYidun.setUrl(url.toString());
419 420 shyYidun.setDesc_msg(desc);
420 421 //校验图片类型
421 422 shyYidun.setCheck_type(CommonConstStates.TUPIAN);
... ... @@ -491,7 +492,7 @@ public class VideosServiceImpl {
491 492 ShyUsersfree shyUserfree = null;
492 493 //如果用户id存在
493 494 if (CommonUtils.isNotEmpty(shyVideo.getVideo_user_id())) {
494   - shyUserfree = usersfreeServiceImpl.selectUser(shyVideo.getSpid(), shyVideo.getCategory(), shyVideo.getVideo_user_id());
  495 + shyUserfree = usersfreeService.selectUser(shyVideo.getSpid(), shyVideo.getCategory(), shyVideo.getVideo_user_id());
495 496 }
496 497 //初始化一个审核状态
497 498 //审核类型,1:免审,2:机审,3:人工审
... ... @@ -537,7 +538,7 @@ public class VideosServiceImpl {
537 538 public String repulse(String shyVideoId, String msg, String userId) {
538 539 String showMsg = "";
539 540 ShyVideos shyVideos = videosService.selectByPrimaryKey(Integer.parseInt(shyVideoId));
540   - JSONObject result = null;
  541 + JSONObject result;
541 542 try {
542 543 result = pass.auditPass(shyVideos.getVideo_id(), 4, msg, msg, shyVideos.getCallback());
543 544 } catch (Exception e) {
... ...