Zlpt-Cloud/zlpt-modules/zlpt-equip/src/main/resources/mapper/SysFileInfoMapper.xml

36 lines
1.5 KiB
XML
Raw Normal View History

<?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.bonus.zlpt.equip.mapper.SysFileInfoMapper">
2023-12-06 10:37:06 +08:00
<select id="selectByMaId" resultType="com.bonus.zlpt.equip.api.domain.SysFileInfo">
select * from sys_file_info where model_id = #{maId}
</select>
2023-12-10 02:07:33 +08:00
<select id="getBmCompanyInfo" resultType="com.bonus.zlpt.company.api.domain.BmCompanyInfo">
select * from bm_company_info where company_name = #{companyName}
</select>
<select id="getTypeInfo" resultType="com.bonus.zlpt.equip.api.domain.TypeInfo">
select * from ma_type_info where type_name = #{deviceName}
</select>
2023-12-06 13:07:00 +08:00
<insert id="insertFileInfo" parameterType="com.bonus.zlpt.equip.api.domain.SysFileInfo">
insert into sys_file_info (
<if test="modelId != null">model_id,</if>
<if test="fileName != null">file_name,</if>
<if test="fileUrl != null">file_url,</if>
<if test="dicId != null">dic_id,</if>
<if test="creator != null">creator,</if>
create_time
)values(
<if test="modelId != null">#{modelId},</if>
<if test="fileName != null">#{fileName},</if>
<if test="fileUrl != null">#{fileUrl},</if>
<if test="dicId != null">#{dicId},</if>
<if test="creator != null">#{creator},</if>
sysdate()
)
</insert>
</mapper>