mirror of
http://git.coreshop.cn/jianweie/coreshoppro.git
synced 2026-02-05 10:19:48 +08:00
# 2022-02-12
### 1.3.5 开源社区版: 无 ### 0.1.7 会员专业版: 【新增】表【CoreCmsUserShip】增加【精度longitude】【纬度latitude】【街道street】三字段。 【新增】用户地址新增及编辑增加地图选择获取街道及经纬度坐标功能。 【新增】【平台设置-订单管理】,新增【同城配送运费设置】,可设置2公里内,5公里内,10公里内,15公里内,20公里内不同距离运费。根据用户地址坐标与门店坐标进行计算。 【新增】商品详情轮播图增加视频图片混播结合功能,类似淘宝打开商品详情后显示视频并支持播放,左右滑动切换图片,实现混播。 【新增】商品添加/删除面板增加视频上传功能。
This commit is contained in:
@@ -11,13 +11,13 @@
|
||||
using CoreCms.Net.Auth.HttpContextUser;
|
||||
using CoreCms.Net.IServices;
|
||||
using CoreCms.Net.Model.FromBody;
|
||||
using CoreCms.Net.Model.ViewModels.UI;
|
||||
using CoreCms.Net.Model.ViewModels.DTO;
|
||||
using CoreCms.Net.Utility.Helper;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using System.Threading.Tasks;
|
||||
using CoreCms.Net.Configuration;
|
||||
using CoreCms.Net.Model.ViewModels.DTO;
|
||||
using CoreCms.Net.Model.ViewModels.UI;
|
||||
|
||||
namespace CoreCms.Net.Web.WebApi.Controllers
|
||||
{
|
||||
@@ -73,10 +73,9 @@ namespace CoreCms.Net.Web.WebApi.Controllers
|
||||
public async Task<WebApiCallBack> GetList([FromBody] FMCartGetList entity)
|
||||
{
|
||||
var ids = CommonHelper.StringToIntArray(entity.ids);
|
||||
//判断免费运费
|
||||
var freeFreight = entity.receiptType != 1;
|
||||
|
||||
//获取数据
|
||||
var jm = await _cartServices.GetCartInfos(_user.ID, ids, entity.type, entity.areaId, entity.point, entity.couponCode, freeFreight, entity.receiptType, entity.objectId);
|
||||
var jm = await _cartServices.GetCartInfos(_user.ID, ids, entity.type, entity.areaId, entity.point, entity.couponCode, entity.receiptType, entity.userShipId, entity.objectId);
|
||||
|
||||
return jm;
|
||||
}
|
||||
@@ -139,5 +138,6 @@ namespace CoreCms.Net.Web.WebApi.Controllers
|
||||
}
|
||||
|
||||
#endregion 根据提交的数据判断哪些购物券可以使用==================================================
|
||||
|
||||
}
|
||||
}
|
||||
@@ -26,8 +26,8 @@ using CoreCms.Net.Loging;
|
||||
using CoreCms.Net.Model.Entities;
|
||||
using CoreCms.Net.Model.Entities.Expression;
|
||||
using CoreCms.Net.Model.FromBody;
|
||||
using CoreCms.Net.Model.ViewModels.UI;
|
||||
using CoreCms.Net.Model.ViewModels.DTO;
|
||||
using CoreCms.Net.Model.ViewModels.UI;
|
||||
using CoreCms.Net.Utility.Extensions;
|
||||
using CoreCms.Net.Utility.Helper;
|
||||
using CoreCms.Net.WeChat.Service.Enums;
|
||||
@@ -85,12 +85,14 @@ namespace CoreCms.Net.Web.WebApi.Controllers
|
||||
private readonly ICoreCmsStoreServices _storeServices;
|
||||
private readonly ICoreCmsCouponServices _couponServices;
|
||||
private readonly ICoreCmsOrderServices _orderServices;
|
||||
|
||||
private readonly IWeChatApiHttpClientFactory _weChatApiHttpClientFactory;
|
||||
private readonly WeChatOptions _weChatOptions;
|
||||
|
||||
|
||||
private readonly AsyncLock _mutex = new AsyncLock();
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 构造函数
|
||||
/// </summary>
|
||||
@@ -235,7 +237,6 @@ namespace CoreCms.Net.Web.WebApi.Controllers
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//注意:生产环境下SessionKey属于敏感信息,不能进行传输!
|
||||
//return new JsonResult(new { success = true, msg = "OK", sessionAuthId = sessionBag.Key, sessionKey = sessionBag.SessionKey, data = jsonResult, sessionBag = sessionBag });
|
||||
jm.status = true;
|
||||
@@ -271,6 +272,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
|
||||
jm.msg = "用户信息获取失败";
|
||||
return jm;
|
||||
}
|
||||
|
||||
var decodedEntity = EncryptHelper.DecodeUserInfoBySessionId(userInfo.sessionKey, entity.encryptedData, entity.iv);
|
||||
var token = string.Empty;
|
||||
var userWxId = entity.sessionAuthId;
|
||||
@@ -355,15 +357,16 @@ namespace CoreCms.Net.Web.WebApi.Controllers
|
||||
jm.msg = "请输入合法的手机号码";
|
||||
return jm;
|
||||
}
|
||||
if (entity.code == "login")
|
||||
{
|
||||
var shave = await _userServices.ExistsAsync(p => p.mobile == entity.mobile && p.userWx > 0);
|
||||
if (shave)
|
||||
{
|
||||
jm.msg = "手机号码已被绑定,请更换";
|
||||
return jm;
|
||||
}
|
||||
}
|
||||
//此验证貌似没意义。
|
||||
//if (entity.code == "login")
|
||||
//{
|
||||
// var shave = await _userServices.ExistsAsync(p => p.mobile == entity.mobile && p.userWx > 0);
|
||||
// if (shave)
|
||||
// {
|
||||
// jm.msg = "手机号码已被绑定,请更换";
|
||||
// return jm;
|
||||
// }
|
||||
//}
|
||||
jm = await _smsServices.DoSendSms(entity.code, entity.mobile);
|
||||
return jm;
|
||||
}
|
||||
@@ -378,7 +381,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
|
||||
[HttpPost]
|
||||
public async Task<WebApiCallBack> SmsLogin([FromBody] FMWxAccountCreate entity)
|
||||
{
|
||||
var jm = await _userServices.SmsLogin(entity, 2, entity.platform);
|
||||
var jm = await _userServices.SmsLogin(entity, (int)GlobalEnumVars.LoginType.Sms, entity.platform);
|
||||
return jm;
|
||||
}
|
||||
|
||||
@@ -428,7 +431,6 @@ namespace CoreCms.Net.Web.WebApi.Controllers
|
||||
return jm;
|
||||
}
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
#region 用户短信注册并返回jwt token(弃用)======================================================
|
||||
@@ -525,8 +527,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
|
||||
var log = new CoreCmsUserLog();
|
||||
log.userId = id;
|
||||
log.state = (int)GlobalEnumVars.UserLogTypes.注册;
|
||||
log.ip = _httpContextAccessor.HttpContext?.Connection.RemoteIpAddress != null ?
|
||||
_httpContextAccessor.HttpContext.Connection.RemoteIpAddress.MapToIPv4().ToString() : "127.0.0.1";
|
||||
log.ip = _httpContextAccessor.HttpContext?.Connection.RemoteIpAddress != null ? _httpContextAccessor.HttpContext.Connection.RemoteIpAddress.MapToIPv4().ToString() : "127.0.0.1";
|
||||
log.createTime = DateTime.Now;
|
||||
log.parameters = GlobalEnumVars.UserLogTypes.注册.ToString();
|
||||
await _userLogServices.InsertAsync(log);
|
||||
@@ -602,7 +603,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
|
||||
/// <summary>
|
||||
/// 统一分享url处理
|
||||
/// 新的分享,不管是二维码,还是地址,都走这个
|
||||
/// page 场景值 1店铺首页,2商品详情页,3拼团详情页,4邀请好友(店铺页面,params里需要传store),5文章页面,6参团页面,7自定义页面,8智能表单,9团购,10秒杀,11代理
|
||||
/// page 场景值 1店铺首页,2商品详情页,3拼团详情页,4邀请好友(店铺页面,params里需要传store),5文章页面,6参团页面,7自定义页面,8智能表单,9团购,10秒杀,11代理,12接龙
|
||||
/// url:前端地址
|
||||
/// params:参数,根据场景值不一样而内容不一样
|
||||
/// 1
|
||||
@@ -727,7 +728,6 @@ namespace CoreCms.Net.Web.WebApi.Controllers
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
#region 获取用户信息
|
||||
/// <summary>
|
||||
/// 获取用户信息
|
||||
@@ -988,6 +988,12 @@ namespace CoreCms.Net.Web.WebApi.Controllers
|
||||
userShip.address = entity.address;
|
||||
userShip.mobile = entity.mobile;
|
||||
userShip.updateTime = DateTime.Now;
|
||||
|
||||
userShip.longitude = entity.longitude;
|
||||
userShip.latitude = entity.latitude;
|
||||
userShip.street = entity.street;
|
||||
|
||||
|
||||
var ship = await _userShipServices.UpdateAsync(userShip);
|
||||
jm.status = true;
|
||||
jm.data = ship;
|
||||
@@ -1008,6 +1014,11 @@ namespace CoreCms.Net.Web.WebApi.Controllers
|
||||
userShip.address = entity.address;
|
||||
userShip.mobile = entity.mobile;
|
||||
userShip.createTime = DateTime.Now;
|
||||
|
||||
userShip.longitude = entity.longitude;
|
||||
userShip.latitude = entity.latitude;
|
||||
userShip.street = entity.street;
|
||||
|
||||
var ship = await _userShipServices.InsertAsync(userShip);
|
||||
jm.status = true;
|
||||
jm.data = ship;
|
||||
@@ -1104,7 +1115,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
|
||||
//生成支付单,并发起支付
|
||||
jm = await _billPaymentsServices.Pay(entity.ids, entity.payment_code, _user.ID, entity.payment_type,
|
||||
entity.@params);
|
||||
|
||||
//NLogUtil.WriteFileLog(NLog.LogLevel.Error, LogType.RedisMessageQueue, "支付",JsonConvert.SerializeObject(jm));
|
||||
return jm;
|
||||
}
|
||||
|
||||
@@ -1259,7 +1270,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
|
||||
[Authorize]
|
||||
public async Task<WebApiCallBack> GetBankCardsOrganization([FromBody] FMStringId entity)
|
||||
{
|
||||
var jm = await _userBankCardServices.BankCardsOrganization(entity.id);
|
||||
var jm =await _userBankCardServices.BankCardsOrganization(entity.id);
|
||||
return jm;
|
||||
}
|
||||
|
||||
@@ -1316,9 +1327,9 @@ namespace CoreCms.Net.Web.WebApi.Controllers
|
||||
|
||||
if (!string.IsNullOrEmpty(entity.propsDate))
|
||||
{
|
||||
if (entity.propsDate.Contains("-"))
|
||||
if (entity.propsDate.Contains("至"))
|
||||
{
|
||||
var dts = entity.propsDate.Split("-");
|
||||
var dts = entity.propsDate.Split("至");
|
||||
if (dts.Length == 2)
|
||||
{
|
||||
var dt = dts[0].ObjectToDate(DateTime.Now);
|
||||
@@ -1558,7 +1569,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
|
||||
{
|
||||
var jm = new WebApiCallBack();
|
||||
|
||||
jm.status = await _goodsBrowsingServices.DeleteAsync(p => p.userId == _user.ID && p.goodsId == entity.id);
|
||||
jm.status = await _goodsBrowsingServices.DeleteAsync(p => p.userId == _user.ID && p.id == entity.id);
|
||||
jm.msg = jm.status ? GlobalConstVars.DeleteSuccess : GlobalConstVars.DeleteFailure;
|
||||
|
||||
return jm;
|
||||
@@ -1725,7 +1736,6 @@ namespace CoreCms.Net.Web.WebApi.Controllers
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
#region 获取我的上级邀请人
|
||||
/// <summary>
|
||||
/// 获取我的上级邀请人
|
||||
@@ -1740,8 +1750,6 @@ namespace CoreCms.Net.Web.WebApi.Controllers
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
|
||||
#region 获取我的下级用户数量
|
||||
/// <summary>
|
||||
/// 获取我的下级用户数量
|
||||
@@ -1776,8 +1784,6 @@ namespace CoreCms.Net.Web.WebApi.Controllers
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
|
||||
#region 获取用户推荐列表
|
||||
/// <summary>
|
||||
/// 获取用户推荐列表
|
||||
@@ -1926,8 +1932,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
|
||||
foreach (var item in orders)
|
||||
{
|
||||
item.service = services.Find(p => p.id == item.servicesId);
|
||||
item.statusStr =
|
||||
EnumHelper.GetEnumDescriptionByValue<GlobalEnumVars.ServicesOrderStatus>(item.status);
|
||||
item.statusStr = EnumHelper.GetEnumDescriptionByValue<GlobalEnumVars.ServicesOrderStatus>(item.status);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user