|
|
@ -11,9 +11,9 @@ import java.util.List; |
|
|
|
public interface AdminMapper { |
|
|
|
@Insert({ |
|
|
|
"insert into admin", |
|
|
|
"(name,jwcode,password,permission,area,admin_flag,create_time,remark,status)", |
|
|
|
"(name,jwcode,password,permission,area,admin_flag,create_time,remark,status1)", |
|
|
|
"values", |
|
|
|
"(#{name},#{jwcode},,#{password},#{permission},#{area},#{admin_flag},now(),#{remark},#{status})" |
|
|
|
"(#{name},#{jwcode},,#{password},#{permission},#{area},#{admin_flag},now(),#{remark},#{status1})" |
|
|
|
}) |
|
|
|
@Options(useGeneratedKeys = true,keyColumn = "admin_id",keyProperty = "adminId") |
|
|
|
int insert(Admin admin); |
|
|
@ -27,7 +27,8 @@ public interface AdminMapper { |
|
|
|
"<if test='permission!=null and permission.length()>0'>permission =#{permission},</if>", |
|
|
|
"<if test='area!=null and area.length()>0'>area =#{area},</if>", |
|
|
|
"<if test='adminFlag!=null '>admin_flag =#{adminFlag},</if>", |
|
|
|
"<if test='status!=null '>status =#{status},</if>", |
|
|
|
"<if test='status1!=null '>status1 =#{status1},</if>", |
|
|
|
"<if test='remark!=null '>remark =#{remark},</if>", |
|
|
|
"</set>", |
|
|
|
"where jwcode =#{jwcode}", |
|
|
|
"</script>" |
|
|
@ -54,7 +55,7 @@ public interface AdminMapper { |
|
|
|
"<if test='store!=null and store.length()>0'> and `store`=#{store}</if>", |
|
|
|
"and permission != 4", |
|
|
|
"</where>", |
|
|
|
"ORDER BY permission ASC", |
|
|
|
"ORDER BY status1 DESC, permission ASC", |
|
|
|
"</script>" |
|
|
|
}) |
|
|
|
List<Admin> select(Admin admin); |
|
|
@ -72,7 +73,7 @@ public interface AdminMapper { |
|
|
|
// "<script>", |
|
|
|
"select * from admin ", |
|
|
|
// "<where>", |
|
|
|
"where permission is null and jwcode=#{jwcode}", |
|
|
|
"where (permission != 1 AND permission != 2 AND permission != 3) and jwcode=#{jwcode}", |
|
|
|
// "</where>", |
|
|
|
|
|
|
|
}) |
|
|
|