Переглянути джерело

Merge branch 'dev_wf' of wufeng/fuse into version1.5

wufeng 2 роки тому
батько
коміт
ee6385684b
1 змінених файлів з 6 додано та 3 видалено
  1. 6 3
      app/admin/logic/AccountLogic.php

+ 6 - 3
app/admin/logic/AccountLogic.php

@@ -65,7 +65,7 @@ class AccountLogic extends BaseLogic
             'status' => AccountModel::$status_not_active,
             'is_del' => CommonModel::$del_normal,
             'starttime' => $data['starttime'],
-            'expiretime' => date('Y-m-d', strtotime($data['expiretime']) + 3600 * 24),
+            'expiretime' => date('Y-m-d 23:59:59', strtotime($data['expiretime'])),
             'createrid' => self::$uid,
             'creater' => self::$uname,
             'addtime' => $date,
@@ -81,8 +81,11 @@ class AccountLogic extends BaseLogic
     //读取
     public static function read(int $id = 0): Json
     {
-        $res = AccountModel::field(true)
-            ->where(['id' => $id, 'is_del' => CommonModel::$del_normal])
+        $res = AccountModel::alias('a')
+            ->field('a.*,b.title company_title,c.title card_title')
+            ->leftJoin('company b', 'b.id=a.company_id AND b.is_del=' . CommonModel::$del_normal)
+            ->leftJoin('card c', 'c.id=a.card_id AND c.is_del=' . CommonModel::$del_normal)
+            ->where(['a.id' => $id, 'a.is_del' => CommonModel::$del_normal])
             ->append(['video_list'])
             ->withAttr('video_list', function ($val, $data) {
                 return VideoModel::field('id,video_name')