zhaops hace 6 años
padre
commit
75023771a2

+ 209 - 0
user-service/src/main/java/com/diagbot/entity/UserAuthentication.java

@@ -0,0 +1,209 @@
+package com.diagbot.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * <p>
+ * 用户认证信息表
+ * </p>
+ *
+ * @author zhaops
+ * @since 2018-09-17
+ */
+@TableName("sys_user_authentication")
+public class UserAuthentication implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    @TableId(value = "id", type = IdType.AUTO)
+    private Long id;
+
+    /**
+     * 是否删除 N:未删除,Y:删除
+     */
+    private String isDeleted;
+
+    /**
+     * 记录创建时间
+     */
+    private Date gmtCreate;
+
+    /**
+     * 记录修改时间
+     */
+    private Date gmtModified;
+
+    /**
+     * 创建人,0表示无创建人值
+     */
+    private String creator;
+
+    /**
+     * 修改人,如果为0则表示纪录未修改
+     */
+    private String modifier;
+
+    /**
+     * 用户id
+     */
+    private Long userId;
+
+    /**
+     * 岗位信息
+     */
+    private String position;
+
+    /**
+     * 是否通过认证 N:未通过,Y:已通过
+     */
+    private String isReject;
+
+    /**
+     * 未通过类型
+     */
+    private Integer rejectType;
+
+    /**
+     * 认证被拒理由
+     */
+    private String rejectComment;
+
+    /**
+     * 认证状态(0:未认证,1:已认证,2:认证中)
+     */
+    private String status;
+
+    /**
+     * 备注
+     */
+    private String remark;
+
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public String getIsDeleted() {
+        return isDeleted;
+    }
+
+    public void setIsDeleted(String isDeleted) {
+        this.isDeleted = isDeleted;
+    }
+
+    public Date getGmtCreate() {
+        return gmtCreate;
+    }
+
+    public void setGmtCreate(Date gmtCreate) {
+        this.gmtCreate = gmtCreate;
+    }
+
+    public Date getGmtModified() {
+        return gmtModified;
+    }
+
+    public void setGmtModified(Date gmtModified) {
+        this.gmtModified = gmtModified;
+    }
+
+    public String getCreator() {
+        return creator;
+    }
+
+    public void setCreator(String creator) {
+        this.creator = creator;
+    }
+
+    public String getModifier() {
+        return modifier;
+    }
+
+    public void setModifier(String modifier) {
+        this.modifier = modifier;
+    }
+
+    public Long getUserId() {
+        return userId;
+    }
+
+    public void setUserId(Long userId) {
+        this.userId = userId;
+    }
+
+    public String getPosition() {
+        return position;
+    }
+
+    public void setPosition(String position) {
+        this.position = position;
+    }
+
+    public String getIsReject() {
+        return isReject;
+    }
+
+    public void setIsReject(String isReject) {
+        this.isReject = isReject;
+    }
+
+    public Integer getRejectType() {
+        return rejectType;
+    }
+
+    public void setRejectType(Integer rejectType) {
+        this.rejectType = rejectType;
+    }
+
+    public String getRejectComment() {
+        return rejectComment;
+    }
+
+    public void setRejectComment(String rejectComment) {
+        this.rejectComment = rejectComment;
+    }
+
+    public String getStatus() {
+        return status;
+    }
+
+    public void setStatus(String status) {
+        this.status = status;
+    }
+
+    public String getRemark() {
+        return remark;
+    }
+
+    public void setRemark(String remark) {
+        this.remark = remark;
+    }
+
+    @Override
+    public String toString() {
+        return "UserAuthentication{" +
+        "id=" + id +
+        ", isDeleted=" + isDeleted +
+        ", gmtCreate=" + gmtCreate +
+        ", gmtModified=" + gmtModified +
+        ", creator=" + creator +
+        ", modifier=" + modifier +
+        ", userId=" + userId +
+        ", position=" + position +
+        ", isReject=" + isReject +
+        ", rejectType=" + rejectType +
+        ", rejectComment=" + rejectComment +
+        ", status=" + status +
+        ", remark=" + remark +
+        "}";
+    }
+}

+ 25 - 0
user-service/src/main/java/com/diagbot/facade/UserAuthenticationFacade.java

@@ -0,0 +1,25 @@
+package com.diagbot.facade;
+
+import com.diagbot.entity.UserAuthentication;
+import com.diagbot.entity.wrapper.UserWrapper;
+import com.diagbot.service.impl.UserAuthenticationServiceImpl;
+import com.diagbot.util.UserUtils;
+import com.diagbot.vo.UserAuthenticationVO;
+import org.springframework.stereotype.Component;
+
+/**
+ * @Description:用户认证业务层
+ * @author: zhaops
+ * @time: 2018/9/13 19:30
+ */
+@Component
+public class UserAuthenticationFacade extends UserAuthenticationServiceImpl{
+    public UserAuthentication userAuthentication(UserAuthenticationVO userAuthenticationVO){
+        return null;
+    }
+
+    public UserWrapper getuserAuthenticationInfo(){
+        //Long userId=UserUtils.getCurrentPrincipleID();
+        return null;
+    }
+}

