SysUserMapper.java
1.22 KB
package cn.csbr.springboot.dao.mapper;
import cn.csbr.springboot.dao.model.SysUser;
import com.csbr.mybatis.MyMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import java.util.List;
public interface SysUserMapper extends MyMapper<SysUser> {
@Select("select * from `sys_user` ta where ta.cardid=#{carid} and exists (select 'x' from sys_store_org tb where tb.storeguid=#{storeguid} and ta.orgguid=tb.deptguid ) ")
SysUser findUserRoleBycarId(@Param("carid")String carid,@Param("storeguid")String storeguid);
@Select( " select ta.* from sys_user ta where exists (select 'x' from sys_user_finger tb where ta.GUID=tb.userguid and tb.fingercd=#{fingerprint} and tb.groupcode=#{groupcode} and ta.ORGGUID=tb.orgguid and tb.storeguid=#{storeguid}) ")
List<SysUser> findUserRoleByFinger(@Param("storeguid")String storeguid, @Param("fingerprint")String fingerprint, @Param("groupcode") String groupcode);
@Select( " select ta.* from sys_user ta where ta.orgguid in (select deptguid from sys_store_org where storeguid=#{storeguid} ) and ta.loginuser=#{loginuser} ")
List<SysUser> findUserLoginCheck(@Param("storeguid")String storeguid,@Param("loginuser")String loginuser);
}