浏览代码

Merge remote-tracking branch 'origin/dev/icss' into dev/icss

Zhaops 6 年之前
父节点
当前提交
e79025cd21

+ 5 - 0
icssman-service/src/main/java/com/diagbot/client/UserServiceClient.java

@@ -3,6 +3,8 @@ package com.diagbot.client;
 import com.diagbot.client.hystrix.UserServiceHystrix;
 import com.diagbot.dto.RespDTO;
 import com.diagbot.entity.Token;
+import com.diagbot.entity.User;
+
 import org.springframework.cloud.openfeign.FeignClient;
 import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestBody;
@@ -18,6 +20,9 @@ public interface UserServiceClient {
 
     @PostMapping("/user/verifyToken")
     RespDTO<Boolean> verifyToken(@RequestBody Token token);
+    
+    @PostMapping(value = "/user/getUserAuthStatus")
+    RespDTO<User> getUserByUserId(@RequestBody Long userId);
 }
 
 

+ 8 - 0
icssman-service/src/main/java/com/diagbot/client/hystrix/UserServiceHystrix.java

@@ -23,4 +23,12 @@ public class UserServiceHystrix implements UserServiceClient {
         return null;
     }
 
+	@Override
+	public RespDTO<User> getUserByUserId(Long userId) {
+		log.error("【hystrix】调用{}异常", "getUserByUserId");
+        return null;
+	}
+
+    
+    
 }

+ 129 - 20
icssman-service/src/main/java/com/diagbot/entity/User.java

