diff --git a/admin/src/main/java/com/jinrui/reference/admin/AdminApplication.java b/admin/src/main/java/com/jinrui/reference/admin/AdminApplication.java index 0d9e152..3de7e46 100644 --- a/admin/src/main/java/com/jinrui/reference/admin/AdminApplication.java +++ b/admin/src/main/java/com/jinrui/reference/admin/AdminApplication.java @@ -6,6 +6,12 @@ import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.context.annotation.Bean; import org.springframework.util.StringUtils; + +import com.jinrui.reference.admin.controller.NewsController; +import com.jinrui.reference.core.model.vo.ResultObject; +import com.jinrui.reference.core.model.vo.news.NewsDetailVO; +import com.jinrui.reference.core.service.NewsService; + import redis.clients.jedis.JedisPool; import redis.clients.jedis.JedisPoolConfig; @@ -20,6 +26,7 @@ public class AdminApplication { public static void main(String[] args) { SpringApplication.run(AdminApplication.class, args); + System.out.println("++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"); } @Bean diff --git a/admin/src/main/java/com/jinrui/reference/admin/controller/NewsController.java b/admin/src/main/java/com/jinrui/reference/admin/controller/NewsController.java index 48ced2d..24177f2 100644 --- a/admin/src/main/java/com/jinrui/reference/admin/controller/NewsController.java +++ b/admin/src/main/java/com/jinrui/reference/admin/controller/NewsController.java @@ -1,15 +1,5 @@ package com.jinrui.reference.admin.controller; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.jinrui.reference.admin.model.dto.news.PublishNewsDTO; -import com.jinrui.reference.core.model.dto.news.SaveNewsDTO; -import com.jinrui.reference.admin.model.entity.AdminUser; -import com.jinrui.reference.core.model.vo.ResultObject; -import com.jinrui.reference.core.model.vo.news.NewsDetailVO; -import com.jinrui.reference.core.model.vo.news.NewsVO; -import com.jinrui.reference.admin.service.AdminJwtService; -import com.jinrui.reference.core.model.vo.PageObject; -import com.jinrui.reference.core.service.NewsService; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.util.StringUtils; @@ -22,6 +12,17 @@ import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RestController; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.jinrui.reference.admin.model.dto.news.PublishNewsDTO; +import com.jinrui.reference.admin.model.entity.AdminUser; +import com.jinrui.reference.admin.service.AdminJwtService; +import com.jinrui.reference.core.model.dto.news.SaveNewsDTO; +import com.jinrui.reference.core.model.vo.PageObject; +import com.jinrui.reference.core.model.vo.ResultObject; +import com.jinrui.reference.core.model.vo.news.NewsDetailVO; +import com.jinrui.reference.core.model.vo.news.NewsVO; +import com.jinrui.reference.core.service.NewsService; + @RestController @RequestMapping("/news") public class NewsController { diff --git a/core/src/main/java/com/jinrui/reference/core/mapper/IndustryMapper.java b/core/src/main/java/com/jinrui/reference/core/mapper/IndustryMapper.java index 9b071fb..2c2a270 100644 --- a/core/src/main/java/com/jinrui/reference/core/mapper/IndustryMapper.java +++ b/core/src/main/java/com/jinrui/reference/core/mapper/IndustryMapper.java @@ -19,7 +19,7 @@ import com.jinrui.reference.core.model.entity.NewsIndustryRel; public interface IndustryMapper { @Results({ @Result(column = "id", property = "id", id = true), - @Result(column = "primay_name", property = "primayName"), + @Result(column = "primary_name", property = "primaryName"), @Result(column = "secondary_name", property = "secondaryName"), @Result(column = "create_time", property = "createTime", javaType = Date.class, jdbcType = JdbcType.TIMESTAMP), @Result(column = "update_time", property = "updateTime", javaType = Date.class, jdbcType = JdbcType.TIMESTAMP) @@ -35,8 +35,8 @@ public interface IndustryMapper { "from news_industry_rel where news_id = #{newsId}") List getNewsIndustryRelList(@Param("newsId") Long newsId); - @Select("select * from industry where primary_name = #{primayName} and parent_id = 0") - Industry queryPrimaryIndustry(String primayName); + @Select("select * from industry where primary_name = #{primaryName} and parent_id = 0") + Industry queryPrimaryIndustry(String primaryName); @Select("select * from industry where secondary_name = #{secondaryName} and parent_id = #{parentId}") Industry querySecondaryIndustry(Long parentId,String secondaryName); @@ -61,7 +61,7 @@ public interface IndustryMapper { @Results({ @Result(column = "id", property = "id", id = true), @Result(column = "parent_id", property = "parentId"), - @Result(column = "primay_name", property = "primayName"), + @Result(column = "primary_name", property = "primaryName"), @Result(column = "secondary_name", property = "secondaryName"), @Result(column = "create_time", property = "createTime", javaType = Date.class, jdbcType = JdbcType.TIMESTAMP), @Result(column = "update_time", property = "updateTime", javaType = Date.class, jdbcType = JdbcType.TIMESTAMP) @@ -73,7 +73,7 @@ public interface IndustryMapper { "parent_id = #{parentId} " + "" + "" + - "and primay_name like concat('%', #{keyword}, '%') or secondary_name like concat('%', #{keyword}, '%') " + + "and primary_name like concat('%', #{keyword}, '%') or secondary_name like concat('%', #{keyword}, '%') " + "" + "" + "order by tag.${orderBy} " + diff --git a/core/src/main/java/com/jinrui/reference/core/model/entity/Industry.java b/core/src/main/java/com/jinrui/reference/core/model/entity/Industry.java index 22ecb43..d5fde6a 100644 --- a/core/src/main/java/com/jinrui/reference/core/model/entity/Industry.java +++ b/core/src/main/java/com/jinrui/reference/core/model/entity/Industry.java @@ -22,7 +22,7 @@ public class Industry { /** * 一级行业 */ - private String primayName; + private String primaryName; /** * 二级行业 @@ -55,12 +55,12 @@ public class Industry { this.parentId = parentId; } - public String getPrimayName() { - return primayName; + public String getPrimaryName() { + return primaryName; } - public void setPrimayName(String primayName) { - this.primayName = primayName; + public void setPrimaryName(String primaryName) { + this.primaryName = primaryName; } public String getSecondaryName() { diff --git a/core/src/main/java/com/jinrui/reference/core/model/vo/news/NewsDetailIndustry.java b/core/src/main/java/com/jinrui/reference/core/model/vo/news/NewsDetailIndustry.java index 0d50a07..b6be5cf 100644 --- a/core/src/main/java/com/jinrui/reference/core/model/vo/news/NewsDetailIndustry.java +++ b/core/src/main/java/com/jinrui/reference/core/model/vo/news/NewsDetailIndustry.java @@ -4,7 +4,7 @@ package com.jinrui.reference.core.model.vo.news; public class NewsDetailIndustry { private Long id; - private String primayName; + private String primaryName; private String secondaryName; @@ -16,12 +16,12 @@ public class NewsDetailIndustry { this.id = id; } - public String getPrimayName() { - return primayName; + public String getPrimaryName() { + return primaryName; } - public void setPrimayName(String primayName) { - this.primayName = primayName; + public void setPrimaryName(String primaryName) { + this.primaryName = primaryName; } public String getSecondaryName() { diff --git a/core/src/main/java/com/jinrui/reference/core/model/vo/tag/IndustryVO.java b/core/src/main/java/com/jinrui/reference/core/model/vo/tag/IndustryVO.java index ba90ce1..099008b 100644 --- a/core/src/main/java/com/jinrui/reference/core/model/vo/tag/IndustryVO.java +++ b/core/src/main/java/com/jinrui/reference/core/model/vo/tag/IndustryVO.java @@ -23,7 +23,7 @@ public class IndustryVO { /** * 一级行业名称 */ - private String primayName; + private String primaryName; /** * 二级行业名称 @@ -46,7 +46,7 @@ public class IndustryVO { public IndustryVO(Industry industry) { this.id = industry.getId(); this.parentId = industry.getParentId(); - this.primayName = industry.getPrimayName(); + this.primaryName = industry.getPrimaryName(); this.secondaryName = industry.getSecondaryName(); this.createTime = industry.getCreateTime(); this.updateTime = industry.getUpdateTime(); @@ -68,12 +68,12 @@ public class IndustryVO { this.parentId = parentId; } - public String getPrimayName() { - return primayName; + public String getPrimaryName() { + return primaryName; } - public void setPrimayName(String primayName) { - this.primayName = primayName; + public void setPrimaryName(String primaryName) { + this.primaryName = primaryName; } public String getSecondaryName() { diff --git a/core/src/main/java/com/jinrui/reference/core/service/IndustryService.java b/core/src/main/java/com/jinrui/reference/core/service/IndustryService.java index 1c2d565..97a78cb 100644 --- a/core/src/main/java/com/jinrui/reference/core/service/IndustryService.java +++ b/core/src/main/java/com/jinrui/reference/core/service/IndustryService.java @@ -35,7 +35,7 @@ public class IndustryService { if (industry == null) { Industry primaryIndustry = new Industry(); primaryIndustry.setParentId(0L); - primaryIndustry.setPrimayName(primaryName); + primaryIndustry.setPrimaryName(primaryName); industryMapper.saveIndustry(primaryIndustry); industry = primaryIndustry; } @@ -48,7 +48,7 @@ public class IndustryService { secondaryIndustry = new Industry(); secondaryIndustry.setParentId(industry.getId()); - secondaryIndustry.setPrimayName(primaryName); + secondaryIndustry.setPrimaryName(primaryName); secondaryIndustry.setSecondaryName(secondaryName); industryMapper.saveIndustry(secondaryIndustry); return ResultObject.success(); diff --git a/core/src/main/java/com/jinrui/reference/core/service/NewsService.java b/core/src/main/java/com/jinrui/reference/core/service/NewsService.java index 8531de0..bb9cb3e 100644 --- a/core/src/main/java/com/jinrui/reference/core/service/NewsService.java +++ b/core/src/main/java/com/jinrui/reference/core/service/NewsService.java @@ -191,7 +191,7 @@ public class NewsService { Industry industry = industryMap.get(industryId); NewsDetailIndustry newsDetailIndustry = new NewsDetailIndustry(); newsDetailIndustry.setId(industryId); - newsDetailIndustry.setPrimayName(industry.getPrimayName()); + newsDetailIndustry.setPrimaryName(industry.getPrimaryName()); newsDetailIndustry.setSecondaryName(industry.getSecondaryName()); newsIndustryList.add(newsDetailIndustry); } @@ -302,7 +302,7 @@ public class NewsService { Industry industry = industryMap.get(industryId); NewsDetailIndustry newsDetailIndustry = new NewsDetailIndustry(); newsDetailIndustry.setId(industryId); - newsDetailIndustry.setPrimayName(industry.getPrimayName()); + newsDetailIndustry.setPrimaryName(industry.getPrimaryName()); newsDetailIndustry.setSecondaryName(industry.getSecondaryName()); newsIndustryList.add(newsDetailIndustry); }