合并分支 'lyh-server' 到 'master'
Lyh server 查看合并请求 !3331
正在显示
5 个修改的文件
包含
8 行增加
和
7 行删除
| @@ -9,7 +9,6 @@ | @@ -9,7 +9,6 @@ | ||
| 9 | 9 | ||
| 10 | namespace App\Http\Logic\Aside\Geo; | 10 | namespace App\Http\Logic\Aside\Geo; |
| 11 | 11 | ||
| 12 | -use App\Enums\Common\Code; | ||
| 13 | use App\Http\Logic\Aside\BaseLogic; | 12 | use App\Http\Logic\Aside\BaseLogic; |
| 14 | use App\Models\Geo\GeoConf; | 13 | use App\Models\Geo\GeoConf; |
| 15 | use App\Models\Geo\GeoConfirm; | 14 | use App\Models\Geo\GeoConfirm; |
| @@ -43,7 +42,7 @@ class GeoConfirmLogic extends BaseLogic | @@ -43,7 +42,7 @@ class GeoConfirmLogic extends BaseLogic | ||
| 43 | public function saveConfirmContent($param) | 42 | public function saveConfirmContent($param) |
| 44 | { | 43 | { |
| 45 | try { | 44 | try { |
| 46 | - $wechat = $param['wechat'] ?? true; | 45 | + $wechat = $param['wechat'] ?? 1; |
| 47 | unset($param['wechat']); | 46 | unset($param['wechat']); |
| 48 | $info = $this->model->read(['project_id' => $param['project_id'],'type' => $param['type']]); | 47 | $info = $this->model->read(['project_id' => $param['project_id'],'type' => $param['type']]); |
| 49 | if($info === false){ | 48 | if($info === false){ |
| @@ -65,9 +65,11 @@ class GeoWritingsLogic extends BaseLogic | @@ -65,9 +65,11 @@ class GeoWritingsLogic extends BaseLogic | ||
| 65 | $this->param['status'] = GeoWritings::STATUS_INIT; | 65 | $this->param['status'] = GeoWritings::STATUS_INIT; |
| 66 | if(isset($this->param['id']) &&!empty($this->param['id'])){ | 66 | if(isset($this->param['id']) &&!empty($this->param['id'])){ |
| 67 | $id = $this->param['id']; | 67 | $id = $this->param['id']; |
| 68 | + $this->param['content_length'] = strlen($this->param['content'] ?? ''); | ||
| 68 | $this->model->edit($this->param,['id'=>$id]); | 69 | $this->model->edit($this->param,['id'=>$id]); |
| 69 | }else{ | 70 | }else{ |
| 70 | $this->param['type'] = GeoWritings::TYPE_SUBMIT; | 71 | $this->param['type'] = GeoWritings::TYPE_SUBMIT; |
| 72 | + $this->param['content_length'] = strlen($this->param['content'] ?? ''); | ||
| 71 | $this->param['uniqid'] = uniqid().$this->param['project_id']; | 73 | $this->param['uniqid'] = uniqid().$this->param['project_id']; |
| 72 | $id = $this->model->addReturnId($this->param); | 74 | $id = $this->model->addReturnId($this->param); |
| 73 | } | 75 | } |
| @@ -102,7 +104,7 @@ class GeoWritingsLogic extends BaseLogic | @@ -102,7 +104,7 @@ class GeoWritingsLogic extends BaseLogic | ||
| 102 | */ | 104 | */ |
| 103 | public function sendWechatMessage() | 105 | public function sendWechatMessage() |
| 104 | { | 106 | { |
| 105 | - $wechat = $this->param['wechat'] ?? true; | 107 | + $wechat = $this->param['wechat'] ?? 1; |
| 106 | $this->model->edit(['status'=>2],['status'=>1,'project_id'=>$this->param['project_id']]); | 108 | $this->model->edit(['status'=>2],['status'=>1,'project_id'=>$this->param['project_id']]); |
| 107 | $data = GeoWritings::sendConfirmMessage($this->param['project_id'],$wechat); | 109 | $data = GeoWritings::sendConfirmMessage($this->param['project_id'],$wechat); |
| 108 | if($data === false){ | 110 | if($data === false){ |
| @@ -38,7 +38,7 @@ class GeoWritingsTaskRequest extends FormRequest | @@ -38,7 +38,7 @@ class GeoWritingsTaskRequest extends FormRequest | ||
| 38 | // 'prefix' => 'required|string', | 38 | // 'prefix' => 'required|string', |
| 39 | // 'suffix' => 'required|string', | 39 | // 'suffix' => 'required|string', |
| 40 | 'event_title' => 'required|string', | 40 | 'event_title' => 'required|string', |
| 41 | - 'event_content' => 'required|string', | 41 | +// 'event_content' => 'required|string', |
| 42 | 'title' => 'required|string|max:120', | 42 | 'title' => 'required|string|max:120', |
| 43 | 'description' => 'required|string', | 43 | 'description' => 'required|string', |
| 44 | ]; | 44 | ]; |
| @@ -106,7 +106,7 @@ class GeoConfirm extends Base | @@ -106,7 +106,7 @@ class GeoConfirm extends Base | ||
| 106 | * @param $id | 106 | * @param $id |
| 107 | * @return bool | 107 | * @return bool |
| 108 | */ | 108 | */ |
| 109 | - public static function sendConfirmMessage($id, $friend_id,$send = true) | 109 | + public static function sendConfirmMessage($id, $friend_id,$send = 1) |
| 110 | { | 110 | { |
| 111 | $data = self::where(compact('id'))->first(); | 111 | $data = self::where(compact('id'))->first(); |
| 112 | $project_id = $data->project_id; | 112 | $project_id = $data->project_id; |
| @@ -127,7 +127,7 @@ class GeoConfirm extends Base | @@ -127,7 +127,7 @@ class GeoConfirm extends Base | ||
| 127 | 'url' => 'https://oa.quanqiusou.cn/public-geo-confirm?token=' . $token | 127 | 'url' => 'https://oa.quanqiusou.cn/public-geo-confirm?token=' . $token |
| 128 | ]; | 128 | ]; |
| 129 | $content = json_encode($content_array, JSON_UNESCAPED_UNICODE); | 129 | $content = json_encode($content_array, JSON_UNESCAPED_UNICODE); |
| 130 | - if($send == true){ | 130 | + if($send){ |
| 131 | $data->send_at = now(); | 131 | $data->send_at = now(); |
| 132 | $data->status = self::STATUS_RUNNING; | 132 | $data->status = self::STATUS_RUNNING; |
| 133 | MessagePush::insert(compact('project_id', 'friend_id', 'type', 'content_type', 'content', 'send_time', 'updated_at', 'created_at')); | 133 | MessagePush::insert(compact('project_id', 'friend_id', 'type', 'content_type', 'content', 'send_time', 'updated_at', 'created_at')); |
| @@ -77,7 +77,7 @@ class GeoWritings extends Base | @@ -77,7 +77,7 @@ class GeoWritings extends Base | ||
| 77 | * @return bool | 77 | * @return bool |
| 78 | * @throws \Exception | 78 | * @throws \Exception |
| 79 | */ | 79 | */ |
| 80 | - public static function sendConfirmMessage($project_id,$wechat = true) | 80 | + public static function sendConfirmMessage($project_id,$wechat = 1) |
| 81 | { | 81 | { |
| 82 | $friend = ProjectAssociation::where(['project_id' => $project_id])->first(); | 82 | $friend = ProjectAssociation::where(['project_id' => $project_id])->first(); |
| 83 | if (empty($friend)) { | 83 | if (empty($friend)) { |
-
请 注册 或 登录 后发表评论