You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
40 lines
1.4 KiB
Java
40 lines
1.4 KiB
Java
2 years ago
|
package com.glxp.api.controller.sup;
|
||
2 years ago
|
|
||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||
|
import com.glxp.api.annotation.AuthRuleAnnotation;
|
||
|
import com.glxp.api.common.res.BaseResponse;
|
||
|
import com.glxp.api.common.util.ResultVOUtils;
|
||
|
import com.glxp.api.controller.BaseController;
|
||
2 years ago
|
import com.glxp.api.entity.sup.UserCompanyEntity;
|
||
2 years ago
|
import com.glxp.api.req.auth.FilterUserComapanyRequest;
|
||
2 years ago
|
import com.glxp.api.service.sup.UserCompanyService;
|
||
2 years ago
|
import lombok.extern.slf4j.Slf4j;
|
||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||
|
import org.springframework.web.bind.annotation.RestController;
|
||
|
|
||
|
import javax.annotation.Resource;
|
||
|
import java.util.List;
|
||
|
|
||
2 years ago
|
/**
|
||
|
* 客户端企业信息
|
||
|
*/
|
||
2 years ago
|
@RestController
|
||
|
@Slf4j
|
||
|
public class UserComanyController extends BaseController {
|
||
|
|
||
|
@Resource
|
||
|
UserCompanyService userCompanyService;
|
||
|
|
||
|
|
||
|
// 关键字搜索
|
||
|
@AuthRuleAnnotation("")
|
||
|
@GetMapping("udi/auth/user/comapny/search")
|
||
|
public BaseResponse search(FilterUserComapanyRequest filterUserComapanyRequest) {
|
||
|
//获取部门id
|
||
|
List<UserCompanyEntity> userCompanyEntities = userCompanyService.list(new QueryWrapper<UserCompanyEntity>().like("companyName", filterUserComapanyRequest.getSearchKey())
|
||
|
.or().like("creditNum", filterUserComapanyRequest.getSearchKey()));
|
||
|
return ResultVOUtils.success(userCompanyEntities);
|
||
|
}
|
||
|
|
||
|
}
|