From ccbc14f0d3cfa9ee1db63a56492d4e67d296a3cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B4=BA=E5=BF=97=E8=B1=AA?= <3087861069@qq.com> Date: Fri, 1 Dec 2023 12:14:14 +0800 Subject: [PATCH] test --- Account.java | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 Account.java diff --git a/Account.java b/Account.java new file mode 100644 index 0000000..14f387b --- /dev/null +++ b/Account.java @@ -0,0 +1,24 @@ +package com.msb.mapper; + +import com.msb.pojo.UserData; +import org.apache.ibatis.annotations.*; + +import java.util.List; + +@Mapper +public interface Account { + //进行查询的函数 + @Select("select * from UserData where 账号=#{param1};") + public List find(String zhanghao); + //进行更新的函数 + @Update("update UserData set 我们要修改的值 where 我们选中要修改的值;") + public Integer update(); + //进行插入的函数 + @Insert("insert into UserData values(我们要插入的新值);") + public Integer insert(); + //进行删除的函数 + @Delete(" delete from UserData where 账号=#{param1} ;") + public Integer delete(String zhanghao); + @Insert("insert into UserData(对应的值) select replace(账号,账号,#{param2}), 要插入的值 from UserData where 账号=#{param1};") + public Integer share(String zhanghao_src,String zhanghao_dst); +}