Commit d2ab05b5 by 陶然

优化

parent 4f6e3ec8
...@@ -358,8 +358,8 @@ namespace Com.Bocom.OpenApi ...@@ -358,8 +358,8 @@ namespace Com.Bocom.OpenApi
bizContent.req_head.trans_time = DateTime.Now.ToString("yyyyMMddHHmmss"); bizContent.req_head.trans_time = DateTime.Now.ToString("yyyyMMddHHmmss");
bizContent.req_head.version = "V-1.0"; bizContent.req_head.version = "V-1.0";
bizContent.req_body = new MPNG020705RequestV1.MPNG020705RequestV1Biz.ReqBody(); bizContent.req_body = new MPNG020705RequestV1.MPNG020705RequestV1Biz.ReqBody();
bizContent.req_body.mer_ptc_id = Configs.mer_ptc_idQrCode;//"301310063009501";//商户号,需要配置信息到位
bizContent.req_body.mer_trade_date = DateTime.Now.ToString("yyyyMMdd"); bizContent.req_body.mer_trade_date = DateTime.Now.ToString("yyyyMMdd");
bizContent.req_body.mer_ptc_id = Configs.mer_ptc_idQrCode;//"301310063009501";//商户号,需要配置信息到位
//bizContent.req_body.pay_mer_tran_no = payMerTranNo; //bizContent.req_body.pay_mer_tran_no = payMerTranNo;
bizContent.req_body.close_mer_tran_no = receiveCode.pay_mer_tran_no; bizContent.req_body.close_mer_tran_no = receiveCode.pay_mer_tran_no;
...@@ -547,7 +547,7 @@ namespace Com.Bocom.OpenApi ...@@ -547,7 +547,7 @@ namespace Com.Bocom.OpenApi
if (split == null) if (split == null)
{ {
split = payment.BizSplit(payment.Amount, "自动认领", KiviiContext.CurrentMember.DepartmentKvid, KiviiContext.CurrentMember.DepartmentName, conn, "市场业务收入", payment.OperatorKvid, payment.OperatorName); split = payment.BizSplit(payment.Amount, "自动认领", KiviiContext.CurrentMember.DepartmentKvid, KiviiContext.CurrentMember.DepartmentName, conn, "市场业务收入", payment.OperatorKvid, payment.OperatorName);
split.AuditTime = payment.OperateTime;
var trans2 = conn.OpenTransaction(); var trans2 = conn.OpenTransaction();
try try
{ {
......
...@@ -138,6 +138,8 @@ ...@@ -138,6 +138,8 @@
<None Include="Content\product_smtbknotify_api_0580_智慧记账通知 %28变更后%29.zip" /> <None Include="Content\product_smtbknotify_api_0580_智慧记账通知 %28变更后%29.zip" />
<None Include="Content\智慧记账 对外接口sdk_v2.zip" /> <None Include="Content\智慧记账 对外接口sdk_v2.zip" />
<None Include="packages.config" /> <None Include="packages.config" />
<None Include="Resources\交通银行金融开放平台新一代条码支付产品对外接接口输出文档V1.0.doc" />
<None Include="Resources\交通银行金融开放平台智慧记账对外接接口输出文档V2.doc" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<EmbeddedResource Include="Content\Scripts\element-ui.css" /> <EmbeddedResource Include="Content\Scripts\element-ui.css" />
......
...@@ -113,6 +113,7 @@ namespace Njzj.Bocoms.Openapis ...@@ -113,6 +113,7 @@ namespace Njzj.Bocoms.Openapis
public string PayMerTranNo { get; set; } public string PayMerTranNo { get; set; }
public List<Guid> SettlementKvids { get; set; } public List<Guid> SettlementKvids { get; set; }
public string View { get; set; }
public override object OnExecution(IRequest req, IResponse res) public override object OnExecution(IRequest req, IResponse res)
{ {
...@@ -168,8 +169,6 @@ namespace Njzj.Bocoms.Openapis ...@@ -168,8 +169,6 @@ namespace Njzj.Bocoms.Openapis
try try
{ {
var order = Extension.GetReceiveCodeOrder(existCode.pay_mer_tran_no); var order = Extension.GetReceiveCodeOrder(existCode.pay_mer_tran_no);
if (order.rsp_body.tran_state.ToUpper() == "SUCCESS")//成功付款的情况
{
existCode.tran_state = order.rsp_body.tran_state; existCode.tran_state = order.rsp_body.tran_state;
existCode.AddOnlyProperties(o => o.tran_state); existCode.AddOnlyProperties(o => o.tran_state);
existCode.tran_state_code = order.rsp_body.tran_state_code; existCode.tran_state_code = order.rsp_body.tran_state_code;
...@@ -186,7 +185,9 @@ namespace Njzj.Bocoms.Openapis ...@@ -186,7 +185,9 @@ namespace Njzj.Bocoms.Openapis
existCode.AddOnlyProperties(o => o.tran_content); existCode.AddOnlyProperties(o => o.tran_content);
conn.UpdateOnly(existCode); conn.UpdateOnly(existCode);
existCode.RemoveAllOnlyProperties(); existCode.RemoveAllOnlyProperties();
if (order.rsp_body.tran_state.ToUpper() == "SUCCESS")//成功付款的情况
{
rtns.Results.Add(existCode);
var th = KiviiContext.NewThread(() => var th = KiviiContext.NewThread(() =>
{ {
existCode.ReceiveCodePaied(); existCode.ReceiveCodePaied();
...@@ -196,7 +197,10 @@ namespace Njzj.Bocoms.Openapis ...@@ -196,7 +197,10 @@ namespace Njzj.Bocoms.Openapis
else if (order.rsp_body.tran_state.ToUpper() == "PROCESS")//仍然在操作中的情况 else if (order.rsp_body.tran_state.ToUpper() == "PROCESS")//仍然在操作中的情况
{ {
if (existCode.CreateTime.AddMinutes(6) < DateTime.Now) existCode.ReceiveCodeDelete();//超过6分钟 二维码已经过期,直接删除 if (existCode.CreateTime.AddMinutes(6) < DateTime.Now) existCode.ReceiveCodeDelete();//超过6分钟 二维码已经过期,直接删除
else rtns.Results.Add(existCode); else
{
rtns.Results.Add(existCode);
}
} }
else//失败的情况 else//失败的情况
{ {
...@@ -212,10 +216,25 @@ namespace Njzj.Bocoms.Openapis ...@@ -212,10 +216,25 @@ namespace Njzj.Bocoms.Openapis
} }
} }
} }
if (View.IsNullOrEmpty())
{
return rtns;
}
else
{
if (rtns.Results.Count == 1)
{
return new HttpResult
{
Response = rtns.Results[0],
View = View
};
}
return rtns; return rtns;
} }
} }
}
[RequiresAnyRole(SystemRoles.Everyone)] [RequiresAnyRole(SystemRoles.Everyone)]
public class ReceiveCodeDelete : RestfulExecution<ReceiveCode> public class ReceiveCodeDelete : RestfulExecution<ReceiveCode>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment