zouxuan 2 năm trước cách đây
mục cha
commit
09b408a6f2

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

@@ -1,29 +1,5 @@
 package com.ym.mec.cms.controller;
 
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiImplicitParam;
-import io.swagger.annotations.ApiImplicitParams;
-import io.swagger.annotations.ApiOperation;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Objects;
-import java.util.stream.Collectors;
-
-import org.apache.commons.lang3.StringUtils;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.http.MediaType;
-import org.springframework.security.access.prepost.PreAuthorize;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PathVariable;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
-
 import com.ym.mec.auth.api.client.SysUserFeignService;
 import com.ym.mec.auth.api.entity.SysUser;
 import com.ym.mec.cms.controller.queryinfo.NewsInformationQueryInfo;
@@ -42,6 +18,7 @@ import com.ym.mec.web.WebFeignService;
 import com.yonge.log.model.AuditLogAnnotation;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
 import io.swagger.annotations.ApiOperation;
 import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -52,8 +29,6 @@ import org.springframework.web.bind.annotation.*;
 import java.util.*;
 import java.util.stream.Collectors;
 
-import javax.validation.constraints.NotNull;
-
 @RestController
 @RequestMapping("news")
 @Api(tags = "资讯服务")

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

@@ -1,21 +1,14 @@
 package com.ym.mec.cms.dal.dao;
 
-import java.util.List;
-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> {
+import java.util.List;
+import java.util.Map;
 
-	/**
-	 * 根据类型查询资讯列表
-	 * @param type
-	 * @return
-	 */
-	List<SysNewsInformation> queryByType(@Param("type") Integer type);
+public interface SysNewsInformationDao extends BaseDAO<Long, SysNewsInformation> {
 
 	List<SysNewsInformation> queryBottomInfo(@Param("subType") Integer subType);
 

+ 1 - 0
cms/src/main/java/com/ym/mec/cms/service/SysNewsInformationService.java

@@ -7,6 +7,7 @@ import com.ym.mec.cms.dto.SysNewsInformationDto;
 import com.ym.mec.common.page.PageInfo;
 import com.ym.mec.common.service.BaseService;
 
+import java.util.List;
 import java.util.Map;
 
 public interface SysNewsInformationService extends BaseService<Long, SysNewsInformation> {

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

@@ -28,11 +28,6 @@ public class SysNewsInformationServiceImpl extends BaseServiceImpl<Long, SysNews
 		return sysNewsInformationDao;
 	}
 
-	@Override
-	public List<SysNewsInformation> queryByType(Integer type) {
-		return sysNewsInformationDao.queryByType(type);
-	}
-
     @Override
     public List<SysNewsInformation> queryBottomInfo(Integer subType) {
         return sysNewsInformationDao.queryBottomInfo(subType);

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

@@ -186,17 +186,6 @@
 		<include refid="queryCondition" />
 	</select>
 	
-	<select id="queryByType" resultMap="SysNewsInformation" parameterType="java.lang.Integer">
-		SELECT * FROM sys_news_information 
-		<where>
-			del_flag_=0
-			<if test="type != null">
-				and sub_type_ = #{type}
-			</if>
-		</where>
-		ORDER BY order_ DESC
-	</select>
-
     <select id="queryBottomInfo" resultMap="SysNewsInformation" parameterType="java.lang.Integer">
         SELECT * FROM sys_news_information
         where del_flag_=0 and status_ = 1