|
@ -2,11 +2,9 @@ package com.yihu.iot.controller.company;
|
|
|
|
|
|
import com.yihu.iot.service.company.IotCompanyCertificateService;
|
|
|
import com.yihu.iot.service.company.IotCompanyService;
|
|
|
import com.yihu.iot.service.company.IotCompanyUserService;
|
|
|
import com.yihu.iot.service.useragent.UserAgent;
|
|
|
import com.yihu.jw.entity.iot.company.IotCompanyCertificateDO;
|
|
|
import com.yihu.jw.entity.iot.company.IotCompanyDO;
|
|
|
import com.yihu.jw.entity.iot.company.IotCompanyUserDO;
|
|
|
import com.yihu.jw.restmodel.web.MixEnvelop;
|
|
|
import com.yihu.jw.restmodel.web.endpoint.EnvelopRestEndpoint;
|
|
|
import com.yihu.jw.restmodel.iot.company.IotCompanyCertificateVO;
|
|
@ -14,15 +12,10 @@ import com.yihu.jw.restmodel.iot.company.IotCompanyVO;
|
|
|
import com.yihu.jw.rm.iot.IotRequestMapping;
|
|
|
import com.yihu.jw.util.date.DateUtil;
|
|
|
import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiModelProperty;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
import io.swagger.annotations.ApiParam;
|
|
|
import org.apache.commons.lang.StringUtils;
|
|
|
import org.elasticsearch.action.ValidateActions;
|
|
|
import org.elasticsearch.common.recycler.Recycler;
|
|
|
import org.json.JSONObject;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
import java.util.ArrayList;
|
|
@ -41,8 +34,7 @@ public class IotCompanyController extends EnvelopRestEndpoint {
|
|
|
@Autowired
|
|
|
private IotCompanyCertificateService iotCompanyCertificateService;
|
|
|
|
|
|
@Autowired
|
|
|
private IotCompanyUserService iotCompanyUserService;
|
|
|
|
|
|
|
|
|
@Autowired
|
|
|
private UserAgent userAgent;
|
|
@ -343,25 +335,14 @@ public class IotCompanyController extends EnvelopRestEndpoint {
|
|
|
}
|
|
|
|
|
|
|
|
|
@GetMapping(value = IotRequestMapping.Company.saveUser)
|
|
|
@ApiOperation(value = "保存用户信息", notes = "保存用户信息")
|
|
|
public MixEnvelop<IotCompanyUserDO,IotCompanyUserDO>saveUser(){
|
|
|
try{
|
|
|
|
|
|
return iotCompanyUserService.saveUser();
|
|
|
}catch (Exception e){
|
|
|
e.printStackTrace();
|
|
|
return MixEnvelop.getError(e.getMessage());
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
@GetMapping(value = IotRequestMapping.Company.findUserCompanyStatus)
|
|
|
@ApiOperation(value = "获取用户企业状态", notes = "获取用户企业状态")
|
|
|
public MixEnvelop<IotCompanyUserDO,IotCompanyUserDO>findUserCompanyStatus(){
|
|
|
@GetMapping(value = IotRequestMapping.Company.findCompanyByAccount)
|
|
|
@ApiOperation(value = "根据账号查询企业状态", notes = "根据账号查询企业状态")
|
|
|
public MixEnvelop<IotCompanyVO,IotCompanyVO>findCompanyByAccount(){
|
|
|
try{
|
|
|
|
|
|
return iotCompanyUserService.findUserCompanyStatus();
|
|
|
return iotCompanyService.findCompanyByAccount();
|
|
|
}catch (Exception e){
|
|
|
e.printStackTrace();
|
|
|
return MixEnvelop.getError(e.getMessage());
|
|
@ -369,5 +350,4 @@ public class IotCompanyController extends EnvelopRestEndpoint {
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|