瀏覽代碼

new_enterprise改un_enterprise

sugangqiang 2 年之前
父節點
當前提交
4c349f0cc5

+ 1 - 1
app/admin/controller/Talent.php

@@ -180,7 +180,7 @@ class Talent extends AdminController {
             echo sprintf("<script>TalentInfo.callBack(%s);</script>", json_encode($res));
         }
         $where[] = ["ti.id", "in", $ids_arr];
-        $list = TalentModel::alias("ti")->leftJoin("new_enterprise e", "e.id=ti.enterprise_id")->field("ti.name,ti.card_type,ti.card_number,e.name as enterpriseName,e.description")->where($where)->select();
+        $list = TalentModel::alias("ti")->leftJoin("un_enterprise e", "e.id=ti.enterprise_id")->field("ti.name,ti.card_type,ti.card_number,e.name as enterpriseName,e.description")->where($where)->select();
         if (!$list) {
             $res = ["code" => 500, "msg" => "没有可以导出的内容"];
             echo sprintf("<script>TalentInfo.callBack(%s);</script>", json_encode($res));

+ 1 - 1
app/admin/model/Enterprise.php

@@ -11,6 +11,6 @@ use think\Model;
  */
 class Enterprise extends Model {
 
-    protected $table = "new_enterprise";
+    protected $table = "un_enterprise";
 
 }

+ 10 - 10
app/common/api/VerifyApi.php

@@ -98,13 +98,13 @@ class VerifyApi {
         $enterprise_tag_kvs = DictApi::selectByParentCode("enterprise_tag");
         $count = Talent::alias("ti")
                         ->leftJoin("new_talent_condition tc", "tc.id=ti.talent_condition")
-                        ->leftJoin("new_enterprise e", "e.id=ti.enterprise_id")
+                        ->leftJoin("un_enterprise e", "e.id=ti.enterprise_id")
                         ->leftJoin("new_talent_checklog tl", "tl.mainId=ti.id and tl.id=(select id from new_talent_checklog where mainId=ti.id and `step` is null and active=1 and typeFileId is null order by createTime desc limit 1)")
                         ->where($where)
                         ->whereRaw("find_in_set(:companyId,companyIds)", ["companyId" => $companyId])->count();
         $list = Talent::alias("ti")
                         ->leftJoin("new_talent_condition tc", "tc.id=ti.talent_condition")
-                        ->leftJoin("new_enterprise e", "e.id=ti.enterprise_id")
+                        ->leftJoin("un_enterprise e", "e.id=ti.enterprise_id")
                         ->leftJoin("new_talent_checklog tl", "tl.mainId=ti.id and tl.id=(select id from new_talent_checklog where mainId=ti.id and `step` is null and active=1 and typeFileId is null order by createTime desc limit 1)")
                         ->where($where)
                         ->whereRaw("find_in_set(:companyId,companyIds)", ["companyId" => $companyId])
@@ -156,8 +156,8 @@ class VerifyApi {
                 break;
         }
         $enterprise_tag_kvs = DictApi::selectByParentCode("enterprise_tag");
-        $count = Talent::alias("ti")->leftJoin("new_enterprise e", "e.id=ti.enterprise_id")->where($where)->count();
-        $list = Talent::alias("ti")->leftJoin("new_enterprise e", "e.id=ti.enterprise_id")
+        $count = Talent::alias("ti")->leftJoin("un_enterprise e", "e.id=ti.enterprise_id")->where($where)->count();
+        $list = Talent::alias("ti")->leftJoin("un_enterprise e", "e.id=ti.enterprise_id")
                         ->where($where)
                         ->limit($offset, $limit)
                         ->order("ti.createTime " . $order)->field("ti.*,e.name as enterpriseName,e.type as enterprise_type,enterpriseTag")->select()->toArray();
@@ -274,12 +274,12 @@ class VerifyApi {
                     break;
             }
             $count = Talent::alias("ti")
-                            ->leftJoin("new_enterprise e", "e.id=ti.enterprise_id")
+                            ->leftJoin("un_enterprise e", "e.id=ti.enterprise_id")
                             ->leftJoin("new_talent_condition tc", "tc.id=ti.talent_condition")
                             ->leftJoin("new_talent_checklog tl", "tl.mainId=ti.id and tl.id=(select id from new_talent_checklog where mainId=ti.id and `step` is null and active=1 and typeFileId is null order by createTime desc limit 1)")
                             ->whereRaw($whereRaw)->where($where)->count();
             $list = Talent::alias("ti")
-                            ->leftJoin("new_enterprise e", "e.id=ti.enterprise_id")
+                            ->leftJoin("un_enterprise e", "e.id=ti.enterprise_id")
                             ->leftJoin("new_talent_condition tc", "tc.id=ti.talent_condition")
                             ->leftJoin("new_talent_checklog tl", "tl.mainId=ti.id and tl.id=(select id from new_talent_checklog where mainId=ti.id and `step` is null and active=1 and typeFileId is null order by createTime desc limit 1)")
                             ->whereRaw($whereRaw)
@@ -315,11 +315,11 @@ class VerifyApi {
                     break;
             }
             $count = Talent::alias("ti")
-                            ->leftJoin("new_enterprise e", "e.id=ti.enterprise_id")
+                            ->leftJoin("un_enterprise e", "e.id=ti.enterprise_id")
                             ->leftJoin("new_talent_checklog tl", "tl.mainId=ti.id and tl.id=(select id from new_talent_checklog where mainId=ti.id and `step` is null and active=1 and typeFileId is null order by createTime desc limit 1)")
                             ->where($where)->count();
             $list = Talent::alias("ti")
-                            ->leftJoin("new_enterprise e", "e.id=ti.enterprise_id")
+                            ->leftJoin("un_enterprise e", "e.id=ti.enterprise_id")
                             ->leftJoin("new_talent_checklog tl", "tl.mainId=ti.id and tl.id=(select id from new_talent_checklog where mainId=ti.id and `step` is null and active=1 and typeFileId is null order by createTime desc limit 1)")
                             ->where($where)->limit($offset, $limit)->order("ti.createTime " . $order)->field("ti.*,tl.last_state as 'lastState',tl.state as 'realState',e.name as enterprise_name,e.type as enterprise_type,enterpriseTag")->select()->toArray();
         }
@@ -424,7 +424,7 @@ class VerifyApi {
         }
         $list = Talent::alias("ti")
                         ->field($fields)
-                        ->leftJoin("new_enterprise e", "e.id=ti.enterprise_id")
+                        ->leftJoin("un_enterprise e", "e.id=ti.enterprise_id")
                         ->leftJoin("new_talent_condition tc", "tc.id=ti.talent_condition")
                         ->leftJoin("new_talent_checklog tl", "tl.mainId=ti.id and tl.id=(select id from new_talent_checklog where mainId=ti.id and `step` is null and active=1 and typeFileId is null order by createTime desc limit 1)")
                         ->whereRaw($where)
@@ -478,7 +478,7 @@ class VerifyApi {
             default:
                 return null;
         }
-        return Talent::alias("ti")->leftJoin("new_enterprise e", "e.id=ti.enterprise_id")->where($where)->field("ti.*,e.agentName,e.agentPhone")->select()->toArray();
+        return Talent::alias("ti")->leftJoin("un_enterprise e", "e.id=ti.enterprise_id")->where($where)->field("ti.*,e.agentName,e.agentPhone")->select()->toArray();
     }
 
     public static function setPublic($mainId, $state, $msg, $batch = null, $type = 1) {

+ 1 - 1
app/common/model/Enterprise.php

@@ -6,7 +6,7 @@ use think\Model;
 
 class Enterprise extends Model{
 
-    protected $table = "new_enterprise";
+    protected $table = "un_enterprise";
 
 
 }

+ 4 - 4
app/common/validate/Enterprise.php

@@ -8,17 +8,17 @@ class Enterprise extends Validate{
 
 
     protected $rule =   [
-        'username' => 'require|max:50|unique:new_enterprise',
+        'username' => 'require|max:50|unique:un_enterprise',
         'password' => 'require|min:6|regex:/^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]{6,}$/',
         're_password' => 'require|confirm:password',
-        'name' => 'require|max:100|unique:new_enterprise|regex:/^[\x{4e00}-\x{9fa5}]+$/u',
-        'idCard' => ['require','unique:new_enterprise','regex:/^([0-9A-HJ-NPQRTUWXY]{2}\d{6}[0-9A-HJ-NPQRTUWXY]{10}|[1-9]\d{14})$/'],
+        'name' => 'require|max:100|unique:un_enterprise|regex:/^[\x{4e00}-\x{9fa5}]+$/u',
+        'idCard' => ['require','unique:un_enterprise','regex:/^([0-9A-HJ-NPQRTUWXY]{2}\d{6}[0-9A-HJ-NPQRTUWXY]{10}|[1-9]\d{14})$/'],
         'type' => 'require',
         'industryFieldNew' => 'require',
         'enterpriseTag' => 'require',
         'enterpriseType' => 'require',
         'agentName' => 'require',
-        'agentPhone' => 'require|unique:new_enterprise',
+        'agentPhone' => 'require|unique:un_enterprise',
         'verificationCode' => 'require',
         'legal' => 'require|regex:/^[\x{4e00}-\x{9fa5}]+$/u',
         'street' => 'require',