liujie
7 天以前 e55fe61ee5c645f885e11d09255c63e5f0c17153
DriverQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/api/DriverController.java
@@ -8,6 +8,7 @@
import com.alibaba.fastjson.JSONObject;
import com.alipay.api.internal.util.file.IOUtils;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.baomidou.mybatisplus.plugins.Page;
import com.stylefeng.guns.config.properties.GunsProperties;
import com.stylefeng.guns.core.util.DateUtil;
@@ -1619,9 +1620,10 @@
    @ApiOperation(value = "通过区code获取服务商", tags = {"司机端-注册"}, notes = "")
    @ApiImplicitParams({
            @ApiImplicitParam(value = "区code", name = "areaCode", required = true, dataType = "String"),
            @ApiImplicitParam(value = "name", name = "name", required = false, dataType = "String"),
    })
    public ResultUtil<List<CompanyVo>> getCompany(String areaCode){
    public ResultUtil<List<CompanyVo>> getCompany(String areaCode,String name){
        try {
            ArrayList<CompanyVo> companyVos = new ArrayList<>();
@@ -1629,7 +1631,12 @@
            if(companyCities.isEmpty()){
                return ResultUtil.success(companyVos);
            }
            List<Company> companies = companyService.selectList(new EntityWrapper<Company>().ne("type", 1).ne("flag", 3).in("id", companyCities.stream().map(CompanyCity::getCompanyId).collect(Collectors.toList())));
            Wrapper<Company> in = new EntityWrapper<Company>().ne("type", 1).ne("flag", 3).in("id", companyCities.stream().map(CompanyCity::getCompanyId).collect(Collectors.toList()));
            if(ToolUtil.isNotEmpty( name)){
                in.like("name", name);
            }
            List<Company> companies = companyService.selectList(in);
            for (Company company : companies) {
                CompanyVo companyVo = new CompanyVo(company.getId(), company.getName());
                companyVos.add(companyVo);