Browse Source

Merge branch '新增ios配置' of http://git.dayaedu.com/yonge/mec into master_saas

 Conflicts:
	cms/src/main/java/com/ym/mec/cms/controller/NewsController.java
	cms/src/main/java/com/ym/mec/cms/dal/dao/SysNewsInformationDao.java
	cms/src/main/java/com/ym/mec/cms/service/SysNewsTypeService.java
	cms/src/main/resources/config/mybatis/SysNewsInformationMapper.xml
zouxuan 3 years ago
parent
commit
b6efd0a124

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

@@ -1,5 +1,29 @@
 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;
@@ -193,9 +217,9 @@ public class NewsController extends BaseController {
 
 	@ApiOperation("查询资讯详情")
 	@ApiImplicitParams({@ApiImplicitParam(name = "id", value = "资讯ID编号", required = true, dataType = "Long"),
-						@ApiImplicitParam(name = "memo", value = "版本号",  dataType = "String") })
+			@ApiImplicitParam(name = "memo", value = "版本号",  dataType = "String") })
 	@GetMapping("/list/tree")
-	public Object listWithTree(Integer id,String memo) {
+	public Object listWithTree(Integer id, String memo) {
 		return succeed(sysNewsTypeService.listWithTree(id,memo));
 	}
 }

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

@@ -191,7 +191,7 @@
 		<where>
 			del_flag_=0
 			<if test="type != null">
-				and sub_type_ = #{type}
+				and type_ = #{type}
 			</if>
 			<if test="subType != null">
 				and sub_type_ = #{subType}
@@ -205,7 +205,7 @@
         where del_flag_=0 and status_ = 1
                 and sub_type_ = #{subType}
     </select>
-	
+
 	<update id="deleteWithLogical">
 		UPDATE sys_news_information SET del_flag_ = 1,update_time_ = NOW() WHERE id_ = #{id}
 	</update>
@@ -324,5 +324,6 @@
 		<if test="memo != null and memo !=''">
 			AND memo_ = #{memo}
 		</if>
+		ORDER BY order_ DESC
 	</select>
 </mapper>