feat:补充事件与接口示例代码
parent
4f764088ce
commit
5e8f85dcbe
|
|
@ -4,11 +4,7 @@ target/
|
|||
!**/src/test/**/target/
|
||||
|
||||
### IntelliJ IDEA ###
|
||||
.idea/modules.xml
|
||||
.idea/jarRepositories.xml
|
||||
.idea/compiler.xml
|
||||
.idea/libraries/
|
||||
.idea/
|
||||
.idea
|
||||
*.iws
|
||||
*.iml
|
||||
*.ipr
|
||||
|
|
@ -39,3 +35,4 @@ build/
|
|||
### Mac OS ###
|
||||
.DS_Store
|
||||
|
||||
/.idea/
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
package com.zcloud.basic.info;
|
||||
|
||||
import com.jjb.saas.base.starter.bootstart.JJBSpringbootApplication;
|
||||
import com.jjb.saas.facade.starter.annotation.EnableFacadeRpcClient;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
|
||||
/**
|
||||
|
|
@ -11,9 +12,11 @@ import org.springframework.boot.SpringApplication;
|
|||
scanBasePackages = {"com.zcloud","com.jjb"},
|
||||
mapperPackages = {"com.zcloud.basic.info.persistence.mapper"}
|
||||
)
|
||||
//@EnableFacadeRpcClient
|
||||
public class Application {
|
||||
|
||||
public static void main(String[] args) {
|
||||
|
||||
SpringApplication.run(Application.class, args);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,31 @@
|
|||
package com.zcloud.basic.info.event;
|
||||
|
||||
import com.jjb.saas.framework.event.consumer.MessageConsumer;
|
||||
import com.jjb.saas.framework.event.consumer.MsgConsumer;
|
||||
import com.jjb.saas.framework.event.dto.BaseEvent;
|
||||
import com.jjb.saas.framework.event.producer.RemoteEventPublisher;
|
||||
import com.jjb.saas.system.client.user.event.UserAddEvent;
|
||||
import com.zcloud.gbscommon.event.user.ZcUserEvent;
|
||||
import lombok.Data;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
* @author lin
|
||||
*/
|
||||
@Component
|
||||
@MsgConsumer(tag = "zcloud:user:ev")
|
||||
public class UserUpdateAuditStatusConsumer implements MessageConsumer<ZcUserEvent> {
|
||||
// private RemoteEventPublisher eventPublisher;
|
||||
|
||||
// public UserUpdateAuditStatusConsumer(RemoteEventPublisher eventPublisher) {
|
||||
// this.eventPublisher = eventPublisher;
|
||||
// }
|
||||
|
||||
@Override
|
||||
public void consume(ZcUserEvent event) {
|
||||
|
||||
System.out.println(event.getName());
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
package com.zcloud.basic.info.facade;
|
||||
|
||||
import com.alibaba.cola.dto.MultiResponse;
|
||||
import com.zcloud.gbscommon.zclouduser.facade.ZcloudUserFacade;
|
||||
import com.zcloud.gbscommon.zclouduser.response.ZcloudUserCo;
|
||||
import org.apache.dubbo.config.annotation.DubboService;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author lin
|
||||
*/
|
||||
@DubboService
|
||||
public class ZcloudUserFacadeImpl implements ZcloudUserFacade {
|
||||
@Override
|
||||
public MultiResponse<ZcloudUserCo> listByUserIdAndDeptId() {
|
||||
System.out.println("listByUserIdAndDeptId");
|
||||
ZcloudUserCo zcloudUserCo = new ZcloudUserCo();
|
||||
zcloudUserCo.setName("hello word");
|
||||
ArrayList<ZcloudUserCo> objects = new ArrayList<>();
|
||||
objects.add(zcloudUserCo);
|
||||
return MultiResponse.of(objects);
|
||||
}
|
||||
}
|
||||
|
|
@ -5,20 +5,32 @@ import com.alibaba.cola.dto.MultiResponse;
|
|||
import com.alibaba.cola.dto.PageResponse;
|
||||
import com.alibaba.cola.dto.Response;
|
||||
import com.alibaba.cola.dto.SingleResponse;
|
||||
import com.alibaba.cola.exception.BizException;
|
||||
import com.jjb.saas.framework.auth.model.SSOUser;
|
||||
import com.jjb.saas.framework.auth.utils.AuthContext;
|
||||
import com.jjb.saas.system.client.dept.request.DeptAddCmd;
|
||||
import com.jjb.saas.system.client.role.facade.RoleFacade;
|
||||
import com.jjb.saas.system.client.role.response.RoleCO;
|
||||
import com.jjb.saas.system.client.user.facade.UserFacade;
|
||||
import com.jjb.saas.system.client.user.request.FacadeUserAddCmd;
|
||||
import com.zcloud.basic.info.api.SysUserServiceI;
|
||||
import com.zcloud.basic.info.dto.SysCorpUserAddCmd;
|
||||
import com.zcloud.basic.info.dto.SysUserAddCmd;
|
||||
import com.zcloud.basic.info.dto.SysUserPageQry;
|
||||
import com.zcloud.basic.info.dto.SysUserUpdateCmd;
|
||||
import com.zcloud.basic.info.dto.clientobject.SysUserCO;
|
||||
import com.zcloud.gbscommon.utils.Smb;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.apache.dubbo.config.annotation.DubboReference;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* web-adapter
|
||||
|
|
@ -33,10 +45,95 @@ import java.util.ArrayList;
|
|||
public class SysUserController {
|
||||
private final SysUserServiceI sysUserService;
|
||||
|
||||
|
||||
@DubboReference(check = false)
|
||||
private UserFacade userFacade;
|
||||
|
||||
@DubboReference(check = false)
|
||||
private RoleFacade roleFacade;
|
||||
|
||||
@ApiOperation("新增-企业主账号")
|
||||
@PostMapping("/saveCorpAccount")
|
||||
// public SingleResponse<SysUserCO> add(@Validated @RequestBody SysUserAddCmd cmd) {
|
||||
public Response saveCorpAccount(@Validated @RequestBody SysCorpUserAddCmd cmd) {
|
||||
MultiResponse<RoleCO> roleCOMultiResponse = roleFacade.listRoles();
|
||||
// List<RoleCO> data = roleCOMultiResponse.getData();
|
||||
// FacadeUserAddCmd facadeUserAddCmd = new FacadeUserAddCmd();
|
||||
// facadeUserAddCmd.setAccount("wxsaas");
|
||||
// facadeUserAddCmd.setName("wx");
|
||||
// facadeUserAddCmd.setAppKey("722091ff53dd4abba078c2a00efd4a42");
|
||||
// facadeUserAddCmd.setPassword("wxsaas");
|
||||
// facadeUserAddCmd.setRoleTypeEnum("ORG_ADMIN");
|
||||
// todo 设置 用户id 用于登录
|
||||
// SingleResponse<Long> longSingleResponse = userFacade.addUser(facadeUserAddCmd);
|
||||
// longSingleResponse.getData();
|
||||
System.out.println(cmd);
|
||||
List<RoleCO> data = roleCOMultiResponse.getData();
|
||||
FacadeUserAddCmd facadeUserAddCmd = new FacadeUserAddCmd();
|
||||
facadeUserAddCmd.setAccount(cmd.getUsername());
|
||||
facadeUserAddCmd.setName(cmd.getUsername());
|
||||
facadeUserAddCmd.setAppKey("e6ab3c9abda747b39d7cc12b6dc0f5a0");
|
||||
facadeUserAddCmd.setPassword("Aa12345678");
|
||||
try {
|
||||
Map<String, String> collect = data.stream().collect(Collectors.toMap(RoleCO::getRoleName, RoleCO::getRoleTypeEnum));
|
||||
facadeUserAddCmd.setRoleTypeEnum("2".equals(cmd.getUserType()) ? collect.get("分公司主账号") : collect.get("相关方主账号"));
|
||||
// todo 新增用户 GBS不适配功能
|
||||
} catch (Exception e) {
|
||||
// 有重复的角色名称 抛异常 联系管理员
|
||||
throw new BizException("监测到角色名称重复,请联系管理员。");
|
||||
}
|
||||
sysUserService.addCorpAccount(cmd);
|
||||
return Response.buildSuccess();
|
||||
}
|
||||
|
||||
@ApiOperation("重置-企业主账号密码")
|
||||
@PutMapping("/resetCorpAccountPassword/{corpinfoId}")
|
||||
// public SingleResponse<SysUserCO> add(@Validated @RequestBody SysUserAddCmd cmd) {
|
||||
public Response resetCorpAccountPassword(@PathVariable("corpinfoId") Long corpinfoId) {
|
||||
// todo GBS不适配功能
|
||||
|
||||
// FacadeUserAddCmd facadeUserAddCmd = new FacadeUserAddCmd();
|
||||
// facadeUserAddCmd.setAccount(cmd.getUsername());
|
||||
// facadeUserAddCmd.setName(cmd.getUsername());
|
||||
// facadeUserAddCmd.setAppKey("e6ab3c9abda747b39d7cc12b6dc0f5a0");
|
||||
// facadeUserAddCmd.setPassword("Aa12345678");
|
||||
|
||||
return Response.buildSuccess();
|
||||
}
|
||||
|
||||
@ApiOperation("删除-企业主账号")
|
||||
@PutMapping("/removeCorpAccount/{corpinfoId}")
|
||||
public Response removeCorpAccount(@PathVariable("corpinfoId") Long corpinfoId) {
|
||||
// todo GBS不适配功能
|
||||
return Response.buildSuccess();
|
||||
}
|
||||
|
||||
@ApiOperation("修改停用启用状态-企业主账号")
|
||||
@PutMapping("/enabledCorpAccount/{corpinfoId}")
|
||||
public Response enabledCorpAccount(@PathVariable("corpinfoId") Long corpinfoId) {
|
||||
// todo GBS不适配功能
|
||||
return Response.buildSuccess();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ApiOperation("新增")
|
||||
@PostMapping("/save")
|
||||
public SingleResponse<SysUserCO> add(@Validated @RequestBody SysUserAddCmd cmd) {
|
||||
// public SingleResponse<SysUserCO> add(@Validated @RequestBody SysUserAddCmd cmd) {
|
||||
public SingleResponse<SysUserCO> add(@RequestBody SysUserAddCmd cmd) {
|
||||
SSOUser ssoUser = AuthContext.getCurrentUser();
|
||||
MultiResponse<RoleCO> roleCOMultiResponse = roleFacade.listRoles();
|
||||
List<RoleCO> data = roleCOMultiResponse.getData();
|
||||
FacadeUserAddCmd facadeUserAddCmd = new FacadeUserAddCmd();
|
||||
facadeUserAddCmd.setAccount("wxsaas");
|
||||
facadeUserAddCmd.setName("wx");
|
||||
facadeUserAddCmd.setAppKey("e6ab3c9abda747b39d7cc12b6dc0f5a0");
|
||||
facadeUserAddCmd.setPassword("Aa12345678");
|
||||
facadeUserAddCmd.setRoleTypeEnum("FGS_DEPART_ADMIN");
|
||||
// todo 设置 用户id 用于登录
|
||||
SingleResponse<Long> longSingleResponse = userFacade.addUser(facadeUserAddCmd);
|
||||
cmd.setUid(longSingleResponse.getData());
|
||||
|
||||
return sysUserService.add(cmd);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,11 @@ package com.zcloud.basic.info.command;
|
|||
import com.alibaba.cola.exception.BizException;
|
||||
import com.zcloud.basic.info.domain.gateway.SysUserGateway;
|
||||
import com.zcloud.basic.info.domain.model.SysUserE;
|
||||
import com.zcloud.basic.info.dto.SysCorpUserAddCmd;
|
||||
import com.zcloud.basic.info.dto.SysUserAddCmd;
|
||||
import com.zcloud.basic.info.persistence.dataobject.SysUserDO;
|
||||
import com.zcloud.basic.info.persistence.repository.SysUserRepository;
|
||||
import com.zcloud.gbscommon.utils.UuidUtil;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
|
@ -20,11 +24,13 @@ import org.springframework.transaction.annotation.Transactional;
|
|||
@AllArgsConstructor
|
||||
public class SysUserAddExe {
|
||||
private final SysUserGateway sysUserGateway;
|
||||
private final SysUserRepository sysUserRepository;
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean execute(SysUserAddCmd cmd) {
|
||||
SysUserE examTypeE = new SysUserE();
|
||||
BeanUtils.copyProperties(cmd, examTypeE);
|
||||
examTypeE.setId(cmd.getUid());
|
||||
boolean res = false;
|
||||
try {
|
||||
res = sysUserGateway.add(examTypeE);
|
||||
|
|
@ -36,5 +42,18 @@ public class SysUserAddExe {
|
|||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void addCorpAccount(SysCorpUserAddCmd cmd) {
|
||||
SysUserDO sysUserDO = new SysUserDO();
|
||||
sysUserDO.setUserId(UuidUtil.get32UUID());
|
||||
sysUserDO.setName(cmd.getName());
|
||||
sysUserDO.setUsername(cmd.getName());
|
||||
sysUserDO.setUserType(cmd.getUserType());
|
||||
sysUserDO.setCorpinfoId(cmd.getCorpinfoId());
|
||||
sysUserDO.setDepartmentId(cmd.getDepartmentId());
|
||||
sysUserDO.setMainCorp(1);
|
||||
sysUserRepository.save(sysUserDO);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -45,10 +45,11 @@ public class CorpInfoServiceImpl implements CorpInfoServiceI {
|
|||
|
||||
//新增企业成功后新增企业主账号用户(企业主账号的gbsId与企业的gbsId一致) 2025-10-31 huangyuxuan
|
||||
SysUserAddCmd user = new SysUserAddCmd();
|
||||
user.setId(userId).setUserId(Tools.get32UUID()).setUsername(cmd.getCorpName()).setName(cmd.getCorpName())
|
||||
.setPassword(new SimpleHash("SHA-1",user.getUsername(),"Aa@123456789").toHex())
|
||||
.setCorpinfoId(id).setUserType(UserTypeEnum.getUserType(cmd.getType())).setStatus("0")
|
||||
.setDepartmentId(id);
|
||||
// to do 完善
|
||||
// user.setId(userId).setUserId(Tools.get32UUID()).setUsername(cmd.getCorpName()).setName(cmd.getCorpName())
|
||||
// .setPassword(new SimpleHash("SHA-1",user.getUsername(),"Aa@123456789").toHex())
|
||||
// .setCorpinfoId(id).setUserType(UserTypeEnum.getUserType(cmd.getType())).setStatus("0")
|
||||
// .setDepartmentId(id);
|
||||
sysUserAddExe.execute(user);
|
||||
return SingleResponse.buildSuccess();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -46,10 +46,11 @@ public class CorpInfoXgfServiceImpl implements CorpInfoXgfServiceI {
|
|||
Long id = corpInfoXgfAddExe.execute(cmd);
|
||||
//新增企业成功后新增企业主账号用户(企业主账号的gbsId与企业的gbsId一致) 2025-10-31 huangyuxuan
|
||||
SysUserAddCmd user = new SysUserAddCmd();
|
||||
user.setId(userId).setUserId(Tools.get32UUID()).setUsername(cmd.getCorpName()).setName(cmd.getCorpName())
|
||||
.setPassword(new SimpleHash("SHA-1",user.getUsername(),"Aa@123456789").toHex())
|
||||
.setCorpinfoId(id).setUserType(UserTypeEnum.getUserType(cmd.getType())).setStatus("0")
|
||||
.setDepartmentId(id);
|
||||
// todo 再完善
|
||||
// user.setId(userId).setUserId(Tools.get32UUID()).setUsername(cmd.getCorpName()).setName(cmd.getCorpName())
|
||||
// .setPassword(new SimpleHash("SHA-1",user.getUsername(),"Aa@123456789").toHex())
|
||||
// .setCorpinfoId(id).setUserType(UserTypeEnum.getUserType(cmd.getType())).setStatus("0")
|
||||
// .setDepartmentId(id);
|
||||
sysUserAddExe.execute(user);
|
||||
return SingleResponse.buildSuccess();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ import com.zcloud.basic.info.command.SysUserAddExe;
|
|||
import com.zcloud.basic.info.command.SysUserRemoveExe;
|
||||
import com.zcloud.basic.info.command.SysUserUpdateExe;
|
||||
import com.zcloud.basic.info.command.query.SysUserQueryExe;
|
||||
import com.zcloud.basic.info.dto.SysCorpUserAddCmd;
|
||||
import com.zcloud.basic.info.dto.SysUserAddCmd;
|
||||
import com.zcloud.basic.info.dto.SysUserPageQry;
|
||||
import com.zcloud.basic.info.dto.SysUserUpdateCmd;
|
||||
|
|
@ -55,5 +56,10 @@ public class SysUserServiceImpl implements SysUserServiceI {
|
|||
public void removeBatch(Long[] ids) {
|
||||
sysUserRemoveExe.execute(ids);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addCorpAccount(SysCorpUserAddCmd cmd) {
|
||||
sysUserAddExe.addCorpAccount(cmd);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ package com.zcloud.basic.info.api;
|
|||
|
||||
import com.alibaba.cola.dto.PageResponse;
|
||||
import com.alibaba.cola.dto.SingleResponse;
|
||||
import com.zcloud.basic.info.dto.SysCorpUserAddCmd;
|
||||
import com.zcloud.basic.info.dto.SysUserAddCmd;
|
||||
import com.zcloud.basic.info.dto.SysUserPageQry;
|
||||
import com.zcloud.basic.info.dto.SysUserUpdateCmd;
|
||||
|
|
@ -23,5 +24,7 @@ public interface SysUserServiceI {
|
|||
void remove(Long id);
|
||||
|
||||
void removeBatch(Long[] ids);
|
||||
|
||||
void addCorpAccount(SysCorpUserAddCmd cmd);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,43 @@
|
|||
package com.zcloud.basic.info.dto;
|
||||
|
||||
import com.alibaba.cola.dto.Command;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
* 企业主账号新增数据
|
||||
*
|
||||
* @Author 王轩
|
||||
* @Date 2025-10-28 16:42:36
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class SysCorpUserAddCmd extends Command {
|
||||
@ApiModelProperty(value = "用户名", name = "username", required = true)
|
||||
@NotEmpty(message = "用户名不能为空")
|
||||
private String username;
|
||||
@ApiModelProperty(value = "密码", name = "password", required = true)
|
||||
@NotEmpty(message = "密码不能为空")
|
||||
private String password;
|
||||
@ApiModelProperty(value = "姓名", name = "name", required = true)
|
||||
@NotEmpty(message = "姓名不能为空")
|
||||
private String name;
|
||||
@ApiModelProperty(value = "企业", name = "corpinfoId", required = true)
|
||||
@NotNull(message = "企业id不能为空")
|
||||
private Long corpinfoId;
|
||||
@ApiModelProperty(value = "部门id", name = "departmentId", required = true)
|
||||
@NotNull(message = "部门id不能为空")
|
||||
private Long departmentId;
|
||||
@ApiModelProperty(value = "1监管2企业3相关方", name = "userType", required = true)
|
||||
@NotEmpty(message = "1监管2企业3相关方不能为空")
|
||||
private String userType;
|
||||
}
|
||||
|
||||
|
|
@ -6,10 +6,8 @@ import lombok.AllArgsConstructor;
|
|||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
|
|
@ -22,14 +20,7 @@ import java.time.LocalDateTime;
|
|||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@Accessors(chain = true)
|
||||
public class SysUserAddCmd extends Command {
|
||||
@ApiModelProperty(value = "GBS用户id", name = "id", required = true)
|
||||
@NotNull(message = "GBS用户id不能为空")
|
||||
private Long id;
|
||||
@ApiModelProperty(value = "用户id", name = "userId", required = true)
|
||||
@NotEmpty(message = "用户id不能为空")
|
||||
private String userId;
|
||||
@ApiModelProperty(value = "用户名", name = "username", required = true)
|
||||
@NotEmpty(message = "用户名不能为空")
|
||||
private String username;
|
||||
|
|
@ -40,17 +31,17 @@ public class SysUserAddCmd extends Command {
|
|||
@NotEmpty(message = "姓名不能为空")
|
||||
private String name;
|
||||
@ApiModelProperty(value = "企业", name = "corpinfoId", required = true)
|
||||
@NotNull(message = "企业不能为空")
|
||||
private Long corpinfoId;
|
||||
@NotEmpty(message = "企业不能为空")
|
||||
private String corpinfoId;
|
||||
@ApiModelProperty(value = "部门id", name = "departmentId", required = true)
|
||||
@NotNull(message = "部门id不能为空")
|
||||
private Long departmentId;
|
||||
@NotEmpty(message = "部门id不能为空")
|
||||
private String departmentId;
|
||||
@ApiModelProperty(value = "角色id", name = "roleIds", required = true)
|
||||
@NotEmpty(message = "角色id不能为空")
|
||||
private String roleIds;
|
||||
@ApiModelProperty(value = "1监管2企业3相关方", name = "userType", required = true)
|
||||
@NotEmpty(message = "1监管2企业3相关方不能为空")
|
||||
private Integer userType;
|
||||
private String userType;
|
||||
@ApiModelProperty(value = "状态0.正常 99.锁定 2密码错误次数超过当天限制", name = "status", required = true)
|
||||
@NotEmpty(message = "状态0.正常 99.锁定 2密码错误次数超过当天限制不能为空")
|
||||
private String status;
|
||||
|
|
@ -138,41 +129,6 @@ public class SysUserAddCmd extends Command {
|
|||
@ApiModelProperty(value = "所属乡镇", name = "village", required = true)
|
||||
@NotEmpty(message = "所属乡镇不能为空")
|
||||
private String village;
|
||||
@ApiModelProperty(value = "乐观锁", name = "version", required = true)
|
||||
@NotEmpty(message = "乐观锁不能为空")
|
||||
private Integer version;
|
||||
@ApiModelProperty(value = "创建人", name = "createId", required = true)
|
||||
@NotEmpty(message = "创建人不能为空")
|
||||
private Integer createId;
|
||||
@ApiModelProperty(value = "创建人姓名", name = "createName", required = true)
|
||||
@NotEmpty(message = "创建人姓名不能为空")
|
||||
private String createName;
|
||||
@ApiModelProperty(value = "创建时间", name = "createTime", required = true)
|
||||
@NotEmpty(message = "创建时间不能为空")
|
||||
private LocalDateTime createTime;
|
||||
@ApiModelProperty(value = "更新人", name = "updateId", required = true)
|
||||
@NotEmpty(message = "更新人不能为空")
|
||||
private Integer updateId;
|
||||
@ApiModelProperty(value = "修改人名称", name = "updateName", required = true)
|
||||
@NotEmpty(message = "修改人名称不能为空")
|
||||
private String updateName;
|
||||
@ApiModelProperty(value = "更新时间", name = "updateTime", required = true)
|
||||
@NotEmpty(message = "更新时间不能为空")
|
||||
private LocalDateTime updateTime;
|
||||
@ApiModelProperty(value = "描述", name = "remarks", required = true)
|
||||
@NotEmpty(message = "描述不能为空")
|
||||
private String remarks;
|
||||
@ApiModelProperty(value = "是否删除", name = "deleteEnum", required = true)
|
||||
@NotEmpty(message = "是否删除不能为空")
|
||||
private String deleteEnum;
|
||||
@ApiModelProperty(value = "租户ID", name = "tenantId", required = true)
|
||||
@NotEmpty(message = "租户ID不能为空")
|
||||
private Integer tenantId;
|
||||
@ApiModelProperty(value = "机构ID", name = "orgId", required = true)
|
||||
@NotEmpty(message = "机构ID不能为空")
|
||||
private Integer orgId;
|
||||
@ApiModelProperty(value = "环境", name = "env", required = true)
|
||||
@NotEmpty(message = "环境不能为空")
|
||||
private String env;
|
||||
private Long uid;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -17,10 +17,7 @@ import java.util.Date;
|
|||
public class SysUserCO extends ClientObject {
|
||||
//GBS用户id
|
||||
@ApiModelProperty(value = "GBS用户id")
|
||||
private Long id;
|
||||
//用户id
|
||||
@ApiModelProperty(value = "用户id")
|
||||
private String userId;
|
||||
private Integer id;
|
||||
//用户名
|
||||
@ApiModelProperty(value = "用户名")
|
||||
private String username;
|
||||
|
|
@ -32,16 +29,16 @@ public class SysUserCO extends ClientObject {
|
|||
private String name;
|
||||
//企业
|
||||
@ApiModelProperty(value = "企业")
|
||||
private Long corpinfoId;
|
||||
private String corpinfoId;
|
||||
//部门id
|
||||
@ApiModelProperty(value = "部门id")
|
||||
private Long departmentId;
|
||||
private String departmentId;
|
||||
//角色id
|
||||
@ApiModelProperty(value = "角色id")
|
||||
private String roleIds;
|
||||
//1监管2企业3相关方
|
||||
@ApiModelProperty(value = "1监管2企业3相关方")
|
||||
private Integer userType;
|
||||
private String userType;
|
||||
//状态0.正常 99.锁定 2密码错误次数超过当天限制
|
||||
@ApiModelProperty(value = "状态0.正常 99.锁定 2密码错误次数超过当天限制")
|
||||
private String status;
|
||||
|
|
|
|||
|
|
@ -16,15 +16,11 @@ import java.time.LocalDateTime;
|
|||
* @Date 2025-10-28 16:42:36
|
||||
*/
|
||||
@Data
|
||||
@TableName("sys_user")
|
||||
@TableName("user")
|
||||
//@EqualsAndHashCode(callSuper = true)
|
||||
public class SysUserDO extends BaseDO {
|
||||
//GBS用户id
|
||||
@ApiModelProperty(value = "GBS用户id")
|
||||
private Long id;
|
||||
//用户id
|
||||
@ApiModelProperty(value = "用户id")
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
private String userId;
|
||||
//用户名
|
||||
@ApiModelProperty(value = "用户名")
|
||||
|
|
@ -46,10 +42,12 @@ public class SysUserDO extends BaseDO {
|
|||
private String roleIds;
|
||||
//1监管2企业3相关方
|
||||
@ApiModelProperty(value = "1监管2企业3相关方")
|
||||
private Integer userType;
|
||||
private String userType;
|
||||
//状态0.正常 99.锁定 2密码错误次数超过当天限制
|
||||
@ApiModelProperty(value = "状态0.正常 99.锁定 2密码错误次数超过当天限制")
|
||||
private String status;
|
||||
private int status;
|
||||
@ApiModelProperty(value = "1主账号0个人账户")
|
||||
private int mainCorp;
|
||||
//邮箱
|
||||
@ApiModelProperty(value = "邮箱")
|
||||
private String email;
|
||||
|
|
@ -134,43 +132,7 @@ public class SysUserDO extends BaseDO {
|
|||
//所属乡镇
|
||||
@ApiModelProperty(value = "所属乡镇")
|
||||
private String village;
|
||||
//乐观锁
|
||||
@ApiModelProperty(value = "乐观锁")
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
private Integer version;
|
||||
//创建人
|
||||
@ApiModelProperty(value = "创建人")
|
||||
private Long createId;
|
||||
//创建人姓名
|
||||
@ApiModelProperty(value = "创建人姓名")
|
||||
private String createName;
|
||||
//创建时间
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
private LocalDateTime createTime;
|
||||
//更新人
|
||||
@ApiModelProperty(value = "更新人")
|
||||
private Long updateId;
|
||||
//修改人名称
|
||||
@ApiModelProperty(value = "修改人名称")
|
||||
private String updateName;
|
||||
//更新时间
|
||||
@ApiModelProperty(value = "更新时间")
|
||||
private LocalDateTime updateTime;
|
||||
//描述
|
||||
@ApiModelProperty(value = "描述")
|
||||
private String remarks;
|
||||
//是否删除
|
||||
@ApiModelProperty(value = "是否删除")
|
||||
private String deleteEnum;
|
||||
//租户ID
|
||||
@ApiModelProperty(value = "租户ID")
|
||||
private Long tenantId;
|
||||
//机构ID
|
||||
@ApiModelProperty(value = "机构ID")
|
||||
private Long orgId;
|
||||
//环境
|
||||
@ApiModelProperty(value = "环境")
|
||||
private String env;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue