feat:增加密码管理接口
This commit is contained in:
31
home-service/src/main/resources/mapper/PasswordMapper.xml
Normal file
31
home-service/src/main/resources/mapper/PasswordMapper.xml
Normal 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>
|
||||
Reference in New Issue
Block a user