新增成果字典管理;校企成果新增相关字段
This commit is contained in:
parent
5ae151e360
commit
b266bb82d6
|
@ -0,0 +1,117 @@
|
||||||
|
package com.microservices.dms.achievementLibrary.controller;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
|
import com.microservices.common.core.utils.StringUtils;
|
||||||
|
import com.microservices.dms.achievementLibrary.domain.KeyValueVo;
|
||||||
|
import com.microservices.system.api.domain.SysDictData;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PutMapping;
|
||||||
|
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PathVariable;
|
||||||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
import com.microservices.common.log.annotation.Log;
|
||||||
|
import com.microservices.common.log.enums.BusinessType;
|
||||||
|
import com.microservices.common.security.annotation.RequiresPermissions;
|
||||||
|
import com.microservices.dms.achievementLibrary.domain.AchievementDictData;
|
||||||
|
import com.microservices.dms.achievementLibrary.service.IAchievementDictDataService;
|
||||||
|
import com.microservices.common.core.web.controller.BaseController;
|
||||||
|
import com.microservices.common.core.web.domain.AjaxResult;
|
||||||
|
import com.microservices.common.core.utils.poi.ExcelUtil;
|
||||||
|
import com.microservices.common.core.web.page.TableDataInfo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 成果相关字典Controller
|
||||||
|
*
|
||||||
|
* @author microservices
|
||||||
|
* @date 2025-05-23
|
||||||
|
*/
|
||||||
|
@Api(tags = "数据管理体系-成果字典管理")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/achDict")
|
||||||
|
public class AchievementDictDataController extends BaseController
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private IAchievementDictDataService achievementDictDataService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询成果相关字典列表
|
||||||
|
*/
|
||||||
|
@GetMapping("/list")
|
||||||
|
public TableDataInfo list(AchievementDictData achievementDictData)
|
||||||
|
{
|
||||||
|
startPage();
|
||||||
|
List<AchievementDictData> list = achievementDictDataService.selectAchievementDictDataList(achievementDictData);
|
||||||
|
return getDataTable(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出成果相关字典列表
|
||||||
|
*/
|
||||||
|
@Log(title = "成果相关字典", businessType = BusinessType.EXPORT)
|
||||||
|
@PostMapping("/export")
|
||||||
|
public void export(HttpServletResponse response, AchievementDictData achievementDictData)
|
||||||
|
{
|
||||||
|
List<AchievementDictData> list = achievementDictDataService.selectAchievementDictDataList(achievementDictData);
|
||||||
|
ExcelUtil<AchievementDictData> util = new ExcelUtil<AchievementDictData>(AchievementDictData.class);
|
||||||
|
util.exportExcel(response, list, "成果相关字典数据");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取成果相关字典详细信息
|
||||||
|
*/
|
||||||
|
@GetMapping(value = "/{dictCode}")
|
||||||
|
public AjaxResult getInfo(@PathVariable("dictCode") Long dictCode)
|
||||||
|
{
|
||||||
|
return success(achievementDictDataService.selectAchievementDictDataByDictCode(dictCode));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增成果相关字典
|
||||||
|
*/
|
||||||
|
@Log(title = "成果相关字典", businessType = BusinessType.INSERT)
|
||||||
|
@PostMapping
|
||||||
|
public AjaxResult add(@RequestBody AchievementDictData achievementDictData)
|
||||||
|
{
|
||||||
|
return toAjax(achievementDictDataService.insertAchievementDictData(achievementDictData));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改成果相关字典
|
||||||
|
*/
|
||||||
|
@Log(title = "成果相关字典", businessType = BusinessType.UPDATE)
|
||||||
|
@PutMapping
|
||||||
|
public AjaxResult edit(@RequestBody AchievementDictData achievementDictData)
|
||||||
|
{
|
||||||
|
return toAjax(achievementDictDataService.updateAchievementDictData(achievementDictData));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除成果相关字典
|
||||||
|
*/
|
||||||
|
@Log(title = "成果相关字典", businessType = BusinessType.DELETE)
|
||||||
|
@DeleteMapping("/{dictCodes}")
|
||||||
|
public AjaxResult remove(@PathVariable Long[] dictCodes)
|
||||||
|
{
|
||||||
|
return toAjax(achievementDictDataService.deleteAchievementDictDataByDictCodes(dictCodes));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据字典类型查询字典数据信息
|
||||||
|
*/
|
||||||
|
@ApiOperation("根据成果字典分类查询成果值")
|
||||||
|
@GetMapping(value = "/getDictDateByType")
|
||||||
|
public AjaxResult dictType(@PathVariable String dictType)
|
||||||
|
{
|
||||||
|
List<KeyValueVo> data = achievementDictDataService.selectDictDataByType(dictType);
|
||||||
|
return success(data);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,112 @@
|
||||||
|
package com.microservices.dms.achievementLibrary.domain;
|
||||||
|
|
||||||
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||||
|
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
|
import com.microservices.common.core.annotation.Excel;
|
||||||
|
import com.microservices.common.core.web.domain.BaseEntity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 成果相关字典对象 achievement_dict_data
|
||||||
|
*
|
||||||
|
* @author microservices
|
||||||
|
* @date 2025-05-23
|
||||||
|
*/
|
||||||
|
public class AchievementDictData extends BaseEntity
|
||||||
|
{
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/** 字典编码 */
|
||||||
|
private Long dictCode;
|
||||||
|
|
||||||
|
/** 字典排序 */
|
||||||
|
@Excel(name = "字典排序")
|
||||||
|
private Integer dictSort;
|
||||||
|
|
||||||
|
/** 字典标签 */
|
||||||
|
@Excel(name = "字典标签")
|
||||||
|
private String dictLabel;
|
||||||
|
|
||||||
|
/** 字典键值 */
|
||||||
|
@Excel(name = "字典键值")
|
||||||
|
private String dictValue;
|
||||||
|
|
||||||
|
/** 字典类型 */
|
||||||
|
@Excel(name = "字典类型")
|
||||||
|
private String dictType;
|
||||||
|
|
||||||
|
/** 状态(0正常 1停用) */
|
||||||
|
@Excel(name = "状态", readConverterExp = "0=正常,1=停用")
|
||||||
|
private String status;
|
||||||
|
|
||||||
|
public void setDictCode(Long dictCode)
|
||||||
|
{
|
||||||
|
this.dictCode = dictCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getDictCode()
|
||||||
|
{
|
||||||
|
return dictCode;
|
||||||
|
}
|
||||||
|
public void setDictSort(Integer dictSort)
|
||||||
|
{
|
||||||
|
this.dictSort = dictSort;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getDictSort()
|
||||||
|
{
|
||||||
|
return dictSort;
|
||||||
|
}
|
||||||
|
public void setDictLabel(String dictLabel)
|
||||||
|
{
|
||||||
|
this.dictLabel = dictLabel;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDictLabel()
|
||||||
|
{
|
||||||
|
return dictLabel;
|
||||||
|
}
|
||||||
|
public void setDictValue(String dictValue)
|
||||||
|
{
|
||||||
|
this.dictValue = dictValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDictValue()
|
||||||
|
{
|
||||||
|
return dictValue;
|
||||||
|
}
|
||||||
|
public void setDictType(String dictType)
|
||||||
|
{
|
||||||
|
this.dictType = dictType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDictType()
|
||||||
|
{
|
||||||
|
return dictType;
|
||||||
|
}
|
||||||
|
public void setStatus(String status)
|
||||||
|
{
|
||||||
|
this.status = status;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getStatus()
|
||||||
|
{
|
||||||
|
return status;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||||
|
.append("dictCode", getDictCode())
|
||||||
|
.append("dictSort", getDictSort())
|
||||||
|
.append("dictLabel", getDictLabel())
|
||||||
|
.append("dictValue", getDictValue())
|
||||||
|
.append("dictType", getDictType())
|
||||||
|
.append("status", getStatus())
|
||||||
|
.append("createBy", getCreateBy())
|
||||||
|
.append("createTime", getCreateTime())
|
||||||
|
.append("updateBy", getUpdateBy())
|
||||||
|
.append("updateTime", getUpdateTime())
|
||||||
|
.append("remark", getRemark())
|
||||||
|
.toString();
|
||||||
|
}
|
||||||
|
}
|
|
@ -167,6 +167,36 @@ public class SchoolEnterpriseAchievements extends BaseEntity {
|
||||||
@Excel(name = "成果附件")
|
@Excel(name = "成果附件")
|
||||||
private String attachments;
|
private String attachments;
|
||||||
private Integer achievementStatus;
|
private Integer achievementStatus;
|
||||||
|
//成果小类型
|
||||||
|
private String achievementLittleType;
|
||||||
|
//成果状态
|
||||||
|
private String achievementCurStatus;
|
||||||
|
//团队名称
|
||||||
|
private String teamName;
|
||||||
|
|
||||||
|
public String getTeamName() {
|
||||||
|
return teamName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTeamName(String teamName) {
|
||||||
|
this.teamName = teamName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAchievementLittleType() {
|
||||||
|
return achievementLittleType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAchievementLittleType(String achievementLittleType) {
|
||||||
|
this.achievementLittleType = achievementLittleType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAchievementCurStatus() {
|
||||||
|
return achievementCurStatus;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAchievementCurStatus(String achievementCurStatus) {
|
||||||
|
this.achievementCurStatus = achievementCurStatus;
|
||||||
|
}
|
||||||
|
|
||||||
public Integer getAchievementStatus() {
|
public Integer getAchievementStatus() {
|
||||||
return achievementStatus;
|
return achievementStatus;
|
||||||
|
|
|
@ -0,0 +1,67 @@
|
||||||
|
package com.microservices.dms.achievementLibrary.mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.microservices.dms.achievementLibrary.domain.AchievementDictData;
|
||||||
|
import com.microservices.dms.achievementLibrary.domain.KeyValueVo;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 成果相关字典Mapper接口
|
||||||
|
*
|
||||||
|
* @author microservices
|
||||||
|
* @date 2025-05-23
|
||||||
|
*/
|
||||||
|
@Mapper
|
||||||
|
public interface AchievementDictDataMapper
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询成果相关字典
|
||||||
|
*
|
||||||
|
* @param dictCode 成果相关字典主键
|
||||||
|
* @return 成果相关字典
|
||||||
|
*/
|
||||||
|
public AchievementDictData selectAchievementDictDataByDictCode(Long dictCode);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询成果相关字典列表
|
||||||
|
*
|
||||||
|
* @param achievementDictData 成果相关字典
|
||||||
|
* @return 成果相关字典集合
|
||||||
|
*/
|
||||||
|
public List<AchievementDictData> selectAchievementDictDataList(AchievementDictData achievementDictData);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增成果相关字典
|
||||||
|
*
|
||||||
|
* @param achievementDictData 成果相关字典
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertAchievementDictData(AchievementDictData achievementDictData);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改成果相关字典
|
||||||
|
*
|
||||||
|
* @param achievementDictData 成果相关字典
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateAchievementDictData(AchievementDictData achievementDictData);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除成果相关字典
|
||||||
|
*
|
||||||
|
* @param dictCode 成果相关字典主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteAchievementDictDataByDictCode(Long dictCode);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除成果相关字典
|
||||||
|
*
|
||||||
|
* @param dictCodes 需要删除的数据主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteAchievementDictDataByDictCodes(Long[] dictCodes);
|
||||||
|
|
||||||
|
List<KeyValueVo> selectDictDataByType(@Param("dictType") String dictType);
|
||||||
|
}
|
|
@ -0,0 +1,65 @@
|
||||||
|
package com.microservices.dms.achievementLibrary.service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.microservices.dms.achievementLibrary.domain.AchievementDictData;
|
||||||
|
import com.microservices.dms.achievementLibrary.domain.KeyValueVo;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 成果相关字典Service接口
|
||||||
|
*
|
||||||
|
* @author microservices
|
||||||
|
* @date 2025-05-23
|
||||||
|
*/
|
||||||
|
public interface IAchievementDictDataService
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询成果相关字典
|
||||||
|
*
|
||||||
|
* @param dictCode 成果相关字典主键
|
||||||
|
* @return 成果相关字典
|
||||||
|
*/
|
||||||
|
public AchievementDictData selectAchievementDictDataByDictCode(Long dictCode);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询成果相关字典列表
|
||||||
|
*
|
||||||
|
* @param achievementDictData 成果相关字典
|
||||||
|
* @return 成果相关字典集合
|
||||||
|
*/
|
||||||
|
public List<AchievementDictData> selectAchievementDictDataList(AchievementDictData achievementDictData);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增成果相关字典
|
||||||
|
*
|
||||||
|
* @param achievementDictData 成果相关字典
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertAchievementDictData(AchievementDictData achievementDictData);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改成果相关字典
|
||||||
|
*
|
||||||
|
* @param achievementDictData 成果相关字典
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateAchievementDictData(AchievementDictData achievementDictData);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除成果相关字典
|
||||||
|
*
|
||||||
|
* @param dictCodes 需要删除的成果相关字典主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteAchievementDictDataByDictCodes(Long[] dictCodes);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除成果相关字典信息
|
||||||
|
*
|
||||||
|
* @param dictCode 成果相关字典主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteAchievementDictDataByDictCode(Long dictCode);
|
||||||
|
|
||||||
|
List<KeyValueVo> selectDictDataByType(String dictType);
|
||||||
|
}
|
|
@ -0,0 +1,104 @@
|
||||||
|
package com.microservices.dms.achievementLibrary.service.impl;
|
||||||
|
|
||||||
|
import java.util.Collections;
|
||||||
|
import java.util.List;
|
||||||
|
import com.microservices.common.core.utils.DateUtils;
|
||||||
|
import com.microservices.dms.achievementLibrary.domain.KeyValueVo;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import com.microservices.dms.achievementLibrary.mapper.AchievementDictDataMapper;
|
||||||
|
import com.microservices.dms.achievementLibrary.domain.AchievementDictData;
|
||||||
|
import com.microservices.dms.achievementLibrary.service.IAchievementDictDataService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 成果相关字典Service业务层处理
|
||||||
|
*
|
||||||
|
* @author microservices
|
||||||
|
* @date 2025-05-23
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class AchievementDictDataServiceImpl implements IAchievementDictDataService
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private AchievementDictDataMapper achievementDictDataMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询成果相关字典
|
||||||
|
*
|
||||||
|
* @param dictCode 成果相关字典主键
|
||||||
|
* @return 成果相关字典
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public AchievementDictData selectAchievementDictDataByDictCode(Long dictCode)
|
||||||
|
{
|
||||||
|
return achievementDictDataMapper.selectAchievementDictDataByDictCode(dictCode);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询成果相关字典列表
|
||||||
|
*
|
||||||
|
* @param achievementDictData 成果相关字典
|
||||||
|
* @return 成果相关字典
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<AchievementDictData> selectAchievementDictDataList(AchievementDictData achievementDictData)
|
||||||
|
{
|
||||||
|
return achievementDictDataMapper.selectAchievementDictDataList(achievementDictData);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增成果相关字典
|
||||||
|
*
|
||||||
|
* @param achievementDictData 成果相关字典
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int insertAchievementDictData(AchievementDictData achievementDictData)
|
||||||
|
{
|
||||||
|
//判断字典是否存在,存在则不管,不存在则新增
|
||||||
|
achievementDictData.setCreateTime(DateUtils.getNowDate());
|
||||||
|
return achievementDictDataMapper.insertAchievementDictData(achievementDictData);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改成果相关字典
|
||||||
|
*
|
||||||
|
* @param achievementDictData 成果相关字典
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int updateAchievementDictData(AchievementDictData achievementDictData)
|
||||||
|
{
|
||||||
|
achievementDictData.setUpdateTime(DateUtils.getNowDate());
|
||||||
|
return achievementDictDataMapper.updateAchievementDictData(achievementDictData);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除成果相关字典
|
||||||
|
*
|
||||||
|
* @param dictCodes 需要删除的成果相关字典主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteAchievementDictDataByDictCodes(Long[] dictCodes)
|
||||||
|
{
|
||||||
|
return achievementDictDataMapper.deleteAchievementDictDataByDictCodes(dictCodes);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除成果相关字典信息
|
||||||
|
*
|
||||||
|
* @param dictCode 成果相关字典主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteAchievementDictDataByDictCode(Long dictCode)
|
||||||
|
{
|
||||||
|
return achievementDictDataMapper.deleteAchievementDictDataByDictCode(dictCode);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<KeyValueVo> selectDictDataByType(String dictType) {
|
||||||
|
return achievementDictDataMapper.selectDictDataByType(dictType);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,100 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
<!DOCTYPE mapper
|
||||||
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.microservices.dms.achievementLibrary.mapper.AchievementDictDataMapper">
|
||||||
|
|
||||||
|
<resultMap type="AchievementDictData" id="AchievementDictDataResult">
|
||||||
|
<result property="dictCode" column="dict_code" />
|
||||||
|
<result property="dictSort" column="dict_sort" />
|
||||||
|
<result property="dictLabel" column="dict_label" />
|
||||||
|
<result property="dictValue" column="dict_value" />
|
||||||
|
<result property="dictType" column="dict_type" />
|
||||||
|
<result property="status" column="status" />
|
||||||
|
<result property="createBy" column="create_by" />
|
||||||
|
<result property="createTime" column="create_time" />
|
||||||
|
<result property="updateBy" column="update_by" />
|
||||||
|
<result property="updateTime" column="update_time" />
|
||||||
|
<result property="remark" column="remark" />
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<sql id="selectAchievementDictDataVo">
|
||||||
|
select dict_code, dict_sort, dict_label, dict_value, dict_type, status, create_by, create_time, update_by, update_time, remark from achievement_dict_data
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<select id="selectAchievementDictDataList" parameterType="AchievementDictData" resultMap="AchievementDictDataResult">
|
||||||
|
<include refid="selectAchievementDictDataVo"/>
|
||||||
|
<where>
|
||||||
|
<if test="dictSort != null "> and dict_sort = #{dictSort}</if>
|
||||||
|
<if test="dictLabel != null and dictLabel != ''"> and dict_label = #{dictLabel}</if>
|
||||||
|
<if test="dictValue != null and dictValue != ''"> and dict_value = #{dictValue}</if>
|
||||||
|
<if test="dictType != null and dictType != ''"> and dict_type = #{dictType}</if>
|
||||||
|
<if test="status != null and status != ''"> and status = #{status}</if>
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectAchievementDictDataByDictCode" parameterType="Long" resultMap="AchievementDictDataResult">
|
||||||
|
<include refid="selectAchievementDictDataVo"/>
|
||||||
|
where dict_code = #{dictCode}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<insert id="insertAchievementDictData" parameterType="AchievementDictData" useGeneratedKeys="true" keyProperty="dictCode">
|
||||||
|
insert into achievement_dict_data
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="dictSort != null">dict_sort,</if>
|
||||||
|
<if test="dictLabel != null">dict_label,</if>
|
||||||
|
<if test="dictValue != null">dict_value,</if>
|
||||||
|
<if test="dictType != null">dict_type,</if>
|
||||||
|
<if test="status != null">status,</if>
|
||||||
|
<if test="createBy != null">create_by,</if>
|
||||||
|
<if test="createTime != null">create_time,</if>
|
||||||
|
<if test="updateBy != null">update_by,</if>
|
||||||
|
<if test="updateTime != null">update_time,</if>
|
||||||
|
<if test="remark != null">remark,</if>
|
||||||
|
</trim>
|
||||||
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="dictSort != null">#{dictSort},</if>
|
||||||
|
<if test="dictLabel != null">#{dictLabel},</if>
|
||||||
|
<if test="dictValue != null">#{dictValue},</if>
|
||||||
|
<if test="dictType != null">#{dictType},</if>
|
||||||
|
<if test="status != null">#{status},</if>
|
||||||
|
<if test="createBy != null">#{createBy},</if>
|
||||||
|
<if test="createTime != null">#{createTime},</if>
|
||||||
|
<if test="updateBy != null">#{updateBy},</if>
|
||||||
|
<if test="updateTime != null">#{updateTime},</if>
|
||||||
|
<if test="remark != null">#{remark},</if>
|
||||||
|
</trim>
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<update id="updateAchievementDictData" parameterType="AchievementDictData">
|
||||||
|
update achievement_dict_data
|
||||||
|
<trim prefix="SET" suffixOverrides=",">
|
||||||
|
<if test="dictSort != null">dict_sort = #{dictSort},</if>
|
||||||
|
<if test="dictLabel != null">dict_label = #{dictLabel},</if>
|
||||||
|
<if test="dictValue != null">dict_value = #{dictValue},</if>
|
||||||
|
<if test="dictType != null">dict_type = #{dictType},</if>
|
||||||
|
<if test="status != null">status = #{status},</if>
|
||||||
|
<if test="createBy != null">create_by = #{createBy},</if>
|
||||||
|
<if test="createTime != null">create_time = #{createTime},</if>
|
||||||
|
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||||
|
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||||
|
<if test="remark != null">remark = #{remark},</if>
|
||||||
|
</trim>
|
||||||
|
where dict_code = #{dictCode}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<delete id="deleteAchievementDictDataByDictCode" parameterType="Long">
|
||||||
|
delete from achievement_dict_data where dict_code = #{dictCode}
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
<delete id="deleteAchievementDictDataByDictCodes" parameterType="String">
|
||||||
|
delete from achievement_dict_data where dict_code in
|
||||||
|
<foreach item="dictCode" collection="array" open="(" separator="," close=")">
|
||||||
|
#{dictCode}
|
||||||
|
</foreach>
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
<select id="selectDictDataByType" resultType="com.microservices.dms.achievementLibrary.domain.KeyValueVo">
|
||||||
|
select dict_value as "key",dict_label as "value" from achievement_dict_data where dict_type = #{dictType}
|
||||||
|
</select>
|
||||||
|
</mapper>
|
|
@ -35,10 +35,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<result property="updateBy" column="update_by" />
|
<result property="updateBy" column="update_by" />
|
||||||
<result property="updateTime" column="update_time" />
|
<result property="updateTime" column="update_time" />
|
||||||
<result property="achievementStatus" column="achievement_status" />
|
<result property="achievementStatus" column="achievement_status" />
|
||||||
|
<result property="achievementLittleType" column="achievement_little_type" />
|
||||||
|
<result property="achievementCurStatus" column="achievement_cur_status" />
|
||||||
|
<result property="teamName" column="team_name" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="selectSchoolEnterpriseAchievementsVo">
|
<sql id="selectSchoolEnterpriseAchievementsVo">
|
||||||
select id, achievement_name, achievement_status,field_1, field_2, field_3, achievement_type, source, source_id, source_link, tags, summary, publishing_unit, address, is_featured, contact_person, contact_number, owner_id, owner_name, status, details, reviewer, review_date, review_comments, images, attachments, create_by, create_time, update_by, update_time from school_enterprise_achievements
|
select id, achievement_name, achievement_status,field_1, field_2, field_3,
|
||||||
|
achievement_type, source, source_id, source_link, tags, summary, publishing_unit,
|
||||||
|
address, is_featured, contact_person, contact_number, owner_id, owner_name, status, achievement_little_type,
|
||||||
|
details, reviewer, review_date, review_comments, images, attachments, create_by, create_time, achievement_cur_status,team_name,
|
||||||
|
update_by, update_time from school_enterprise_achievements
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="selectSchoolEnterpriseAchievementsList" parameterType="SchoolEnterpriseAchievements" resultMap="SchoolEnterpriseAchievementsResult">
|
<select id="selectSchoolEnterpriseAchievementsList" parameterType="SchoolEnterpriseAchievements" resultMap="SchoolEnterpriseAchievementsResult">
|
||||||
|
@ -70,6 +77,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="images != null and images != ''"> and images = #{images}</if>
|
<if test="images != null and images != ''"> and images = #{images}</if>
|
||||||
<if test="attachments != null and attachments != ''"> and attachments = #{attachments}</if>
|
<if test="attachments != null and attachments != ''"> and attachments = #{attachments}</if>
|
||||||
<if test="createBy != null and createBy != ''"> and create_by = #{createBy}</if>
|
<if test="createBy != null and createBy != ''"> and create_by = #{createBy}</if>
|
||||||
|
<if test="achievementCurStatus != null and achievementCurStatus != ''"> and achievement_cur_status = #{achievementCurStatus}</if>
|
||||||
|
<if test="achievementLittleType != null and achievementLittleType != ''"> and achievement_little_type = #{achievementLittleType}</if>
|
||||||
|
<if test="teamName != null and teamName != ''"> and team_name = #{teamName}</if>
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
@ -105,6 +115,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="reviewComments != null and reviewComments != ''"> and review_comments = #{reviewComments}</if>
|
<if test="reviewComments != null and reviewComments != ''"> and review_comments = #{reviewComments}</if>
|
||||||
<if test="images != null and images != ''"> and images = #{images}</if>
|
<if test="images != null and images != ''"> and images = #{images}</if>
|
||||||
<if test="attachments != null and attachments != ''"> and attachments = #{attachments}</if>
|
<if test="attachments != null and attachments != ''"> and attachments = #{attachments}</if>
|
||||||
|
<if test="achievementCurStatus != null and achievementCurStatus != ''"> and achievement_cur_status = #{achievementCurStatus}</if>
|
||||||
|
<if test="achievementLittleType != null and achievementLittleType != ''"> and achievement_little_type = #{achievementLittleType}</if>
|
||||||
|
<if test="teamName != null and teamName != ''"> and team_name = #{teamName}</if>
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
@ -140,6 +153,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="updateBy != null">update_by,</if>
|
<if test="updateBy != null">update_by,</if>
|
||||||
<if test="updateTime != null">update_time,</if>
|
<if test="updateTime != null">update_time,</if>
|
||||||
<if test="achievementStatus != null">achievement_status,</if>
|
<if test="achievementStatus != null">achievement_status,</if>
|
||||||
|
<if test="achievementCurStatus != null">achievement_cur_status,</if>
|
||||||
|
<if test="achievementLittleType != null">achievement_little_type,</if>
|
||||||
|
<if test="teamName != null">team_name,</if>
|
||||||
</trim>
|
</trim>
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
<if test="achievementName != null">#{achievementName},</if>
|
<if test="achievementName != null">#{achievementName},</if>
|
||||||
|
@ -171,6 +187,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="updateBy != null">#{updateBy},</if>
|
<if test="updateBy != null">#{updateBy},</if>
|
||||||
<if test="updateTime != null">#{updateTime},</if>
|
<if test="updateTime != null">#{updateTime},</if>
|
||||||
<if test="achievementStatus != null">#{achievementStatus},</if>
|
<if test="achievementStatus != null">#{achievementStatus},</if>
|
||||||
|
<if test="achievementCurStatus != null">#{achievementCurStatus},</if>
|
||||||
|
<if test="achievementLittleType != null">#{achievementLittleType},</if>
|
||||||
|
<if test="teamName != null">#{teamName},</if>
|
||||||
</trim>
|
</trim>
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
|
@ -206,6 +225,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||||
<if test="achievementStatus != null">achievement_status = #{achievementStatus},</if>
|
<if test="achievementStatus != null">achievement_status = #{achievementStatus},</if>
|
||||||
|
<if test="achievementCurStatus != null">achievement_cur_status = #{achievementCurStatus},</if>
|
||||||
|
<if test="achievementLittleType != null">achievement_little_type = #{achievementLittleType},</if>
|
||||||
|
<if test="teamName != null">team_name = #{teamName},</if>
|
||||||
</trim>
|
</trim>
|
||||||
where id = #{id}
|
where id = #{id}
|
||||||
</update>
|
</update>
|
||||||
|
|
Loading…
Reference in New Issue