常用话术

This commit is contained in:
zhangheng 2024-06-07 14:32:57 +08:00
parent 4530b9c44c
commit 8dac1141d4
5 changed files with 41 additions and 23 deletions

View File

@ -244,6 +244,11 @@ public class Constants {
*/
public static final String ROUTE_CODE = "RC";
/**
* 常用术语编码
*/
public static final String TERM_CODE = "TC";
/**
* 院后微信小程序accessToken的redis的键前缀
*/

View File

@ -38,6 +38,11 @@ public class TermBankController extends BaseController {
return getDataTable(list);
}
@GetMapping("/selectTermBankList")
public AjaxResult selectTermBankList(TermBank termBank) {
return AjaxResult.success(termBankService.selectTermBankList(termBank));
}
/**
* 导出常用术语(知识库)列表
*/

View File

@ -63,14 +63,14 @@ public class TermBank extends BaseEntity {
*/
@ApiModelProperty(value = "层级从1开始1,2,3……")
@Excel(name = "层级从1开始1,2,3……")
private Integer termLevel;
private Long termLevel;
/**
* 内容排序
*/
@ApiModelProperty(value = "内容排序")
@Excel(name = "内容排序")
private Integer termSort;
private Long termSort;
/**
* 内容备注信息

View File

@ -1,5 +1,8 @@
package com.xinelu.manage.service.termbank.impl;
import com.xinelu.common.constant.Constants;
import com.xinelu.common.utils.SecurityUtils;
import com.xinelu.common.utils.codes.GenerateSystemCodeUtil;
import com.xinelu.manage.domain.termbank.TermBank;
import com.xinelu.manage.mapper.termbank.TermBankMapper;
import com.xinelu.manage.service.termbank.ITermBankService;
@ -19,6 +22,8 @@ import java.util.List;
public class TermBankServiceImpl implements ITermBankService {
@Resource
private TermBankMapper termBankMapper;
@Resource
private GenerateSystemCodeUtil generateSystemCodeUtil;
/**
* 查询常用术语(知识库)
@ -39,6 +44,7 @@ public class TermBankServiceImpl implements ITermBankService {
*/
@Override
public List<TermBank> selectTermBankList(TermBank termBank) {
termBank.setTermLevel(1l);
return termBankMapper.selectTermBankList(termBank);
}
@ -51,6 +57,8 @@ public class TermBankServiceImpl implements ITermBankService {
@Override
public int insertTermBank(TermBank termBank) {
termBank.setCreateTime(LocalDateTime.now());
termBank.setCreateBy(SecurityUtils.getUsername());
termBank.setTermCode(Constants.TERM_CODE + generateSystemCodeUtil.generateSystemCode(Constants.TERM_CODE));
return termBankMapper.insertTermBank(termBank);
}

View File

@ -26,27 +26,27 @@
<select id="selectTermBankList" parameterType="TermBank" resultMap="TermBankResult">
<include refid="selectTermBankVo"/>
<where>
<if test="termCode != null and termCode != ''">
and term_code = #{termCode}
</if>
<if test="termName != null and termName != ''">
and term_name like concat('%', #{termName}, '%')
</if>
<if test="termContent != null and termContent != ''">
and term_content = #{termContent}
</if>
<if test="parentTermCode != null and parentTermCode != ''">
and parent_term_code = #{parentTermCode}
</if>
<if test="termLevel != null ">
and term_level = #{termLevel}
</if>
<if test="termSort != null ">
and term_sort = #{termSort}
</if>
<if test="termRemark != null and termRemark != ''">
and term_remark = #{termRemark}
</if>
<if test="termCode != null and termCode != ''">
and term_code = #{termCode}
</if>
<if test="termName != null and termName != ''">
and term_name like concat('%', #{termName}, '%')
</if>
<if test="termContent != null and termContent != ''">
and term_content = #{termContent}
</if>
<if test="parentTermCode != null and parentTermCode != ''">
and parent_term_code = #{parentTermCode}
</if>
<if test="termLevel != null ">
and term_level = #{termLevel}
</if>
<if test="termSort != null ">
and term_sort = #{termSort}
</if>
<if test="termRemark != null and termRemark != ''">
and term_remark = #{termRemark}
</if>
</where>
</select>