mirror of
http://git.coreshop.cn/jianweie/coreshoppro.git
synced 2025-12-06 14:53:26 +08:00
新增【后台】微信支付商家转账增加场景选择。
This commit is contained in:
@@ -3450,5 +3450,61 @@ namespace CoreCms.Net.Configuration
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 微信支付-商家转账场景ID
|
||||
/// <summary>
|
||||
/// 微信支付-商家转账场景ID
|
||||
/// </summary>
|
||||
public enum WeChatPayTransferSceneId
|
||||
{
|
||||
/// <summary>
|
||||
/// 现金营销
|
||||
/// </summary>
|
||||
[Description("现金营销")]
|
||||
现金营销 = 1000,
|
||||
|
||||
/// <summary>
|
||||
/// 佣金报酬
|
||||
/// </summary>
|
||||
[Description("佣金报酬")]
|
||||
佣金报酬 = 1005,
|
||||
|
||||
/// <summary>
|
||||
/// 采购货款
|
||||
/// </summary>
|
||||
[Description("采购货款")]
|
||||
采购货款 = 1009,
|
||||
|
||||
/// <summary>
|
||||
/// 二手回收
|
||||
/// </summary>
|
||||
[Description("二手回收")]
|
||||
二手回收 = 1010,
|
||||
|
||||
/// <summary>
|
||||
/// 企业赔付
|
||||
/// </summary>
|
||||
[Description("企业赔付")]
|
||||
企业赔付 = 1011,
|
||||
|
||||
/// <summary>
|
||||
/// 行政补贴
|
||||
/// </summary>
|
||||
[Description("行政补贴")]
|
||||
行政补贴 = 1002,
|
||||
|
||||
/// <summary>
|
||||
/// 公益补助
|
||||
/// </summary>
|
||||
[Description("公益补助")]
|
||||
公益补助 = 1013,
|
||||
|
||||
/// <summary>
|
||||
/// 保险理赔
|
||||
/// </summary>
|
||||
[Description("保险理赔")]
|
||||
保险理赔 = 1004,
|
||||
}
|
||||
#endregion
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -44,10 +44,12 @@ namespace CoreCms.Net.IServices
|
||||
/// <summary>
|
||||
/// 提现审核
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <param name="status"></param>
|
||||
/// <param name="id">数据序列</param>
|
||||
/// <param name="status">状态</param>
|
||||
/// <param name="type">提现方式</param>
|
||||
/// <param name="sceneId">转账场景(只有微信支付商家转账时使用)</param>
|
||||
/// <returns></returns>
|
||||
Task<WebApiCallBack> Examine(int id = 0, int status = 0, int type = (int)GlobalEnumVars.UserTocashType.银行线下转账);
|
||||
Task<WebApiCallBack> Examine(int id = 0, int status = 0, int type = (int)GlobalEnumVars.UserTocashType.银行线下转账, int sceneId = 1000);
|
||||
|
||||
|
||||
#region 重写根据条件查询分页数据
|
||||
|
||||
@@ -10665,6 +10665,11 @@
|
||||
提现方式
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:CoreCms.Net.Model.FromBody.FMUserTocash.sceneId">
|
||||
<summary>
|
||||
转账场景(只有微信支付商家转账时使用)
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:CoreCms.Net.Model.FromBody.FMGetWeChatConfig">
|
||||
<summary>
|
||||
|
||||
|
||||
@@ -160,6 +160,12 @@ namespace CoreCms.Net.Model.FromBody
|
||||
/// </summary>
|
||||
public int type { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 转账场景(只有微信支付商家转账时使用)
|
||||
/// </summary>
|
||||
public int sceneId { get; set; } = 1000;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -253,10 +253,12 @@ namespace CoreCms.Net.Services
|
||||
/// <summary>
|
||||
/// 提现审核
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <param name="status"></param>
|
||||
/// <param name="id">数据序列</param>
|
||||
/// <param name="status">状态</param>
|
||||
/// <param name="type">提现方式</param>
|
||||
/// <param name="sceneId">转账场景(只有微信支付商家转账时使用)</param>
|
||||
/// <returns></returns>
|
||||
public async Task<WebApiCallBack> Examine(int id = 0, int status = 0, int type = (int)GlobalEnumVars.UserTocashType.银行线下转账)
|
||||
public async Task<WebApiCallBack> Examine(int id = 0, int status = 0, int type = (int)GlobalEnumVars.UserTocashType.银行线下转账, int sceneId = 1000)
|
||||
{
|
||||
var jm = new WebApiCallBack();
|
||||
|
||||
@@ -575,7 +577,6 @@ namespace CoreCms.Net.Services
|
||||
|
||||
request.AppId = config.appId;
|
||||
request.OutBillNumber = "usertocash" + info.id;
|
||||
request.TransferSceneId = "1000";
|
||||
request.OpenId = weChatUserInfo.openid;
|
||||
|
||||
//按分计算
|
||||
@@ -584,23 +585,139 @@ namespace CoreCms.Net.Services
|
||||
{
|
||||
request.UserName = info.accountName;
|
||||
}
|
||||
|
||||
request.TransferRemark = "客户推广业务佣金提现处理";
|
||||
request.NotifyUrl = config.transferBillsUrl;
|
||||
|
||||
request.TransferSceneId = sceneId.ToString();
|
||||
switch (sceneId)
|
||||
{
|
||||
case (int)GlobalEnumVars.WeChatPayTransferSceneId.现金营销:
|
||||
request.TransferRemark = "客户推广业务佣金提现处理";
|
||||
request.TransferSceneReportInfoList = new List<CreateFundAppMerchantTransferBillRequest.Types.TransferSceneReportInfo>()
|
||||
{
|
||||
new CreateFundAppMerchantTransferBillRequest.Types.TransferSceneReportInfo()
|
||||
new()
|
||||
{
|
||||
InfoType = "活动名称",
|
||||
InfoContent = "分销佣金提现",
|
||||
},
|
||||
new CreateFundAppMerchantTransferBillRequest.Types.TransferSceneReportInfo()
|
||||
new()
|
||||
{
|
||||
InfoType = "奖励说明",
|
||||
InfoContent = "用户分销佣金提现申请",
|
||||
}
|
||||
};
|
||||
|
||||
break;
|
||||
|
||||
case (int)GlobalEnumVars.WeChatPayTransferSceneId.企业赔付:
|
||||
request.TransferRemark = "企业赔付费用";
|
||||
request.TransferSceneReportInfoList = new List<CreateFundAppMerchantTransferBillRequest.Types.TransferSceneReportInfo>()
|
||||
{
|
||||
new()
|
||||
{
|
||||
InfoType = "赔付原因",
|
||||
InfoContent = "用户主动申请赔付提现转账",
|
||||
}
|
||||
};
|
||||
break;
|
||||
|
||||
case (int)GlobalEnumVars.WeChatPayTransferSceneId.佣金报酬:
|
||||
request.TransferRemark = "佣金报酬费用";
|
||||
request.TransferSceneReportInfoList = new List<CreateFundAppMerchantTransferBillRequest.Types.TransferSceneReportInfo>()
|
||||
{
|
||||
new()
|
||||
{
|
||||
InfoType = "岗位类型",
|
||||
InfoContent = "业务人员",
|
||||
},
|
||||
new()
|
||||
{
|
||||
InfoType = "报酬说明",
|
||||
InfoContent = "用户主动申请报酬提现转账",
|
||||
}
|
||||
};
|
||||
break;
|
||||
|
||||
case (int)GlobalEnumVars.WeChatPayTransferSceneId.采购货款:
|
||||
request.TransferRemark = "采购货款费用";
|
||||
request.TransferSceneReportInfoList = new List<CreateFundAppMerchantTransferBillRequest.Types.TransferSceneReportInfo>()
|
||||
{
|
||||
new()
|
||||
{
|
||||
InfoType = "采购商品名称",
|
||||
InfoContent = "未定义的商品名称提现转账",
|
||||
}
|
||||
};
|
||||
break;
|
||||
|
||||
case (int)GlobalEnumVars.WeChatPayTransferSceneId.二手回收:
|
||||
request.TransferRemark = "二手回收费用";
|
||||
request.TransferSceneReportInfoList = new List<CreateFundAppMerchantTransferBillRequest.Types.TransferSceneReportInfo>()
|
||||
{
|
||||
new()
|
||||
{
|
||||
InfoType = "回收商品名称",
|
||||
InfoContent = "未定义的商品名称提现转账",
|
||||
}
|
||||
};
|
||||
break;
|
||||
|
||||
case (int)GlobalEnumVars.WeChatPayTransferSceneId.公益补助:
|
||||
request.TransferRemark = "公益补助费用";
|
||||
request.TransferSceneReportInfoList = new List<CreateFundAppMerchantTransferBillRequest.Types.TransferSceneReportInfo>()
|
||||
{
|
||||
new()
|
||||
{
|
||||
InfoType = "公益活动名称",
|
||||
InfoContent = "未定义的活动名称",
|
||||
},
|
||||
new()
|
||||
{
|
||||
InfoType = "公益活动备案编号",
|
||||
InfoContent = "未定义的活动备案编号",
|
||||
}
|
||||
};
|
||||
break;
|
||||
|
||||
case (int)GlobalEnumVars.WeChatPayTransferSceneId.行政补贴:
|
||||
request.TransferRemark = "行政补贴费用";
|
||||
request.TransferSceneReportInfoList = new List<CreateFundAppMerchantTransferBillRequest.Types.TransferSceneReportInfo>()
|
||||
{
|
||||
new()
|
||||
{
|
||||
InfoType = "补贴类型",
|
||||
InfoContent = "用户自主申请行政补贴费用提现",
|
||||
}
|
||||
};
|
||||
break;
|
||||
|
||||
case (int)GlobalEnumVars.WeChatPayTransferSceneId.保险理赔:
|
||||
request.TransferRemark = "保险理赔费用";
|
||||
request.TransferSceneReportInfoList = new List<CreateFundAppMerchantTransferBillRequest.Types.TransferSceneReportInfo>()
|
||||
{
|
||||
new()
|
||||
{
|
||||
InfoType = "保险产品备案编号",
|
||||
InfoContent = "未定义的保险产品备案编号",
|
||||
},
|
||||
new()
|
||||
{
|
||||
InfoType = "保险名称",
|
||||
InfoContent = "未定义的保险名称",
|
||||
},
|
||||
new()
|
||||
{
|
||||
InfoType = "保险操作单号",
|
||||
InfoContent = "未定义的保险操作单号",
|
||||
}
|
||||
};
|
||||
break;
|
||||
|
||||
default:
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
var response = await client.ExecuteCreateFundAppMerchantTransferBillAsync(request);
|
||||
if (response.IsSuccessful())
|
||||
{
|
||||
@@ -630,7 +747,6 @@ namespace CoreCms.Net.Services
|
||||
log.createTime = DateTime.Now;
|
||||
await _userTocashWeChatResponseServices.InsertAsync(log);
|
||||
|
||||
|
||||
jm.status = bl;
|
||||
jm.data = status;
|
||||
}
|
||||
@@ -662,8 +778,6 @@ namespace CoreCms.Net.Services
|
||||
break;
|
||||
}
|
||||
return jm;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -294,12 +294,14 @@ namespace CoreCms.Net.Web.Admin.Controllers
|
||||
|
||||
var userTocashStatus = EnumHelper.EnumToList<GlobalEnumVars.UserTocashStatus>();
|
||||
var userTocashType = EnumHelper.EnumToList<GlobalEnumVars.UserTocashType>();
|
||||
var weChatPayTransferSceneId = EnumHelper.EnumToList<GlobalEnumVars.WeChatPayTransferSceneId>();
|
||||
|
||||
jm.data = new
|
||||
{
|
||||
model,
|
||||
userTocashStatus,
|
||||
userTocashType
|
||||
userTocashType,
|
||||
weChatPayTransferSceneId
|
||||
};
|
||||
|
||||
return jm;
|
||||
@@ -327,7 +329,7 @@ namespace CoreCms.Net.Web.Admin.Controllers
|
||||
return jm;
|
||||
}
|
||||
|
||||
var res = await _coreCmsUserTocashServices.Examine(entity.id, entity.status, entity.type);
|
||||
var res = await _coreCmsUserTocashServices.Examine(entity.id, entity.status, entity.type, entity.sceneId);
|
||||
jm.code = res.status ? 0 : 1;
|
||||
jm.data = res.data;
|
||||
jm.msg = res.msg;
|
||||
@@ -360,12 +362,14 @@ namespace CoreCms.Net.Web.Admin.Controllers
|
||||
|
||||
var userTocashStatus = EnumHelper.EnumToList<GlobalEnumVars.UserTocashStatus>();
|
||||
var userTocashType = EnumHelper.EnumToList<GlobalEnumVars.UserTocashType>();
|
||||
var weChatPayTransferSceneId = EnumHelper.EnumToList<GlobalEnumVars.WeChatPayTransferSceneId>();
|
||||
|
||||
jm.data = new
|
||||
{
|
||||
model,
|
||||
userTocashStatus,
|
||||
userTocashType
|
||||
userTocashType,
|
||||
weChatPayTransferSceneId
|
||||
};
|
||||
|
||||
return jm;
|
||||
|
||||
@@ -23,13 +23,24 @@
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item" id="selectSceneBox">
|
||||
<label for="sceneId" class="layui-form-label layui-form-required">转账场景</label>
|
||||
<div class="layui-input-block">
|
||||
<select name="sceneId" lay-verify="required|number" lay-reqText="请选择审核状态">
|
||||
{{# layui.each(d.params.data.weChatPayTransferSceneId, function(index, item){ }}
|
||||
<option value="{{ item.value }}">{{ item.title }}</option>
|
||||
{{# }); }}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<blockquote class="layui-elem-quote">
|
||||
1、微信提现需微信支付商户开通了企业付款到零钱功能。<br />
|
||||
2、只有【提现方式】为【银行卡】,才可主动设置成功失败。<br />
|
||||
3、微信提现方式下,将依据请求微信api接口返回信息,进行状态处理。<br />
|
||||
4、【微信提现付款到零钱】【微信提现付款到银行卡】再有异常的情况下,都可继续进行新的处理,可能会存在网络,微信支付商户余额,用户填写的银行卡信息错误等。<br />
|
||||
5、【微信提现付款到银行卡】需要配置【RsaPublicKey】,请自行添加,不然会报异常。
|
||||
5、【微信提现付款到银行卡】需要配置【RsaPublicKey】,请自行添加,不然会报异常。<br />
|
||||
6、【商家转账】请完善微信支付配置里面的相关【平台证书】或者【微信支付公钥】,请自行添加,不然会报异常,另外选择【商家转账】时,根据自己申请的【转账场景】选择上面【转账场景】的下拉数据,错误的转账场景也将导致转账失败。
|
||||
</blockquote>
|
||||
</div>
|
||||
|
||||
@@ -43,6 +54,7 @@
|
||||
layui.data.sendParams = function (d) {
|
||||
//开启调试情况下获取接口赋值数据
|
||||
if (debug) { console.log(d.params.data); }
|
||||
|
||||
layui.use(['admin', 'form', 'laydate', 'upload', 'coreHelper', 'cropperImg'],
|
||||
function () {
|
||||
var $ = layui.$
|
||||
@@ -54,6 +66,7 @@
|
||||
, coreHelper = layui.coreHelper;
|
||||
|
||||
$('#selectStatusBox').hide();
|
||||
$('#selectSceneBox').hide();
|
||||
|
||||
form.on('select(selectType)', function (data) {
|
||||
console.log(data.value); //复选框value值,也可以通过data.elem.value得到
|
||||
@@ -62,6 +75,13 @@
|
||||
} else {
|
||||
$('#selectStatusBox').hide();
|
||||
}
|
||||
|
||||
if (data.value === '4') {
|
||||
$('#selectSceneBox').show();
|
||||
} else {
|
||||
$('#selectSceneBox').hide();
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
@@ -239,7 +239,7 @@
|
||||
admin.popup({
|
||||
shadeClose: false,
|
||||
title: '提现操作',
|
||||
area: ['500px', '400px'],
|
||||
area: ['500px', '500px'],
|
||||
id: 'LAY-popup-CoreCmsUserTocash-edit',
|
||||
success: function (layero, index) {
|
||||
view(this.id).render('financial/usertocash/edit', { data: e.data }).done(function () {
|
||||
@@ -248,8 +248,6 @@
|
||||
function (data) {
|
||||
var field = data.field; //获取提交的字段
|
||||
|
||||
|
||||
|
||||
if (debug) { console.log(field); } //开启调试返回数据
|
||||
//提交 Ajax 成功后,关闭当前弹层并重载表格
|
||||
coreHelper.Post("Api/CoreCmsUserTocash/SetStatus", field, function (e) {
|
||||
|
||||
Reference in New Issue
Block a user