14 changed files with 709 additions and 16 deletions
@ -0,0 +1,28 @@ |
|||||||
|
package com.ruoyi.common.config; |
||||||
|
|
||||||
|
import org.springframework.boot.context.properties.ConfigurationProperties; |
||||||
|
import org.springframework.stereotype.Component; |
||||||
|
|
||||||
|
/** |
||||||
|
* @version 1.0 |
||||||
|
* @ClassName ExportConfig |
||||||
|
* @Author yzj |
||||||
|
* @Description //TODO 表格导入配置
|
||||||
|
* @Date 2022/7/1 16:55 |
||||||
|
**/ |
||||||
|
@Component |
||||||
|
@ConfigurationProperties(prefix = "export") |
||||||
|
public class ExportConfig { |
||||||
|
private static String achievements; |
||||||
|
|
||||||
|
public static String getAchievements() |
||||||
|
{ |
||||||
|
return achievements; |
||||||
|
} |
||||||
|
|
||||||
|
public void setAchievements(String achievements) |
||||||
|
{ |
||||||
|
ExportConfig.achievements = achievements; |
||||||
|
} |
||||||
|
|
||||||
|
} |
@ -0,0 +1,105 @@ |
|||||||
|
package com.ruoyi.project.controller; |
||||||
|
|
||||||
|
import java.util.List; |
||||||
|
|
||||||
|
import com.ruoyi.project.domain.PaAchievements; |
||||||
|
import com.ruoyi.project.service.IPaAchievementsService; |
||||||
|
import org.springframework.security.access.prepost.PreAuthorize; |
||||||
|
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.ruoyi.common.annotation.Log; |
||||||
|
import com.ruoyi.common.core.controller.BaseController; |
||||||
|
import com.ruoyi.common.core.domain.AjaxResult; |
||||||
|
import com.ruoyi.common.enums.BusinessType; |
||||||
|
|
||||||
|
import com.ruoyi.common.utils.poi.ExcelUtil; |
||||||
|
import com.ruoyi.common.core.page.TableDataInfo; |
||||||
|
|
||||||
|
/** |
||||||
|
* 【请填写功能名称】Controller |
||||||
|
* |
||||||
|
* @author ruoyi |
||||||
|
* @date 2022-07-01 |
||||||
|
*/ |
||||||
|
@RestController |
||||||
|
@RequestMapping("/system/achievements") |
||||||
|
public class PaAchievementsController extends BaseController |
||||||
|
{ |
||||||
|
@Autowired |
||||||
|
private IPaAchievementsService paAchievementsService; |
||||||
|
|
||||||
|
/** |
||||||
|
* 查询【请填写功能名称】列表 |
||||||
|
*/ |
||||||
|
@PreAuthorize("@ss.hasPermi('system:achievements:list')") |
||||||
|
@GetMapping("/list") |
||||||
|
public TableDataInfo list(PaAchievements paAchievements) |
||||||
|
{ |
||||||
|
startPage(); |
||||||
|
List<PaAchievements> list = paAchievementsService.selectPaAchievementsList(paAchievements); |
||||||
|
return getDataTable(list); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 导出【请填写功能名称】列表 |
||||||
|
*/ |
||||||
|
@PreAuthorize("@ss.hasPermi('system:achievements:export')") |
||||||
|
@Log(title = "【请填写功能名称】", businessType = BusinessType.EXPORT) |
||||||
|
@GetMapping("/export") |
||||||
|
public AjaxResult export(PaAchievements paAchievements) |
||||||
|
{ |
||||||
|
List<PaAchievements> list = paAchievementsService.selectPaAchievementsList(paAchievements); |
||||||
|
ExcelUtil<PaAchievements> util = new ExcelUtil<PaAchievements>(PaAchievements.class); |
||||||
|
return util.exportExcel(list, "achievements"); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 获取【请填写功能名称】详细信息 |
||||||
|
*/ |
||||||
|
@PreAuthorize("@ss.hasPermi('system:achievements:query')") |
||||||
|
@GetMapping(value = "/{id}") |
||||||
|
public AjaxResult getInfo(@PathVariable("id") Long id) |
||||||
|
{ |
||||||
|
return AjaxResult.success(paAchievementsService.selectPaAchievementsById(id)); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 新增【请填写功能名称】 |
||||||
|
*/ |
||||||
|
@PreAuthorize("@ss.hasPermi('system:achievements:add')") |
||||||
|
@Log(title = "【请填写功能名称】", businessType = BusinessType.INSERT) |
||||||
|
@PostMapping |
||||||
|
public AjaxResult add(@RequestBody PaAchievements paAchievements) |
||||||
|
{ |
||||||
|
return toAjax(paAchievementsService.insertPaAchievements(paAchievements)); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 修改【请填写功能名称】 |
||||||
|
*/ |
||||||
|
@PreAuthorize("@ss.hasPermi('system:achievements:edit')") |
||||||
|
@Log(title = "【请填写功能名称】", businessType = BusinessType.UPDATE) |
||||||
|
@PutMapping |
||||||
|
public AjaxResult edit(@RequestBody PaAchievements paAchievements) |
||||||
|
{ |
||||||
|
return toAjax(paAchievementsService.updatePaAchievements(paAchievements)); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 删除【请填写功能名称】 |
||||||
|
*/ |
||||||
|
@PreAuthorize("@ss.hasPermi('system:achievements:remove')") |
||||||
|
@Log(title = "【请填写功能名称】", businessType = BusinessType.DELETE) |
||||||
|
@DeleteMapping("/ids") |
||||||
|
public AjaxResult remove(@PathVariable Long[] ids) |
||||||
|
{ |
||||||
|
return toAjax(paAchievementsService.deletePaAchievementsByIds(ids)); |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,145 @@ |
|||||||
|
package com.ruoyi.project.domain; |
||||||
|
|
||||||
|
import org.apache.commons.lang3.builder.ToStringBuilder; |
||||||
|
import org.apache.commons.lang3.builder.ToStringStyle; |
||||||
|
import com.ruoyi.common.annotation.Excel; |
||||||
|
import com.ruoyi.common.core.domain.BaseEntity; |
||||||
|
|
||||||
|
/** |
||||||
|
* 【请填写功能名称】对象 pa_achievements |
||||||
|
* |
||||||
|
* @author ruoyi |
||||||
|
* @date 2022-07-01 |
||||||
|
*/ |
||||||
|
public class PaAchievements extends BaseEntity |
||||||
|
{ |
||||||
|
private static final long serialVersionUID = 1L; |
||||||
|
|
||||||
|
/** $column.columnComment */ |
||||||
|
private Long id; |
||||||
|
@Excel(name = "说明") |
||||||
|
private String explain; |
||||||
|
@Excel(name = "项目编号") |
||||||
|
private String projectCode; |
||||||
|
@Excel(name = "大类") |
||||||
|
private String category; |
||||||
|
@Excel(name = "条目") |
||||||
|
private String entry; |
||||||
|
@Excel(name = "所指") |
||||||
|
private String referredTo; |
||||||
|
@Excel(name = "格式要求") |
||||||
|
private String formatRequirements; |
||||||
|
@Excel(name = "报送附件的格式要求(附件电子文件名)") |
||||||
|
private String attachment; |
||||||
|
@Excel(name = "成果应用情况") |
||||||
|
private String situation; |
||||||
|
@Excel(name = "支撑材料的格式要求(附件电子文件名)") |
||||||
|
private String materialScience; |
||||||
|
@Excel(name = "备注") |
||||||
|
private String remake; |
||||||
|
|
||||||
|
public Long getId() { |
||||||
|
return id; |
||||||
|
} |
||||||
|
|
||||||
|
public void setId(Long id) { |
||||||
|
this.id = id; |
||||||
|
} |
||||||
|
|
||||||
|
public String getCategory() { |
||||||
|
return category; |
||||||
|
} |
||||||
|
|
||||||
|
public void setCategory(String category) { |
||||||
|
this.category = category; |
||||||
|
} |
||||||
|
|
||||||
|
public String getEntry() { |
||||||
|
return entry; |
||||||
|
} |
||||||
|
|
||||||
|
public void setEntry(String entry) { |
||||||
|
this.entry = entry; |
||||||
|
} |
||||||
|
|
||||||
|
public String getReferredTo() { |
||||||
|
return referredTo; |
||||||
|
} |
||||||
|
|
||||||
|
public void setReferredTo(String referredTo) { |
||||||
|
this.referredTo = referredTo; |
||||||
|
} |
||||||
|
|
||||||
|
public String getFormatRequirements() { |
||||||
|
return formatRequirements; |
||||||
|
} |
||||||
|
|
||||||
|
public void setFormatRequirements(String formatRequirements) { |
||||||
|
this.formatRequirements = formatRequirements; |
||||||
|
} |
||||||
|
|
||||||
|
public String getAttachment() { |
||||||
|
return attachment; |
||||||
|
} |
||||||
|
|
||||||
|
public void setAttachment(String attachment) { |
||||||
|
this.attachment = attachment; |
||||||
|
} |
||||||
|
|
||||||
|
public String getSituation() { |
||||||
|
return situation; |
||||||
|
} |
||||||
|
|
||||||
|
public void setSituation(String situation) { |
||||||
|
this.situation = situation; |
||||||
|
} |
||||||
|
|
||||||
|
public String getMaterialScience() { |
||||||
|
return materialScience; |
||||||
|
} |
||||||
|
|
||||||
|
public void setMaterialScience(String materialScience) { |
||||||
|
this.materialScience = materialScience; |
||||||
|
} |
||||||
|
|
||||||
|
public String getRemake() { |
||||||
|
return remake; |
||||||
|
} |
||||||
|
|
||||||
|
public void setRemake(String remake) { |
||||||
|
this.remake = remake; |
||||||
|
} |
||||||
|
|
||||||
|
public String getExplain() { |
||||||
|
return explain; |
||||||
|
} |
||||||
|
|
||||||
|
public void setExplain(String explain) { |
||||||
|
this.explain = explain; |
||||||
|
} |
||||||
|
|
||||||
|
public String getProjectCode() { |
||||||
|
return projectCode; |
||||||
|
} |
||||||
|
|
||||||
|
public void setProjectCode(String projectCode) { |
||||||
|
this.projectCode = projectCode; |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
public String toString() { |
||||||
|
return "PaAchievements{" + |
||||||
|
"id=" + id + |
||||||
|
", category='" + category + '\'' + |
||||||
|
", entry='" + entry + '\'' + |
||||||
|
", referredTo='" + referredTo + '\'' + |
||||||
|
", formatRequirements='" + formatRequirements + '\'' + |
||||||
|
", attachmentId='" + attachment + '\'' + |
||||||
|
", situation='" + situation + '\'' + |
||||||
|
", materialScience='" + materialScience + '\'' + |
||||||
|
", remake='" + remake + '\'' + |
||||||
|
", explain='" + explain + '\'' + |
||||||
|
", projectCode='" + projectCode + '\'' + |
||||||
|
'}'; |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,63 @@ |
|||||||
|
package com.ruoyi.project.mapper; |
||||||
|
|
||||||
|
import com.ruoyi.project.domain.PaAchievements; |
||||||
|
|
||||||
|
import java.util.List; |
||||||
|
|
||||||
|
|
||||||
|
/** |
||||||
|
* 【请填写功能名称】Mapper接口 |
||||||
|
* |
||||||
|
* @author ruoyi |
||||||
|
* @date 2022-07-01 |
||||||
|
*/ |
||||||
|
public interface PaAchievementsMapper |
||||||
|
{ |
||||||
|
/** |
||||||
|
* 查询【请填写功能名称】 |
||||||
|
* |
||||||
|
* @param ${pkColumn.javaField} 【请填写功能名称】ID |
||||||
|
* @return 【请填写功能名称】 |
||||||
|
*/ |
||||||
|
public PaAchievements selectPaAchievementsById(Long id); |
||||||
|
|
||||||
|
/** |
||||||
|
* 查询【请填写功能名称】列表 |
||||||
|
* |
||||||
|
* @param paAchievements 【请填写功能名称】 |
||||||
|
* @return 【请填写功能名称】集合 |
||||||
|
*/ |
||||||
|
public List<PaAchievements> selectPaAchievementsList(PaAchievements paAchievements); |
||||||
|
|
||||||
|
/** |
||||||
|
* 新增【请填写功能名称】 |
||||||
|
* |
||||||
|
* @param paAchievements 【请填写功能名称】 |
||||||
|
* @return 结果 |
||||||
|
*/ |
||||||
|
public int insertPaAchievements(PaAchievements paAchievements); |
||||||
|
|
||||||
|
/** |
||||||
|
* 修改【请填写功能名称】 |
||||||
|
* |
||||||
|
* @param paAchievements 【请填写功能名称】 |
||||||
|
* @return 结果 |
||||||
|
*/ |
||||||
|
public int updatePaAchievements(PaAchievements paAchievements); |
||||||
|
|
||||||
|
/** |
||||||
|
* 删除【请填写功能名称】 |
||||||
|
* |
||||||
|
* @param ${pkColumn.javaField} 【请填写功能名称】ID |
||||||
|
* @return 结果 |
||||||
|
*/ |
||||||
|
public int deletePaAchievementsById(Long id); |
||||||
|
|
||||||
|
/** |
||||||
|
* 批量删除【请填写功能名称】 |
||||||
|
* |
||||||
|
* @param ${pkColumn.javaField}s 需要删除的数据ID |
||||||
|
* @return 结果 |
||||||
|
*/ |
||||||
|
public int deletePaAchievementsByIds(Long[] ids); |
||||||
|
} |
@ -0,0 +1,63 @@ |
|||||||
|
package com.ruoyi.project.service; |
||||||
|
|
||||||
|
import com.ruoyi.project.domain.PaAchievements; |
||||||
|
|
||||||
|
import java.util.List; |
||||||
|
|
||||||
|
|
||||||
|
/** |
||||||
|
* 【请填写功能名称】Service接口 |
||||||
|
* |
||||||
|
* @author ruoyi |
||||||
|
* @date 2022-07-01 |
||||||
|
*/ |
||||||
|
public interface IPaAchievementsService |
||||||
|
{ |
||||||
|
/** |
||||||
|
* 查询【请填写功能名称】 |
||||||
|
* |
||||||
|
* @param ${pkColumn.javaField} 【请填写功能名称】ID |
||||||
|
* @return 【请填写功能名称】 |
||||||
|
*/ |
||||||
|
public PaAchievements selectPaAchievementsById(Long id); |
||||||
|
|
||||||
|
/** |
||||||
|
* 查询【请填写功能名称】列表 |
||||||
|
* |
||||||
|
* @param paAchievements 【请填写功能名称】 |
||||||
|
* @return 【请填写功能名称】集合 |
||||||
|
*/ |
||||||
|
public List<PaAchievements> selectPaAchievementsList(PaAchievements paAchievements); |
||||||
|
|
||||||
|
/** |
||||||
|
* 新增【请填写功能名称】 |
||||||
|
* |
||||||
|
* @param paAchievements 【请填写功能名称】 |
||||||
|
* @return 结果 |
||||||
|
*/ |
||||||
|
public int insertPaAchievements(PaAchievements paAchievements); |
||||||
|
|
||||||
|
/** |
||||||
|
* 修改【请填写功能名称】 |
||||||
|
* |
||||||
|
* @param paAchievements 【请填写功能名称】 |
||||||
|
* @return 结果 |
||||||
|
*/ |
||||||
|
public int updatePaAchievements(PaAchievements paAchievements); |
||||||
|
|
||||||
|
/** |
||||||
|
* 批量删除【请填写功能名称】 |
||||||
|
* |
||||||
|
* @param ${pkColumn.javaField}s 需要删除的【请填写功能名称】ID |
||||||
|
* @return 结果 |
||||||
|
*/ |
||||||
|
public int deletePaAchievementsByIds(Long[] ids); |
||||||
|
|
||||||
|
/** |
||||||
|
* 删除【请填写功能名称】信息 |
||||||
|
* |
||||||
|
* @param ${pkColumn.javaField} 【请填写功能名称】ID |
||||||
|
* @return 结果 |
||||||
|
*/ |
||||||
|
public int deletePaAchievementsById(Long id); |
||||||
|
} |
@ -0,0 +1,97 @@ |
|||||||
|
package com.ruoyi.project.service.impl; |
||||||
|
|
||||||
|
import java.util.List; |
||||||
|
|
||||||
|
import com.ruoyi.project.domain.PaAchievements; |
||||||
|
import com.ruoyi.project.mapper.PaAchievementsMapper; |
||||||
|
import com.ruoyi.project.service.IPaAchievementsService; |
||||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||||
|
import org.springframework.stereotype.Service; |
||||||
|
|
||||||
|
import javax.annotation.Resource; |
||||||
|
|
||||||
|
|
||||||
|
/** |
||||||
|
* 【请填写功能名称】Service业务层处理 |
||||||
|
* |
||||||
|
* @author ruoyi |
||||||
|
* @date 2022-07-01 |
||||||
|
*/ |
||||||
|
@Service |
||||||
|
public class PaAchievementsServiceImpl implements IPaAchievementsService |
||||||
|
{ |
||||||
|
@Resource |
||||||
|
private PaAchievementsMapper paAchievementsMapper; |
||||||
|
|
||||||
|
/** |
||||||
|
* 查询【请填写功能名称】 |
||||||
|
* |
||||||
|
* @param ${pkColumn.javaField} 【请填写功能名称】ID |
||||||
|
* @return 【请填写功能名称】 |
||||||
|
*/ |
||||||
|
@Override |
||||||
|
public PaAchievements selectPaAchievementsById(Long id) |
||||||
|
{ |
||||||
|
return paAchievementsMapper.selectPaAchievementsById(id); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 查询【请填写功能名称】列表 |
||||||
|
* |
||||||
|
* @param paAchievements 【请填写功能名称】 |
||||||
|
* @return 【请填写功能名称】 |
||||||
|
*/ |
||||||
|
@Override |
||||||
|
public List<PaAchievements> selectPaAchievementsList(PaAchievements paAchievements) |
||||||
|
{ |
||||||
|
return paAchievementsMapper.selectPaAchievementsList(paAchievements); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 新增【请填写功能名称】 |
||||||
|
* |
||||||
|
* @param paAchievements 【请填写功能名称】 |
||||||
|
* @return 结果 |
||||||
|
*/ |
||||||
|
@Override |
||||||
|
public int insertPaAchievements(PaAchievements paAchievements) |
||||||
|
{ |
||||||
|
return paAchievementsMapper.insertPaAchievements(paAchievements); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 修改【请填写功能名称】 |
||||||
|
* |
||||||
|
* @param paAchievements 【请填写功能名称】 |
||||||
|
* @return 结果 |
||||||
|
*/ |
||||||
|
@Override |
||||||
|
public int updatePaAchievements(PaAchievements paAchievements) |
||||||
|
{ |
||||||
|
return paAchievementsMapper.updatePaAchievements(paAchievements); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 批量删除【请填写功能名称】 |
||||||
|
* |
||||||
|
* @param ${pkColumn.javaField}s 需要删除的【请填写功能名称】ID |
||||||
|
* @return 结果 |
||||||
|
*/ |
||||||
|
@Override |
||||||
|
public int deletePaAchievementsByIds(Long[] ids) |
||||||
|
{ |
||||||
|
return paAchievementsMapper.deletePaAchievementsByIds(ids); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 删除【请填写功能名称】信息 |
||||||
|
* |
||||||
|
* @param ${pkColumn.javaField} 【请填写功能名称】ID |
||||||
|
* @return 结果 |
||||||
|
*/ |
||||||
|
@Override |
||||||
|
public int deletePaAchievementsById(Long id) |
||||||
|
{ |
||||||
|
return paAchievementsMapper.deletePaAchievementsById(id); |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,110 @@ |
|||||||
|
<?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.ruoyi.project.mapper.PaAchievementsMapper"> |
||||||
|
|
||||||
|
<resultMap type="PaAchievements" id="PaAchievementsResult"> |
||||||
|
<result property="id" column="id" /> |
||||||
|
<result property="category" column="category" /> |
||||||
|
<result property="entry" column="entry" /> |
||||||
|
<result property="referredTo" column="referred_to" /> |
||||||
|
<result property="formatRequirements" column="format_requirements" /> |
||||||
|
<result property="attachment" column="attachment" /> |
||||||
|
<result property="situation" column="situation" /> |
||||||
|
<result property="materialScience" column="material_science" /> |
||||||
|
<result property="remake" column="remake" /> |
||||||
|
<result property="explain" column="explain" /> |
||||||
|
<result property="projectCode" column="project_code" /> |
||||||
|
</resultMap> |
||||||
|
|
||||||
|
<sql id="selectPaAchievementsVo"> |
||||||
|
SELECT "id", "category", "entry", "referred_to", "format_requirements", "attachment", "situation", "material_science", "remake", "explain", "project_code" |
||||||
|
FROM "public"."pa_achievements" |
||||||
|
</sql> |
||||||
|
|
||||||
|
<select id="selectPaAchievementsList" parameterType="PaAchievements" resultMap="PaAchievementsResult"> |
||||||
|
<include refid="selectPaAchievementsVo"/> |
||||||
|
<where> |
||||||
|
<if test="id != null "> and id = #{id}</if> |
||||||
|
<if test="category != null and category != ''"> and category = #{category}</if> |
||||||
|
<if test="entry != null and entry != ''"> and entry = #{entry}</if> |
||||||
|
<if test="referredTo != null and referredTo != ''"> and referred_to like concat('%', #{referredTo}, '%')</if> |
||||||
|
<if test="formatRequirements != null and formatRequirements != ''"> and format_requirements = #{formatRequirements}</if> |
||||||
|
<if test="attachment != null "> and attachment = #{attachment}</if> |
||||||
|
<if test="situation != null and situation != ''"> and situation = #{situation}</if> |
||||||
|
<if test="materialScience != null and materialScience != ''"> and material_science = #{materialScience}</if> |
||||||
|
<if test="remake != null and remake != ''"> and remake = #{remake}</if> |
||||||
|
<if test="explain != null and explain != ''"> and explain = #{explain}</if> |
||||||
|
<if test="projectCode != null and projectCode != ''"> and project_code = #{projectCode}</if> |
||||||
|
</where> |
||||||
|
</select> |
||||||
|
|
||||||
|
<select id="selectPaAchievementsById" parameterType="Long" resultMap="PaAchievementsResult"> |
||||||
|
<include refid="selectPaAchievementsVo"/> |
||||||
|
where id = #{id} |
||||||
|
|
||||||
|
</select> |
||||||
|
|
||||||
|
<insert id="insertPaAchievements" parameterType="PaAchievements" useGeneratedKeys="true" keyProperty="id"> |
||||||
|
INSERT INTO "public"."pa_achievements" |
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=","> |
||||||
|
<if test="id != null">id,</if> |
||||||
|
<if test="category != null">category,</if> |
||||||
|
<if test="entry != null">entry,</if> |
||||||
|
<if test="referredTo != null">referred_to,</if> |
||||||
|
<if test="formatRequirements != null">format_requirements,</if> |
||||||
|
<if test="attachment != null">attachment,</if> |
||||||
|
<if test="situation != null">situation,</if> |
||||||
|
<if test="materialScience != null">material_science,</if> |
||||||
|
<if test="remake != null">remake,</if> |
||||||
|
<if test="explain != null">explain,</if> |
||||||
|
<if test="projectCode != null">project_code,</if> |
||||||
|
</trim> |
||||||
|
<trim prefix="values (" suffix=")" suffixOverrides=","> |
||||||
|
<if test="id != null">#{id},</if> |
||||||
|
<if test="category != null">#{category},</if> |
||||||
|
<if test="entry != null">#{entry},</if> |
||||||
|
<if test="referredTo != null">#{referredTo},</if> |
||||||
|
<if test="formatRequirements != null">#{formatRequirements},</if> |
||||||
|
<if test="attachment != null">#{attachment},</if> |
||||||
|
<if test="situation != null">#{situation},</if> |
||||||
|
<if test="materialScience != null">#{materialScience},</if> |
||||||
|
<if test="remake != null">#{remake},</if> |
||||||
|
<if test="explain != null">#{explain},</if> |
||||||
|
<if test="projectCode != null">#{projectCode},</if> |
||||||
|
</trim> |
||||||
|
</insert> |
||||||
|
|
||||||
|
<update id="updatePaAchievements" parameterType="PaAchievements"> |
||||||
|
UPDATE "public"."pa_achievements" |
||||||
|
<trim prefix="SET" suffixOverrides=","> |
||||||
|
<if test="id != null">id = #{id},</if> |
||||||
|
<if test="category != null">category = #{category},</if> |
||||||
|
<if test="entry != null">entry = #{entry},</if> |
||||||
|
<if test="referredTo != null">referred_to = #{referredTo},</if> |
||||||
|
<if test="formatRequirements != null">format_requirements = #{formatRequirements},</if> |
||||||
|
<if test="attachment != null">attachment = #{attachment},</if> |
||||||
|
<if test="situation != null">type = #{situation},</if> |
||||||
|
<if test="materialScience != null">material_science = #{materialScience},</if> |
||||||
|
<if test="remake != null">remake = #{remake},</if> |
||||||
|
<if test="explain != null">explain = #{explain},</if> |
||||||
|
<if test="projectCode != null">project_code = #{projectCode},</if> |
||||||
|
</trim> |
||||||
|
where id = #{id} |
||||||
|
|
||||||
|
</update> |
||||||
|
|
||||||
|
<delete id="deletePaAchievementsById" parameterType="Long"> |
||||||
|
DELETE FROM "public"."pa_achievements" where id = #{id} |
||||||
|
|
||||||
|
</delete> |
||||||
|
|
||||||
|
<delete id="deletePaAchievementsByIds" parameterType="String"> |
||||||
|
DELETE FROM "public"."pa_achievements" |
||||||
|
<foreach item="id" collection="array" open="(" separator="," close=")"> |
||||||
|
#{id} |
||||||
|
</foreach> |
||||||
|
</delete> |
||||||
|
|
||||||
|
</mapper> |
Loading…
Reference in new issue