增加账户
This commit is contained in:
parent
1a49cce3da
commit
5b809a4613
|
|
@ -0,0 +1,184 @@
|
|||
package com.bonus.system.client.feign.Dto;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@ApiModel("人员资料表")
|
||||
@Data
|
||||
public class CustInfo {
|
||||
private static final long serialVersionUID = 1L;
|
||||
// @TableId
|
||||
// @ApiModelProperty("主键自增")
|
||||
// private Long id;
|
||||
@ApiModelProperty("人员id")
|
||||
Long custId;
|
||||
@ApiModelProperty("人员编号")
|
||||
String custNum;
|
||||
@ApiModelProperty("人员姓名")
|
||||
String custName;
|
||||
// @ApiModelProperty("人员姓名")
|
||||
// @TableField(
|
||||
// value = "nick_name_like",
|
||||
// typeHandler = CipherQueryLikeHandler.class
|
||||
// )
|
||||
// private String custNameLike;
|
||||
@ApiModelProperty("人员限制id")
|
||||
private Integer custLimitId;
|
||||
// @ApiModelProperty("第三方人员id")
|
||||
// private String custThirdId;
|
||||
// @ApiModelProperty("推送到设备上,生成的用户id")
|
||||
// private String custDeviceId;
|
||||
@ApiModelProperty("手机号")
|
||||
private String mobile;
|
||||
// @ApiModelProperty("手机号")
|
||||
// @TableField(
|
||||
// value = "mobile_suffix",
|
||||
// typeHandler = SM4EncDecHandler.class
|
||||
// )
|
||||
// private String mobileSuffix;
|
||||
// @ApiModelProperty("登录密码")
|
||||
// @TableField(value = "password")
|
||||
private String pwd;
|
||||
// @ApiModelProperty("身份证号")
|
||||
// @TableField(
|
||||
// value = "id_card",
|
||||
// typeHandler = SM4EncDecHandler.class
|
||||
// )
|
||||
// private String idCard;
|
||||
@ApiModelProperty("邮箱")
|
||||
private String email;
|
||||
@ApiModelProperty("性别 0-男 1-女 2-未知")
|
||||
private Integer sex;
|
||||
// @ApiModelProperty("年龄")
|
||||
// private Integer age;
|
||||
// @ApiModelProperty("生日")
|
||||
// @TableField(
|
||||
// updateStrategy = FieldStrategy.IGNORED
|
||||
// )
|
||||
// private LocalDate birthday;
|
||||
// @ApiModelProperty("民族编码")
|
||||
// @TableField(
|
||||
// updateStrategy = FieldStrategy.IGNORED
|
||||
// )
|
||||
// private Integer ethnicityCode;
|
||||
// @ApiModelProperty("籍贯")
|
||||
// private String nativePlace;
|
||||
// @ApiModelProperty("人脸照片地址")
|
||||
// @TableField(value = "face_url")
|
||||
// private String custPhotoUrl;
|
||||
// @ApiModelProperty("头像地址")
|
||||
// @TableField(value = "avatar")
|
||||
// private String headPortraitUrl;
|
||||
@ApiModelProperty("所属组织id")
|
||||
Long orgId;
|
||||
// @ApiModelProperty("机构编号")
|
||||
// private String orgNum;
|
||||
// @ApiModelProperty("机构全称")
|
||||
// private String orgFullName;
|
||||
// @ApiModelProperty("成本中心id")
|
||||
// @TableField(
|
||||
// updateStrategy = FieldStrategy.IGNORED
|
||||
// )
|
||||
// private Long costCenterId;
|
||||
@ApiModelProperty("所属位置")
|
||||
private Long placeId;
|
||||
@ApiModelProperty("所属位置名称")
|
||||
private String placeFullName;
|
||||
@ApiModelProperty("人员类别")
|
||||
private Integer psnType;
|
||||
@ApiModelProperty("人员类别名称")
|
||||
private String psnTypeName;
|
||||
@ApiModelProperty("家庭地址")
|
||||
private String homeAddr;
|
||||
// @ApiModelProperty("QQ")
|
||||
// private String qq;
|
||||
// @ApiModelProperty("微信")
|
||||
// private String wechat;
|
||||
// @ApiModelProperty("企业微信")
|
||||
// private String companyWechat;
|
||||
// @ApiModelProperty("钉钉")
|
||||
// private String dingtalk;
|
||||
// @ApiModelProperty("支付宝openid")
|
||||
// private String alipayOpenid;
|
||||
// @ApiModelProperty("紧急联系人")
|
||||
// private String emerContactPerson;
|
||||
// @ApiModelProperty("紧急联系电话")
|
||||
// private String emerContactNum;
|
||||
// @ApiModelProperty("紧急联系人身份证号")
|
||||
// private String emerContactCard;
|
||||
// @ApiModelProperty("职位")
|
||||
// private String job;
|
||||
// @ApiModelProperty("职位等级")
|
||||
// private String jobRank;
|
||||
// @ApiModelProperty("职位级别")
|
||||
// private String jobLevel;
|
||||
// @ApiModelProperty("职称")
|
||||
// private String jobTitle;
|
||||
// @ApiModelProperty("职称等级")
|
||||
// private String jobTitleRank;
|
||||
// @ApiModelProperty("编制")
|
||||
// private String authStrength;
|
||||
// @ApiModelProperty("职务")
|
||||
// private String position;
|
||||
// @ApiModelProperty("入职日期")
|
||||
// @TableField(
|
||||
// updateStrategy = FieldStrategy.IGNORED
|
||||
// )
|
||||
// private LocalDate entryDate;
|
||||
// @ApiModelProperty("合同签订日期")
|
||||
// @TableField(
|
||||
// updateStrategy = FieldStrategy.IGNORED
|
||||
// )
|
||||
// private LocalDate signingDate;
|
||||
// @ApiModelProperty("合同到期日期")
|
||||
// @TableField(
|
||||
// updateStrategy = FieldStrategy.IGNORED
|
||||
// )
|
||||
// private LocalDate expiryDate;
|
||||
@ApiModelProperty("人员状态 0-正常 1-停用")
|
||||
private Integer custState;
|
||||
// @ApiModelProperty("点赞调查批次号")
|
||||
// private Long likeBatch;
|
||||
// @ApiModelProperty("乐观锁")
|
||||
// private Integer revision;
|
||||
|
||||
@ApiModelProperty("创建人")
|
||||
private String crby;
|
||||
|
||||
@ApiModelProperty("创建时间")
|
||||
private LocalDateTime crtime;
|
||||
|
||||
@ApiModelProperty("更新人")
|
||||
private String upby;
|
||||
|
||||
@ApiModelProperty("更新时间")
|
||||
private LocalDateTime uptime;
|
||||
// @ApiModelProperty("就诊号")
|
||||
// private String doctorNum;
|
||||
// @ApiModelProperty("住院号")
|
||||
// private String hospitalNum;
|
||||
// @ApiModelProperty("医嘱")
|
||||
// private String doctorInstruct;
|
||||
// @ApiModelProperty("住院日期")
|
||||
// private LocalDateTime hospitalDate;
|
||||
// @ApiModelProperty("最近下单时间")
|
||||
// private LocalDateTime orderTime;
|
||||
// @ApiModelProperty("银行卡号")
|
||||
// private String bankCardNum;
|
||||
// @ApiModelProperty("扩展字段1(日期 yyyy-MM-dd)")
|
||||
// private LocalDate extendDate;
|
||||
// @ApiModelProperty("扩展字段2(日期 yyyy-MM-dd HH:mm:ss)")
|
||||
// private LocalDateTime extendDateTime;
|
||||
// @ApiModelProperty("扩展字段3(字符串)")
|
||||
// private String extendStr1;
|
||||
// @ApiModelProperty("扩展字段4(字符串)")
|
||||
// private String extendStr2;
|
||||
// @ApiModelProperty("婚姻状态 0-保密 1-未婚 2-已婚")
|
||||
// private Integer maritalStatus;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
package com.bonus.system.client.feign.Dto;
|
||||
|
||||
import com.fasterxml.jackson.databind.JsonNode;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Data
|
||||
public class CustInfoModel extends CustInfo {
|
||||
private LocalDate orgAdjustDate;
|
||||
private String pictureUrl;
|
||||
private String features;
|
||||
private String path;
|
||||
private Integer photoType;
|
||||
private Integer featuresBuildStatus;
|
||||
private LocalDateTime featuresBuildTime;
|
||||
private String openid;
|
||||
private Integer sourceType;
|
||||
@ApiModelProperty("账户id")
|
||||
private Long accId;
|
||||
private LocalDate accEndDate;
|
||||
@ApiModelProperty("就餐地")
|
||||
private JsonNode diningPlace;
|
||||
@ApiModelProperty("是否创建账户")
|
||||
private Boolean isCreateAcc;
|
||||
}
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
package com.bonus.system.client.feign;
|
||||
|
||||
import com.bonus.common.core.web.domain.AjaxResult;
|
||||
import com.bonus.system.client.feign.Dto.CustInfoModel;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
|
||||
@FeignClient(value="bonus-smart-canteen")
|
||||
@Service
|
||||
@Component
|
||||
public interface SmartCanteenClient {
|
||||
@ApiOperation(value = "新增账户")
|
||||
@RequestMapping(value = "/custInfo/addCustInfo",method = RequestMethod.POST)
|
||||
AjaxResult addCustInfo(CustInfoModel dto);
|
||||
|
||||
}
|
||||
|
|
@ -18,6 +18,8 @@ import com.bonus.common.datascope.utils.CommonDataPermissionInfo;
|
|||
import com.bonus.common.security.config.VerificationCodeConfig;
|
||||
import com.bonus.common.security.utils.SecurityUtils;
|
||||
import com.bonus.system.api.domain.*;
|
||||
import com.bonus.system.client.feign.Dto.CustInfoModel;
|
||||
import com.bonus.system.client.feign.SmartCanteenClient;
|
||||
import com.bonus.system.domain.SysUserPost;
|
||||
import com.bonus.system.mapper.*;
|
||||
import com.bonus.system.service.ISysConfigService;
|
||||
|
|
@ -79,6 +81,9 @@ public class SysUserServiceImpl implements ISysUserService {
|
|||
@Autowired
|
||||
private JavaMailSender mailSender; // 自动注入JavaMailSender,用于发送邮件
|
||||
|
||||
@Resource
|
||||
private SmartCanteenClient smartCanteenClient;
|
||||
|
||||
/**
|
||||
* 根据条件分页查询用户列表
|
||||
*
|
||||
|
|
@ -361,15 +366,27 @@ public class SysUserServiceImpl implements ISysUserService {
|
|||
@Transactional(rollbackFor = Exception.class)
|
||||
public int insertUser(SysUser user) {
|
||||
user.setCustId(Id.next());
|
||||
user.setCustNum(user.getPhonenumber());
|
||||
// 新增用户信息
|
||||
int rows = userMapper.insertUser(user);
|
||||
// 新增用户岗位关联
|
||||
insertUserPost(user);
|
||||
// 新增用户与角色管理
|
||||
insertUserRole(user);
|
||||
// 新增账户信息
|
||||
addAccountInfo(user);
|
||||
return rows;
|
||||
}
|
||||
|
||||
private void addAccountInfo(SysUser user) {
|
||||
CustInfoModel custInfoModel = new CustInfoModel();
|
||||
custInfoModel.setCustId(user.getCustId());
|
||||
custInfoModel.setCustNum(user.getCustNum());
|
||||
custInfoModel.setCustName(user.getNickName());
|
||||
custInfoModel.setMobile(user.getPhonenumber());
|
||||
smartCanteenClient.addCustInfo(custInfoModel);
|
||||
}
|
||||
|
||||
/**
|
||||
* 注册用户信息
|
||||
*
|
||||
|
|
|
|||
Loading…
Reference in New Issue