jiangping
2023-12-05 4aba5c05fd1c525f2daaa004fbfec45d997b2e29
server/dmvisit_admin/src/main/java/com/doumee/api/business/CompanyController.java
@@ -6,11 +6,12 @@
import com.doumee.core.model.ApiResponse;
import com.doumee.core.model.PageWrap;
import com.doumee.core.model.PageData;
import com.doumee.core.utils.Constants;
import com.doumee.dao.business.model.Company;
import com.doumee.service.business.CompanyService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
@@ -87,4 +88,15 @@
    public ApiResponse findById(@PathVariable Integer id) {
        return ApiResponse.success(companyService.findById(id));
    }
    @ApiOperation("根据分类ID查询")
    @PostMapping("/findLaborServicesList")
    @RequiresPermissions("business:company:query")
    public ApiResponse<List<Company>> findLaborServicesList(Company query){
        Company company = new Company();
        company.setIsdeleted(Constants.ZERO);
        company.setType(query.getType());
        company.setCategoryId(query.getCategoryId());
        return ApiResponse.success(companyService.findList(company));
    }
}