Browse Source

Merge remote-tracking branch 'origin/dev' into dev

pull/97/head
fanshuai 1 year ago
parent
commit
ef16c5e0ce
1 changed files with 13 additions and 4 deletions
  1. +13
    -4
      ruoyi-modules/management-platform/src/main/resources/mapper/managementPlatform/ImageDaoMapper.xml

+ 13
- 4
ruoyi-modules/management-platform/src/main/resources/mapper/managementPlatform/ImageDaoMapper.xml View File

@@ -14,12 +14,21 @@
<result property="state" column="state" jdbcType="INTEGER"/>
</resultMap>

<!--查询单个-->
<!-- 查询单个 -->
<select id="queryById" resultMap="ImageMap">
select
id,name,description,image_type,create_by,create_time,update_by,update_time,state
from image
where id = #{id} and state = 1
img.id,
img.name,
img.description,
img.image_type,
img.create_by,
img.create_time,
img.update_by,
img.update_time,
img.state,
(SELECT COUNT(*) FROM image_version WHERE image_version.image_id = img.id AND image_version.state = 1) as versionCount
from image img
where img.id = #{id} and img.state = 1
</select>

<!--查询指定行数据-->


Loading…
Cancel
Save