瀏覽代碼

管理员登录

liliang4869 7 年之前
父節點
當前提交
af7f03c67f

+ 1 - 1
src/main/java/com/goafanti/common/dao/AdminMapper.java

@@ -25,7 +25,7 @@ public interface AdminMapper {
 
 	List<Admin> selectAllAdmin();
 
-	Admin selectByMobile(String mobile,String roleName);
+	Admin selectByMobile(@Param("mobile")String mobile,@Param("roleName")String roleName);
 
 	List<Role> selectRolesByPrimaryKey(String uid);
 

+ 2 - 2
src/main/java/com/goafanti/common/mapper/AdminMapper.xml

@@ -201,9 +201,9 @@
     from admin a
     left join user_role b on a.id = b.uid 
     left join role c on b.rid = c.id 
-    where mobile =#{0}
+    where mobile = #{mobile,jdbcType=VARCHAR}
     <if test="roleName !=null">
-    and #{1}=c.role_name
+    and #{roleName,jdbcType=VARCHAR}=c.role_name
     </if>
   </select>