setter
parent
7cdca1b279
commit
cb671bae45
|
@ -1023,23 +1023,27 @@ class Coupon extends Base
|
||||||
|
|
||||||
//未领取的优惠券
|
//未领取的优惠券
|
||||||
$NotClaimedMoney = CouponRepository::getInstance()->getBusinessNotClaimedCoupon($account->business["code"]);
|
$NotClaimedMoney = CouponRepository::getInstance()->getBusinessNotClaimedCoupon($account->business["code"]);
|
||||||
if(
|
// if(
|
||||||
$account->business["model"] == BusinessModel::model_ordinary
|
// $account->business["model"] == BusinessModel::model_ordinary
|
||||||
||
|
// ||
|
||||||
(
|
// (
|
||||||
$account->business["model"] == BusinessModel::model_time_limit
|
// $account->business["model"] == BusinessModel::model_time_limit
|
||||||
&&
|
// &&
|
||||||
(
|
// (
|
||||||
(strtotime($account->business["time_limit_end"]) < $time)
|
// (strtotime($account->business["time_limit_end"]) < $time)
|
||||||
||
|
// ||
|
||||||
($TimeListModeReleaseCount >= $account->business["time_limit_release_count"])
|
// ($TimeListModeReleaseCount >= $account->business["time_limit_release_count"])
|
||||||
)
|
// )
|
||||||
)
|
// )
|
||||||
) {
|
// ) {
|
||||||
|
// if ($account->business["balance"] < ($totalMoney + $NotClaimedMoney)) {
|
||||||
|
// return $this->json(4001, '商家余额不足');
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
if ($account->business["balance"] < ($totalMoney + $NotClaimedMoney)) {
|
if ($account->business["balance"] < ($totalMoney + $NotClaimedMoney)) {
|
||||||
return $this->json(4001, '商家余额不足');
|
return $this->json(4001, '商家余额不足');
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
Db::startTrans();
|
Db::startTrans();
|
||||||
try {
|
try {
|
||||||
|
|
|
@ -326,24 +326,26 @@ class Coupon extends Base
|
||||||
|
|
||||||
//未领取的优惠券
|
//未领取的优惠券
|
||||||
$NotClaimedMoney = CouponRepository::getInstance()->getBusinessNotClaimedCoupon($business["code"]);
|
$NotClaimedMoney = CouponRepository::getInstance()->getBusinessNotClaimedCoupon($business["code"]);
|
||||||
if(
|
// if(
|
||||||
$business["model"] == BusinessModel::model_ordinary
|
// $business["model"] == BusinessModel::model_ordinary
|
||||||
||
|
// ||
|
||||||
(
|
// (
|
||||||
$business["model"] == BusinessModel::model_time_limit
|
// $business["model"] == BusinessModel::model_time_limit
|
||||||
&&
|
// &&
|
||||||
(
|
// (
|
||||||
strtotime($business["time_limit_end"]) < $time
|
// strtotime($business["time_limit_end"]) < $time
|
||||||
||
|
// ||
|
||||||
$TimeListModeReleaseCount >= $business["time_limit_release_count"]
|
// $TimeListModeReleaseCount >= $business["time_limit_release_count"]
|
||||||
)
|
// )
|
||||||
)
|
// )
|
||||||
){
|
// ){
|
||||||
|
// if ($business["balance"] < ($totalMoney + $NotClaimedMoney)) {
|
||||||
|
// return $this->json(4001, '商家余额不足');
|
||||||
|
// }
|
||||||
|
// }
|
||||||
if ($business["balance"] < ($totalMoney + $NotClaimedMoney)) {
|
if ($business["balance"] < ($totalMoney + $NotClaimedMoney)) {
|
||||||
return $this->json(4001, '商家余额不足');
|
return $this->json(4001, '商家余额不足');
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
$date = date("Y-m-d H:i:s");
|
$date = date("Y-m-d H:i:s");
|
||||||
$data['create_time'] = $date;
|
$data['create_time'] = $date;
|
||||||
|
|
Loading…
Reference in New Issue