作者 zhl

u

@@ -8,8 +8,8 @@ use Throwable; @@ -8,8 +8,8 @@ use Throwable;
8 8
9 /** 9 /**
10 * @notes: B端接口统一错误格式 10 * @notes: B端接口统一错误格式
11 - * @author:wlj  
12 - * @date: 2022/6/2 16:32 11 + * Class AsideGlobalException
  12 + * @package App\Exceptions
13 */ 13 */
14 class AsideGlobalException extends Exception 14 class AsideGlobalException extends Exception
15 { 15 {
@@ -8,8 +8,8 @@ use Throwable; @@ -8,8 +8,8 @@ use Throwable;
8 8
9 /** 9 /**
10 * @notes: B端接口统一错误格式 10 * @notes: B端接口统一错误格式
11 - * @author:wlj  
12 - * @date: 2022/6/2 16:32 11 + * Class BsideGlobalException
  12 + * @package App\Exceptions
13 */ 13 */
14 class BsideGlobalException extends Exception 14 class BsideGlobalException extends Exception
15 { 15 {
@@ -7,17 +7,21 @@ use App\Exceptions\AsideGlobalException; @@ -7,17 +7,21 @@ use App\Exceptions\AsideGlobalException;
7 7
8 /** 8 /**
9 * @notes: 逻辑层基类 控制器调用 统一返回 统一抛出异常 9 * @notes: 逻辑层基类 控制器调用 统一返回 统一抛出异常
10 - * @author:wlj  
11 - * @date: 2022/6/7 17:37 10 + * Class BaseLogic
  11 + * @package App\Http\Logic\Aside
12 */ 12 */
13 class BaseLogic 13 class BaseLogic
14 { 14 {
  15 + protected $requestAll;
  16 + public function __construct()
  17 + {
  18 + $this->requestAll=request()->all();
  19 + }
  20 +
15 /** 21 /**
16 * @notes: 请简要描述方法功能 22 * @notes: 请简要描述方法功能
17 * @param array $data 23 * @param array $data
18 * @return array 24 * @return array
19 - * @author:wlj  
20 - * @date: 2022/7/19 12:25  
21 */ 25 */
22 public function success(array $data): array 26 public function success(array $data): array
23 { 27 {
@@ -29,8 +33,6 @@ class BaseLogic @@ -29,8 +33,6 @@ class BaseLogic
29 * @param string $code 33 * @param string $code
30 * @param string $message 34 * @param string $message
31 * @throws AsideGlobalException 35 * @throws AsideGlobalException
32 - * @author:wlj  
33 - * @date: 2022/7/19 12:28  
34 */ 36 */
35 public function fail(string $code = Code::SYSTEM_ERROR, $message = "") 37 public function fail(string $code = Code::SYSTEM_ERROR, $message = "")
36 { 38 {
@@ -40,8 +42,6 @@ class BaseLogic @@ -40,8 +42,6 @@ class BaseLogic
40 /** 42 /**
41 * @notes: 统一格式化分页返回 43 * @notes: 统一格式化分页返回
42 * @return array 44 * @return array
43 - * @author:wlj  
44 - * @date: 2022/7/11 15:34  
45 */ 45 */
46 function getPageData($pagninate): array 46 function getPageData($pagninate): array
47 { 47 {
@@ -7,17 +7,19 @@ use App\Exceptions\BsideGlobalException; @@ -7,17 +7,19 @@ use App\Exceptions\BsideGlobalException;
7 7
8 /** 8 /**
9 * @notes: 逻辑层基类 控制器调用 统一返回 统一抛出异常 9 * @notes: 逻辑层基类 控制器调用 统一返回 统一抛出异常
10 - * @author:wlj  
11 - * @date: 2022/6/7 17:37  
12 */ 10 */
13 class BaseLogic 11 class BaseLogic
14 { 12 {
  13 + protected $requestAll;
  14 + public function __construct()
  15 + {
  16 + $this->requestAll = request()->all();
  17 + }
  18 +
15 /** 19 /**
16 * @notes: 请简要描述方法功能 20 * @notes: 请简要描述方法功能
17 * @param array $data 21 * @param array $data
18 * @return array 22 * @return array
19 - * @author:wlj  
20 - * @date: 2022/7/19 12:25  
21 */ 23 */
22 public function success(array $data): array 24 public function success(array $data): array
23 { 25 {
@@ -29,8 +31,6 @@ class BaseLogic @@ -29,8 +31,6 @@ class BaseLogic
29 * @param string $code 31 * @param string $code
30 * @param string $message 32 * @param string $message
31 * @throws BsideGlobalException 33 * @throws BsideGlobalException
32 - * @author:wlj  
33 - * @date: 2022/7/19 12:28  
34 */ 34 */
35 public function fail(string $code = Code::SYSTEM_ERROR, $message = "") 35 public function fail(string $code = Code::SYSTEM_ERROR, $message = "")
36 { 36 {
@@ -40,8 +40,6 @@ class BaseLogic @@ -40,8 +40,6 @@ class BaseLogic
40 /** 40 /**
41 * @notes: 统一格式化分页返回 41 * @notes: 统一格式化分页返回
42 * @return array 42 * @return array
43 - * @author:wlj  
44 - * @date: 2022/7/11 15:34  
45 */ 43 */
46 function getPageData($pagninate): array 44 function getPageData($pagninate): array
47 { 45 {
@@ -12,6 +12,8 @@ class User extends Authenticatable @@ -12,6 +12,8 @@ class User extends Authenticatable
12 { 12 {
13 use HasApiTokens, HasFactory, Notifiable; 13 use HasApiTokens, HasFactory, Notifiable;
14 14
  15 + protected $table = 'gl_project_user';
  16 +
15 /** 17 /**
16 * The attributes that are mass assignable. 18 * The attributes that are mass assignable.
17 * 19 *
@@ -18,8 +18,6 @@ class EncryptUtils @@ -18,8 +18,6 @@ class EncryptUtils
18 * @param $iv 18 * @param $iv
19 * @param string $algo 19 * @param string $algo
20 * @return string 20 * @return string
21 - * @author:wlj  
22 - * @date: 2022/6/10 15:03  
23 */ 21 */
24 function openssl_en($data, $key, $iv, $algo = 'DES-EDE3-CBC') 22 function openssl_en($data, $key, $iv, $algo = 'DES-EDE3-CBC')
25 { 23 {
@@ -15,10 +15,8 @@ class HttpUtils @@ -15,10 +15,8 @@ class HttpUtils
15 /** 15 /**
16 * @notes: 异常处理 16 * @notes: 异常处理
17 * @param \Illuminate\Http\Client\Response $response 17 * @param \Illuminate\Http\Client\Response $response
18 - * @return bool|void 18 + * @return bool
19 * @throws BsideGlobalException 19 * @throws BsideGlobalException
20 - * @author:wlj  
21 - * @date: 2022/6/7 16:34  
22 */ 20 */
23 public static function checkSuccess(Response $response) 21 public static function checkSuccess(Response $response)
24 { 22 {
1 <?php 1 <?php
2 -/**  
3 - * @author:wlj  
4 - * @date: 2022/6/7 16:39  
5 - */  
6 -  
7 namespace App\Utils; 2 namespace App\Utils;
8 3
9 use App\Enums\Common\Common; 4 use App\Enums\Common\Common;