Helius
2021-11-26 4017fe347792c7e28695c455a40874f0c647cc9b
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<?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.xcong.excoin.modules.fish.dao.CannonOwnRecordDao">
 
    <select id="selectCannonOwnRecordsByMemberIdAndCannonCode" resultType="com.xcong.excoin.modules.fish.entity.CannonOwnRecord">
        select a.* from cannon_own_record a where a.member_id = #{memberId} and a.cannon_code = #{code}
    </select>
 
    <select id="selectCannonOwnRecordsByMemberId" resultType="com.xcong.excoin.modules.fish.vo.OwnCannonVo">
        select
               a.*,
               case when b.id is null then 0 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>