Browse Source

修改sql

hgw 3 years ago
parent
commit
1963ee94ed

+ 1 - 1
cms/src/main/java/com/ym/mec/cms/controller/NewsController.java

@@ -61,7 +61,7 @@ public class NewsController extends BaseController {
         } else {
             return failed("参数错误");
         }
-        return succeed(sysNewsInformationDao.queryBySubType(subType));
+        return succeed(sysNewsInformationService.queryBySubType(subType));
     }
 
     @ApiOperation("资讯列表分页查询")

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

@@ -6,6 +6,7 @@ import java.util.Map;
 import com.ym.mec.cms.dal.entity.SysNewsInformation;
 import com.ym.mec.cms.dto.SysNewsInformationDto;
 import com.ym.mec.common.dal.BaseDAO;
+import org.apache.ibatis.annotations.Param;
 
 public interface SysNewsInformationDao extends BaseDAO<Long, SysNewsInformation> {
 
@@ -16,7 +17,7 @@ public interface SysNewsInformationDao extends BaseDAO<Long, SysNewsInformation>
 	 */
 	List<SysNewsInformation> queryByType(Integer type);
 
-	List<SysNewsInformation> queryBySubType(Integer subType);
+	List<SysNewsInformation> queryBySubType(@Param("subType") Integer subType);
 
 	/**
 	 * 逻辑删除