系统管理,供应商用户新增接口封装
This commit is contained in:
@ -18,6 +18,8 @@ import org.springframework.beans.factory.annotation.Value;
|
||||
import feign.RequestInterceptor;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
import javax.validation.Valid;
|
||||
|
||||
@FeignClient(
|
||||
name = ServiceNameConstants.SYSTEM_SERVICE,
|
||||
fallback = SystemClientFallback.class,
|
||||
@ -42,6 +44,11 @@ public interface SystemClient {
|
||||
@ApiParam(value = "查询对象数据", required = false) @SpringQueryMap SysUser param
|
||||
);
|
||||
|
||||
// -----------------------供应商用户接口-----------------------
|
||||
@ApiOperation("供应商注册(自动生成账号并设置统一重置密码)")
|
||||
@PostMapping("/v1/supplieruser/register")
|
||||
BaseResponse<SysSupplierUser> register(@ApiParam(value = "注册信息", required = true) @RequestBody @Valid SupplierRegistrationVO registrationVO);
|
||||
|
||||
// -----------------------组织接口-----------------------
|
||||
@ApiOperation("查询组织信息(当前组织及下级组织列表)")
|
||||
@GetMapping("/v1/sysorg/queryOrgWithChildren")
|
||||
|
@ -0,0 +1,49 @@
|
||||
package com.chinaunicom.mall.ebtp.common.base.entity;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.Email;
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.Pattern;
|
||||
|
||||
@Data
|
||||
@ApiModel("供应商注册信息")
|
||||
public class SupplierRegistrationVO {
|
||||
|
||||
@ApiModelProperty(value = "供应商名称", required = true)
|
||||
@NotBlank(message = "供应商名称不能为空")
|
||||
private String supplierName;
|
||||
|
||||
@ApiModelProperty(value = "统一信用代码", required = true)
|
||||
@NotBlank(message = "统一信用代码不能为空")
|
||||
@Pattern(regexp = "^[0-9A-HJ-NPQRTUWXY]{2}\\d{6}[0-9A-HJ-NPQRTUWXY]{10}$", message = "统一信用代码格式不正确")
|
||||
private String creditCode;
|
||||
|
||||
@ApiModelProperty(value = "手机号", required = true)
|
||||
@NotBlank(message = "手机号不能为空")
|
||||
@Pattern(regexp = "^1[3-9]\\d{9}$", message = "手机号格式不正确")
|
||||
private String mobile;
|
||||
|
||||
@ApiModelProperty(value = "邮箱", required = true)
|
||||
@NotBlank(message = "邮箱不能为空")
|
||||
@Email(message = "邮箱格式不正确")
|
||||
private String email;
|
||||
|
||||
@ApiModelProperty(value = "联系人")
|
||||
private String contactName;
|
||||
|
||||
@ApiModelProperty(value = "联系人职务")
|
||||
private String contactTitle;
|
||||
|
||||
@ApiModelProperty(value = "企业地址")
|
||||
private String address;
|
||||
|
||||
@ApiModelProperty(value = "企业简介")
|
||||
private String description;
|
||||
|
||||
@ApiModelProperty(value = "供应商ID", required = true)
|
||||
@NotBlank(message = "供应商ID不能为空")
|
||||
private String supplierId;
|
||||
}
|
@ -0,0 +1,66 @@
|
||||
package com.chinaunicom.mall.ebtp.common.base.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 实体类 SysSupplierUser-供应商用户表
|
||||
*
|
||||
* @author yss
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
@TableName(value = "sys_supplier_user", autoResultMap = true)
|
||||
@ApiModel(value = "SysSupplierUser对象", description = "供应商用户表")
|
||||
public class SysSupplierUser extends BaseEntity implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId
|
||||
@ApiModelProperty(value = "用户id")
|
||||
private Long userId;
|
||||
|
||||
@ApiModelProperty(value = "用户名")
|
||||
private String username;
|
||||
|
||||
@ApiModelProperty(value = "密码")
|
||||
private String password;
|
||||
|
||||
@ApiModelProperty(value = "中文姓名")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty(value = "状态")
|
||||
private Integer status;
|
||||
|
||||
@ApiModelProperty(value = "手机号码(用于接收短信提醒)等")
|
||||
private String mobile;
|
||||
|
||||
@ApiModelProperty(value = "统一邮件")
|
||||
private String email;
|
||||
|
||||
@ApiModelProperty(value = "性别")
|
||||
private String sex;
|
||||
|
||||
@ApiModelProperty(value = "供应商id")
|
||||
private String supplierId;
|
||||
|
||||
@ApiModelProperty(value = "是否首次登录 0:否 1:是")
|
||||
private Integer firstLogin;
|
||||
|
||||
@ApiModelProperty(value = "最后登录时间")
|
||||
private LocalDateTime lastLoginTime;
|
||||
|
||||
@ApiModelProperty(value = "统一信用代码")
|
||||
private String creditCode;
|
||||
|
||||
@ApiModelProperty(value = "供应商名称")
|
||||
private String supplierName;
|
||||
|
||||
}
|
Reference in New Issue
Block a user