Commit cb93dd46 authored by zuoyh's avatar zuoyh

Merge remote-tracking branch 'origin/dev' into dev

parents 41d0ce7e ccd4e7db
......@@ -29,10 +29,8 @@ public class AppStaffUserBiz extends BaseBiz<AppStaffUserMapper, AppStaffUser> {
public List<AppStaffUser> getAll(Integer id, String username) {
Example example = new Example(AppStaffUser.class);
example.createCriteria().andEqualTo("suId", id).orEqualTo("phone",username).andEqualTo("isDel", 0);
example.orderBy("crtTime").desc();
return selectByExample(example);
return mapper.selectByBysuIdOrUsername(id,username);
}
@Override
......
package com.github.wxiaoqi.security.admin.mapper;
import com.github.wxiaoqi.security.admin.entity.AppStaffUser;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import tk.mybatis.mapper.common.Mapper;
import javax.persistence.Id;
import java.util.List;
/**
* @author Administrator
*/
public interface AppStaffUserMapper extends Mapper<AppStaffUser> {
List<AppStaffUser> selectByBysuIdOrUsername(@Param("id") Integer id,@Param("username") String username);
}
<?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.github.wxiaoqi.security.admin.mapper.AppStaffUserMapper">
<select id="selectByBysuIdOrUsername" resultType="com.github.wxiaoqi.security.admin.entity.AppStaffUser">
select * from where is_del = 0 and (su_id=#{id} or su_phone=#{username})
</select>
</mapper>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment