feat:增加密码管理接口

This commit is contained in:
2025-06-12 14:02:17 +08:00
parent 7ca52c0537
commit d119e7aee8
30 changed files with 335 additions and 32 deletions

View File

@@ -0,0 +1,31 @@
<?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.cxx.home.dao.PasswordDao">
<select id="query" resultType="com.cxx.home.dto.password.PasswordDto">
SELECT
id AS id,
title AS title,
website AS website,
username AS username,
password AS password,
category AS category,
owner AS owner,
remark AS remark
FROM
password
<where>
<if test="query.category != null and query.category != ''">
category = #{query.category}
</if>
<if test="query.owner != null and query.owner != ''">
AND owner = #{query.owner}
</if>
</where>
</select>
<select id="queryCategory" resultType="string">
SELECT DISTINCT category
FROM password
WHERE category IS NOT NULL AND category != '';
</select>
</mapper>