From c13c98374281a6316348979841a2fb249575ac26 Mon Sep 17 00:00:00 2001
From: Helius <wangdoubleone@gmail.com>
Date: Tue, 30 Nov 2021 18:43:47 +0800
Subject: [PATCH] fix
---
src/main/resources/mapper/fish/CannonOwnRecordDao.xml | 13 +++++++++----
1 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/src/main/resources/mapper/fish/CannonOwnRecordDao.xml b/src/main/resources/mapper/fish/CannonOwnRecordDao.xml
index e79ff28..2b2239f 100644
--- a/src/main/resources/mapper/fish/CannonOwnRecordDao.xml
+++ b/src/main/resources/mapper/fish/CannonOwnRecordDao.xml
@@ -7,10 +7,15 @@
</select>
<select id="selectCannonOwnRecordsByMemberId" resultType="com.xcong.excoin.modules.fish.vo.OwnCannonVo">
- select a.*,b.gold_consume goldConsume
- from cannon_own_record a
- left join cannon_setting b on a.cannon_code = b.code
- where a.member_id = #{memberId}
+ select
+ a.*,
+ case when b.id is null then 2 else 1 end isHas
+ from cannon_setting a
+ left join cannon_own_record b on a.code=b.cannon_code and b.member_id=#{memberId}
+ </select>
+
+ <select id="selectCannonOwnRecordsByIdAndMemberId" resultType="com.xcong.excoin.modules.fish.entity.CannonOwnRecord">
+ select a.* from cannon_own_record a where a.member_id = #{memberId} and a.id = #{id}
</select>
</mapper>
\ No newline at end of file
--
Gitblit v1.9.1