예제 #1
0
파일: UserBiz.cs 프로젝트: kiss5523/PMSAPI
        public SingleApiResponse GetList(UserInfoGetListRequest req)
        {
            var result = UserRepo.GetList <SS_USER>(req);

            return(new SingleApiResponse()
            {
                Data = result
            });
        }
예제 #2
0
파일: UserRepo.cs 프로젝트: kiss5523/PMSAPI
        public IEnumerable <T> GetList <T>(UserInfoGetListRequest req) where T : class
        {
            var client = DBProxy.CreateClient();
            var sql    = new StringBuilder(@"SELECT * FROM SS_USER su WHERE 1=1 ");
            var param  = new DynamicParameters();

            if (!string.IsNullOrEmpty(req.U_NAME))
            {
                sql.Append(" AND su.U_NAME LIKE @U_NAME");
                param.Add("@U_NAME", $"%{req.U_NAME}%");
            }

            if (!string.IsNullOrEmpty(req.U_NAME))
            {
                sql.Append(" AND su.U_REALNAME LIKE @U_REALNAME");
                param.Add("@U_REALNAME", $"%{req.U_REALNAME}%");
            }

            return(client.Query <T>(sql.ToString(), param));
        }
예제 #3
0
 public SingleApiResponse GetList([FromBody] UserInfoGetListRequest req)
 {
     return(UserBiz.GetList(req));
 }