检测模板头
This commit is contained in:
parent
6c8a0a6e8e
commit
7dbadb12a4
@ -0,0 +1,112 @@
|
||||
package com.ktg.mes.qc.controller;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.ktg.common.constant.UserConstants;
|
||||
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.ktg.common.annotation.Log;
|
||||
import com.ktg.common.core.controller.BaseController;
|
||||
import com.ktg.common.core.domain.AjaxResult;
|
||||
import com.ktg.common.enums.BusinessType;
|
||||
import com.ktg.mes.qc.domain.QcTemplate;
|
||||
import com.ktg.mes.qc.service.IQcTemplateService;
|
||||
import com.ktg.common.utils.poi.ExcelUtil;
|
||||
import com.ktg.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 检测模板Controller
|
||||
*
|
||||
* @author yinjinlu
|
||||
* @date 2022-05-17
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/qc/qctemplate")
|
||||
public class QcTemplateController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IQcTemplateService qcTemplateService;
|
||||
|
||||
/**
|
||||
* 查询检测模板列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('qc:qctemplate:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(QcTemplate qcTemplate)
|
||||
{
|
||||
startPage();
|
||||
List<QcTemplate> list = qcTemplateService.selectQcTemplateList(qcTemplate);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出检测模板列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('qc:qctemplate:export')")
|
||||
@Log(title = "检测模板", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, QcTemplate qcTemplate)
|
||||
{
|
||||
List<QcTemplate> list = qcTemplateService.selectQcTemplateList(qcTemplate);
|
||||
ExcelUtil<QcTemplate> util = new ExcelUtil<QcTemplate>(QcTemplate.class);
|
||||
util.exportExcel(response, list, "检测模板数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取检测模板详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('qc:qctemplate:query')")
|
||||
@GetMapping(value = "/{templateId}")
|
||||
public AjaxResult getInfo(@PathVariable("templateId") Long templateId)
|
||||
{
|
||||
return AjaxResult.success(qcTemplateService.selectQcTemplateByTemplateId(templateId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增检测模板
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('qc:qctemplate:add')")
|
||||
@Log(title = "检测模板", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody QcTemplate qcTemplate)
|
||||
{
|
||||
if(UserConstants.NOT_UNIQUE.equals(qcTemplateService.checkTemplateCodeUnique(qcTemplate))){
|
||||
return AjaxResult.error("检测模板编号已存在!");
|
||||
}
|
||||
return toAjax(qcTemplateService.insertQcTemplate(qcTemplate));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改检测模板
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('qc:qctemplate:edit')")
|
||||
@Log(title = "检测模板", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody QcTemplate qcTemplate)
|
||||
{
|
||||
if(UserConstants.NOT_UNIQUE.equals(qcTemplateService.checkTemplateCodeUnique(qcTemplate))){
|
||||
return AjaxResult.error("检测模板编号已存在!");
|
||||
}
|
||||
return toAjax(qcTemplateService.updateQcTemplate(qcTemplate));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除检测模板
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('qc:qctemplate:remove')")
|
||||
@Log(title = "检测模板", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{templateIds}")
|
||||
public AjaxResult remove(@PathVariable Long[] templateIds)
|
||||
{
|
||||
return toAjax(qcTemplateService.deleteQcTemplateByTemplateIds(templateIds));
|
||||
}
|
||||
}
|
150
ktg-mes/src/main/java/com/ktg/mes/qc/domain/QcTemplate.java
Normal file
150
ktg-mes/src/main/java/com/ktg/mes/qc/domain/QcTemplate.java
Normal file
@ -0,0 +1,150 @@
|
||||
package com.ktg.mes.qc.domain;
|
||||
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.ktg.common.annotation.Excel;
|
||||
import com.ktg.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 检测模板对象 qc_template
|
||||
*
|
||||
* @author yinjinlu
|
||||
* @date 2022-05-17
|
||||
*/
|
||||
public class QcTemplate extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 检测模板ID */
|
||||
private Long templateId;
|
||||
|
||||
/** 检测模板编号 */
|
||||
@Excel(name = "检测模板编号")
|
||||
private String templateCode;
|
||||
|
||||
/** 检测模板名称 */
|
||||
@Excel(name = "检测模板名称")
|
||||
private String templateName;
|
||||
|
||||
/** 检测种类 */
|
||||
@Excel(name = "检测种类")
|
||||
private String qcTypes;
|
||||
|
||||
/** 是否启用 */
|
||||
@Excel(name = "是否启用")
|
||||
private String enableFlag;
|
||||
|
||||
/** 预留字段1 */
|
||||
private String attr1;
|
||||
|
||||
/** 预留字段2 */
|
||||
private String attr2;
|
||||
|
||||
/** 预留字段3 */
|
||||
private Long attr3;
|
||||
|
||||
/** 预留字段4 */
|
||||
private Long attr4;
|
||||
|
||||
public void setTemplateId(Long templateId)
|
||||
{
|
||||
this.templateId = templateId;
|
||||
}
|
||||
|
||||
public Long getTemplateId()
|
||||
{
|
||||
return templateId;
|
||||
}
|
||||
public void setTemplateCode(String templateCode)
|
||||
{
|
||||
this.templateCode = templateCode;
|
||||
}
|
||||
|
||||
public String getTemplateCode()
|
||||
{
|
||||
return templateCode;
|
||||
}
|
||||
public void setTemplateName(String templateName)
|
||||
{
|
||||
this.templateName = templateName;
|
||||
}
|
||||
|
||||
public String getTemplateName()
|
||||
{
|
||||
return templateName;
|
||||
}
|
||||
public void setQcTypes(String qcTypes)
|
||||
{
|
||||
this.qcTypes = qcTypes;
|
||||
}
|
||||
|
||||
public String getQcTypes()
|
||||
{
|
||||
return qcTypes;
|
||||
}
|
||||
public void setEnableFlag(String enableFlag)
|
||||
{
|
||||
this.enableFlag = enableFlag;
|
||||
}
|
||||
|
||||
public String getEnableFlag()
|
||||
{
|
||||
return enableFlag;
|
||||
}
|
||||
public void setAttr1(String attr1)
|
||||
{
|
||||
this.attr1 = attr1;
|
||||
}
|
||||
|
||||
public String getAttr1()
|
||||
{
|
||||
return attr1;
|
||||
}
|
||||
public void setAttr2(String attr2)
|
||||
{
|
||||
this.attr2 = attr2;
|
||||
}
|
||||
|
||||
public String getAttr2()
|
||||
{
|
||||
return attr2;
|
||||
}
|
||||
public void setAttr3(Long attr3)
|
||||
{
|
||||
this.attr3 = attr3;
|
||||
}
|
||||
|
||||
public Long getAttr3()
|
||||
{
|
||||
return attr3;
|
||||
}
|
||||
public void setAttr4(Long attr4)
|
||||
{
|
||||
this.attr4 = attr4;
|
||||
}
|
||||
|
||||
public Long getAttr4()
|
||||
{
|
||||
return attr4;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("templateId", getTemplateId())
|
||||
.append("templateCode", getTemplateCode())
|
||||
.append("templateName", getTemplateName())
|
||||
.append("qcTypes", getQcTypes())
|
||||
.append("enableFlag", getEnableFlag())
|
||||
.append("remark", getRemark())
|
||||
.append("attr1", getAttr1())
|
||||
.append("attr2", getAttr2())
|
||||
.append("attr3", getAttr3())
|
||||
.append("attr4", getAttr4())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.toString();
|
||||
}
|
||||
}
|
@ -0,0 +1,64 @@
|
||||
package com.ktg.mes.qc.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ktg.mes.qc.domain.QcTemplate;
|
||||
|
||||
/**
|
||||
* 检测模板Mapper接口
|
||||
*
|
||||
* @author yinjinlu
|
||||
* @date 2022-05-17
|
||||
*/
|
||||
public interface QcTemplateMapper
|
||||
{
|
||||
/**
|
||||
* 查询检测模板
|
||||
*
|
||||
* @param templateId 检测模板主键
|
||||
* @return 检测模板
|
||||
*/
|
||||
public QcTemplate selectQcTemplateByTemplateId(Long templateId);
|
||||
|
||||
/**
|
||||
* 查询检测模板列表
|
||||
*
|
||||
* @param qcTemplate 检测模板
|
||||
* @return 检测模板集合
|
||||
*/
|
||||
public List<QcTemplate> selectQcTemplateList(QcTemplate qcTemplate);
|
||||
|
||||
|
||||
public QcTemplate checkTemplateCodeUnique(QcTemplate qcTemplate);
|
||||
|
||||
/**
|
||||
* 新增检测模板
|
||||
*
|
||||
* @param qcTemplate 检测模板
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertQcTemplate(QcTemplate qcTemplate);
|
||||
|
||||
/**
|
||||
* 修改检测模板
|
||||
*
|
||||
* @param qcTemplate 检测模板
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateQcTemplate(QcTemplate qcTemplate);
|
||||
|
||||
/**
|
||||
* 删除检测模板
|
||||
*
|
||||
* @param templateId 检测模板主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteQcTemplateByTemplateId(Long templateId);
|
||||
|
||||
/**
|
||||
* 批量删除检测模板
|
||||
*
|
||||
* @param templateIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteQcTemplateByTemplateIds(Long[] templateIds);
|
||||
}
|
@ -0,0 +1,68 @@
|
||||
package com.ktg.mes.qc.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ktg.mes.qc.domain.QcTemplate;
|
||||
|
||||
/**
|
||||
* 检测模板Service接口
|
||||
*
|
||||
* @author yinjinlu
|
||||
* @date 2022-05-17
|
||||
*/
|
||||
public interface IQcTemplateService
|
||||
{
|
||||
/**
|
||||
* 查询检测模板
|
||||
*
|
||||
* @param templateId 检测模板主键
|
||||
* @return 检测模板
|
||||
*/
|
||||
public QcTemplate selectQcTemplateByTemplateId(Long templateId);
|
||||
|
||||
/**
|
||||
* 查询检测模板列表
|
||||
*
|
||||
* @param qcTemplate 检测模板
|
||||
* @return 检测模板集合
|
||||
*/
|
||||
public List<QcTemplate> selectQcTemplateList(QcTemplate qcTemplate);
|
||||
|
||||
/**
|
||||
* 检测模板编号是否唯一
|
||||
* @param qcTemplate
|
||||
* @return
|
||||
*/
|
||||
public String checkTemplateCodeUnique(QcTemplate qcTemplate);
|
||||
|
||||
/**
|
||||
* 新增检测模板
|
||||
*
|
||||
* @param qcTemplate 检测模板
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertQcTemplate(QcTemplate qcTemplate);
|
||||
|
||||
/**
|
||||
* 修改检测模板
|
||||
*
|
||||
* @param qcTemplate 检测模板
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateQcTemplate(QcTemplate qcTemplate);
|
||||
|
||||
/**
|
||||
* 批量删除检测模板
|
||||
*
|
||||
* @param templateIds 需要删除的检测模板主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteQcTemplateByTemplateIds(Long[] templateIds);
|
||||
|
||||
/**
|
||||
* 删除检测模板信息
|
||||
*
|
||||
* @param templateId 检测模板主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteQcTemplateByTemplateId(Long templateId);
|
||||
}
|
@ -0,0 +1,109 @@
|
||||
package com.ktg.mes.qc.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.ktg.common.constant.UserConstants;
|
||||
import com.ktg.common.utils.DateUtils;
|
||||
import com.ktg.common.utils.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ktg.mes.qc.mapper.QcTemplateMapper;
|
||||
import com.ktg.mes.qc.domain.QcTemplate;
|
||||
import com.ktg.mes.qc.service.IQcTemplateService;
|
||||
|
||||
/**
|
||||
* 检测模板Service业务层处理
|
||||
*
|
||||
* @author yinjinlu
|
||||
* @date 2022-05-17
|
||||
*/
|
||||
@Service
|
||||
public class QcTemplateServiceImpl implements IQcTemplateService
|
||||
{
|
||||
@Autowired
|
||||
private QcTemplateMapper qcTemplateMapper;
|
||||
|
||||
/**
|
||||
* 查询检测模板
|
||||
*
|
||||
* @param templateId 检测模板主键
|
||||
* @return 检测模板
|
||||
*/
|
||||
@Override
|
||||
public QcTemplate selectQcTemplateByTemplateId(Long templateId)
|
||||
{
|
||||
return qcTemplateMapper.selectQcTemplateByTemplateId(templateId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询检测模板列表
|
||||
*
|
||||
* @param qcTemplate 检测模板
|
||||
* @return 检测模板
|
||||
*/
|
||||
@Override
|
||||
public List<QcTemplate> selectQcTemplateList(QcTemplate qcTemplate)
|
||||
{
|
||||
return qcTemplateMapper.selectQcTemplateList(qcTemplate);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String checkTemplateCodeUnique(QcTemplate qcTemplate) {
|
||||
QcTemplate template = qcTemplateMapper.checkTemplateCodeUnique(qcTemplate);
|
||||
Long templateId = qcTemplate.getTemplateId()==null?-1L:qcTemplate.getTemplateId();
|
||||
if(StringUtils.isNotNull(template) && template.getTemplateId().longValue()!=templateId.longValue()){
|
||||
return UserConstants.NOT_UNIQUE;
|
||||
}
|
||||
return UserConstants.UNIQUE;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增检测模板
|
||||
*
|
||||
* @param qcTemplate 检测模板
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertQcTemplate(QcTemplate qcTemplate)
|
||||
{
|
||||
qcTemplate.setCreateTime(DateUtils.getNowDate());
|
||||
return qcTemplateMapper.insertQcTemplate(qcTemplate);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改检测模板
|
||||
*
|
||||
* @param qcTemplate 检测模板
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateQcTemplate(QcTemplate qcTemplate)
|
||||
{
|
||||
qcTemplate.setUpdateTime(DateUtils.getNowDate());
|
||||
return qcTemplateMapper.updateQcTemplate(qcTemplate);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除检测模板
|
||||
*
|
||||
* @param templateIds 需要删除的检测模板主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteQcTemplateByTemplateIds(Long[] templateIds)
|
||||
{
|
||||
return qcTemplateMapper.deleteQcTemplateByTemplateIds(templateIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除检测模板信息
|
||||
*
|
||||
* @param templateId 检测模板主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteQcTemplateByTemplateId(Long templateId)
|
||||
{
|
||||
return qcTemplateMapper.deleteQcTemplateByTemplateId(templateId);
|
||||
}
|
||||
}
|
112
ktg-mes/src/main/resources/mapper/qc/QcTemplateMapper.xml
Normal file
112
ktg-mes/src/main/resources/mapper/qc/QcTemplateMapper.xml
Normal file
@ -0,0 +1,112 @@
|
||||
<?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.ktg.mes.qc.mapper.QcTemplateMapper">
|
||||
|
||||
<resultMap type="QcTemplate" id="QcTemplateResult">
|
||||
<result property="templateId" column="template_id" />
|
||||
<result property="templateCode" column="template_code" />
|
||||
<result property="templateName" column="template_name" />
|
||||
<result property="qcTypes" column="qc_types" />
|
||||
<result property="enableFlag" column="enable_flag" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="attr1" column="attr1" />
|
||||
<result property="attr2" column="attr2" />
|
||||
<result property="attr3" column="attr3" />
|
||||
<result property="attr4" column="attr4" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectQcTemplateVo">
|
||||
select template_id, template_code, template_name, qc_types, enable_flag, remark, attr1, attr2, attr3, attr4, create_by, create_time, update_by, update_time from qc_template
|
||||
</sql>
|
||||
|
||||
<select id="selectQcTemplateList" parameterType="QcTemplate" resultMap="QcTemplateResult">
|
||||
<include refid="selectQcTemplateVo"/>
|
||||
<where>
|
||||
<if test="templateCode != null and templateCode != ''"> and template_code = #{templateCode}</if>
|
||||
<if test="templateName != null and templateName != ''"> and template_name like concat('%', #{templateName}, '%')</if>
|
||||
<if test="qcTypes != null and qcTypes != ''"> and qc_types = #{qcTypes}</if>
|
||||
<if test="enableFlag != null and enableFlag != ''"> and enable_flag = #{enableFlag}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectQcTemplateByTemplateId" parameterType="Long" resultMap="QcTemplateResult">
|
||||
<include refid="selectQcTemplateVo"/>
|
||||
where template_id = #{templateId}
|
||||
</select>
|
||||
|
||||
<select id="checkTemplateCodeUnique" parameterType="QcTemplate" resultMap="QcTemplateResult">
|
||||
<include refid="selectQcTemplateVo"/>
|
||||
where template_code = #{templateCode}
|
||||
</select>
|
||||
|
||||
<insert id="insertQcTemplate" parameterType="QcTemplate" useGeneratedKeys="true" keyProperty="templateId">
|
||||
insert into qc_template
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="templateCode != null and templateCode != ''">template_code,</if>
|
||||
<if test="templateName != null and templateName != ''">template_name,</if>
|
||||
<if test="qcTypes != null and qcTypes != ''">qc_types,</if>
|
||||
<if test="enableFlag != null">enable_flag,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
<if test="attr1 != null">attr1,</if>
|
||||
<if test="attr2 != null">attr2,</if>
|
||||
<if test="attr3 != null">attr3,</if>
|
||||
<if test="attr4 != null">attr4,</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>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="templateCode != null and templateCode != ''">#{templateCode},</if>
|
||||
<if test="templateName != null and templateName != ''">#{templateName},</if>
|
||||
<if test="qcTypes != null and qcTypes != ''">#{qcTypes},</if>
|
||||
<if test="enableFlag != null">#{enableFlag},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
<if test="attr1 != null">#{attr1},</if>
|
||||
<if test="attr2 != null">#{attr2},</if>
|
||||
<if test="attr3 != null">#{attr3},</if>
|
||||
<if test="attr4 != null">#{attr4},</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>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateQcTemplate" parameterType="QcTemplate">
|
||||
update qc_template
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="templateCode != null and templateCode != ''">template_code = #{templateCode},</if>
|
||||
<if test="templateName != null and templateName != ''">template_name = #{templateName},</if>
|
||||
<if test="qcTypes != null and qcTypes != ''">qc_types = #{qcTypes},</if>
|
||||
<if test="enableFlag != null">enable_flag = #{enableFlag},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="attr1 != null">attr1 = #{attr1},</if>
|
||||
<if test="attr2 != null">attr2 = #{attr2},</if>
|
||||
<if test="attr3 != null">attr3 = #{attr3},</if>
|
||||
<if test="attr4 != null">attr4 = #{attr4},</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>
|
||||
</trim>
|
||||
where template_id = #{templateId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteQcTemplateByTemplateId" parameterType="Long">
|
||||
delete from qc_template where template_id = #{templateId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteQcTemplateByTemplateIds" parameterType="String">
|
||||
delete from qc_template where template_id in
|
||||
<foreach item="templateId" collection="array" open="(" separator="," close=")">
|
||||
#{templateId}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
Loading…
Reference in New Issue
Block a user