|
@ -11,9 +11,9 @@ import java.util.List; |
|
|
public interface AdminMapper { |
|
|
public interface AdminMapper { |
|
|
@Insert({ |
|
|
@Insert({ |
|
|
"insert into admin", |
|
|
"insert into admin", |
|
|
"(name,jwcode,password,permission,area,admin_flag,create_time,remark)", |
|
|
|
|
|
|
|
|
"(name,jwcode,password,permission,area,admin_flag,create_time,remark,status)", |
|
|
"values", |
|
|
"values", |
|
|
"(#{name},#{jwcode},,#{password},#{permission},#{area},#{admin_flag},now(),#{remark})" |
|
|
|
|
|
|
|
|
"(#{name},#{jwcode},,#{password},#{permission},#{area},#{admin_flag},now(),#{remark},#{status})" |
|
|
}) |
|
|
}) |
|
|
@Options(useGeneratedKeys = true,keyColumn = "admin_id",keyProperty = "adminId") |
|
|
@Options(useGeneratedKeys = true,keyColumn = "admin_id",keyProperty = "adminId") |
|
|
int insert(Admin admin); |
|
|
int insert(Admin admin); |
|
@ -27,6 +27,7 @@ public interface AdminMapper { |
|
|
"<if test='permission!=null and permission.length()>0'>permission =#{permission},</if>", |
|
|
"<if test='permission!=null and permission.length()>0'>permission =#{permission},</if>", |
|
|
"<if test='area!=null and area.length()>0'>area =#{area},</if>", |
|
|
"<if test='area!=null and area.length()>0'>area =#{area},</if>", |
|
|
"<if test='adminFlag!=null '>admin_flag =#{adminFlag},</if>", |
|
|
"<if test='adminFlag!=null '>admin_flag =#{adminFlag},</if>", |
|
|
|
|
|
"<if test='status!=null '>status =#{status},</if>", |
|
|
"</set>", |
|
|
"</set>", |
|
|
"where jwcode =#{jwcode}", |
|
|
"where jwcode =#{jwcode}", |
|
|
"</script>" |
|
|
"</script>" |
|
@ -46,12 +47,12 @@ public interface AdminMapper { |
|
|
"<script>", |
|
|
"<script>", |
|
|
"SELECT * from admin", |
|
|
"SELECT * from admin", |
|
|
"<where>", |
|
|
"<where>", |
|
|
"permission is not null and admin_flag=1", |
|
|
|
|
|
|
|
|
"admin_flag=1", |
|
|
"<if test='name!=null and name.length()>0'> and `name` like concat('%',#{name},'%')</if>", |
|
|
"<if test='name!=null and name.length()>0'> and `name` like concat('%',#{name},'%')</if>", |
|
|
"<if test='jwcode!=null and jwcode.length()>0'> and jwcode=#{jwcode}</if>", |
|
|
"<if test='jwcode!=null and jwcode.length()>0'> and jwcode=#{jwcode}</if>", |
|
|
"<if test='permission!=null'> and permission=#{permission}</if>", |
|
|
|
|
|
"<if test='area!=null and area.length()>0'> and `area`=#{area}</if>", |
|
|
"<if test='area!=null and area.length()>0'> and `area`=#{area}</if>", |
|
|
"<if test='store!=null and store.length()>0'> and `store`=#{store}</if>", |
|
|
"<if test='store!=null and store.length()>0'> and `store`=#{store}</if>", |
|
|
|
|
|
"and permission != 4", |
|
|
"</where>", |
|
|
"</where>", |
|
|
"ORDER BY permission ASC", |
|
|
"ORDER BY permission ASC", |
|
|
"</script>" |
|
|
"</script>" |
|
|