Commit 3c7f8a2cfdc8d009b3537b18240e0c48868fa43a

Authored by 陈杰
1 parent be5d580a
Exists in master

bug 修复

src/main/java/com/sincere/student/controller/AdminController.java
@@ -461,9 +461,11 @@ public class AdminController { @@ -461,9 +461,11 @@ public class AdminController {
461 temp.setSort(1); 461 temp.setSort(1);
462 temp.setType(AdvertEnums.screen.getType()); 462 temp.setType(AdvertEnums.screen.getType());
463 temp.setImgUrl(dto.getUrl()); 463 temp.setImgUrl(dto.getUrl());
  464 + temp.setUrlLink(dto.getUrlLink());
464 advertService.create(temp); 465 advertService.create(temp);
465 }else { 466 }else {
466 advert.setImgUrl(dto.getUrl()); 467 advert.setImgUrl(dto.getUrl());
  468 + advert.setUrlLink(dto.getUrlLink());
467 advertService.update(advert); 469 advertService.update(advert);
468 } 470 }
469 return new BaseDto() ; 471 return new BaseDto() ;
src/main/java/com/sincere/student/controller/AppController.java
@@ -106,6 +106,37 @@ public class AppController { @@ -106,6 +106,37 @@ public class AppController {
106 return result ; 106 return result ;
107 } 107 }
108 108
  109 + @ApiOperation("首页 搜索 按钮 咨询列表")
  110 + @RequestMapping(value = "/consult/getConsultListSearch" , method = RequestMethod.POST)
  111 + public BaseDto<List<AppConsult>> getConsultListSearch(@RequestBody ConsultSearchDto consultSearchDto){
  112 + consultSearchDto.setStatus(1);
  113 + consultSearchDto.setPage(1);
  114 + consultSearchDto.setPageSize(3);
  115 + BaseDto<List<AppConsult>> result = new BaseDto<>();
  116 + List<AppConsult> data = new ArrayList<>();
  117 + ColumnDto columnDto = new ColumnDto();
  118 + columnDto.setType(ColumnEnums.university.getType());
  119 + List<ColumnType> columnTypes = columnService.getList(columnDto);
  120 + if(columnTypes != null && columnTypes.size() > 0){
  121 + for(ColumnType columnType : columnTypes){
  122 + consultSearchDto.setColumnType(columnType.getId());
  123 + Page<Consult> page = consultService.getList(consultSearchDto);
  124 + AppConsult appConsult = new AppConsult();
  125 + appConsult.setColumnTypeId(columnType.getId());
  126 + appConsult.setName(columnType.getName());
  127 + appConsult.setList(page.getList());
  128 + if(appConsult.getList() != null && appConsult.getList().size() > 0){
  129 + data.add(appConsult);
  130 + }
  131 + }
  132 + result.setData(data);
  133 + }else {
  134 + result.setSuccess(false);
  135 + result.setMessage("后台暂未分配招生咨询会栏目");
  136 + }
  137 + return result ;
  138 + }
  139 +
