lanan-system/dl-module-knowledge/src/main/resources/mapper/TViolationImageMapper.xml
愉快的大福 58f3d3d4a3 知识模块
2024-08-12 21:27:02 +08:00

52 lines
1.4 KiB
XML

<?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="cn.iocoder.yudao.module.knowledge.mapper.TViolationImageMapper" >
<select id="selectByViolationId" resultType="cn.iocoder.yudao.module.knowledge.entity.TViolationImage">
SELECT
id AS id,
filename AS filename,
file_size AS fileSize,
file_url AS fileUrl,
sort AS sort,
violation_code AS violationCode,
dept_id AS deptId,
identity_id AS identityId,
create_time AS createTime,
update_time AS updateTime,
creator AS creator,
violation_id AS violationId
FROM t_violation_image
WHERE
violation_id = #{id}
AND deleted = 0
ORDER BY
create_time DESC
</select>
<select id="findOneForApp" resultType="cn.iocoder.yudao.module.knowledge.entity.TViolationImage">
SELECT
id AS id,
filename AS filename,
file_size AS fileSize,
file_url AS fileUrl,
sort AS sort,
violation_code AS violationCode,
dept_id AS deptId,
identity_id AS identityId,
create_time AS createTime,
update_time AS updateTime,
creator AS creator,
violation_id AS violationId
FROM t_violation_image
WHERE
violation_id = #{id}
AND deleted = 0
ORDER BY
create_time DESC
</select>
</mapper>