2022-10-21 17:32:22 +08:00
|
|
|
<?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.rzyc.mapper.SparePartMapper">
|
|
|
|
|
|
|
|
|
|
<!-- 通用查询映射结果 -->
|
|
|
|
|
<resultMap id="BaseResultMap" type="com.rzyc.model.SparePart">
|
|
|
|
|
<id column="spare_part_id" property="sparePartId" />
|
|
|
|
|
<result column="used_id" property="usedId" />
|
|
|
|
|
<result column="name" property="name" />
|
|
|
|
|
<result column="specification_model" property="specificationModel" />
|
|
|
|
|
<result column="spare_part_number" property="sparePartNumber" />
|
|
|
|
|
<result column="create_time" property="createTime" />
|
|
|
|
|
<result column="create_by" property="createBy" />
|
|
|
|
|
<result column="modify_by" property="modifyBy" />
|
|
|
|
|
<result column="modify_time" property="modifyTime" />
|
|
|
|
|
</resultMap>
|
|
|
|
|
|
|
|
|
|
<!-- 通用查询结果列 -->
|
|
|
|
|
<sql id="Base_Column_List">
|
|
|
|
|
spare_part_id, used_id, name, specification_model, spare_part_number, create_time, create_by, modify_by, modify_time
|
|
|
|
|
</sql>
|
|
|
|
|
|
2022-10-25 17:34:27 +08:00
|
|
|
<select id="sparePartList" resultMap="BaseResultMap">
|
|
|
|
|
select * from spare_part
|
|
|
|
|
<if test="null != name and '' != name ">
|
|
|
|
|
where `name` = #{name}
|
|
|
|
|
</if>
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<update id="updateSparePart">
|
|
|
|
|
update spare_part set used_id = #{usedId} ,specification_model = #{specificationModel},spare_part_number = #{sparePartNumber} where spare_part_id = #{sparePartId}
|
|
|
|
|
</update>
|
|
|
|
|
|
2022-10-21 17:32:22 +08:00
|
|
|
</mapper>
|