109 @ApiOperation("获取首页学校 咨询列表 more") 140 @ApiOperation("获取首页学校 咨询列表 more")
110 @RequestMapping(value = "/consult/getConsultPage" , method = RequestMethod.POST) 141 @RequestMapping(value = "/consult/getConsultPage" , method = RequestMethod.POST)
111 public BaseDto<Page<Consult>> getConsultTypeList(@RequestBody ConsultPageDto consultPageDto){ 142 public BaseDto<Page<Consult>> getConsultTypeList(@RequestBody ConsultPageDto consultPageDto){
@@ -172,7 +203,24 @@ public class AppController { @@ -172,7 +203,24 @@ public class AppController {
172 @RequestMapping(value = "/article/getDetail/{id}" , method = RequestMethod.POST) 203 @RequestMapping(value = "/article/getDetail/{id}" , method = RequestMethod.POST)
173 public BaseDto<Article> getDetail(@PathVariable("id") int id){ 204 public BaseDto<Article> getDetail(@PathVariable("id") int id){
174 BaseDto<Article> result = new BaseDto<>() ; 205 BaseDto<Article> result = new BaseDto<>() ;
175 - result.setData(articleService.selectById(id)); 206 + Article article = articleService.selectById(id) ;
  207 + result.setData(article);
  208 + Article temp = new Article();
  209 + temp.setId(id);
  210 + temp.setLookNumber(article.getLookNumber()+1);
  211 + articleService.update(temp);
  212 + return result ;
  213 + }
  214 +
  215 + @ApiOperation(" 点赞 权威解读(文章广告)相关接口")
  216 + @RequestMapping(value = "/article/good/{id}" , method = RequestMethod.POST)
  217 + public BaseDto good(@PathVariable("id") int id){
  218 + BaseDto result = new BaseDto<>() ;
  219 + Article article = articleService.selectById(id) ;
  220 + Article temp = new Article();
  221 + temp.setId(id);
  222 + temp.setGoodNumber(article.getGoodNumber()+1);
  223 + articleService.update(temp);
176 return result ; 224 return result ;
177 } 225 }
178 226
src/main/java/com/sincere/student/controller/CommonController.java
@@ -8,6 +8,7 @@ import org.springframework.web.bind.annotation.RequestMapping; @@ -8,6 +8,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
8 import org.springframework.web.bind.annotation.RequestMethod; 8 import org.springframework.web.bind.annotation.RequestMethod;
9 import org.springframework.web.bind.annotation.RestController; 9 import org.springframework.web.bind.annotation.RestController;
10 10
  11 +import java.util.ArrayList;
11 import java.util.Arrays; 12 import java.util.Arrays;
12 import java.util.List; 13 import java.util.List;
13 14
@@ -18,11 +19,32 @@ public class CommonController { @@ -18,11 +19,32 @@ public class CommonController {
18 @Autowired 19 @Autowired
19 CommonService commonService ; 20 CommonService commonService ;
20 21
  22 + private static List<Area> list = new ArrayList<>();
21 23
22 @ApiOperation("省份") 24 @ApiOperation("省份")
23 @RequestMapping(value = "getProvince",method = RequestMethod.GET) 25 @RequestMapping(value = "getProvince",method = RequestMethod.GET)
24 public List<Area> getProvince(){ 26 public List<Area> getProvince(){
25 - return commonService.getProvince(); 27 + if(list.size() == 0){
  28 + List<Area> areas = commonService.getProvince();
  29 + for(Area area : areas){
  30 + List<Area> cityList = commonService.getCity(area.getCode());
  31 + if(area.getName().contains("市")){
  32 + //获取全部
  33 + area.setList(cityList);
  34 + }else {
  35 + //获取4位的市
  36 + List<Area> trueCityList = new ArrayList<>();
  37 + for(Area city : cityList){
  38 + if(city.getCode().length() < 6){
  39 + trueCityList.add(city);
  40 + }
  41 + }
  42 + area.setList(trueCityList);
  43 + }
  44 + }
  45 + list = areas ;
  46 + }
  47 + return list ;
26 } 48 }
27 49
28 @ApiOperation("市") 50 @ApiOperation("市")
src/main/java/com/sincere/student/controller/IndexController.java
@@ -1,28 +0,0 @@ @@ -1,28 +0,0 @@
1 -package com.sincere.student.controller;  
2 -  
3 -import org.springframework.stereotype.Controller;  
4 -import org.springframework.web.bind.annotation.RequestMapping;  
5 -import org.springframework.web.bind.annotation.RequestMethod;  
6 -import org.springframework.web.bind.annotation.RequestParam;  
7 -import org.springframework.web.bind.annotation.ResponseBody;  
8 -import org.springframework.web.multipart.MultipartFile;  
9 -  
10 -import java.io.File;  
11 -import java.io.FileOutputStream;  
12 -import java.io.InputStream;  
13 -import java.io.OutputStream;  
14 -  
15 -@Controller  
16 -public class IndexController {  
17 -  
18 - @RequestMapping("index")  
19 - public String index(){  
20 - return "index" ;  
21 - }  
22 -  
23 - @ResponseBody  
24 - @RequestMapping(value = "upload" ,method = RequestMethod.POST)  
25 - public String upload(@RequestParam("file") MultipartFile file) throws Exception{  
26 - return file.getOriginalFilename() ;  
27 - }  
28 -}  
src/main/java/com/sincere/student/dto/LinkUsDto.java
@@ -3,6 +3,15 @@ package com.sincere.student.dto; @@ -3,6 +3,15 @@ package com.sincere.student.dto;
3 public class LinkUsDto { 3 public class LinkUsDto {
4 4
5 private String url ; 5 private String url ;
  6 + private String urlLink ;
  7 +
  8 + public String getUrlLink() {
  9 + return urlLink;
  10 + }
  11 +
  12 + public void setUrlLink(String urlLink) {
  13 + this.urlLink = urlLink;
  14 + }
6 15
7 public String getUrl() { 16 public String getUrl() {
8 return url; 17 return url;
src/main/java/com/sincere/student/model/Advert.java
@@ -12,11 +12,11 @@ public class Advert { @@ -12,11 +12,11 @@ public class Advert {
12 private int id ; 12 private int id ;
13 @ApiModelProperty(value = "广告类型 1:开屏 2:banner 所有接口不用传") 13 @ApiModelProperty(value = "广告类型 1:开屏 2:banner 所有接口不用传")
14 private int type ; 14 private int type ;
15 - @ApiModelProperty(value = "图片地址") 15 + @ApiModelProperty(value = "必传 图片地址")
16 private String imgUrl ; 16 private String imgUrl ;
17 @ApiModelProperty(value = "外链") 17 @ApiModelProperty(value = "外链")
18 private String urlLink ; 18 private String urlLink ;
19 - @ApiModelProperty(value = "排序") 19 + @ApiModelProperty(value = "必传 排序")
20 private int sort ; 20 private int sort ;
21 @ApiModelProperty(value = "状态 预留字段 所有接口不用传") 21 @ApiModelProperty(value = "状态 预留字段 所有接口不用传")
22 private int status ; 22 private int status ;
src/main/java/com/sincere/student/model/Area.java
1 package com.sincere.student.model; 1 package com.sincere.student.model;
2 2
  3 +import java.util.List;
  4 +
3 public class Area { 5 public class Area {
4 6
5 private String code ; 7 private String code ;
6 private String name ; 8 private String name ;
7 9
  10 + private List<Area> list ;
  11 +
  12 + public List<Area> getList() {
  13 + return list;
  14 + }
  15 +
  16 + public void setList(List<Area> list) {
  17 + this.list = list;
  18 + }
  19 +
8 public String getCode() { 20 public String getCode() {
9 return code; 21 return code;
10 } 22 }
src/main/java/com/sincere/student/model/Article.java
@@ -10,17 +10,17 @@ public class Article { @@ -10,17 +10,17 @@ public class Article {
10 10
11 @ApiModelProperty(value = "主键 , 新增接口不用传") 11 @ApiModelProperty(value = "主键 , 新增接口不用传")
12 private int id ; 12 private int id ;
13 - @ApiModelProperty(value = "标题") 13 + @ApiModelProperty(value = "必传 标题")
14 private String title ; 14 private String title ;
15 @ApiModelProperty(value = "栏目 type=1 不用传") 15 @ApiModelProperty(value = "栏目 type=1 不用传")
16 private int columnType ; 16 private int columnType ;
17 - @ApiModelProperty(value = "大学id") 17 + @ApiModelProperty(value = "必传 大学id")
18 private int universityId ; 18 private int universityId ;
19 - @ApiModelProperty(value = "排序") 19 + @ApiModelProperty(value = "必传 排序")
20 private int sort ; 20 private int sort ;
21 @ApiModelProperty(value = "内容") 21 @ApiModelProperty(value = "内容")
22 private String context ; 22 private String context ;
23 - @ApiModelProperty(value = "作者") 23 + @ApiModelProperty(value = "必传 作者")
24 private String author ; 24 private String author ;
25 @ApiModelProperty(value = "封面图片") 25 @ApiModelProperty(value = "封面图片")
26 private String imageUrl ; 26 private String imageUrl ;
src/main/java/com/sincere/student/model/Major.java
@@ -8,9 +8,9 @@ public class Major { @@ -8,9 +8,9 @@ public class Major {
8 8
9 @ApiModelProperty(value = "主键 , 新增接口不用传") 9 @ApiModelProperty(value = "主键 , 新增接口不用传")
10 private int id ; 10 private int id ;
11 - @ApiModelProperty(value = "专业名") 11 + @ApiModelProperty(value = "必传 专业名")
12 private String major ; 12 private String major ;
13 - @ApiModelProperty(value = "专业编码") 13 + @ApiModelProperty(value = "必传 专业编码")
14 private String majorCode ; 14 private String majorCode ;
15 @ApiModelProperty(value = "父级专业id") //-1 说明是一级专业 15 @ApiModelProperty(value = "父级专业id") //-1 说明是一级专业
16 private int pId ; 16 private int pId ;
src/main/java/com/sincere/student/model/Message.java
@@ -10,9 +10,9 @@ import java.util.List; @@ -10,9 +10,9 @@ import java.util.List;
10 public class Message { 10 public class Message {
11 @ApiModelProperty(value = "主键 , 新增接口不用传") 11 @ApiModelProperty(value = "主键 , 新增接口不用传")
12 private Integer id; 12 private Integer id;
13 - @ApiModelProperty(value = "标题") 13 + @ApiModelProperty(value = "必传 标题")
14 private String title; 14 private String title;
15 - @ApiModelProperty(value = "内容") 15 + @ApiModelProperty(value = "必传 内容")
16 private String context; 16 private String context;
17 @ApiModelProperty(value = "联系方式") 17 @ApiModelProperty(value = "联系方式")
18 private String phone; 18 private String phone;
src/main/java/com/sincere/student/model/Reply.java
@@ -11,7 +11,7 @@ public class Reply { @@ -11,7 +11,7 @@ public class Reply {
11 private Integer id; 11 private Integer id;
12 @ApiModelProperty(value = "留言主键") 12 @ApiModelProperty(value = "留言主键")
13 private Integer messageId; 13 private Integer messageId;
14 - @ApiModelProperty(value = "内容") 14 + @ApiModelProperty(value = "必传 内容")
15 private String context; 15 private String context;
16 @ApiModelProperty(value = "不用传") 16 @ApiModelProperty(value = "不用传")
17 private Date createTime; 17 private Date createTime;
src/main/java/com/sincere/student/model/SubmitFile.java
@@ -10,13 +10,13 @@ import java.util.List; @@ -10,13 +10,13 @@ import java.util.List;
10 public class SubmitFile { 10 public class SubmitFile {
11 @ApiModelProperty(value = "主键 , 新增接口不用传") 11 @ApiModelProperty(value = "主键 , 新增接口不用传")
12 private Integer id; 12 private Integer id;
13 - @ApiModelProperty(value = "标题") 13 + @ApiModelProperty(value = "必传 标题")
14 private String title; 14 private String title;
15 - @ApiModelProperty(value = "年") 15 + @ApiModelProperty(value = "必传 年")
16 private String year; 16 private String year;
17 - @ApiModelProperty(value = "排序") 17 + @ApiModelProperty(value = "必传 排序")
18 private Integer sort; 18 private Integer sort;
19 - @ApiModelProperty(value = "文件路径") 19 + @ApiModelProperty(value = "必传 文件路径")
20 private String fileUrl ; 20 private String fileUrl ;
21 @ApiModelProperty(value = "不用传") 21 @ApiModelProperty(value = "不用传")
22 private Date createTime; 22 private Date createTime;
src/main/java/com/sincere/student/model/University.java
@@ -11,19 +11,19 @@ public class University { @@ -11,19 +11,19 @@ public class University {
11 11
12 @ApiModelProperty(value = "主键 , 新增接口不用传") 12 @ApiModelProperty(value = "主键 , 新增接口不用传")
13 private int id ; 13 private int id ;
14 - @ApiModelProperty(value = "学校名称") 14 + @ApiModelProperty(value = "必传 学校名称")
15 private String name ; 15 private String name ;
16 - @ApiModelProperty(value = "学校编码") 16 + @ApiModelProperty(value = "必传 学校编码")
17 private String code ; 17 private String code ;
18 - @ApiModelProperty(value = "高校学科类型") 18 + @ApiModelProperty(value = "必传 高校学科类型")
19 private String universityType ; 19 private String universityType ;
20 - @ApiModelProperty(value = "主管部门") 20 + @ApiModelProperty(value = "必传 主管部门")
21 private String department; 21 private String department;
22 - @ApiModelProperty(value = "所在省") 22 + @ApiModelProperty(value = "必传 所在省")
23 private String province ; 23 private String province ;
24 - @ApiModelProperty(value = "所在市") 24 + @ApiModelProperty(value = "必传 所在市")
25 private String city ; 25 private String city ;
26 - @ApiModelProperty(value = "办学层次") 26 + @ApiModelProperty(value = "必传 办学层次")
27 private String level ; 27 private String level ;
28 @ApiModelProperty(value = "联系方式") 28 @ApiModelProperty(value = "联系方式")
29 private String phone ; 29 private String phone ;
src/main/resources/mapper/ArticleMapper.xml
@@ -24,7 +24,7 @@ @@ -24,7 +24,7 @@
24 <select id="getListCount" parameterType="com.sincere.student.dto.ArticleSearchDto" resultType="java.lang.Integer"> 24 <select id="getListCount" parameterType="com.sincere.student.dto.ArticleSearchDto" resultType="java.lang.Integer">
25 select count(0) from university_article 25 select count(0) from university_article
26 <where> 26 <where>
27 - <if test="title != null"> 27 + <if test="title != null and title != ''">
28 and title like #{title} 28 and title like #{title}
29 </if> 29 </if>
30 <if test="columnType != 0"> 30 <if test="columnType != 0">
@@ -45,7 +45,7 @@ @@ -45,7 +45,7 @@
45 <select id="getList" parameterType="com.sincere.student.dto.ArticleSearchDto" resultMap="ArticleMap"> 45 <select id="getList" parameterType="com.sincere.student.dto.ArticleSearchDto" resultMap="ArticleMap">
46 select * from university_article 46 select * from university_article
47 <where> 47 <where>
48 - <if test="title != null"> 48 + <if test="title != null and title != ''">
49 and title like #{title} 49 and title like #{title}
50 </if> 50 </if>
51 <if test="columnType != 0"> 51 <if test="columnType != 0">
@@ -90,9 +90,6 @@ @@ -90,9 +90,6 @@
90 <if test="columnType!=0"> 90 <if test="columnType!=0">
91 column_type=#{columnType}, 91 column_type=#{columnType},
92 </if> 92 </if>
93 - <if test="universityName!=null">  
94 - university_name=#{universityName},  
95 - </if>  
96 <if test="universityId!=0"> 93 <if test="universityId!=0">
97 university_id=#{universityId}, 94 university_id=#{universityId},
98 </if> 95 </if>
src/main/resources/mapper/MajorMapper.xml
@@ -15,7 +15,7 @@ @@ -15,7 +15,7 @@
15 <if test="pId != 0"> 15 <if test="pId != 0">
16 and p_id = #{pId} 16 and p_id = #{pId}
17 </if> 17 </if>
18 - <if test="major != null"> 18 + <if test="major != null and major != ''">
19 and major like #{major} 19 and major like #{major}
20 </if> 20 </if>
21 </where> 21 </where>
@@ -27,7 +27,7 @@ @@ -27,7 +27,7 @@
27 <if test="pId >= 0"> 27 <if test="pId >= 0">
28 and p_id = #{pId} 28 and p_id = #{pId}
29 </if> 29 </if>
30 - <if test="major != null"> 30 + <if test="major != null and major != ''">
31 and major like #{major} 31 and major like #{major}
32 </if> 32 </if>
33 <if test="majorCode != null"> 33 <if test="majorCode != null">
src/main/resources/mapper/UniversityConsultMapper.xml
@@ -24,16 +24,16 @@ @@ -24,16 +24,16 @@
24 <if test="columnType == 0"> 24 <if test="columnType == 0">
25 and c.column_type = (select top 1 id from university_column_type where type = 2 order by sort) 25 and c.column_type = (select top 1 id from university_column_type where type = 2 order by sort)
26 </if> 26 </if>
27 - <if test="province != null"> 27 + <if test="province != null and province != '' ">
28 and info.province = #{province} 28 and info.province = #{province}
29 </if> 29 </if>
30 - <if test="city != null"> 30 + <if test="city != null and city != '' ">
31 and info.city = #{city} 31 and info.city = #{city}
32 </if> 32 </if>
33 - <if test="universityName != null"> 33 + <if test="universityName != null and universityName != ''">
34 and info.name like #{universityName} 34 and info.name like #{universityName}
35 </if> 35 </if>
36 - <if test="majorName != null"> 36 + <if test="majorName != null and majorName != ''">
37 and m.major like #{majorName} 37 and m.major like #{majorName}
38 </if> 38 </if>
39 <if test="status == 1"> 39 <if test="status == 1">
@@ -57,16 +57,16 @@ @@ -57,16 +57,16 @@
57 <if test="columnType == 0"> 57 <if test="columnType == 0">
58 and c.column_type = (select top 1 id from university_column_type where type = 2 order by sort) 58 and c.column_type = (select top 1 id from university_column_type where type = 2 order by sort)
59 </if> 59 </if>
60 - <if test="province != null"> 60 + <if test="province != null and province != '' ">
61 and info.province = #{province} 61 and info.province = #{province}
62 </if> 62 </if>
63 - <if test="city != null"> 63 + <if test="city != null and city != '' ">
64 and info.city = #{city} 64 and info.city = #{city}
65 </if> 65 </if>
66 - <if test="universityName != null"> 66 + <if test="universityName != null and universityName != ''">
67 and info.name like #{universityName} 67 and info.name like #{universityName}
68 </if> 68 </if>
69 - <if test="majorName != null"> 69 + <if test="majorName != null and majorName != ''">
70 and m.major like #{majorName} 70 and m.major like #{majorName}
71 </if> 71 </if>
72 <if test="status == 1"> 72 <if test="status == 1">
src/main/resources/mapper/UniversityMapper.xml
@@ -18,7 +18,7 @@ @@ -18,7 +18,7 @@
18 <select id="getListCount" parameterType="com.sincere.student.dto.UniversitySearchDto" resultType="java.lang.Integer"> 18 <select id="getListCount" parameterType="com.sincere.student.dto.UniversitySearchDto" resultType="java.lang.Integer">
19 select count(0) from university_info 19 select count(0) from university_info
20 <where> 20 <where>
21 - <if test="search != null"> 21 + <if test="search != null and search != ''">
22 and name like #{search} 22 and name like #{search}
23 </if> 23 </if>
24 </where> 24 </where>
@@ -27,7 +27,7 @@ @@ -27,7 +27,7 @@
27 <select id="getList" parameterType="com.sincere.student.dto.UniversitySearchDto" resultMap="UniversityMap"> 27 <select id="getList" parameterType="com.sincere.student.dto.UniversitySearchDto" resultMap="UniversityMap">
28 select * from university_info 28 select * from university_info
29 <where> 29 <where>
30 - <if test="search != null"> 30 + <if test="search != null and search != ''">
31 and name like #{search} 31 and name like #{search}
32 </if> 32 </if>
33 </where> 33 </where>
src/main/resources/mapper/UniversityMessageMapper.xml
@@ -12,7 +12,7 @@ @@ -12,7 +12,7 @@
12 <select id="getListCount" parameterType="com.sincere.student.dto.MessageSearchDto" resultType="java.lang.Integer"> 12 <select id="getListCount" parameterType="com.sincere.student.dto.MessageSearchDto" resultType="java.lang.Integer">
13 select * from university_message 13 select * from university_message
14 <where> 14 <where>
15 - <if test="search != null"> 15 + <if test="search != null and search != ''">
16 and title like #{search} 16 and title like #{search}
17 </if> 17 </if>
18 </where> 18 </where>
@@ -21,7 +21,7 @@ @@ -21,7 +21,7 @@
21 <select id="getList" parameterType="com.sincere.student.dto.MessageSearchDto" resultMap="BaseResultMap"> 21 <select id="getList" parameterType="com.sincere.student.dto.MessageSearchDto" resultMap="BaseResultMap">
22 select * from university_message 22 select * from university_message
23 <where> 23 <where>
24 - <if test="search != null"> 24 + <if test="search != null and search != ''">
25 and title like #{search} 25 and title like #{search}
26 </if> 26 </if>
27 </where> 27 </where>
src/main/resources/mapper/UniversitySubmitFileMapper.xml
@@ -26,16 +26,16 @@ @@ -26,16 +26,16 @@
26 <if test="submitId != 0"> 26 <if test="submitId != 0">
27 and sf.id = #{submitId} 27 and sf.id = #{submitId}
28 </if> 28 </if>
29 - <if test="universityName != null"> 29 + <if test="universityName != null and universityName != '' ">
30 and info.name like #{universityName} 30 and info.name like #{universityName}
31 </if> 31 </if>
32 - <if test="province != null"> 32 + <if test="province != null and province != '' ">
33 and info.province = #{province} 33 and info.province = #{province}
34 </if> 34 </if>
35 - <if test="city != null"> 35 + <if test="city != null and city != '' ">
36 and info.city = #{city} 36 and info.city = #{city}
37 </if> 37 </if>
38 - <if test="majorName != null"> 38 + <if test="majorName != null and majorName != '' ">
39 and m.major like #{majorName} 39 and m.major like #{majorName}
40 </if> 40 </if>
41 <if test="point != 0 "> 41 <if test="point != 0 ">
@@ -56,16 +56,16 @@ @@ -56,16 +56,16 @@
56 <if test="submitId != 0"> 56 <if test="submitId != 0">
57 and sf.id = #{submitId} 57 and sf.id = #{submitId}
58 </if> 58 </if>
59 - <if test="universityName != null"> 59 + <if test="universityName != null and universityName != '' ">
60 and info.name like #{universityName} 60 and info.name like #{universityName}
61 </if> 61 </if>
62 - <if test="province != null"> 62 + <if test="province != null and province != '' ">
63 and info.province = #{province} 63 and info.province = #{province}
64 </if> 64 </if>
65 - <if test="city != null"> 65 + <if test="city != null and city != '' ">
66 and info.city = #{city} 66 and info.city = #{city}
67 </if> 67 </if>
68 - <if test="majorName != null"> 68 + <if test="majorName != null and majorName != '' ">
69 and m.major like #{majorName} 69 and m.major like #{majorName}
70 </if> 70 </if>
71 <if test="point != 0 "> 71 <if test="point != 0 ">
@@ -89,7 +89,7 @@ @@ -89,7 +89,7 @@
89 <select id="getListCount" parameterType="com.sincere.student.dto.MessageSearchDto" resultType="java.lang.Integer"> 89 <select id="getListCount" parameterType="com.sincere.student.dto.MessageSearchDto" resultType="java.lang.Integer">
90 select count(0) from university_submit_file 90 select count(0) from university_submit_file
91 <where> 91 <where>
92 - <if test="search != null"> 92 + <if test="search != null and search != '' ">
93 title like #{search} 93 title like #{search}
94 </if> 94 </if>
95 </where> 95 </where>
@@ -98,7 +98,7 @@ @@ -98,7 +98,7 @@
98 <select id="getList" parameterType="com.sincere.student.dto.MessageSearchDto" resultMap="BaseResultMap"> 98 <select id="getList" parameterType="com.sincere.student.dto.MessageSearchDto" resultMap="BaseResultMap">
99 select * from university_submit_file 99 select * from university_submit_file
100 <where> 100 <where>
101 - <if test="search != null"> 101 + <if test="search != null and search != '' ">
102 title like #{search} 102 title like #{search}
103 </if> 103 </if>
104 </where> 104 </where>
src/main/resources/mapper/VideoMapper.xml
@@ -27,7 +27,7 @@ @@ -27,7 +27,7 @@
27 <if test="universityName == 0"> 27 <if test="universityName == 0">
28 and 1 = 1 28 and 1 = 1
29 </if> 29 </if>
30 - <if test="universityName != null"> 30 + <if test="universityName != null and universityName != ''">
31 and info.name like #{universityName} 31 and info.name like #{universityName}
32 </if> 32 </if>
33 <if test="status == 1"> 33 <if test="status == 1">
@@ -45,7 +45,7 @@ @@ -45,7 +45,7 @@
45 <if test="columnTypeId != 0"> 45 <if test="columnTypeId != 0">
46 and v.column_type = #{columnTypeId} 46 and v.column_type = #{columnTypeId}
47 </if> 47 </if>
48 - <if test="universityName != null"> 48 + <if test="universityName != null and universityName != ''">
49 and info.name like #{universityName} 49 and info.name like #{universityName}
50 </if> 50 </if>
51 <if test="status == 1"> 51 <if test="status == 1">