|
@@ -7,6 +7,7 @@ use App\Model\Category;
|
|
|
use App\Model\WebsiteCategory;
|
|
|
use App\Model\ArticleSurvey;
|
|
|
use App\Model\Good;
|
|
|
+use App\Model\JobHunting;
|
|
|
|
|
|
use Hyperf\DbConnection\Db;
|
|
|
use Hyperf\RpcServer\Annotation\RpcService;
|
|
@@ -454,7 +455,7 @@ class NewsService implements NewsServiceInterface
|
|
|
} catch (\Throwable $ex) {
|
|
|
Db::rollBack();
|
|
|
var_dump($ex->getMessage());
|
|
|
- return Result::error("更新失败1" . $ex->getMessage(), 0);
|
|
|
+ return Result::error("更新失败" . $ex->getMessage(), 0);
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -699,4 +700,52 @@ class NewsService implements NewsServiceInterface
|
|
|
}
|
|
|
|
|
|
//20250226 产品列表
|
|
|
+ //20250306 求职信息
|
|
|
+ public function getJobHuntingList(array $data): array
|
|
|
+ {
|
|
|
+ $where = [];
|
|
|
+ if (isset($data['title']) && !empty($data['title'])) {
|
|
|
+
|
|
|
+ $where[] = ['title', 'like', '%' . $data['title'] . '%'];
|
|
|
+ }
|
|
|
+ $result = JobHunting::where($where)->paginate($data['limit'], ['*'], 'page', $data['page'])->toArray();
|
|
|
+ if (empty($result)) {
|
|
|
+ return Result::error("查询失败", 0);
|
|
|
+ }
|
|
|
+ return Result::success($result);
|
|
|
+ }
|
|
|
+ public function addJobHunting(array $data): array
|
|
|
+ {
|
|
|
+ $data['created_at'] = date('Y-m-d H:i:s');
|
|
|
+ $data['updated_at'] = date('Y-m-d H:i:s');
|
|
|
+ $result = JobHunting::create($data);
|
|
|
+ if (empty($result)) {
|
|
|
+ return Result::error("添加失败", 0);
|
|
|
+ }
|
|
|
+ return Result::success($result);
|
|
|
+ }
|
|
|
+ public function delJobHunting(array $data): array
|
|
|
+ {
|
|
|
+ $result = JobHunting::where('id', $data['id'])->delete();
|
|
|
+ if (empty($result)) {
|
|
|
+ return Result::error("删除失败", 0);
|
|
|
+ }
|
|
|
+ return Result::success($result);
|
|
|
+ }
|
|
|
+ public function updateJobHunting(array $data): array
|
|
|
+ {
|
|
|
+ $result = JobHunting::where('id', $data['id'])->update($data);
|
|
|
+ if (empty($result)) {
|
|
|
+ return Result::error("更新失败", 0);
|
|
|
+ }
|
|
|
+ return Result::success($result);
|
|
|
+ }
|
|
|
+ public function getJobHuntingInfo(array $data): array
|
|
|
+ {
|
|
|
+ $result = JobHunting::where('id', $data['id'])->first();
|
|
|
+ if (empty($result)) {
|
|
|
+ return Result::error("查询失败", 0);
|
|
|
+ }
|
|
|
+ return Result::success($result);
|
|
|
+ }
|
|
|
}
|