服务名称
pai-console
接口地址
/open/v1/ent/create
请求参数
参数名称 | 参数类型 | 参数说明 | 是否必填 |
---|---|---|---|
phone | string | 用户手机号(账号) | true |
code | string | 企业唯一标识 | true |
parkCode | string | 园区编码 | true |
entName | string | 企业名称 | true |
nickName | string | 用户昵称(如果非新用户,此参数设置不会生效) | true |
address | string | 企业地址 | true |
entTel | string | 企业电话 | false |
password | string | 用户密码(如果非新用户,此参数设置不会生效) | false |
string | 用户邮箱(如果非新用户,此参数设置不会生效) | false | |
entCode | string | 企业编码 | false |
entEmail | string | 企业邮箱 | false |
fax | string | 企业传真 | false |
请求实体类示例
@ApiModel("创建并激活企业请求实体类")
public class EntInfoRequest {
@ApiModelProperty(value = "企业唯一标识", required = true)
@NotBlank(message = "企业唯一标识不能为空")
@Size(max = 32)
private String code;
@ApiModelProperty(value = "企业编码")
@Size(max = 32)
private String entCode;
@ApiModelProperty(value = "园区code", required = true)
@NotBlank(message = "园区code不能为空")
@Size(max = 50)
private String parkCode;
@ApiModelProperty(value = "用户手机号(初始化时手机号即账号)", required = true)
@NotBlank(message = "用户手机号不能为空")
@Size(max = 11)
private String phone;
@ApiModelProperty(value = "用户昵称", required = true)
@NotBlank(message = "用户昵称不能为空")
@Size(max = 255)
private String nickName;
@ApiModelProperty(value = "用户邮箱")
@Size(max = 32)
private String email;
@ApiModelProperty(value = "企业邮箱")
@Size(max = 32)
private String entEmail;
@ApiModelProperty(value = "用户密码")
@Size(max = 50)
private String password;
@ApiModelProperty(value = "企业名称", required = true)
@NotBlank(message = "企业名称不能为空")
@Size(max = 32)
private String entName;
@ApiModelProperty(value = "公司电话", required = true)
@NotBlank(message = "公司电话不能为空")
@Size(max = 32)
private String entTel;
@ApiModelProperty(value = "公司地址", required = true)
@NotBlank(message = "公司地址不能为空")
@Size(max = 255)
private String address;
@ApiModelProperty("公司传真")
@Size(max = 32)
private String fax;
public String getPhone() {
return phone;
}
public void setPhone(String phone) {
this.phone = phone;
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
public String getEntName() {
return entName;
}
public void setEntName(String entName) {
this.entName = entName;
}
public String getEntTel() {
return entTel;
}
public void setEntTel(String entTel) {
this.entTel = entTel;
}
public String getFax() {
return fax;
}
public void setFax(String fax) {
this.fax = fax;
}
public String getAddress() {
return address;
}
public void setAddress(String address) {
this.address = address;
}
public String getNickName() {
return nickName;
}
public void setNickName(String nickName) {
this.nickName = nickName;
}
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
public String getParkCode() {
return parkCode;
}
public void setParkCode(String parkCode) {
this.parkCode = parkCode;
}
public String getEntCode() {
return entCode;
}
public void setEntCode(String entCode) {
this.entCode = entCode;
}
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
public String getEntEmail() {
return entEmail;
}
public void setEntEmail(String entEmail) {
this.entEmail = entEmail;
}
}
请求示例
{
"address": "南方软件园b6栋1层",
"code": "1509095548324155391",
"entCode": "",
"entName": "圆圈测试企业",
"entTel": "13543018715",
"fax": "",
"nickName": "某某",
"parkCode": "0mtyithe",
"password": "123456",
"phone": "13543018715"
}
响应参数
参数名称 | 参数类型 | 参数说明 |
---|---|---|
adminName | string | 管理员 |
adminPhone | string | 管理员电话 |
deptNum | integer | 部门数 |
entAddress | string | 地址 |
entCode | string | 企业编码 |
entDomain | string | 域名 |
entEmail | string | 邮箱地址 |
entFax | string | 传真 |
entId | string | 企业信息id |
entLogo | string | 企业logo |
entName | string | 企业名称 |
entParkId | string | 入驻园区 |
entParkName | string | 园区名称 |
entPerson | string | 联系人 |
entPersonPhone | string | 联系电话 |
entScale | string | 规模 |
entStatus | string | 状态(0 未激活 1 激活 2 停用) |
entTel | string | 企业联系电话 |
entTrade | string | 行业 |
entType | string | 企业类型(1 运营企业 2 入驻企业) |
entUsId | string | 企业管理员用户Id |
groupId | string | 集团id |
groupPresetId | string | 集团预设id |
personNum | integer | 人员总数 |
remark | string | 备注 |
响应实体类示例
public class EntInfoResponse implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 企业信息id
*/
@ApiModelProperty("企业信息id")
private String entId;
/**
* 企业名称
*/
@ApiModelProperty("企业名称")
private String entName;
/**
* 企业编码
*/
@ApiModelProperty("企业编码")
private String entCode;
/**
* 域名
*/
@ApiModelProperty("域名")
private String entDomain;
/**
* 行业
*/
@ApiModelProperty("行业")
private String entTrade;
/**
* 规模
*/
@ApiModelProperty("规模")
private String entScale;
/**
* 联系电话
*/
@ApiModelProperty("联系电话")
private String entPersonPhone;
/**
* 联系人
*/
@ApiModelProperty("联系人")
private String entPerson;
/**
* 邮箱地址
*/
@ApiModelProperty("邮箱地址")
private String entEmail;
/**
* 企业联系电话
*/
@ApiModelProperty("企业联系电话")
private String entTel;
/**
* 传真
*/
@ApiModelProperty("传真")
private String entFax;
/**
* 地址
*/
@ApiModelProperty("地址")
private String entAddress;
/**
* 状态(0 未激活 1 激活)
*/
@ApiModelProperty(value = "状态(0 未激活 1 激活 2 停用)",example = "0")
private String entStatus;
@ApiModelProperty("企业管理员用户Id")
private String entUsId;
/**
* 备注
*/
@ApiModelProperty("备注")
private String remark;
/**
* 企业logo
*/
@ApiModelProperty("企业logo")
private String entLogo;
/**
* 企业类型(1 运营企业 2 入驻企业)
*/
@ApiModelProperty(value = "企业类型(1 运营企业 2 入驻企业)")
private String entType;
/**
* 入驻园区
*/
@ApiModelProperty("入驻园区")
private String entParkId;
@ApiModelProperty("管理员")
private String adminName;
@ApiModelProperty("管理员电话")
private String adminPhone;
@ApiModelProperty("部门数")
private int deptNum;
@ApiModelProperty("人员总数")
private int personNum;
@ApiModelProperty("园区名称")
private String entParkName;
@ApiModelProperty("集团预设id")
private String groupPresetId;
@ApiModelProperty("集团id")
private String groupId;
public void setEntId(String entId) {
this.entId = entId;
}
public String getEntId() {
return entId;
}
public void setEntName(String entName) {
this.entName = entName;
}
public String getEntName() {
return entName;
}
public void setEntCode(String entCode) {
this.entCode = entCode;
}
public String getEntCode() {
return entCode;
}
public void setEntDomain(String entDomain) {
this.entDomain = entDomain;
}
public String getEntDomain() {
return entDomain;
}
public void setEntTrade(String entTrade) {
this.entTrade = entTrade;
}
public String getEntTrade() {
return entTrade;
}
public void setEntScale(String entScale) {
this.entScale = entScale;
}
public String getEntScale() {
return entScale;
}
public void setEntPersonPhone(String entPersonPhone) {
this.entPersonPhone = entPersonPhone;
}
public String getEntPersonPhone() {
return entPersonPhone;
}
public void setEntPerson(String entPerson) {
this.entPerson = entPerson;
}
public String getEntPerson() {
return entPerson;
}
public void setEntEmail(String entEmail) {
this.entEmail = entEmail;
}
public String getEntEmail() {
return entEmail;
}
public void setEntTel(String entTel) {
this.entTel = entTel;
}
public String getEntTel() {
return entTel;
}
public void setEntFax(String entFax) {
this.entFax = entFax;
}
public String getEntFax() {
return entFax;
}
public void setEntAddress(String entAddress) {
this.entAddress = entAddress;
}
public String getEntAddress() {
return entAddress;
}
public void setEntStatus(String entStatus) {
this.entStatus = entStatus;
}
public String getEntStatus() {
return entStatus;
}
public String getEntUsId() {
return entUsId;
}
public void setEntUsId(String entUsId) {
this.entUsId = entUsId;
}
public String getRemark() {
return remark;
}
public void setRemark(String remark) {
this.remark = remark;
}
public String getEntLogo() {
return entLogo;
}
public void setEntLogo(String entLogo) {
this.entLogo = entLogo;
}
public String getEntType() {
return entType;
}
public void setEntType(String entType) {
this.entType = entType;
}
public String getEntParkId() {
return entParkId;
}
public void setEntParkId(String entParkId) {
this.entParkId = entParkId;
}
public String getAdminName() {
return adminName;
}
public void setAdminName(String adminName) {
this.adminName = adminName;
}
public String getAdminPhone() {
return adminPhone;
}
public void setAdminPhone(String adminPhone) {
this.adminPhone = adminPhone;
}
public int getDeptNum() {
return deptNum;
}
public void setDeptNum(int deptNum) {
this.deptNum = deptNum;
}
public int getPersonNum() {
return personNum;
}
public void setPersonNum(int personNum) {
this.personNum = personNum;
}
public String getEntParkName() {
return entParkName;
}
public void setEntParkName(String entParkName) {
this.entParkName = entParkName;
}
public String getGroupPresetId() {
return groupPresetId;
}
public void setGroupPresetId(String groupPresetId) {
this.groupPresetId = groupPresetId;
}
public String getGroupId() {
return groupId;
}
public void setGroupId(String groupId) {
this.groupId = groupId;
}
}
响应示例
{
"code": "200",
"data": {
"entId": "1509095548324155391",
"entName": "圆圈测试企业2",
"entCode": "1509104018754396160",
"entDomain": null,
"entTrade": null,
"entScale": null,
"entPersonPhone": "13543056789",
"entPerson": "某某",
"entEmail": null,
"entTel": "13543018715",
"entFax": "",
"entAddress": "南方软件园b6栋2层",
"entStatus": "1",
"entUsId": "1509104019475816448",
"remark": null,
"entLogo": null,
"entType": "2",
"entParkId": "1309331342667943937",
"adminName": "某某",
"adminPhone": "13543056789",
"deptNum": 0,
"personNum": 0,
"entParkName": null,
"groupPresetId": null,
"groupId": null
},
"time": 1648633411163,
"msg": "操作成功",
"annex": null,
"success": true
}
feign示例
@FeignClient(name = "pai-console", contextId = "entInfoApi", fallbackFactory = RemoteEnterpriseFallbackFactory.class)
public interface IEnterpriseService {
/**
* 创建并激活企业
*
* @param request 请求实体类
* @return map
*/
@GetMapping("/open/v1/ent/create")
Reply<Map<String, Object>> createEnt(@RequestBody EntInfoRequest request);
}
或者
@FeignClient(name = "pai-console", contextId = "entInfoApi", fallbackFactory = RemoteEnterpriseFallbackFactory.class)
public interface IEnterpriseService {
/**
* 创建并激活企业
* @param request req
* @return entInfoResponse
*/
@GetMapping("/open/v1/ent/create")
Reply<EntInfoResponse> createEnt(@RequestBody EntInfoRequest request);
}
错误代码
code | msg |
---|---|
1231 | 企业编码已存在 |
1232 | 企业已存在 |
1233 | 园区不存在 |
文档更新时间: 2022-08-23 10:27 作者:伍润源