From 5c3b221287d8791950e09cf684609a7de376ae2f Mon Sep 17 00:00:00 2001
From: lwh <2679599887@qq.com>
Date: Fri, 9 Jun 2023 15:10:09 +0800
Subject: [PATCH] =?UTF-8?q?fix=20=E4=BF=AE=E6=94=B9=E6=8E=A5=E5=8F=A3?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../Api/Custom/Customers/CustomerApiDto.cs | 16 ++-
.../Business/Custom/Customers/CustomerDto.cs | 2 +-
.../Dto/Business/Custom/Regions/RegionDto.cs | 1 +
.../Business/Custom/Customers/Customer.cs | 2 +-
.../Business/Customers/CustomerRepository.cs | 20 ---
.../Business/Regions/RegionRepository.cs | 20 ---
.../Custom/Customers/CustomerServiceApi.cs | 19 ++-
.../Custom/Customers/ICustomerServiceApi.cs | 10 +-
.../CustomerAddressService.cs | 2 +-
.../Customers/CustomerService.cs | 111 --------------
.../BusinessService/Regions/RegionService.cs | 135 ------------------
.../Customers/ICustomerService.cs | 45 ------
.../Regions/IRegionService.cs | 46 ------
.../Custom/Customers/CustomerApiController.cs | 35 ++++-
.../Api/Wechat/WeChatLoginController.cs | 3 +-
.../Api/Wechat/WxPay/WxPayController.cs | 2 +-
.../Custom/Customers/CustomerController.cs | 2 +-
.../Custom/Regions/RegionController.cs | 2 +-
18 files changed, 77 insertions(+), 396 deletions(-)
delete mode 100644 ARW.Repository/Business/Customers/CustomerRepository.cs
delete mode 100644 ARW.Repository/Business/Regions/RegionRepository.cs
delete mode 100644 ARW.Service/Business/BusinessService/Customers/CustomerService.cs
delete mode 100644 ARW.Service/Business/BusinessService/Regions/RegionService.cs
delete mode 100644 ARW.Service/Business/IBusinessService/Customers/ICustomerService.cs
delete mode 100644 ARW.Service/Business/IBusinessService/Regions/IRegionService.cs
diff --git a/ARW.Model/Dto/Api/Custom/Customers/CustomerApiDto.cs b/ARW.Model/Dto/Api/Custom/Customers/CustomerApiDto.cs
index d4ddd64..233d47b 100644
--- a/ARW.Model/Dto/Api/Custom/Customers/CustomerApiDto.cs
+++ b/ARW.Model/Dto/Api/Custom/Customers/CustomerApiDto.cs
@@ -14,11 +14,9 @@ namespace ARW.Model.Dto.Api.Custom.Customers
///
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
///
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; }
+
}
}
diff --git a/ARW.Model/Dto/Business/Custom/Customers/CustomerDto.cs b/ARW.Model/Dto/Business/Custom/Customers/CustomerDto.cs
index e640178..471ba34 100644
--- a/ARW.Model/Dto/Business/Custom/Customers/CustomerDto.cs
+++ b/ARW.Model/Dto/Business/Custom/Customers/CustomerDto.cs
@@ -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 = "可用余额不能为空")]
diff --git a/ARW.Model/Dto/Business/Custom/Regions/RegionDto.cs b/ARW.Model/Dto/Business/Custom/Regions/RegionDto.cs
index cde4d22..fbf6ffc 100644
--- a/ARW.Model/Dto/Business/Custom/Regions/RegionDto.cs
+++ b/ARW.Model/Dto/Business/Custom/Regions/RegionDto.cs
@@ -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; }
}
diff --git a/ARW.Model/Models/Business/Custom/Customers/Customer.cs b/ARW.Model/Models/Business/Custom/Customers/Customer.cs
index babbc17..14e6928 100644
--- a/ARW.Model/Models/Business/Custom/Customers/Customer.cs
+++ b/ARW.Model/Models/Business/Custom/Customers/Customer.cs
@@ -122,7 +122,7 @@ namespace ARW.Model.Models.Business.Custom.Customers
/// 描述 :性别(字典)
/// 空值 : false
///
- [EpplusTableColumn(Header = "性别(字典)")]
+ [EpplusTableColumn(Header = "性别")]
[SugarColumn(ColumnName = "customer_gender")]
public int CustomerGender { get; set; }
diff --git a/ARW.Repository/Business/Customers/CustomerRepository.cs b/ARW.Repository/Business/Customers/CustomerRepository.cs
deleted file mode 100644
index fee4b2a..0000000
--- a/ARW.Repository/Business/Customers/CustomerRepository.cs
+++ /dev/null
@@ -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
-{
- ///
- /// 小程序客户仓储
- ///
- /// @author 黎文豪
- /// @date 2023-06-05
- ///
- [AppService(ServiceLifetime = LifeTime.Transient)]
- public class CustomerRepository : BaseRepository
- {
- #region 业务逻辑代码
- #endregion
- }
-}
\ No newline at end of file
diff --git a/ARW.Repository/Business/Regions/RegionRepository.cs b/ARW.Repository/Business/Regions/RegionRepository.cs
deleted file mode 100644
index 054b74d..0000000
--- a/ARW.Repository/Business/Regions/RegionRepository.cs
+++ /dev/null
@@ -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
-{
- ///
- /// 省市区数据表仓储
- ///
- /// @author admin
- /// @date 2023-06-05
- ///
- [AppService(ServiceLifetime = LifeTime.Transient)]
- public class RegionRepository : BaseRepository
- {
- #region 业务逻辑代码
- #endregion
- }
-}
\ No newline at end of file
diff --git a/ARW.Service/Api/BusinessService/Custom/Customers/CustomerServiceApi.cs b/ARW.Service/Api/BusinessService/Custom/Customers/CustomerServiceApi.cs
index 1459b04..6429bb3 100644
--- a/ARW.Service/Api/BusinessService/Custom/Customers/CustomerServiceApi.cs
+++ b/ARW.Service/Api/BusinessService/Custom/Customers/CustomerServiceApi.cs
@@ -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
///
///
///
- public Task GetCustomerDetails(CustomerDtoApi parm)
+ public Task GetCustomerDetails(CustomerQueryDtoApi parm)
{
var query = _CustomerRepository
@@ -60,6 +60,21 @@ namespace ARW.Service.Api.BusinessService.Custom.Customers
}
+ ///
+ /// 编辑客户信息
+ ///
+ public async Task 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
}
diff --git a/ARW.Service/Api/IBusinessService/Custom/Customers/ICustomerServiceApi.cs b/ARW.Service/Api/IBusinessService/Custom/Customers/ICustomerServiceApi.cs
index f56b90b..5f7cc96 100644
--- a/ARW.Service/Api/IBusinessService/Custom/Customers/ICustomerServiceApi.cs
+++ b/ARW.Service/Api/IBusinessService/Custom/Customers/ICustomerServiceApi.cs
@@ -24,7 +24,15 @@ namespace ARW.Service.Api.IBusinessService.Custom.Customers
///
///
///
- Task GetCustomerDetails(CustomerDtoApi parm);
+ Task GetCustomerDetails(CustomerQueryDtoApi parm);
+
+
+ ///
+ /// 编辑客户信息
+ ///
+ ///
+ ///
+ Task UpdateCustomer(Customer parm);
}
}
diff --git a/ARW.Service/Business/BusinessService/Custom/CustomerAddresses/CustomerAddressService.cs b/ARW.Service/Business/BusinessService/Custom/CustomerAddresses/CustomerAddressService.cs
index e06a573..68e9932 100644
--- a/ARW.Service/Business/BusinessService/Custom/CustomerAddresses/CustomerAddressService.cs
+++ b/ARW.Service/Business/BusinessService/Custom/CustomerAddresses/CustomerAddressService.cs
@@ -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
{
diff --git a/ARW.Service/Business/BusinessService/Customers/CustomerService.cs b/ARW.Service/Business/BusinessService/Customers/CustomerService.cs
deleted file mode 100644
index 2b0143d..0000000
--- a/ARW.Service/Business/BusinessService/Customers/CustomerService.cs
+++ /dev/null
@@ -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
-{
- ///
- /// 小程序客户接口实现类
- ///
- /// @author 黎文豪
- /// @date 2023-06-05
- ///
- [AppService(ServiceType = typeof(ICustomerService), ServiceLifetime = LifeTime.Transient)]
- public class CustomerServiceImpl : BaseService, ICustomerService
- {
- private readonly CustomerRepository _CustomerRepository;
-
- public CustomerServiceImpl(CustomerRepository CustomerRepository)
- {
- this._CustomerRepository = CustomerRepository;
- }
-
- #region 业务逻辑代码
-
-
- ///
- /// 查询小程序客户分页列表
- ///
- public Task> GetCustomerList(CustomerQueryDto parm)
- {
- //开始拼装查询条件d
- var predicate = Expressionable.Create();
-
- 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);
- }
-
- ///
- /// 添加或修改小程序客户
- ///
- public async Task AddOrUpdateCustomer(Customer model)
- {
- if (model.CustomerId != 0)
- {
- var response = await _CustomerRepository.UpdateAsync(model);
- return "修改成功!";
- }
- else
- {
-
- var response = await _CustomerRepository.InsertReturnSnowflakeIdAsync(model);
- return "添加成功!";
- }
- }
-
- #region Excel处理
-
-
- ///
- /// Excel数据导出处理
- ///
- public async Task> HandleExportData(List data)
- {
- return data;
- }
-
- #endregion
-
-
-
- #endregion
-
- }
-}
diff --git a/ARW.Service/Business/BusinessService/Regions/RegionService.cs b/ARW.Service/Business/BusinessService/Regions/RegionService.cs
deleted file mode 100644
index eec0aa0..0000000
--- a/ARW.Service/Business/BusinessService/Regions/RegionService.cs
+++ /dev/null
@@ -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
-{
- ///
- /// 省市区数据表接口实现类
- ///
- [AppService(ServiceType = typeof(IRegionService), ServiceLifetime = LifeTime.Transient)]
- public class RegionServiceImpl : BaseService, IRegionService
- {
- private readonly RegionRepository _RegionRepository;
-
- public RegionServiceImpl(RegionRepository RegionRepository)
- {
- this._RegionRepository = RegionRepository;
- }
-
- #region 业务逻辑代码
-
-
- ///
- /// 查询省市区数据表树形列表
- ///
- public async Task> GetRegionTreeList(RegionQueryDto parm)
- {
- //开始拼装查询条件
- var predicate = Expressionable.Create();
-
- var query = _RegionRepository
- .Queryable()
- .LeftJoin((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);
- }
-
-
- ///
- /// 查询省市区数据表列表
- ///
- public Task> GetRegionList(RegionQueryDto parm)
- {
- //开始拼装查询条件d
- var predicate = Expressionable.Create();
-
- 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();
- }
-
- ///
- /// 添加或修改省市区数据表
- ///
- public async Task 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处理
-
-
- ///
- /// Excel数据导出处理
- ///
- public async Task> HandleExportData(List data)
- {
- return data;
- }
-
- #endregion
-
-
-
- #endregion
-
- }
-}
diff --git a/ARW.Service/Business/IBusinessService/Customers/ICustomerService.cs b/ARW.Service/Business/IBusinessService/Customers/ICustomerService.cs
deleted file mode 100644
index 567e428..0000000
--- a/ARW.Service/Business/IBusinessService/Customers/ICustomerService.cs
+++ /dev/null
@@ -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
-{
- ///
- /// 小程序客户接口类
- ///
- /// @author 黎文豪
- /// @date 2023-06-05
- ///
- public interface ICustomerService : IBaseService
- {
- ///
- /// 获取小程序客户分页列表
- ///
- ///
- ///
- Task> GetCustomerList(CustomerQueryDto parm);
-
-
- ///
- /// 添加或修改小程序客户
- ///
- ///
- ///
- Task AddOrUpdateCustomer(Customer parm);
-
-
-
- ///
- /// Excel导出
- ///
- Task> HandleExportData(List data);
-
-
- }
-}
diff --git a/ARW.Service/Business/IBusinessService/Regions/IRegionService.cs b/ARW.Service/Business/IBusinessService/Regions/IRegionService.cs
deleted file mode 100644
index 6222047..0000000
--- a/ARW.Service/Business/IBusinessService/Regions/IRegionService.cs
+++ /dev/null
@@ -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
- {
- ///
- /// 获取省市区数据表树形列表
- ///
- ///
- ///
- Task> GetRegionTreeList(RegionQueryDto parm);
-
- ///
- /// 获取省市区数据表列表
- ///
- ///
- ///
- Task> GetRegionList(RegionQueryDto parm);
-
-
- ///
- /// 添加或修改省市区数据表
- ///
- ///
- ///
- Task AddOrUpdateRegion(Region parm);
-
-
-
- ///
- /// Excel导出
- ///
- Task> HandleExportData(List data);
-
-
- }
-}
diff --git a/ARW.WebApi/Controllers/Api/Custom/Customers/CustomerApiController.cs b/ARW.WebApi/Controllers/Api/Custom/Customers/CustomerApiController.cs
index b4cf683..db8d66f 100644
--- a/ARW.WebApi/Controllers/Api/Custom/Customers/CustomerApiController.cs
+++ b/ARW.WebApi/Controllers/Api/Custom/Customers/CustomerApiController.cs
@@ -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
}
- ///
+ ///
/// 获取Customer详情(Api)
///
/// 查询参数
///
[HttpGet("getCustomerDetails")]
- public async Task GetCustomerDetails([FromQuery] CustomerDtoApi parm)
+ public async Task 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();
@@ -56,5 +62,28 @@ namespace ARW.WebApi.Controllers.Api.Custom.Customers
}
}
+
+ ///
+ /// 编辑客户信息
+ ///
+ ///
+ ///
+ [HttpPost("UpdateCustomer")]
+ [Log(Title = "编辑客户信息", BusinessType = BusinessType.UPDATE)]
+ public async Task 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().ToUpdate(HttpContext);
+
+ var res = await _CustomerServiceApi.UpdateCustomer(modal);
+ return SUCCESS(res);
+ }
+
+
}
}
diff --git a/ARW.WebApi/Controllers/Api/Wechat/WeChatLoginController.cs b/ARW.WebApi/Controllers/Api/Wechat/WeChatLoginController.cs
index d740f81..9476638 100644
--- a/ARW.WebApi/Controllers/Api/Wechat/WeChatLoginController.cs
+++ b/ARW.WebApi/Controllers/Api/Wechat/WeChatLoginController.cs
@@ -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)
diff --git a/ARW.WebApi/Controllers/Api/Wechat/WxPay/WxPayController.cs b/ARW.WebApi/Controllers/Api/Wechat/WxPay/WxPayController.cs
index da821e2..3392790 100644
--- a/ARW.WebApi/Controllers/Api/Wechat/WxPay/WxPayController.cs
+++ b/ARW.WebApi/Controllers/Api/Wechat/WxPay/WxPayController.cs
@@ -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
{
diff --git a/ARW.WebApi/Controllers/Business/Custom/Customers/CustomerController.cs b/ARW.WebApi/Controllers/Business/Custom/Customers/CustomerController.cs
index be2fb8a..8e1aca4 100644
--- a/ARW.WebApi/Controllers/Business/Custom/Customers/CustomerController.cs
+++ b/ARW.WebApi/Controllers/Business/Custom/Customers/CustomerController.cs
@@ -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
{
diff --git a/ARW.WebApi/Controllers/Business/Custom/Regions/RegionController.cs b/ARW.WebApi/Controllers/Business/Custom/Regions/RegionController.cs
index db0133a..7255e2d 100644
--- a/ARW.WebApi/Controllers/Business/Custom/Regions/RegionController.cs
+++ b/ARW.WebApi/Controllers/Business/Custom/Regions/RegionController.cs
@@ -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
{