mitao
2025-02-21 31573d6180d15ef65ed0df9c2732495f40b12663
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
<?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.panzhihua.service_community.dao.ComActEasyPhotoRewardMapper">
 
    <!-- 通用查询映射结果 -->
    <resultMap id="BaseResultMap" type="com.panzhihua.service_community.model.dos.ComActEasyPhotoRewardDO">
        <id column="id" property="id" />
        <result column="user_id" property="userId" />
        <result column="community_id" property="communityId" />
        <result column="is_read" property="isRead" />
        <result column="amount" property="amount" />
        <result column="create_at" property="createAt" />
        <result column="update_at" property="updateAt" />
    </resultMap>
 
    <!-- 通用查询结果列 -->
    <sql id="Base_Column_List">
        id, user_id, community_id, is_read, amount, create_at, update_at
    </sql>
 
    <select id="getUserReward" resultType="java.math.BigDecimal">
        select amount from com_act_easy_photo_reward where user_id = #{userId} and is_read = 2 and community_id = ${communityId}
    </select>
 
</mapper>