@@ -51,16 +51,60 @@ public class User implements Serializable {
      */
     private String modifier;
 
+    /**
+     * 用户名
+     */
+    private String username;
+
     /**
      * 用户密码
      */
     private String password;
 
     /**
-     * 用户名
+     * 联系人
      */
-    private String username;
+    private String linkman;
+
+    /**
+     * 手机号(如果是客户,phone与username是一样的)
+     */
+    private String phone;
+
+    /**
+     * 所属岗位
+     */
+    private String position;
+
+    /**
+     * 所属部门
+     */
+    private String dept;
+
+    /**
+     * 邮箱
+     */
+    private String email;
 
+    /**
+     * 认证状态: 0 未认证,1 已认证,2 认证中
+     */
+    private Integer authStatus;
+
+    /**
+     * 认证通过时间
+     */
+    private Date passauthTime;
+
+    /**
+     * 1内部用户,0外部用户(默认0)
+     */
+    private Integer type;
+
+    /**
+     * 备注
+     */
+    private String remark;
 
     public Long getId() {
         return id;
@@ -69,7 +113,6 @@ public class User implements Serializable {
     public void setId(Long id) {
         this.id = id;
     }
-
     public String getIsDeleted() {
         return isDeleted;
     }
@@ -77,7 +120,6 @@ public class User implements Serializable {
     public void setIsDeleted(String isDeleted) {
         this.isDeleted = isDeleted;
     }
-
     public Date getGmtCreate() {
         return gmtCreate;
     }
@@ -85,7 +127,6 @@ public class User implements Serializable {
     public void setGmtCreate(Date gmtCreate) {
         this.gmtCreate = gmtCreate;
     }
-
     public Date getGmtModified() {
         return gmtModified;
     }
@@ -93,7 +134,6 @@ public class User implements Serializable {
     public void setGmtModified(Date gmtModified) {
         this.gmtModified = gmtModified;
     }
-
     public String getCreator() {
         return creator;
     }
@@ -101,7 +141,6 @@ public class User implements Serializable {
     public void setCreator(String creator) {
         this.creator = creator;
     }
-
     public String getModifier() {
         return modifier;
     }
@@ -109,7 +148,13 @@ public class User implements Serializable {
     public void setModifier(String modifier) {
         this.modifier = modifier;
     }
+    public String getUsername() {
+        return username;
+    }
 
+    public void setUsername(String username) {
+        this.username = username;
+    }
     public String getPassword() {
         return password;
     }
@@ -117,26 +162,90 @@ public class User implements Serializable {
     public void setPassword(String password) {
         this.password = password;
     }
+    public String getLinkman() {
+        return linkman;
+    }
 
-    public String getUsername() {
-        return username;
+    public void setLinkman(String linkman) {
+        this.linkman = linkman;
+    }
+    public String getPhone() {
+        return phone;
     }
 
-    public void setUsername(String username) {
-        this.username = username;
+    public void setPhone(String phone) {
+        this.phone = phone;
+    }
+    public String getPosition() {
+        return position;
+    }
+
+    public void setPosition(String position) {
+        this.position = position;
+    }
+    public String getDept() {
+        return dept;
+    }
+
+    public void setDept(String dept) {
+        this.dept = dept;
+    }
+    public String getEmail() {
+        return email;
+    }
+
+    public void setEmail(String email) {
+        this.email = email;
+    }
+    public Integer getAuthStatus() {
+        return authStatus;
+    }
+
+    public void setAuthStatus(Integer authStatus) {
+        this.authStatus = authStatus;
+    }
+    public Date getPassauthTime() {
+        return passauthTime;
+    }
+
+    public void setPassauthTime(Date passauthTime) {
+        this.passauthTime = passauthTime;
+    }
+    public Integer getType() {
+        return type;
+    }
+
+    public void setType(Integer type) {
+        this.type = type;
+    }
+    public String getRemark() {
+        return remark;
+    }
+
+    public void setRemark(String remark) {
+        this.remark = remark;
     }
 
     @Override
     public String toString() {
         return "User{" +
-                "id=" + id +
-                ", isDeleted=" + isDeleted +
-                ", gmtCreate=" + gmtCreate +
-                ", gmtModified=" + gmtModified +
-                ", creator=" + creator +
-                ", modifier=" + modifier +
-                ", password=" + password +
-                ", username=" + username +
-                "}";
+        "id=" + id +
+        ", isDeleted=" + isDeleted +
+        ", gmtCreate=" + gmtCreate +
+        ", gmtModified=" + gmtModified +
+        ", creator=" + creator +
+        ", modifier=" + modifier +
+        ", username=" + username +
+        ", password=" + password +
+        ", linkman=" + linkman +
+        ", phone=" + phone +
+        ", position=" + position +
+        ", dept=" + dept +
+        ", email=" + email +
+        ", authStatus=" + authStatus +
+        ", passauthTime=" + passauthTime +
+        ", type=" + type +
+        ", remark=" + remark +
+        "}";
     }
 }

+ 8 - 2
icssman-service/src/main/java/com/diagbot/facade/DeptInfoFacade.java

@@ -15,6 +15,8 @@ import com.diagbot.vo.GetDeptInfoVO;
 import com.diagbot.vo.UpdateDeptInfoVO;
 import org.springframework.stereotype.Component;
 
+import java.util.Date;
+
 /**
  * @Description:
  * @Author:zhaops
@@ -31,8 +33,12 @@ public class DeptInfoFacade extends DeptInfoServiceImpl {
     public Boolean addDeptInfo(AddDeptInfoVO addDeptInfoVO) {
         DeptInfo deptInfo =new DeptInfo();
         BeanUtil.copyProperties(addDeptInfoVO,deptInfo);
-        deptInfo.setCreator(UserUtils.getCurrentPrincipleID());
-        deptInfo.setGmtCreate(DateUtil.now());
+        Date now = DateUtil.now();
+        String userId = UserUtils.getCurrentPrincipleID();
+        deptInfo.setCreator(userId);
+        deptInfo.setGmtCreate(now);
+        deptInfo.setModifier(userId);
+        deptInfo.setGmtModified(now);
         Boolean flag = this.save(deptInfo);
         if(!flag){
             throw new CommonException(CommonErrorCode.FAIL,

+ 7 - 2
icssman-service/src/main/java/com/diagbot/facade/DeptVitalFacade.java

@@ -10,6 +10,7 @@ import com.diagbot.exception.CommonErrorCode;
 import com.diagbot.exception.CommonException;
 import com.diagbot.service.DeptVitalService;
 import com.diagbot.service.impl.DeptVitalServiceImpl;
+import com.diagbot.util.DateUtil;
 import com.diagbot.util.EntityUtil;
 import com.diagbot.util.UserUtils;
 import com.diagbot.vo.DeptVitalVO;
@@ -67,12 +68,16 @@ public class DeptVitalFacade extends DeptVitalServiceImpl implements DeptVitalSe
 
         //插入新模板
         List<DeptVital> deptVitalList = Lists.newArrayList();
+        Date now = DateUtil.now();
+        String userId = UserUtils.getCurrentPrincipleID();
         for (Long vital : deptVitalVO.getVitalIds()) {
             DeptVital deptVital = new DeptVital();
             deptVital.setDeptId(deptVitalVO.getDeptId());
             deptVital.setVitalId(vital);
-            deptVital.setCreator(UserUtils.getCurrentPrincipleID());
-            deptVital.setGmtCreate(new Date());
+            deptVital.setCreator(userId);
+            deptVital.setGmtCreate(now);
+            deptVital.setModifier(userId);
+            deptVital.setGmtModified(now);
             deptVitalList.add(deptVital);
         }