+ 16 - 0
user-service/src/main/java/com/diagbot/mapper/UserAuthenticationMapper.java

@@ -0,0 +1,16 @@
+package com.diagbot.mapper;
+
+import com.diagbot.entity.UserAuthentication;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * <p>
+ * 用户认证信息表 Mapper 接口
+ * </p>
+ *
+ * @author zhaops
+ * @since 2018-09-17
+ */
+public interface UserAuthenticationMapper extends BaseMapper<UserAuthentication> {
+
+}

+ 16 - 0
user-service/src/main/java/com/diagbot/service/UserAuthenticationService.java

@@ -0,0 +1,16 @@
+package com.diagbot.service;
+
+import com.diagbot.entity.UserAuthentication;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * <p>
+ * 用户认证信息表 服务类
+ * </p>
+ *
+ * @author zhaops
+ * @since 2018-09-17
+ */
+public interface UserAuthenticationService extends IService<UserAuthentication> {
+
+}

+ 20 - 0
user-service/src/main/java/com/diagbot/service/impl/UserAuthenticationServiceImpl.java

@@ -0,0 +1,20 @@
+package com.diagbot.service.impl;
+
+import com.diagbot.entity.UserAuthentication;
+import com.diagbot.mapper.UserAuthenticationMapper;
+import com.diagbot.service.UserAuthenticationService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ * 用户认证信息表 服务实现类
+ * </p>
+ *
+ * @author zhaops
+ * @since 2018-09-17
+ */
+@Service
+public class UserAuthenticationServiceImpl extends ServiceImpl<UserAuthenticationMapper, UserAuthentication> implements UserAuthenticationService {
+
+}

+ 28 - 0
user-service/src/main/java/com/diagbot/vo/UserAuthenticationVO.java

@@ -0,0 +1,28 @@
+package com.diagbot.vo;
+
+import lombok.Getter;
+import lombok.Setter;
+
+import javax.validation.constraints.NotBlank;
+import java.util.Date;
+
+/**
+ * @Description:用户验证输入信息
+ * @author: zhaops
+ * @time: 2018/9/14 14:22
+ */
+@Getter
+@Setter
+public class UserAuthenticationVO {
+    private Long id;
+    @NotBlank(message = "请输入岗位信息!")
+    private String position;
+    @NotBlank(message = "请输入手机号!")
+    private String userName;
+    @NotBlank(message = "请输入机构名称!")
+    private String organization;
+    private String organization_linkName;
+    private String organizationAddress;
+    private Integer organizationType;
+    private Integer subOrganizationNum;
+}

+ 51 - 0
user-service/src/main/java/com/diagbot/web/UserAuthenticationController.java

@@ -0,0 +1,51 @@
+package com.diagbot.web;
+
+
+import com.diagbot.annotation.SysLogger;
+import com.diagbot.dto.RespDTO;
+import com.diagbot.entity.UserAuthentication;
+import com.diagbot.entity.User;
+import com.diagbot.entity.wrapper.UserWrapper;
+import com.diagbot.facade.UserAuthenticationFacade;
+import com.diagbot.vo.UserAuthenticationVO;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import javax.validation.Valid;
+
+/**
+ * <p>
+ * 用户认证信息表 前端控制器
+ * </p>
+ *
+ * @author zhaops
+ * @since 2018-09-13
+ */
+@RestController
+@RequestMapping("/userAuthentication")
+public class UserAuthenticationController {
+    @Autowired
+    private UserAuthenticationFacade userAuthenticationFacade;
+
+
+    @ApiOperation(value = "用户认证",
+            notes = "userName:用户名,必填<br>" +
+                    "organization:组织机构,必填<br>")
+    @PostMapping("/userAuthentication")
+    @SysLogger("userAuthentication")
+    public RespDTO<Boolean> userAuthentication(@RequestBody @Valid UserAuthenticationVO userAuthenticationVO) {
+        UserAuthentication userAuthentication = userAuthenticationFacade.userAuthentication(userAuthenticationVO);
+        return RespDTO.onSuc(true);
+    }
+
+    @PostMapping("/getuserAuthenticationInfo")
+    @SysLogger("getuserAuthenticationInfo")
+    public RespDTO<UserWrapper> getuserAuthenticationInfo() {
+        UserWrapper userWrapper = userAuthenticationFacade.getuserAuthenticationInfo();
+        return RespDTO.onSuc(userWrapper);
+    }
+}

+ 22 - 0
user-service/src/main/resources/mapper/UserAuthenticationMapper.xml

@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.diagbot.mapper.UserAuthenticationMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.diagbot.entity.UserAuthentication">
+        <id column="id" property="id" />
+        <result column="is_deleted" property="isDeleted" />
+        <result column="gmt_create" property="gmtCreate" />
+        <result column="gmt_modified" property="gmtModified" />
+        <result column="creator" property="creator" />
+        <result column="modifier" property="modifier" />
+        <result column="user_id" property="userId" />
+        <result column="position" property="position" />
+        <result column="is_reject" property="isReject" />
+        <result column="reject_type" property="rejectType" />
+        <result column="reject_comment" property="rejectComment" />
+        <result column="status" property="status" />
+        <result column="remark" property="remark" />
+    </resultMap>
+
+</mapper>