| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- <?php
- /**
- * Created by Administrator.
- * User: 向往那片天空
- * Date: 2022\5\21 0021
- * Time: 15:11
- * 格言: 抓住中心,宁精勿杂,宁专勿多
- * QQ/微信: 250023777
- * 描述: 无
- */
- namespace app\api\logic\enterprise;
- use app\api\logic\BaseLogic;
- use app\admin\model\user\User;
- use crmeb\services\JsonService;
- use crmeb\traits\ModelTrait;
- class ApplyLogic extends BaseLogic
- {
- use ModelTrait;
- protected $pk = 'id';
- protected $name = 'user_apply_enterprise_record';
- public function add($data)
- {
- if (!self::save($data)) {
- return app('json')->fail('申请失败');
- }
- return app('json')->success('申请成功');
- }
- /**
- * 用户是否有正在审核的记录
- * @param $userId 用户
- * @return bool true-有,false-无
- */
- public function hasApllying($userId)
- {
- $query = [];
- $query['apply_user_id'] = $userId;
- $query['is_delete'] = '0';
- $query['audit_status'] = 0;
- return self::be($query);
- }
- }
|