浏览代码

Merge remote-tracking branch 'origin/master_saas' into master_saas

zouxuan 3 年之前
父节点
当前提交
05092cc93a

+ 1 - 1
cms/src/main/java/com/ym/mec/cms/dal/dao/SysNewsInformationDao.java

@@ -15,7 +15,7 @@ public interface SysNewsInformationDao extends BaseDAO<Long, SysNewsInformation>
 	 * @param type
 	 * @return
 	 */
-	List<SysNewsInformation> queryByType(@Param("type") Integer type);
+	List<SysNewsInformation> queryByType(@Param("type") Integer type,@Param("subType") Integer subType);
 
 	/**
 	 * 逻辑删除

+ 1 - 1
cms/src/main/java/com/ym/mec/cms/service/impl/SysNewsInformationServiceImpl.java

@@ -50,7 +50,7 @@ public class SysNewsInformationServiceImpl extends BaseServiceImpl<Long, SysNews
 
 	@Override
 	public List<SysNewsInformation> queryByType(Integer type) {
-		return sysNewsInformationDao.queryByType(type);
+		return sysNewsInformationDao.queryByType(type,null);
 	}
 
 	@Override

+ 1 - 1
cms/src/main/java/com/ym/mec/cms/service/impl/SysNewsTypeServiceImpl.java

@@ -56,7 +56,7 @@ public class SysNewsTypeServiceImpl extends BaseServiceImpl<Integer, SysNewsType
         List<SysNewsType> all = sysNewsTypeDao.findAll(null);
 
         all.forEach(e -> {
-            List<SysNewsInformation> list = informationDao.queryByType(e.getId());
+            List<SysNewsInformation> list = informationDao.queryByType(null,e.getId());
             if (CollectionUtils.isNotEmpty(list)) {
                 e.setInformationList(list);
             }

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

@@ -192,6 +192,9 @@
 			<if test="type != null">
 				and type_ = #{type}
 			</if>
+			<if test="subType != null">
+				and sub_type_ = #{subType}
+			</if>
 		</where>
 	</select>