Browse Source

fix:学生老师公告区分

liujunchi 2 years ago
parent
commit
68d3289a95

+ 2 - 1
cooleshow-cms/src/main/java/com/yonge/cooleshow/cms/dal/dao/HelpCenterContentDao.java

@@ -40,7 +40,8 @@ public interface HelpCenterContentDao extends BaseDAO<Long, HelpCenterContent> {
      * 查看状态为启用的公告
      *
      * @param status
+     * @param catalogType
      * @return
      */
-    Integer selectByNoticeStatus(@Param("status") Integer status);
+    Integer selectByNoticeStatus(@Param("status") Integer status, @Param("catalogType") String catalogType);
 }

+ 2 - 2
cooleshow-cms/src/main/java/com/yonge/cooleshow/cms/service/impl/HelpCenterContentServiceImpl.java

@@ -57,10 +57,10 @@ public class HelpCenterContentServiceImpl extends BaseServiceImpl<Long, HelpCent
 			contentCenterDao.status(id);
 			return true;
 		}
-		Integer count = contentCenterDao.selectByNoticeStatus(NewsStatusEnum.SHOW.getCode());
+		Integer count = contentCenterDao.selectByNoticeStatus(NewsStatusEnum.SHOW.getCode(),helpCenterContent.getCatalogType());
 
 		if (count >0) {
-			throw  new BizException("有正在启用的广告");
+			throw  new BizException("有正在启用的告");
 		}
 
 		contentCenterDao.status(id);

+ 3 - 0
cooleshow-cms/src/main/resources/config/mybatis/HelpCenterContentMapper.xml

@@ -248,6 +248,9 @@
 			<if test="status != null">
 				and hcc.status_ = #{status}
 			</if>
+			<if test="catalogType != null and catalogType != ''">
+				and hcc.catalog_type_ = #{catalogType}
+			</if>
 		</where>
 	</select>
 </mapper>

+ 0 - 3
cooleshow-cms/src/main/resources/config/mybatis/SysNewsInformationMapper.xml

@@ -261,9 +261,6 @@
 			<if test="status != null">
 				and sni.status_ = #{status}
 			</if>
-			<if test="version != null || version != ''">
-				and sni.attribute1_ = #{version}
-			</if>
 		</where>
 	</select>
 </mapper>