liujie
2025-06-03 ced35443353a013091a70a240c846e4344fec19d
ruoyi-applet/src/main/java/com/ruoyi/web/controller/system/CompanyController.java
@@ -13,6 +13,7 @@
import com.ruoyi.system.query.CompanyListQuery;
import com.ruoyi.system.query.MyPushCompanyListQuery;
import com.ruoyi.system.service.*;
import com.ruoyi.system.vo.CompanyDetailVo;
import com.ruoyi.system.vo.IndexCompanyListVo;
import com.ruoyi.system.vo.MyPushCompanyListVo;
import io.swagger.annotations.Api;
@@ -24,6 +25,7 @@
import org.springframework.web.bind.annotation.*;
import javax.validation.Valid;
import java.util.Date;
import java.util.List;
@Slf4j
@@ -47,6 +49,15 @@
    @Autowired
    private TbScheduleService scheduleService;
    @Autowired
    private TbMessageService messageService;
    @Autowired
    private TbLicenceService licenceService;
    @Autowired
    private TbCompanyTypeService companyTypeService;
    @ApiOperation(value = "获取我发布的公司",tags = {"发布模块"})
@@ -62,6 +73,20 @@
    @GetMapping("/getIndustryList")
    public R<Page<TbIndustry>> getIndustryList(BasePage page) {
        Page<TbIndustry> page1 = industryService.page(new Page<>(page.getPageNum(),page.getPageSize()),new LambdaQueryWrapper<TbIndustry>().orderByDesc(TbIndustry::getOrderNum));
        return R.ok(page1);
    }
    @ApiOperation(value = "获取许可证信息",tags = {"发布模块"})
    @GetMapping("/getCompanyTypeList")
    public R<Page<TbCompanyType>> getCompanyTypeList(BasePage page) {
        Page<TbCompanyType> page1 = companyTypeService.page(new Page<>(page.getPageNum(),page.getPageSize()),new LambdaQueryWrapper<TbCompanyType>().eq(TbCompanyType::getDelFlag,0).orderByDesc(TbCompanyType::getOrderNum));
        return R.ok(page1);
    }
    @ApiOperation(value = "获取许可证信息",tags = {"发布模块"})
    @GetMapping("/getLicenceList")
    public R<Page<TbLicence>> getLicenceList(BasePage page) {
        Page<TbLicence> page1 = licenceService.page(new Page<>(page.getPageNum(),page.getPageSize()),new LambdaQueryWrapper<TbLicence>().eq(TbLicence::getDelFlag,0).orderByDesc(TbLicence::getOrderNum));
        return R.ok(page1);
    }
@@ -133,7 +158,9 @@
            return R.fail("该订单状态不需要确认");
        }
        order.setStatus(3);
        order.setConfirmTime(new Date());
        order.updateById();
        return R.ok();
    }
@@ -160,6 +187,12 @@
        }
        order.setStatus(3);
        order.updateById();
        company.setStatus(1);
        company.updateById();
        messageService.addMessage("您有订单被取消", order.getUserId(),order.getId());
        return R.ok();
    }
@@ -177,6 +210,8 @@
            return R.fail("非法操作");
        }
        scheduleService.addSchedule(dto,userId);
        messageService.addMessage("您有订单卖家已完成,等待确认", order.getUserId(),order.getId());
        return R.ok();
    }
@@ -204,11 +239,25 @@
            return R.fail("该订单状态不能完成");
        }
        order.setStatus(5);
        order.setSellerFinishTime(new Date());
        order.updateById();
        messageService.addMessage("您有订单卖家已完成,等待确认", order.getUserId(),orderId);
        return R.ok();
    }
    @ApiOperation(value = "公司详情",tags = {"发布模块"})
    @GetMapping("/companyDetail")
    public R<CompanyDetailVo> companyDetail(@RequestParam String companyId) {
        if(StringUtils.isEmpty(companyId)){
            return R.fail("参数错误");
        }
        LoginUser loginUser = tokenService.getLoginUser();
        Long userId = loginUser.getUserId();
        CompanyDetailVo companyDetailVo = tbCompanyService.companyDetail(companyId,userId);
        return R.ok(companyDetailVo);
    }
}