setter
parent
6e245814a4
commit
b233bf7e8b
|
@ -680,7 +680,7 @@ class Coupon extends Base
|
||||||
if ($hasCouponMax > 0) {
|
if ($hasCouponMax > 0) {
|
||||||
$hasCouponCount = CouponRepository::getInstance()->getBusinessOnShelfOnCount($account->business->code);
|
$hasCouponCount = CouponRepository::getInstance()->getBusinessOnShelfOnCount($account->business->code);
|
||||||
if ($hasCouponCount > $hasCouponMax) {
|
if ($hasCouponCount > $hasCouponMax) {
|
||||||
return $this->json(4001, "商家持有商家优惠券不能超过{$hasCouponMax}");
|
return $this->json(4001, "商家持有优惠券不能超过{$hasCouponMax}");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -3,6 +3,7 @@ namespace app\controller\api;
|
||||||
|
|
||||||
use app\exception\RepositoryException;
|
use app\exception\RepositoryException;
|
||||||
use app\model\Account;
|
use app\model\Account;
|
||||||
|
use app\model\Business;
|
||||||
use app\repository\AccountRepository;
|
use app\repository\AccountRepository;
|
||||||
use app\repository\BusinessRepository;
|
use app\repository\BusinessRepository;
|
||||||
use app\repository\CouponRepository;
|
use app\repository\CouponRepository;
|
||||||
|
@ -234,13 +235,14 @@ class User extends Base
|
||||||
// }
|
// }
|
||||||
//
|
//
|
||||||
// }
|
// }
|
||||||
|
$personalRes['business'] =[
|
||||||
|
"state" => Business::state_consumer,//未认证
|
||||||
|
"reason" => "",//未认证
|
||||||
|
];
|
||||||
if(!empty($account['business'])) {
|
if(!empty($account['business'])) {
|
||||||
// 商户认证记录
|
// 商户认证记录
|
||||||
$personalRes['business'] = [
|
$personalRes['business']["state"] = $account['business']['state'];
|
||||||
'state' => $account['business']['state'],
|
$personalRes['business']["reason"] = $account['business']['reason'];
|
||||||
'reason' => $account['business']['reason'],
|
|
||||||
];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->json(0, 'success', $personalRes);
|
return $this->json(0, 'success', $personalRes);
|
||||||
|
|
|
@ -6,9 +6,11 @@ use think\model\relation\HasOne;
|
||||||
|
|
||||||
class Business extends Base
|
class Business extends Base
|
||||||
{
|
{
|
||||||
|
|
||||||
const state_reviewing = 0;//待审核
|
const state_reviewing = 0;//待审核
|
||||||
const state_on = 1;//审核通过
|
const state_on = 1;//审核通过
|
||||||
const state_off = 2;//驳回
|
const state_off = 2;//驳回
|
||||||
|
const state_consumer = 4;//未认证
|
||||||
|
|
||||||
const model_ordinary = 0;//普通商家
|
const model_ordinary = 0;//普通商家
|
||||||
const model_annual_fee = 1;//年费商家
|
const model_annual_fee = 1;//年费商家
|
||||||
|
|
Loading…
Reference in New Issue