master
wangxinglong 2022-02-08 16:38:36 +08:00
parent 6e245814a4
commit b233bf7e8b
3 changed files with 10 additions and 6 deletions

View File

@ -680,7 +680,7 @@ class Coupon extends Base
if ($hasCouponMax > 0) {
$hasCouponCount = CouponRepository::getInstance()->getBusinessOnShelfOnCount($account->business->code);
if ($hasCouponCount > $hasCouponMax) {
return $this->json(4001, "商家持有商家优惠券不能超过{$hasCouponMax}");
return $this->json(4001, "商家持有优惠券不能超过{$hasCouponMax}");
}
}

View File

@ -3,6 +3,7 @@ namespace app\controller\api;
use app\exception\RepositoryException;
use app\model\Account;
use app\model\Business;
use app\repository\AccountRepository;
use app\repository\BusinessRepository;
use app\repository\CouponRepository;
@ -234,13 +235,14 @@ class User extends Base
// }
//
// }
$personalRes['business'] =[
"state" => Business::state_consumer,//未认证
"reason" => "",//未认证
];
if(!empty($account['business'])) {
// 商户认证记录
$personalRes['business'] = [
'state' => $account['business']['state'],
'reason' => $account['business']['reason'],
];
$personalRes['business']["state"] = $account['business']['state'];
$personalRes['business']["reason"] = $account['business']['reason'];
}
return $this->json(0, 'success', $personalRes);

View File

@ -6,9 +6,11 @@ use think\model\relation\HasOne;
class Business extends Base
{
const state_reviewing = 0;//待审核
const state_on = 1;//审核通过
const state_off = 2;//驳回
const state_consumer = 4;//未认证
const model_ordinary = 0;//普通商家
const model_annual_fee = 1;//年费商家