仪器的新增和编辑
parent
2e834acce8
commit
dffd37aa06
@ -0,0 +1,72 @@
|
||||
package com.flossom.common.core.mapper;
|
||||
|
||||
import com.flossom.common.core.domain.entity.WxInstrumentFileRelate;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* 仪器关联文件信息Mapper接口
|
||||
*
|
||||
* @author flossom
|
||||
* @date 2024-01-10
|
||||
*/
|
||||
public interface WxInstrumentFileRelateMapper {
|
||||
/**
|
||||
* 查询仪器关联文件信息
|
||||
*
|
||||
* @param id 仪器关联文件信息主键
|
||||
* @return 仪器关联文件信息
|
||||
*/
|
||||
public WxInstrumentFileRelate selectWxInstrumentFileRelateById(Long id);
|
||||
|
||||
/**
|
||||
* 查询仪器关联文件信息列表
|
||||
*
|
||||
* @param wxInstrumentFileRelate 仪器关联文件信息
|
||||
* @return 仪器关联文件信息集合
|
||||
*/
|
||||
public List<WxInstrumentFileRelate> selectWxInstrumentFileRelateList(WxInstrumentFileRelate wxInstrumentFileRelate);
|
||||
|
||||
/**
|
||||
* 新增仪器关联文件信息
|
||||
*
|
||||
* @param wxInstrumentFileRelate 仪器关联文件信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertWxInstrumentFileRelate(WxInstrumentFileRelate wxInstrumentFileRelate);
|
||||
|
||||
/**
|
||||
* 修改仪器关联文件信息
|
||||
*
|
||||
* @param wxInstrumentFileRelate 仪器关联文件信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateWxInstrumentFileRelate(WxInstrumentFileRelate wxInstrumentFileRelate);
|
||||
|
||||
/**
|
||||
* 删除仪器关联文件信息
|
||||
*
|
||||
* @param id 仪器关联文件信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteWxInstrumentFileRelateById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除仪器关联文件信息
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteWxInstrumentFileRelateByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除仪器关联文件信息
|
||||
*
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteByInstrumentIdAndClassify(@Param("instrumentId") Long instrumentId, @Param("classify") Integer classify);
|
||||
|
||||
public List<WxInstrumentFileRelate> selectByInstrumentIdAndClassify(@Param("instrumentId") Long instrumentId, @Param("classify") Integer classify);
|
||||
}
|
||||
@ -0,0 +1,98 @@
|
||||
<?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.flossom.common.core.mapper.WxInstrumentFileRelateMapper">
|
||||
|
||||
<resultMap type="WxInstrumentFileRelate" id="WxInstrumentFileRelateResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="classify" column="classify" />
|
||||
<result property="instrumentId" column="instrument_id" />
|
||||
<result property="file" column="file" />
|
||||
<result property="fileType" column="file_type" />
|
||||
<result property="message" column="message" />
|
||||
<result property="status" column="status" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectWxInstrumentFileRelateVo">
|
||||
select id, classify, instrument_id, file, file_type, message, status, create_by, create_time from wx_instrument_file_relate
|
||||
</sql>
|
||||
|
||||
<select id="selectWxInstrumentFileRelateList" parameterType="WxInstrumentFileRelate" resultMap="WxInstrumentFileRelateResult">
|
||||
<include refid="selectWxInstrumentFileRelateVo"/>
|
||||
<where>
|
||||
<if test="classify != null "> and classify = #{classify}</if>
|
||||
<if test="instrumentId != null "> and instrument_id = #{instrumentId}</if>
|
||||
<if test="file != null and file != ''"> and file = #{file}</if>
|
||||
<if test="fileType != null and fileType != ''"> and file_type = #{fileType}</if>
|
||||
<if test="message != null and message != ''"> and message = #{message}</if>
|
||||
<if test="status != null "> and status = #{status}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectWxInstrumentFileRelateById" parameterType="Long" resultMap="WxInstrumentFileRelateResult">
|
||||
<include refid="selectWxInstrumentFileRelateVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
<select id="selectByInstrumentIdAndClassify" resultMap="WxInstrumentFileRelateResult">
|
||||
<include refid="selectWxInstrumentFileRelateVo"/>
|
||||
where instrument_id = #{instrumentId} and classify = #{classify}
|
||||
</select>
|
||||
|
||||
<insert id="insertWxInstrumentFileRelate" parameterType="WxInstrumentFileRelate" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into wx_instrument_file_relate
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="classify != null">classify,</if>
|
||||
<if test="instrumentId != null">instrument_id,</if>
|
||||
<if test="file != null and file != ''">file,</if>
|
||||
<if test="fileType != null and fileType != ''">file_type,</if>
|
||||
<if test="message != null and message != ''">message,</if>
|
||||
<if test="status != null">status,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="classify != null">#{classify},</if>
|
||||
<if test="instrumentId != null">#{instrumentId},</if>
|
||||
<if test="file != null and file != ''">#{file},</if>
|
||||
<if test="fileType != null and fileType != ''">#{fileType},</if>
|
||||
<if test="message != null and message != ''">#{message},</if>
|
||||
<if test="status != null">#{status},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateWxInstrumentFileRelate" parameterType="WxInstrumentFileRelate">
|
||||
update wx_instrument_file_relate
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="classify != null">classify = #{classify},</if>
|
||||
<if test="instrumentId != null">instrument_id = #{instrumentId},</if>
|
||||
<if test="file != null and file != ''">file = #{file},</if>
|
||||
<if test="fileType != null and fileType != ''">file_type = #{fileType},</if>
|
||||
<if test="message != null and message != ''">message = #{message},</if>
|
||||
<if test="status != null">status = #{status},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteWxInstrumentFileRelateById" parameterType="Long">
|
||||
delete from wx_instrument_file_relate where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteWxInstrumentFileRelateByIds" parameterType="String">
|
||||
delete from wx_instrument_file_relate where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
|
||||
<delete id="deleteByInstrumentIdAndClassify">
|
||||
delete from wx_instrument_file_relate where instrument_id = #{instrumentId} and classify = #{classify}
|
||||
</delete>
|
||||
</mapper>
|
||||
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue