|
|
@ -22,8 +22,11 @@ namespace BWP.B3QingDaoWanFu.Tasks { |
|
|
var query = new DQueryDom(new JoinAlias(typeof(TrustPay))); |
|
|
var query = new DQueryDom(new JoinAlias(typeof(TrustPay))); |
|
|
query.Where.Conditions.Add(DQCondition.GreaterThanOrEqual("PayState", 付款状态.请求支付)); |
|
|
query.Where.Conditions.Add(DQCondition.GreaterThanOrEqual("PayState", 付款状态.请求支付)); |
|
|
query.Where.Conditions.Add(DQCondition.LessThanOrEqual("ReCheckTime", BLContext.Now)); |
|
|
query.Where.Conditions.Add(DQCondition.LessThanOrEqual("ReCheckTime", BLContext.Now)); |
|
|
|
|
|
query.Where.Conditions.Add(DQCondition.GreaterThan("CreateTime", BLContext.Now.AddHours(-5))); |
|
|
query.Where.Conditions.Add(DQCondition.EQ("ReChecked", false)); |
|
|
query.Where.Conditions.Add(DQCondition.EQ("ReChecked", false)); |
|
|
|
|
|
query.Where.Conditions.Add(DQCondition.LessThan("ReCheckCount", 6)); |
|
|
query.Where.Conditions.Add(DQCondition.IsNull(DQExpression.Field("Gathering_ID"))); |
|
|
query.Where.Conditions.Add(DQCondition.IsNull(DQExpression.Field("Gathering_ID"))); |
|
|
|
|
|
|
|
|
query.Columns.Add(DQSelectColumn.Field("ID")); |
|
|
query.Columns.Add(DQSelectColumn.Field("ID")); |
|
|
var list = query.EExecuteList<long>(); |
|
|
var list = query.EExecuteList<long>(); |
|
|
foreach (var id in list) { |
|
|
foreach (var id in list) { |
|
|
@ -60,10 +63,11 @@ namespace BWP.B3QingDaoWanFu.Tasks { |
|
|
if (trustPay == null || trustPay.AccountCustomer_ID == null) |
|
|
if (trustPay == null || trustPay.AccountCustomer_ID == null) |
|
|
return; |
|
|
return; |
|
|
trustPay.ID = _trustPayID; |
|
|
trustPay.ID = _trustPayID; |
|
|
|
|
|
trustPay.ReCheckCount++; |
|
|
if (trustPay.Gathering_ID > 0) { |
|
|
if (trustPay.Gathering_ID > 0) { |
|
|
if (!trustPay.ReChecked) { |
|
|
if (!trustPay.ReChecked) { |
|
|
trustPay.ReChecked = true; |
|
|
trustPay.ReChecked = true; |
|
|
InnerBLUtil.UpdateEntityProperties(session, trustPay, "ReChecked"); |
|
|
|
|
|
|
|
|
InnerBLUtil.UpdateEntityProperties(session, trustPay, "ReChecked", "ReCheckCount"); |
|
|
session.Commit(); |
|
|
session.Commit(); |
|
|
} |
|
|
} |
|
|
return; |
|
|
return; |
|
|
@ -85,7 +89,7 @@ namespace BWP.B3QingDaoWanFu.Tasks { |
|
|
var config = new WanFuOnlineConfig(); |
|
|
var config = new WanFuOnlineConfig(); |
|
|
using (new SpecialDomainUserBLScope(config.DomainUserForTrustPay.Value)) { |
|
|
using (new SpecialDomainUserBLScope(config.DomainUserForTrustPay.Value)) { |
|
|
bl.CreateGathering(trustPay, out gatheringID); |
|
|
bl.CreateGathering(trustPay, out gatheringID); |
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
if (gatheringID > 0) { |
|
|
if (gatheringID > 0) { |
|
|
trustPay.Gathering_ID = gatheringID; |
|
|
trustPay.Gathering_ID = gatheringID; |
|
|
} |
|
|
} |
|
|
@ -98,7 +102,8 @@ namespace BWP.B3QingDaoWanFu.Tasks { |
|
|
|
|
|
|
|
|
using (var session = Dmo.NewSession()) { |
|
|
using (var session = Dmo.NewSession()) { |
|
|
trustPay.ReChecked = trustPay.Gathering_ID > 0; |
|
|
trustPay.ReChecked = trustPay.Gathering_ID > 0; |
|
|
InnerBLUtil.UpdateEntityProperties(session, trustPay, "Gathering_ID", "PayState", "ReChecked"); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
InnerBLUtil.UpdateEntityProperties(session, trustPay, "Gathering_ID", "PayState", "ReChecked", "ReCheckCount"); |
|
|
session.Commit(); |
|
|
session.Commit(); |
|
|
} |
|
|
} |
|
|
if (!string.IsNullOrEmpty(msg)) |
|
|
if (!string.IsNullOrEmpty(msg)) |
|
|
@ -118,12 +123,12 @@ namespace BWP.B3QingDaoWanFu.Tasks { |
|
|
|
|
|
|
|
|
if (res.Status == "01" || res.Status == "02" || res.Status == "03") { |
|
|
if (res.Status == "01" || res.Status == "02" || res.Status == "03") { |
|
|
trustPay.ReCheckTime = BLContext.Now.AddMinutes(5); |
|
|
trustPay.ReCheckTime = BLContext.Now.AddMinutes(5); |
|
|
InnerBLUtil.UpdateEntityProperties(session, trustPay, "ReCheckTime"); |
|
|
|
|
|
|
|
|
InnerBLUtil.UpdateEntityProperties(session, trustPay, "ReCheckTime", "ReCheckCount"); |
|
|
session.Commit(); |
|
|
session.Commit(); |
|
|
return false; |
|
|
return false; |
|
|
} |
|
|
} |
|
|
trustPay.ReChecked = true; |
|
|
trustPay.ReChecked = true; |
|
|
InnerBLUtil.UpdateEntityProperties(session, trustPay, "ReChecked"); |
|
|
|
|
|
|
|
|
InnerBLUtil.UpdateEntityProperties(session, trustPay, "ReChecked", "ReCheckCount"); |
|
|
session.Commit(); |
|
|
session.Commit(); |
|
|
return false; |
|
|
return false; |
|
|
} |
|
|
} |
|
|
|