primary代词拼写错误
This commit is contained in:
parent
7a844be077
commit
cd2751e633
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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<NewsIndustryRel> 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} " +
|
||||
"</if>" +
|
||||
"<if test=\"keyword != null and !keyword.isEmpty()\">" +
|
||||
"and primay_name like concat('%', #{keyword}, '%') or secondary_name like concat('%', #{keyword}, '%') " +
|
||||
"and primary_name like concat('%', #{keyword}, '%') or secondary_name like concat('%', #{keyword}, '%') " +
|
||||
"</if>" +
|
||||
"</where>" +
|
||||
"order by tag.${orderBy} " +
|
||||
|
|
|
|||
|
|
@ -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() {
|
||||
|
|
|
|||
|
|
@ -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() {
|
||||
|
|
|
|||
|
|
@ -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() {
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue