Example #1
0
        public async Task <IActionResult> GetConsumerProjects(string classifyGuid, string phone)
        {
            if (string.IsNullOrEmpty(phone) || string.IsNullOrEmpty(classifyGuid))
            {
                return(Failed(ErrorCode.Empty, "参数不正确"));
            }

            var userModel = new UserBiz().GetModelByPhoneAsync(phone);

            if (userModel is null)
            {
                return(Failed(ErrorCode.Empty, "无此用户"));
            }

            var categoryBiz = new MerchantCategoryBiz();

            var projects = await categoryBiz.GetMerchantConsumerProjects(UserID, classifyGuid, userModel.UserGuid);

            return(Success((projects == null || projects.Count <= 0) ? new List <GetConsumerProjectsResponseDto>() : projects));
        }