| | |
| | | package com.ruoyi.system.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.common.core.web.page.PageInfo; |
| | | import com.ruoyi.system.api.model.Enterprise; |
| | | import com.ruoyi.system.api.query.GetEnterpriseListReq; |
| | | import com.ruoyi.system.service.IEnterpriseService; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; /** |
| | | import javax.annotation.Resource; |
| | | |
| | | /** |
| | | * @author zhibing.pu |
| | | * @Date 2025/3/6 11:01 |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 获取企业 |
| | | * |
| | | * @param username |
| | | * @return |
| | | */ |
| | | @PostMapping("/getEnterprise") |
| | | public R<Enterprise> getEnterprise(@RequestParam("username") String username){ |
| | | public R<Enterprise> getEnterprise(@RequestParam("username") String username) { |
| | | Enterprise username1 = enterpriseService.getOne(new QueryWrapper<Enterprise>().eq("username", username)); |
| | | return R.ok(username1); |
| | | } |
| | | |
| | | |
| | | @GetMapping("/getEnterpriseList") |
| | | @ApiOperation(value = "获取公司列表数据", tags = {"公司管理"}) |
| | | public R<PageInfo<Enterprise>> getEnterpriseList(GetEnterpriseListReq req) { |
| | | PageInfo<Enterprise> enterpriseList = enterpriseService.getEnterpriseList(req); |
| | | return R.ok(enterpriseList); |
| | | } |
| | | |
| | | |
| | | @GetMapping("/getEnterpriseInfo/{id}") |
| | | @ApiOperation(value = "获取公司详情", tags = {"公司管理"}) |
| | | public R<Enterprise> getEnterpriseInfo(@PathVariable("id") Integer id) { |
| | | Enterprise enterprise = enterpriseService.getById(id); |
| | | return R.ok(enterprise); |
| | | } |
| | | } |