24 lines
955 B
XML
Raw Permalink Normal View History

2026-03-10 16:40:19 +08:00
<?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._3e.dao.BadgeLogDao">
<insert id="doRecordLog" parameterType="com._3e.entity.BadgeLog">
INSERT INTO badgelog(
badgelogid, userid, badgetype, objectid, badgecaseid, created,
areaid, pointcasetype,source,sourceId)
VALUES (
<if test="badgelogid == 0">
(SELECT NEXTVAL('seq_badgelogid')),
</if>
<if test="badgelogid != 0">
#{badgelogid},
</if>
#{userid}, #{badgetype}, #{objectid}, #{badgecaseid}, #{created},
#{areaid}, #{pointcasetype},#{source},#{sourceId})
</insert>
<select id="findBadgeLogBySourceId" resultType="com._3e.entity.BadgeLog">
SELECT * FROM badgelog WHERE userid = #{uid} and sourceId=#{sourceId} and source=#{source} and areaId = #{areaId} and created = #{created}
</select>
</mapper>