|
|
|
@ -15,6 +15,7 @@ import com.glxp.api.entity.basic.ProductInfoEntity;
|
|
|
|
|
import com.glxp.api.entity.basic.TyCompanySearchEntity;
|
|
|
|
|
import com.glxp.api.entity.sup.UserCompanyEntity;
|
|
|
|
|
import com.glxp.api.entity.sup.UserCompanyOnlineEntity;
|
|
|
|
|
import com.glxp.api.entity.sup.UserPersonEntity;
|
|
|
|
|
import com.glxp.api.exception.JsonException;
|
|
|
|
|
import com.glxp.api.http.YyHttpClient;
|
|
|
|
|
import com.glxp.api.req.auth.FilterUserComapanyRequest;
|
|
|
|
@ -25,6 +26,7 @@ import com.glxp.api.res.sup.UserCompanyOnlineResponse;
|
|
|
|
|
import com.glxp.api.res.sup.UserCompanyResponse;
|
|
|
|
|
import com.glxp.api.service.sup.UserCompanyOnlineService;
|
|
|
|
|
import com.glxp.api.service.sup.UserCompanyService;
|
|
|
|
|
import com.glxp.api.service.sup.UserPersonService;
|
|
|
|
|
import com.glxp.api.util.DateUtil;
|
|
|
|
|
import com.glxp.api.util.UnifiedCodeUtil;
|
|
|
|
|
import io.swagger.annotations.Api;
|
|
|
|
@ -116,6 +118,8 @@ public class UserComanyController extends BaseController {
|
|
|
|
|
|
|
|
|
|
@Resource
|
|
|
|
|
YyHttpClient yyHttpClient;
|
|
|
|
|
@Resource
|
|
|
|
|
private UserPersonService userPersonService;
|
|
|
|
|
|
|
|
|
|
@ApiOperation(value = "查询用户企业信息", response = UserCompanyEntity.class)
|
|
|
|
|
@GetMapping("udi/auth/user/comapny/info")
|
|
|
|
@ -129,7 +133,18 @@ public class UserComanyController extends BaseController {
|
|
|
|
|
UserCompanyResponse userCompanyResponse = new UserCompanyResponse();
|
|
|
|
|
List<UserCompanyEntity> userCompanyEntities = userCompanyService.filterCompanyName(filterUserComapanyRequest);
|
|
|
|
|
if (CollUtil.isNotEmpty(userCompanyEntities)) {
|
|
|
|
|
|
|
|
|
|
UserCompanyEntity userCompanyEntity = userCompanyEntities.get(0);
|
|
|
|
|
UserPersonEntity userPersonEntity = userPersonService.findByCompanyId(userCompanyEntity.getId());
|
|
|
|
|
if (userPersonEntity != null) {
|
|
|
|
|
userCompanyResponse.setPersonEmail(userPersonEntity.getEmail());
|
|
|
|
|
userCompanyResponse.setPersonMobile(userPersonEntity.getMobile());
|
|
|
|
|
userCompanyResponse.setPersonName(userPersonEntity.getName());
|
|
|
|
|
userCompanyResponse.setPersonQq(userPersonEntity.getQq());
|
|
|
|
|
userCompanyResponse.setPersonWeChat(userPersonEntity.getWeChat());
|
|
|
|
|
userCompanyResponse.setPersonTel(userPersonEntity.getTel());
|
|
|
|
|
userCompanyResponse.setPersonEmail(userPersonEntity.getEmail());
|
|
|
|
|
}
|
|
|
|
|
BeanUtil.copyProperties(userCompanyEntity, userCompanyResponse);
|
|
|
|
|
userCompanyResponse.setRegStatus(1);
|
|
|
|
|
return ResultVOUtils.success(userCompanyResponse);
|
|
|
|
|