fix 修改接口
This commit is contained in:
parent
960984831e
commit
5c3b221287
@ -14,11 +14,9 @@ namespace ARW.Model.Dto.Api.Custom.Customers
|
||||
/// </summary>
|
||||
public class CustomerQueryDtoApi : PagerInfo
|
||||
{
|
||||
public string CustomerXcxOpenid { get; set; }
|
||||
public string CustomerNickname { get; set; }
|
||||
public string CustomerMobilePhoneNumber { get; set; }
|
||||
public DateTime? BeginCustomerLastLoginTime { get; set; }
|
||||
public DateTime? EndCustomerLastLoginTime { get; set; }
|
||||
[Required(ErrorMessage = "CustomerGuid不能为空")]
|
||||
public long CustomerGuid { get; set; }
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -30,8 +28,14 @@ namespace ARW.Model.Dto.Api.Custom.Customers
|
||||
/// </summary>
|
||||
public class CustomerDtoApi
|
||||
{
|
||||
[Required(ErrorMessage = "CustomerGuid不能为空")]
|
||||
public long CustomerGuid { get; set; }
|
||||
|
||||
public string CustomerNickname { get; set; }
|
||||
|
||||
public string CustomerAvatar { get; set; }
|
||||
|
||||
public int CustomerGender { get; set; }
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -38,7 +38,7 @@ namespace ARW.Model.Dto.Business.Custom.Customers
|
||||
[Required(ErrorMessage = "头像不能为空")]
|
||||
public string CustomerAvatar { get; set; }
|
||||
|
||||
[Required(ErrorMessage = "性别(字典)不能为空")]
|
||||
[Required(ErrorMessage = "性别不能为空")]
|
||||
public int CustomerGender { get; set; }
|
||||
|
||||
[Required(ErrorMessage = "可用余额不能为空")]
|
||||
|
@ -25,6 +25,7 @@ namespace ARW.Model.Dto.Business.Custom.Regions
|
||||
public class RegionQueryDto : PagerInfo
|
||||
{
|
||||
public string RegionName { get; set; }
|
||||
public string RegionCode { get; set; }
|
||||
|
||||
public string ids { get; set; }
|
||||
}
|
||||
|
@ -122,7 +122,7 @@ namespace ARW.Model.Models.Business.Custom.Customers
|
||||
/// 描述 :性别(字典)
|
||||
/// 空值 : false
|
||||
/// </summary>
|
||||
[EpplusTableColumn(Header = "性别(字典)")]
|
||||
[EpplusTableColumn(Header = "性别")]
|
||||
[SugarColumn(ColumnName = "customer_gender")]
|
||||
public int CustomerGender { get; set; }
|
||||
|
||||
|
@ -1,20 +0,0 @@
|
||||
using System;
|
||||
using Infrastructure.Attribute;
|
||||
using ARW.Repository.System;
|
||||
using ARW.Model.Models.Business.Custom.Customers;
|
||||
|
||||
namespace ARW.Repository.Business.Customers
|
||||
{
|
||||
/// <summary>
|
||||
/// 小程序客户仓储
|
||||
///
|
||||
/// @author 黎文豪
|
||||
/// @date 2023-06-05
|
||||
/// </summary>
|
||||
[AppService(ServiceLifetime = LifeTime.Transient)]
|
||||
public class CustomerRepository : BaseRepository<Customer>
|
||||
{
|
||||
#region 业务逻辑代码
|
||||
#endregion
|
||||
}
|
||||
}
|
@ -1,20 +0,0 @@
|
||||
using System;
|
||||
using Infrastructure.Attribute;
|
||||
using ARW.Repository.System;
|
||||
using ARW.Model.Models.Business.Custom.Regions;
|
||||
|
||||
namespace ARW.Repository.Business.Regions
|
||||
{
|
||||
/// <summary>
|
||||
/// 省市区数据表仓储
|
||||
///
|
||||
/// @author admin
|
||||
/// @date 2023-06-05
|
||||
/// </summary>
|
||||
[AppService(ServiceLifetime = LifeTime.Transient)]
|
||||
public class RegionRepository : BaseRepository<Region>
|
||||
{
|
||||
#region 业务逻辑代码
|
||||
#endregion
|
||||
}
|
||||
}
|
@ -10,7 +10,7 @@ using ARW.Service.Api.IBusinessService.Custom.Customers;
|
||||
using ARW.Model.Dto.Api.Custom.Customers;
|
||||
using ARW.Model.Vo.Api.Custom.Customers;
|
||||
using ARW.Model.Models.Business.Custom.Customers;
|
||||
using ARW.Repository.Business.Customers;
|
||||
using ARW.Repository.Business.Custom.Customers;
|
||||
|
||||
namespace ARW.Service.Api.BusinessService.Custom.Customers
|
||||
{
|
||||
@ -38,7 +38,7 @@ namespace ARW.Service.Api.BusinessService.Custom.Customers
|
||||
/// </summary>
|
||||
/// <param name="parm"></param>
|
||||
/// <returns></returns>
|
||||
public Task<string> GetCustomerDetails(CustomerDtoApi parm)
|
||||
public Task<string> GetCustomerDetails(CustomerQueryDtoApi parm)
|
||||
{
|
||||
|
||||
var query = _CustomerRepository
|
||||
@ -60,6 +60,21 @@ namespace ARW.Service.Api.BusinessService.Custom.Customers
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 编辑客户信息
|
||||
/// </summary>
|
||||
public async Task<string> UpdateCustomer(Customer model)
|
||||
{
|
||||
var response = await _CustomerRepository.UpdateAsync(f => new Customer
|
||||
{
|
||||
CustomerAvatar = model.CustomerAvatar,
|
||||
CustomerNickname = model.CustomerNickname,
|
||||
CustomerGender = model.CustomerGender,
|
||||
}, s => s.CustomerGuid == model.CustomerGuid);
|
||||
return "修改成功!";
|
||||
}
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
|
@ -24,7 +24,15 @@ namespace ARW.Service.Api.IBusinessService.Custom.Customers
|
||||
/// </summary>
|
||||
/// <param name="parm"></param>
|
||||
/// <returns></returns>
|
||||
Task<string> GetCustomerDetails(CustomerDtoApi parm);
|
||||
Task<string> GetCustomerDetails(CustomerQueryDtoApi parm);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 编辑客户信息
|
||||
/// </summary>
|
||||
/// <param name="parm"></param>
|
||||
/// <returns></returns>
|
||||
Task<string> UpdateCustomer(Customer parm);
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -13,10 +13,10 @@ using ARW.Repository.Business.Custom.CustomerAddresses;
|
||||
using ARW.Service.Business.IBusinessService.Custom.CustomerAddresses;
|
||||
using ARW.Model.Dto.Business.Custom.CustomerAddresses;
|
||||
using ARW.Model.Vo.Business.Custom.CustomerAddresses;
|
||||
using ARW.Repository.Business.Customers;
|
||||
using ARW.Model.Models.Business.Custom.CustomerAddresses;
|
||||
using ARW.Model.Models.Business.Custom.Regions;
|
||||
using ARW.Model.Models.Business.Custom.Customers;
|
||||
using ARW.Repository.Business.Custom.Customers;
|
||||
|
||||
namespace ARW.Service.Business.BusinessService.Custom.CustomerAddresses
|
||||
{
|
||||
|
@ -1,111 +0,0 @@
|
||||
using Infrastructure.Attribute;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using SqlSugar;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Infrastructure;
|
||||
using ARW.Model;
|
||||
using ARW.Repository;
|
||||
using ARW.Repository.Business.Customers;
|
||||
using ARW.Service.Business.IBusinessService.Customers;
|
||||
using ARW.Model.Dto.Business.Custom.Customers;
|
||||
using ARW.Model.Models.Business.Custom.Customers;
|
||||
using ARW.Model.Vo.Business.Custom.Customers;
|
||||
|
||||
namespace ARW.Service.Business.BusinessService.Customers
|
||||
{
|
||||
/// <summary>
|
||||
/// 小程序客户接口实现类
|
||||
///
|
||||
/// @author 黎文豪
|
||||
/// @date 2023-06-05
|
||||
/// </summary>
|
||||
[AppService(ServiceType = typeof(ICustomerService), ServiceLifetime = LifeTime.Transient)]
|
||||
public class CustomerServiceImpl : BaseService<Customer>, ICustomerService
|
||||
{
|
||||
private readonly CustomerRepository _CustomerRepository;
|
||||
|
||||
public CustomerServiceImpl(CustomerRepository CustomerRepository)
|
||||
{
|
||||
this._CustomerRepository = CustomerRepository;
|
||||
}
|
||||
|
||||
#region 业务逻辑代码
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 查询小程序客户分页列表
|
||||
/// </summary>
|
||||
public Task<PagedInfo<CustomerVo>> GetCustomerList(CustomerQueryDto parm)
|
||||
{
|
||||
//开始拼装查询条件d
|
||||
var predicate = Expressionable.Create<Customer>();
|
||||
|
||||
predicate = predicate.AndIF(!string.IsNullOrEmpty(parm.CustomerXcxOpenid), it => it.CustomerXcxOpenid == parm.CustomerXcxOpenid);
|
||||
predicate = predicate.AndIF(!string.IsNullOrEmpty(parm.CustomerNickname), it => it.CustomerNickname.Contains(parm.CustomerNickname));
|
||||
predicate = predicate.AndIF(!string.IsNullOrEmpty(parm.CustomerMobilePhoneNumber), it => it.CustomerMobilePhoneNumber.Contains(parm.CustomerMobilePhoneNumber));
|
||||
predicate = predicate.AndIF(parm.BeginTime != null && parm.EndTime != null, it => it.CustomerLastLoginTime >= parm.BeginTime && it.CustomerLastLoginTime <= parm.EndTime);
|
||||
var query = _CustomerRepository
|
||||
.Queryable()
|
||||
.Where(predicate.ToExpression())
|
||||
.OrderBy(s => s.Create_time, OrderByType.Desc)
|
||||
.Select(s => new CustomerVo
|
||||
{
|
||||
CustomerId = s.CustomerId,
|
||||
CustomerGuid = s.CustomerGuid,
|
||||
CustomerXcxOpenid = s.CustomerXcxOpenid,
|
||||
CustomerNickname = s.CustomerNickname,
|
||||
CustomerMobilePhoneNumber = s.CustomerMobilePhoneNumber,
|
||||
CustomerAvatar = s.CustomerAvatar,
|
||||
CustomerGender = s.CustomerGender,
|
||||
CustomerAvailableBalance = s.CustomerAvailableBalance,
|
||||
CustomerAvailablePoints = s.CustomerAvailablePoints,
|
||||
CustomerTotalPaymentAmount = s.CustomerTotalPaymentAmount,
|
||||
CustomerActualConsumptionAmount = s.CustomerActualConsumptionAmount,
|
||||
CustomerLastLoginTime = s.CustomerLastLoginTime,
|
||||
});
|
||||
|
||||
|
||||
return query.ToPageAsync(parm);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加或修改小程序客户
|
||||
/// </summary>
|
||||
public async Task<string> AddOrUpdateCustomer(Customer model)
|
||||
{
|
||||
if (model.CustomerId != 0)
|
||||
{
|
||||
var response = await _CustomerRepository.UpdateAsync(model);
|
||||
return "修改成功!";
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
var response = await _CustomerRepository.InsertReturnSnowflakeIdAsync(model);
|
||||
return "添加成功!";
|
||||
}
|
||||
}
|
||||
|
||||
#region Excel处理
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Excel数据导出处理
|
||||
/// </summary>
|
||||
public async Task<List<CustomerVo>> HandleExportData(List<CustomerVo> data)
|
||||
{
|
||||
return data;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
}
|
@ -1,135 +0,0 @@
|
||||
using Infrastructure.Attribute;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using SqlSugar;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Infrastructure;
|
||||
using ARW.Model;
|
||||
using ARW.Repository;
|
||||
using ARW.Repository.Business.Regions;
|
||||
using ARW.Service.Business.IBusinessService.Regions;
|
||||
using ARW.Model.Dto.Business.Custom.Regions;
|
||||
using ARW.Model.Models.Business.Custom.Regions;
|
||||
using ARW.Model.Vo.Business.Custom.Regions;
|
||||
|
||||
namespace ARW.Service.Business.BusinessService.Regions
|
||||
{
|
||||
/// <summary>
|
||||
/// 省市区数据表接口实现类
|
||||
/// </summary>
|
||||
[AppService(ServiceType = typeof(IRegionService), ServiceLifetime = LifeTime.Transient)]
|
||||
public class RegionServiceImpl : BaseService<Region>, IRegionService
|
||||
{
|
||||
private readonly RegionRepository _RegionRepository;
|
||||
|
||||
public RegionServiceImpl(RegionRepository RegionRepository)
|
||||
{
|
||||
this._RegionRepository = RegionRepository;
|
||||
}
|
||||
|
||||
#region 业务逻辑代码
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 查询省市区数据表树形列表
|
||||
/// </summary>
|
||||
public async Task<List<RegionVo>> GetRegionTreeList(RegionQueryDto parm)
|
||||
{
|
||||
//开始拼装查询条件
|
||||
var predicate = Expressionable.Create<Region>();
|
||||
|
||||
var query = _RegionRepository
|
||||
.Queryable()
|
||||
.LeftJoin<Region>((s, c) => s.RegionPid == c.RegionId)
|
||||
.Where(predicate.ToExpression())
|
||||
.OrderBy(s => s.RegionId, OrderByType.Asc)
|
||||
.Select((s, c) => new RegionVo
|
||||
{
|
||||
RegionId = s.RegionId,
|
||||
RegionName = s.RegionName,
|
||||
RegionPid = s.RegionPid,
|
||||
RegionCode = s.RegionCode,
|
||||
RegionLevel = s.RegionLevel,
|
||||
ParentName = c.RegionName,
|
||||
});
|
||||
|
||||
return await query.ToTreeAsync(it => it.Children, it => it.RegionPid, 0);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 查询省市区数据表列表
|
||||
/// </summary>
|
||||
public Task<List<RegionVo>> GetRegionList(RegionQueryDto parm)
|
||||
{
|
||||
//开始拼装查询条件d
|
||||
var predicate = Expressionable.Create<Region>();
|
||||
|
||||
predicate = predicate.AndIF(!string.IsNullOrEmpty(parm.RegionName), it => it.RegionName.Contains(parm.RegionName));
|
||||
var query = _RegionRepository
|
||||
.Queryable()
|
||||
.Where(predicate.ToExpression())
|
||||
.OrderBy(s => s.RegionId, OrderByType.Asc)
|
||||
.Select(s => new RegionVo
|
||||
{
|
||||
RegionId = s.RegionId,
|
||||
RegionName = s.RegionName,
|
||||
RegionPid = s.RegionPid,
|
||||
RegionCode = s.RegionCode,
|
||||
RegionLevel = s.RegionLevel,
|
||||
});
|
||||
|
||||
|
||||
return query.ToListAsync();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加或修改省市区数据表
|
||||
/// </summary>
|
||||
public async Task<string> AddOrUpdateRegion(Region model)
|
||||
{
|
||||
if (model.RegionId != 0)
|
||||
{
|
||||
var type = await _RegionRepository.GetListAsync(s => s.RegionPid == model.RegionId);
|
||||
if (type != null)
|
||||
{
|
||||
foreach (var item in type)
|
||||
{
|
||||
if (model.RegionPid == item.RegionId) throw new CustomException("上级菜单不能选择自己的子级!");
|
||||
}
|
||||
}
|
||||
if (model.RegionPid == model.RegionId) throw new CustomException("上级菜单不能选择与当前菜单一样的!");
|
||||
var response = await _RegionRepository.UpdateAsync(model);
|
||||
return "修改成功!";
|
||||
}
|
||||
else
|
||||
{
|
||||
var info = _RegionRepository.GetFirst(it => it.RegionId == model.RegionPid);
|
||||
|
||||
var response = await _RegionRepository.InsertAsync(model);
|
||||
return "添加成功!";
|
||||
}
|
||||
}
|
||||
|
||||
#region Excel处理
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Excel数据导出处理
|
||||
/// </summary>
|
||||
public async Task<List<RegionVo>> HandleExportData(List<RegionVo> data)
|
||||
{
|
||||
return data;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
}
|
@ -1,45 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using ARW.Model;
|
||||
using ARW.Model.Dto.Business.Custom.Customers;
|
||||
using ARW.Model.Models.Business.Custom.Customers;
|
||||
using ARW.Model.Vo.Business.Custom.Customers;
|
||||
|
||||
namespace ARW.Service.Business.IBusinessService.Customers
|
||||
{
|
||||
/// <summary>
|
||||
/// 小程序客户接口类
|
||||
///
|
||||
/// @author 黎文豪
|
||||
/// @date 2023-06-05
|
||||
/// </summary>
|
||||
public interface ICustomerService : IBaseService<Customer>
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取小程序客户分页列表
|
||||
/// </summary>
|
||||
/// <param name="parm"></param>
|
||||
/// <returns></returns>
|
||||
Task<PagedInfo<CustomerVo>> GetCustomerList(CustomerQueryDto parm);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 添加或修改小程序客户
|
||||
/// </summary>
|
||||
/// <param name="parm"></param>
|
||||
/// <returns></returns>
|
||||
Task<string> AddOrUpdateCustomer(Customer parm);
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Excel导出
|
||||
/// </summary>
|
||||
Task<List<CustomerVo>> HandleExportData(List<CustomerVo> data);
|
||||
|
||||
|
||||
}
|
||||
}
|
@ -1,46 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using ARW.Model;
|
||||
using ARW.Model.Dto.Business.Custom.Regions;
|
||||
using ARW.Model.Models.Business.Custom.Regions;
|
||||
using ARW.Model.Vo.Business.Custom.Regions;
|
||||
|
||||
namespace ARW.Service.Business.IBusinessService.Regions
|
||||
{
|
||||
public interface IRegionService : IBaseService<Region>
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取省市区数据表树形列表
|
||||
/// </summary>
|
||||
/// <param name="parm"></param>
|
||||
/// <returns></returns>
|
||||
Task<List<RegionVo>> GetRegionTreeList(RegionQueryDto parm);
|
||||
|
||||
/// <summary>
|
||||
/// 获取省市区数据表列表
|
||||
/// </summary>
|
||||
/// <param name="parm"></param>
|
||||
/// <returns></returns>
|
||||
Task<List<RegionVo>> GetRegionList(RegionQueryDto parm);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 添加或修改省市区数据表
|
||||
/// </summary>
|
||||
/// <param name="parm"></param>
|
||||
/// <returns></returns>
|
||||
Task<string> AddOrUpdateRegion(Region parm);
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Excel导出
|
||||
/// </summary>
|
||||
Task<List<RegionVo>> HandleExportData(List<RegionVo> data);
|
||||
|
||||
|
||||
}
|
||||
}
|
@ -6,6 +6,12 @@ using ARW.Service.Api.IBusinessService.Custom.Customers;
|
||||
using ARW.Model.Vo.Api.Custom.Customers;
|
||||
using Geocoding;
|
||||
using Infrastructure;
|
||||
using ARW.Model.Models.Business.Custom.Customers;
|
||||
using Infrastructure.Attribute;
|
||||
using Infrastructure.Enums;
|
||||
using Mapster;
|
||||
using ARW.Admin.WebApi.Extensions;
|
||||
using ARW.Admin.WebApi.Framework;
|
||||
|
||||
namespace ARW.WebApi.Controllers.Api.Custom.Customers
|
||||
{
|
||||
@ -31,20 +37,20 @@ namespace ARW.WebApi.Controllers.Api.Custom.Customers
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// <summary>
|
||||
/// 获取Customer详情(Api)
|
||||
/// </summary>
|
||||
/// <param name="parm">查询参数</param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("getCustomerDetails")]
|
||||
public async Task<IActionResult> GetCustomerDetails([FromQuery] CustomerDtoApi parm)
|
||||
public async Task<IActionResult> GetCustomerDetails([FromQuery] CustomerQueryDtoApi parm)
|
||||
{
|
||||
if (parm == null) throw new CustomException("参数错误!");
|
||||
|
||||
var res = await _CustomerServiceApi.GetCustomerDetails(parm);
|
||||
|
||||
if (res != "[]")
|
||||
{
|
||||
{
|
||||
res = res.Remove(0, 1);
|
||||
res = res.Substring(0, res.Length - 1);
|
||||
var data = res.FromJSON<CustomerApiDetailsVo>();
|
||||
@ -56,5 +62,28 @@ namespace ARW.WebApi.Controllers.Api.Custom.Customers
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 编辑客户信息
|
||||
/// </summary>
|
||||
/// <param name="parm"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost("UpdateCustomer")]
|
||||
[Log(Title = "编辑客户信息", BusinessType = BusinessType.UPDATE)]
|
||||
public async Task<IActionResult> AddOrUpdateCustomer([FromBody] CustomerDtoApi parm)
|
||||
{
|
||||
if (parm == null) { throw new CustomException("请求参数错误"); }
|
||||
|
||||
var user = JwtUtil.GetLoginUser(App.HttpContext);
|
||||
parm.CustomerGuid = user.UserId;
|
||||
|
||||
var modal = new Customer();
|
||||
modal = parm.Adapt<Customer>().ToUpdate(HttpContext);
|
||||
|
||||
var res = await _CustomerServiceApi.UpdateCustomer(modal);
|
||||
return SUCCESS(res);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -2,7 +2,6 @@
|
||||
using ARW.Admin.WebApi.Extensions;
|
||||
using ARW.Admin.WebApi.Framework;
|
||||
using ARW.Model.System;
|
||||
using ARW.Service.Business.IBusinessService.Customers;
|
||||
using Infrastructure.WeChat.Login;
|
||||
using Infrastructure;
|
||||
using Mapster;
|
||||
@ -16,6 +15,7 @@ using ARW.Model.Dto.Business.Custom.Customers;
|
||||
using ARW.Model.Models.Business.Custom.Customers;
|
||||
using ARW.Service.System;
|
||||
using Infrastructure.Attribute;
|
||||
using ARW.Service.Business.IBusinessService.Custom.Customers;
|
||||
|
||||
namespace ARW.WebApi.Controllers.Api.Wechat
|
||||
{
|
||||
@ -60,6 +60,7 @@ namespace ARW.WebApi.Controllers.Api.Wechat
|
||||
{
|
||||
addModal.CustomerAvatar = "https://cdn-we-retail.ym.tencent.com/miniapp/usercenter/icon-user-center-avatar@2x.png";
|
||||
addModal.CustomerNickname = "用户" + addModal.CustomerMobilePhoneNumber.Substring(addModal.CustomerMobilePhoneNumber.Length - 4); ;
|
||||
addModal.CustomerGender = 1;
|
||||
addModal.CustomerLastLoginTime = DateTime.Now;
|
||||
var response = await _customerService.InsertReturnSnowflakeIdAsync(addModal);
|
||||
if (response == 0)
|
||||
|
@ -1,6 +1,5 @@
|
||||
using ARW.Admin.WebApi.Controllers;
|
||||
using ARW.Model.Models.Business.Payments;
|
||||
using ARW.Service.Business.IBusinessService.Customers;
|
||||
using ARW.Service.Business.IBusinessService.Payments;
|
||||
using Infrastructure.WeChat.TenPay;
|
||||
using Infrastructure;
|
||||
@ -11,6 +10,7 @@ using static Infrastructure.WeChat.TenPay.Pay;
|
||||
using ARW.Admin.WebApi.Framework;
|
||||
using Senparc.Weixin.Open.WxOpenAPIs;
|
||||
using Senparc.Weixin.WxOpen.AdvancedAPIs.WxApp;
|
||||
using ARW.Service.Business.IBusinessService.Custom.Customers;
|
||||
|
||||
namespace ARW.WebApi.Controllers.Api.Wechat.WxPay
|
||||
{
|
||||
|
@ -7,11 +7,11 @@ using Microsoft.AspNetCore.Mvc;
|
||||
using ARW.Admin.WebApi.Extensions;
|
||||
using ARW.Admin.WebApi.Filters;
|
||||
using ARW.Common;
|
||||
using ARW.Service.Business.IBusinessService.Customers;
|
||||
using ARW.Admin.WebApi.Controllers;
|
||||
using ARW.Model.Models.Business.Custom.Customers;
|
||||
using ARW.Model.Vo.Business.Custom.Customers;
|
||||
using ARW.Model.Dto.Business.Custom.Customers;
|
||||
using ARW.Service.Business.IBusinessService.Custom.Customers;
|
||||
|
||||
namespace ARW.WebApi.Controllers.Business.Custom.Customers
|
||||
{
|
||||
|
@ -8,13 +8,13 @@ using Microsoft.AspNetCore.Mvc;
|
||||
using ARW.Admin.WebApi.Extensions;
|
||||
using ARW.Admin.WebApi.Filters;
|
||||
using ARW.Common;
|
||||
using ARW.Service.Business.IBusinessService.Regions;
|
||||
using ARW.Admin.WebApi.Controllers;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using ARW.Admin.WebApi.Framework;
|
||||
using ARW.Model.Dto.Business.Custom.Regions;
|
||||
using ARW.Model.Models.Business.Custom.Regions;
|
||||
using ARW.Model.Vo.Business.Custom.Regions;
|
||||
using ARW.Service.Business.IBusinessService.Custom.Regions;
|
||||
|
||||
namespace ARW.WebApi.Controllers.Business.Custom.Regions
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user