Commit e62fe580c4e797248433047171d121450d87bab2
1 parent
3a7fcd65
更改状态值类型
Showing
9 changed files
with
37 additions
and
29 deletions
src/main/java/com/cnlive/shenhe/controller/VideosController.java
| @@ -209,7 +209,7 @@ public class VideosController { | @@ -209,7 +209,7 @@ public class VideosController { | ||
| 209 | for (String cid : cids) { | 209 | for (String cid : cids) { |
| 210 | ShyVideos shyVideos = videosService.selectByPrimaryKey(Integer.parseInt(cid)); | 210 | ShyVideos shyVideos = videosService.selectByPrimaryKey(Integer.parseInt(cid)); |
| 211 | if (CommonUtils.isNotNull(shyVideos)) { | 211 | if (CommonUtils.isNotNull(shyVideos)) { |
| 212 | - if (shyVideos.getState() != CommonConst.AUDIT_INTT || shyVideos.getReceive()) { | 212 | + if (shyVideos.getState() != CommonConst.AUDIT_INTT || shyVideos.getReceive()==CommonConst.RECEIVE_AFTER) { |
| 213 | return new ResponseBean(ErrorEnum.ERROR.getErrorCode(), "您领取的内容中有已被领取或者已经被审核,请检查并重试"); | 213 | return new ResponseBean(ErrorEnum.ERROR.getErrorCode(), "您领取的内容中有已被领取或者已经被审核,请检查并重试"); |
| 214 | } | 214 | } |
| 215 | } else { | 215 | } else { |
| @@ -238,7 +238,7 @@ public class VideosController { | @@ -238,7 +238,7 @@ public class VideosController { | ||
| 238 | String[] cids = ids.split(","); | 238 | String[] cids = ids.split(","); |
| 239 | for (String cid : cids) { | 239 | for (String cid : cids) { |
| 240 | ShyVideos shyVideos = videosService.selectByPrimaryKey(Integer.parseInt(cid)); | 240 | ShyVideos shyVideos = videosService.selectByPrimaryKey(Integer.parseInt(cid)); |
| 241 | - if (shyVideos.getState() != CommonConst.AUDIT_INTT || !shyVideos.getReceive() || !shyVideos.getReceive_user_id().equals(userId)) { | 241 | + if (shyVideos.getState() != CommonConst.AUDIT_INTT || shyVideos.getReceive()==CommonConst.RECEIVE_BEFORE || !shyVideos.getReceive_user_id().equals(userId)) { |
| 242 | return new ResponseBean(ErrorEnum.ERROR.getErrorCode(), "退领失败,您选中的内容包含已退领的或已经审核的"); | 242 | return new ResponseBean(ErrorEnum.ERROR.getErrorCode(), "退领失败,您选中的内容包含已退领的或已经审核的"); |
| 243 | } | 243 | } |
| 244 | } | 244 | } |
src/main/java/com/cnlive/shenhe/entity/ShyComments.java
| @@ -107,7 +107,7 @@ public class ShyComments { | @@ -107,7 +107,7 @@ public class ShyComments { | ||
| 107 | /** | 107 | /** |
| 108 | * 领取状态。0:未领取;1:已领取 | 108 | * 领取状态。0:未领取;1:已领取 |
| 109 | */ | 109 | */ |
| 110 | - private Boolean receive; | 110 | + private Integer receive; |
| 111 | 111 | ||
| 112 | /** | 112 | /** |
| 113 | * 领取人id | 113 | * 领取人id |
| @@ -499,7 +499,7 @@ public class ShyComments { | @@ -499,7 +499,7 @@ public class ShyComments { | ||
| 499 | * | 499 | * |
| 500 | * @return receive - 领取状态。0:未领取;1:已领取 | 500 | * @return receive - 领取状态。0:未领取;1:已领取 |
| 501 | */ | 501 | */ |
| 502 | - public Boolean getReceive() { | 502 | + public Integer getReceive() { |
| 503 | return receive; | 503 | return receive; |
| 504 | } | 504 | } |
| 505 | 505 | ||
| @@ -508,7 +508,7 @@ public class ShyComments { | @@ -508,7 +508,7 @@ public class ShyComments { | ||
| 508 | * | 508 | * |
| 509 | * @param receive 领取状态。0:未领取;1:已领取 | 509 | * @param receive 领取状态。0:未领取;1:已领取 |
| 510 | */ | 510 | */ |
| 511 | - public void setReceive(Boolean receive) { | 511 | + public void setReceive(Integer receive) { |
| 512 | this.receive = receive; | 512 | this.receive = receive; |
| 513 | } | 513 | } |
| 514 | 514 |
src/main/java/com/cnlive/shenhe/entity/ShySites.java
| @@ -26,12 +26,13 @@ public class ShySites { | @@ -26,12 +26,13 @@ public class ShySites { | ||
| 26 | 26 | ||
| 27 | private String appid; | 27 | private String appid; |
| 28 | 28 | ||
| 29 | - @Transient | ||
| 30 | - private String write_business_name; | ||
| 31 | /** | 29 | /** |
| 32 | * 免审业务,多种用,分割 | 30 | * 免审业务,多种用,分割 |
| 33 | */ | 31 | */ |
| 34 | private String write_business; | 32 | private String write_business; |
| 33 | + | ||
| 34 | + @Transient | ||
| 35 | + private String write_business_name; | ||
| 35 | 36 | ||
| 36 | /** | 37 | /** |
| 37 | * @return id | 38 | * @return id |
| @@ -165,5 +166,4 @@ public class ShySites { | @@ -165,5 +166,4 @@ public class ShySites { | ||
| 165 | this.write_business_name = write_business_name; | 166 | this.write_business_name = write_business_name; |
| 166 | } | 167 | } |
| 167 | 168 | ||
| 168 | - | ||
| 169 | } | 169 | } |
| 170 | \ No newline at end of file | 170 | \ No newline at end of file |
src/main/java/com/cnlive/shenhe/entity/ShyUsersfree.java
| @@ -25,7 +25,7 @@ public class ShyUsersfree { | @@ -25,7 +25,7 @@ public class ShyUsersfree { | ||
| 25 | /** | 25 | /** |
| 26 | * 是否启用,0:未启用,1:启用 | 26 | * 是否启用,0:未启用,1:启用 |
| 27 | */ | 27 | */ |
| 28 | - private Integer is_enable=1; | 28 | + private Integer is_enable; |
| 29 | 29 | ||
| 30 | /** | 30 | /** |
| 31 | * @return id | 31 | * @return id |
| @@ -98,18 +98,18 @@ public class ShyUsersfree { | @@ -98,18 +98,18 @@ public class ShyUsersfree { | ||
| 98 | /** | 98 | /** |
| 99 | * 获取是否启用,0:未启用,1:启用 | 99 | * 获取是否启用,0:未启用,1:启用 |
| 100 | * | 100 | * |
| 101 | - * @return isEnable - 是否启用,0:未启用,1:启用 | 101 | + * @return is_enable - 是否启用,0:未启用,1:启用 |
| 102 | */ | 102 | */ |
| 103 | - public Integer getIsEnable() { | 103 | + public Integer getIs_enable() { |
| 104 | return is_enable; | 104 | return is_enable; |
| 105 | } | 105 | } |
| 106 | 106 | ||
| 107 | /** | 107 | /** |
| 108 | * 设置是否启用,0:未启用,1:启用 | 108 | * 设置是否启用,0:未启用,1:启用 |
| 109 | * | 109 | * |
| 110 | - * @param isEnable 是否启用,0:未启用,1:启用 | 110 | + * @param is_enable 是否启用,0:未启用,1:启用 |
| 111 | */ | 111 | */ |
| 112 | - public void setIsEnable(Integer is_enable) { | 112 | + public void setIs_enable(Integer is_enable) { |
| 113 | this.is_enable = is_enable; | 113 | this.is_enable = is_enable; |
| 114 | } | 114 | } |
| 115 | } | 115 | } |
| 116 | \ No newline at end of file | 116 | \ No newline at end of file |
src/main/java/com/cnlive/shenhe/entity/ShyVideos.java
| @@ -91,7 +91,7 @@ public class ShyVideos { | @@ -91,7 +91,7 @@ public class ShyVideos { | ||
| 91 | /** | 91 | /** |
| 92 | * 领取状态。0:未领取;1:已领取 | 92 | * 领取状态。0:未领取;1:已领取 |
| 93 | */ | 93 | */ |
| 94 | - private Boolean receive; | 94 | + private Integer receive; |
| 95 | 95 | ||
| 96 | /** | 96 | /** |
| 97 | * 领取人id | 97 | * 领取人id |
| @@ -142,7 +142,6 @@ public class ShyVideos { | @@ -142,7 +142,6 @@ public class ShyVideos { | ||
| 142 | * 抽帧返回信息(主要找问题时使用) | 142 | * 抽帧返回信息(主要找问题时使用) |
| 143 | */ | 143 | */ |
| 144 | private String avsample_msg; | 144 | private String avsample_msg; |
| 145 | - | ||
| 146 | @Transient | 145 | @Transient |
| 147 | private String spid_desc; | 146 | private String spid_desc; |
| 148 | 147 | ||
| @@ -487,7 +486,7 @@ public class ShyVideos { | @@ -487,7 +486,7 @@ public class ShyVideos { | ||
| 487 | * | 486 | * |
| 488 | * @return receive - 领取状态。0:未领取;1:已领取 | 487 | * @return receive - 领取状态。0:未领取;1:已领取 |
| 489 | */ | 488 | */ |
| 490 | - public Boolean getReceive() { | 489 | + public Integer getReceive() { |
| 491 | return receive; | 490 | return receive; |
| 492 | } | 491 | } |
| 493 | 492 | ||
| @@ -496,7 +495,7 @@ public class ShyVideos { | @@ -496,7 +495,7 @@ public class ShyVideos { | ||
| 496 | * | 495 | * |
| 497 | * @param receive 领取状态。0:未领取;1:已领取 | 496 | * @param receive 领取状态。0:未领取;1:已领取 |
| 498 | */ | 497 | */ |
| 499 | - public void setReceive(Boolean receive) { | 498 | + public void setReceive(Integer receive) { |
| 500 | this.receive = receive; | 499 | this.receive = receive; |
| 501 | } | 500 | } |
| 502 | 501 |
src/main/java/com/cnlive/shenhe/serviceImpl/CommentsServiceImpl.java
| @@ -195,9 +195,9 @@ public class CommentsServiceImpl { | @@ -195,9 +195,9 @@ public class CommentsServiceImpl { | ||
| 195 | String[] cids = ids.split(","); | 195 | String[] cids = ids.split(","); |
| 196 | for (String cid : cids) { | 196 | for (String cid : cids) { |
| 197 | ShyComments shyComments = shyCommentsMapper.selectByPrimaryKey(Integer.parseInt(cid)); | 197 | ShyComments shyComments = shyCommentsMapper.selectByPrimaryKey(Integer.parseInt(cid)); |
| 198 | - if (CommonUtils.isNotNull(shyComments) && shyComments.getState() == CommonConst.AUDIT_INTT && !shyComments.getReceive()) { | 198 | + if (CommonUtils.isNotNull(shyComments) && shyComments.getState() == CommonConst.AUDIT_INTT && shyComments.getReceive()==CommonConst.RECEIVE_BEFORE) { |
| 199 | shyComments.setReceive_user_id(userId); | 199 | shyComments.setReceive_user_id(userId); |
| 200 | - shyComments.setReceive(true); | 200 | + shyComments.setReceive(CommonConst.RECEIVE_AFTER); |
| 201 | shyCommentsMapper.updateByPrimaryKeySelective(shyComments); | 201 | shyCommentsMapper.updateByPrimaryKeySelective(shyComments); |
| 202 | n++; | 202 | n++; |
| 203 | } | 203 | } |
| @@ -212,7 +212,7 @@ public class CommentsServiceImpl { | @@ -212,7 +212,7 @@ public class CommentsServiceImpl { | ||
| 212 | if (!shyCommentsList.isEmpty()) { | 212 | if (!shyCommentsList.isEmpty()) { |
| 213 | for (ShyComments shyComments : shyCommentsList) { | 213 | for (ShyComments shyComments : shyCommentsList) { |
| 214 | shyComments.setReceive_user_id(userId); | 214 | shyComments.setReceive_user_id(userId); |
| 215 | - shyComments.setReceive(true); | 215 | + shyComments.setReceive(CommonConst.RECEIVE_AFTER); |
| 216 | shyCommentsMapper.updateByPrimaryKeySelective(shyComments); | 216 | shyCommentsMapper.updateByPrimaryKeySelective(shyComments); |
| 217 | n++; | 217 | n++; |
| 218 | } | 218 | } |
| @@ -226,7 +226,7 @@ public class CommentsServiceImpl { | @@ -226,7 +226,7 @@ public class CommentsServiceImpl { | ||
| 226 | String[] cids = ids.split(","); | 226 | String[] cids = ids.split(","); |
| 227 | for (String cid : cids) { | 227 | for (String cid : cids) { |
| 228 | ShyComments shyComments = shyCommentsMapper.selectByPrimaryKey(Integer.parseInt(cid)); | 228 | ShyComments shyComments = shyCommentsMapper.selectByPrimaryKey(Integer.parseInt(cid)); |
| 229 | - if (shyComments.getState() == CommonConst.AUDIT_INTT && shyComments.getReceive() && userId.equals(shyComments.getReceive_user_id())) { | 229 | + if (shyComments.getState() == CommonConst.AUDIT_INTT && shyComments.getReceive()==CommonConst.RECEIVE_AFTER && userId.equals(shyComments.getReceive_user_id())) { |
| 230 | shyComments.setReceive(CommonConst.RECEIVE_BEFORE); | 230 | shyComments.setReceive(CommonConst.RECEIVE_BEFORE); |
| 231 | shyComments.setReceive_user_id(null); | 231 | shyComments.setReceive_user_id(null); |
| 232 | int i = shyCommentsMapper.updateByPrimaryKeySelective(shyComments); | 232 | int i = shyCommentsMapper.updateByPrimaryKeySelective(shyComments); |
src/main/java/com/cnlive/shenhe/serviceImpl/VideosServiceImpl.java
| @@ -193,9 +193,9 @@ public class VideosServiceImpl { | @@ -193,9 +193,9 @@ public class VideosServiceImpl { | ||
| 193 | String[] cids = ids.split(","); | 193 | String[] cids = ids.split(","); |
| 194 | for (String cid : cids) { | 194 | for (String cid : cids) { |
| 195 | ShyVideos shyVideos = shyVideosMapper.selectByPrimaryKey(Integer.parseInt(cid)); | 195 | ShyVideos shyVideos = shyVideosMapper.selectByPrimaryKey(Integer.parseInt(cid)); |
| 196 | - if (CommonUtils.isNotNull(shyVideos) && shyVideos.getState() == CommonConst.AUDIT_INTT && !shyVideos.getReceive()) { | 196 | + if (CommonUtils.isNotNull(shyVideos) && shyVideos.getState() == CommonConst.AUDIT_INTT && shyVideos.getReceive()==CommonConst.RECEIVE_BEFORE) { |
| 197 | shyVideos.setReceive_user_id(userId); | 197 | shyVideos.setReceive_user_id(userId); |
| 198 | - shyVideos.setReceive(true); | 198 | + shyVideos.setReceive(CommonConst.RECEIVE_AFTER); |
| 199 | shyVideosMapper.updateByPrimaryKeySelective(shyVideos); | 199 | shyVideosMapper.updateByPrimaryKeySelective(shyVideos); |
| 200 | n++; | 200 | n++; |
| 201 | } | 201 | } |
| @@ -210,7 +210,7 @@ public class VideosServiceImpl { | @@ -210,7 +210,7 @@ public class VideosServiceImpl { | ||
| 210 | if (!shyCommentsList.isEmpty()) { | 210 | if (!shyCommentsList.isEmpty()) { |
| 211 | for (ShyVideos shyComments : shyCommentsList) { | 211 | for (ShyVideos shyComments : shyCommentsList) { |
| 212 | shyComments.setReceive_user_id(userId); | 212 | shyComments.setReceive_user_id(userId); |
| 213 | - shyComments.setReceive(true); | 213 | + shyComments.setReceive(CommonConst.RECEIVE_AFTER); |
| 214 | shyVideosMapper.updateByPrimaryKeySelective(shyComments); | 214 | shyVideosMapper.updateByPrimaryKeySelective(shyComments); |
| 215 | n++; | 215 | n++; |
| 216 | } | 216 | } |
| @@ -224,7 +224,7 @@ public class VideosServiceImpl { | @@ -224,7 +224,7 @@ public class VideosServiceImpl { | ||
| 224 | String[] cids = ids.split(","); | 224 | String[] cids = ids.split(","); |
| 225 | for (String cid : cids) { | 225 | for (String cid : cids) { |
| 226 | ShyVideos shyVideos = shyVideosMapper.selectByPrimaryKey(Integer.parseInt(cid)); | 226 | ShyVideos shyVideos = shyVideosMapper.selectByPrimaryKey(Integer.parseInt(cid)); |
| 227 | - if (shyVideos.getState() == CommonConst.AUDIT_INTT && shyVideos.getReceive() && shyVideos.getReceive_user_id().equals(userId)) { | 227 | + if (shyVideos.getState() == CommonConst.AUDIT_INTT && shyVideos.getReceive()==CommonConst.RECEIVE_AFTER && shyVideos.getReceive_user_id().equals(userId)) { |
| 228 | shyVideos.setReceive(CommonConst.RECEIVE_BEFORE); | 228 | shyVideos.setReceive(CommonConst.RECEIVE_BEFORE); |
| 229 | shyVideos.setReceive_user_id(null); | 229 | shyVideos.setReceive_user_id(null); |
| 230 | int i = shyVideosMapper.updateByPrimaryKey(shyVideos); | 230 | int i = shyVideosMapper.updateByPrimaryKey(shyVideos); |
src/main/java/com/cnlive/shenhe/utils/CommonConst.java
| @@ -43,11 +43,15 @@ public class CommonConst { | @@ -43,11 +43,15 @@ public class CommonConst { | ||
| 43 | /** | 43 | /** |
| 44 | * 领取状态:未领 | 44 | * 领取状态:未领 |
| 45 | */ | 45 | */ |
| 46 | - public static Boolean RECEIVE_BEFORE = false; | 46 | + public static Integer RECEIVE_BEFORE = 0; |
| 47 | /** | 47 | /** |
| 48 | * 领取状态:已领 | 48 | * 领取状态:已领 |
| 49 | */ | 49 | */ |
| 50 | - public static Boolean RECEIVE_AFTER= true; | 50 | + public static Integer RECEIVE_AFTER= 1; |
| 51 | + /** | ||
| 52 | + * 领取状态:已审 | ||
| 53 | + */ | ||
| 54 | + public static Integer RECEIVE_AUDIT= 2; | ||
| 51 | 55 | ||
| 52 | /** | 56 | /** |
| 53 | * 用户状态:可用 | 57 | * 用户状态:可用 |
| @@ -69,6 +73,11 @@ public class CommonConst { | @@ -69,6 +73,11 @@ public class CommonConst { | ||
| 69 | */ | 73 | */ |
| 70 | public static Integer BUSINESS_COMMENT = 2; | 74 | public static Integer BUSINESS_COMMENT = 2; |
| 71 | 75 | ||
| 76 | + /** | ||
| 77 | + * 白名单业务:图文 | ||
| 78 | + */ | ||
| 79 | + public static Integer BUSINESS_CONTENT = 3; | ||
| 80 | + | ||
| 72 | public static JSONObject BUSINESS = JSONObject.parseObject("{\"1\":\"点播业务\",\"2\":\"评论业务\"}"); | 81 | public static JSONObject BUSINESS = JSONObject.parseObject("{\"1\":\"点播业务\",\"2\":\"评论业务\"}"); |
| 73 | 82 | ||
| 74 | /** | 83 | /** |
| @@ -131,7 +140,7 @@ public class CommonConst { | @@ -131,7 +140,7 @@ public class CommonConst { | ||
| 131 | /** | 140 | /** |
| 132 | * 数美过滤器尺度状态:新闻 | 141 | * 数美过滤器尺度状态:新闻 |
| 133 | */ | 142 | */ |
| 134 | - public static String DYNAMIC_NEWS = "DYNAMIC_NEWS"; | 143 | + public static String DYNAMIC_NEWS = "NEWS"; |
| 135 | 144 | ||
| 136 | /** | 145 | /** |
| 137 | * 数美过滤器返回结果:通过 | 146 | * 数美过滤器返回结果:通过 |
src/main/resources/mapper/ShyUsersfreeMapper.xml
| @@ -9,6 +9,6 @@ | @@ -9,6 +9,6 @@ | ||
| 9 | <result column="user_id" jdbcType="VARCHAR" property="user_id" /> | 9 | <result column="user_id" jdbcType="VARCHAR" property="user_id" /> |
| 10 | <result column="sp_id" jdbcType="INTEGER" property="sp_id" /> | 10 | <result column="sp_id" jdbcType="INTEGER" property="sp_id" /> |
| 11 | <result column="category" jdbcType="VARCHAR" property="category" /> | 11 | <result column="category" jdbcType="VARCHAR" property="category" /> |
| 12 | - <result column="isEnable" jdbcType="INTEGER" property="isEnable" /> | 12 | + <result column="is_enable" jdbcType="INTEGER" property="is_enable" /> |
| 13 | </resultMap> | 13 | </resultMap> |
| 14 | </mapper> | 14 | </mapper> |
| 15 | \ No newline at end of file | 15 | \ No newline at end of file |