<?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>
|