p-honggang.li
2025-08-28 f0da95925bcb8ad19b0d1cc78afe4b4a4ae188a6
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<?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.webmanage.mapper.UserPointsMapper">
 
    <!-- 根据用户ID查询积分信息 -->
    <select id="selectByUserId" resultType="com.webmanage.entity.UserPoints">
        SELECT *
        FROM tb_user_points
        WHERE user_id = #{userId}
        AND deleted = 0
        LIMIT 1
    </select>
 
    <!-- 根据单位ID查询积分信息 -->
    <select id="selectByUnitId" resultType="com.webmanage.entity.UserPoints">
        SELECT *
        FROM tb_user_points
        WHERE unit_id = #{unitId}
        AND deleted = 0
        LIMIT 1
    </select>
 
</mapper>