using Microsoft.AspNetCore.Mvc; using Zxd.Domain.Dto.Resource; using Zxd.Domain.Impl; namespace Zxd.WebApi.Controllers { public class TestController : BaseController { private readonly IBasRoseDomain _freeOrdDomain; // 提供各种http请求方法 private readonly IHttpClient _httpClient; public TestController(IBasRoseDomain freeOrdDomain, IHttpClient httpClient) { _freeOrdDomain = freeOrdDomain; _httpClient = httpClient; } /// /// 免费产品类型 /// /// /// /// [HttpGet("test")] [ApiSignatureFilterForbid] public async Task GetFreeOrderPage() { try { await _freeOrdDomain.test(); var ss = ""; for (var i = 0; i <= 1; i++) { var ch = 7000; if (i % 2 == 0) { ch = 7300; } var syncRegUserDto = new SyncRegUserDto { username = $"csd100878{i}", password = "123qwe123", mobile = $"1351102568{i}", channel = ch, curChannel = ch, plat = "0", ip = "192.168.91.238", clientip = "192.168.91.238", regDate = 1624430678384, eid = "", unionId = "", refeid = $"10597{i}", liveCode = "", regSource = "soft_reg" }; ResAllocationDto resAllocationDto = new ResAllocationDto { Ctime = Convert.ToDateTime("2022-11-01T15:26:55"), Appid = "com.dongniu", Appuserid = "dn0178911", Deptid = "2", Seaid = null, Groupid = "14", Eid = 60251, Addway = "0", /*Unionid = $"oz-hQ5idpaTgjQyHa0ZblNbpBLRQ", Ch = ch.ToString(), CampaignId = $"tag",*/ AssignType = 1, Hhuserid = null }; CheckUserDTO checkUserDTO = new CheckUserDTO { Appid = "ww89347c2378b6e050", Appuserid = "yujinglin" }; var obj = await _httpClient.PostSecurityAsync>("http://localhost:7009/Api/SoftUser/GetUserProtectInfo", checkUserDTO, "UPWEBSITE", "YafhQn$3gLUl@XDI", "Nx7GqcMxc=F&cpUa"); //ss = JsonConvert.SerializeObject(obj); } return ss; } catch (Exception ex) { throw new Exception(ex.Message); } } } }