Ejemplo n.º 1
0
        /// <summary>
        /// 获取用户信息列表
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        public async Task <GetAccountListResponseDto> GetAccountListAsync(GetGetAccountListRequestDto request)
        {
            var whereSql = "1=1";

            if (!string.IsNullOrWhiteSpace(request.Account))
            {
                whereSql = $"{whereSql} AND Account=@Account";
            }
            if (!string.IsNullOrWhiteSpace(request.Phone))
            {
                whereSql = $"{whereSql} AND Phone=@Phone";
            }
            var sql = $@"
SELECT * FROM (
	SELECT
	a.*,
	b.org_name AS OrganizationName 
FROM
	t_manager_account a
	LEFT JOIN t_manager_organization b ON a.organization_guid = b.org_guid
) T 
WHERE {whereSql}
	ORDER BY creation_date
";

            return(await MySqlHelper.QueryByPageAsync <GetGetAccountListRequestDto, GetAccountListResponseDto, GetAccountListItemDto>(sql, request));
        }
Ejemplo n.º 2
0
        public async Task <IActionResult> GetAccountListAsync([FromBody] GetGetAccountListRequestDto request)
        {
            var response = await new ManagerAccountBiz().GetAccountListAsync(request);

            return(Success(response));
        }