From f9b84fc5ae27ae77c8133cb682c48b841cf15754 Mon Sep 17 00:00:00 2001
From: m1991 <shenglonghua@1rock.net>
Date: Wed, 3 Mar 2021 17:34:10 +0800
Subject: [PATCH] =?UTF-8?q?sms=E5=B7=A5=E5=85=B7=E7=B1=BB=E5=8F=98?=
 =?UTF-8?q?=E5=8A=A8?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 wisenergy-common/pom.xml                      |   6 +
 .../wisenergy/common/utils/DeviceIdUtil.java  |  23 +++
 .../wisenergy/common/utils/ShareCodeUtil.java |  85 ++++++++++++
 .../cn/wisenergy/common/utils}/SmsUtils.java  |   3 +-
 .../cn/wisenergy/web/config/SmsConfig.java    |   0
 wisenergy-common/wisenergy-common.iml         |  10 ++
 .../wisenergy/mapper/RecommendUserMapper.java |   3 +
 .../java/cn/wisenergy/mapper/UsersMapper.java |  15 +-
 .../resources/mapper/RecommendUserMapper.xml  |  10 ++
 .../src/main/resources/mapper/UsersMapper.xml |  28 +++-
 .../java/cn/wisenergy/model/app/Page.java     |   2 +-
 .../java/cn/wisenergy/model/app/SmsLog.java   | 121 +++++++++-------
 .../java/cn/wisenergy/model/app/User.java     |  95 +++++++++++++
 wisenergy-service/pom.xml                     |  22 ---
 .../cn/wisenergy/service/app/UserService.java |  17 ++-
 .../service/app/impl/UserServiceImpl.java     |  41 +++++-
 .../controller/app}/SmsController.java        |  25 +++-
 .../controller/app}/TestController.java       |  34 +++--
 .../admin/controller/app/UserController.java  |  45 ------
 .../admin/controller/app/loginController.java | 131 ++++++++++++++++++
 .../cn/wisenergy/web/shiro/ShiroConfig.java   |   4 +-
 .../java/cn/wisenergy/web/sms/Constants.java  |  18 ++-
 .../java/cn/wisenergy/web/sms/ResultEnum.java |   2 +-
 .../interceptor/ValidateParamInterceptor.java |   4 +-
 24 files changed, 588 insertions(+), 156 deletions(-)
 create mode 100644 wisenergy-common/src/main/java/cn/wisenergy/common/utils/DeviceIdUtil.java
 create mode 100644 wisenergy-common/src/main/java/cn/wisenergy/common/utils/ShareCodeUtil.java
 rename {wisenergy-web-admin/src/main/java/cn/wisenergy/web/sms => wisenergy-common/src/main/java/cn/wisenergy/common/utils}/SmsUtils.java (96%)
 rename {wisenergy-web-admin => wisenergy-common}/src/main/java/cn/wisenergy/web/config/SmsConfig.java (100%)
 rename wisenergy-web-admin/src/main/java/cn/wisenergy/web/{sms => admin/controller/app}/SmsController.java (61%)
 rename wisenergy-web-admin/src/main/java/cn/wisenergy/web/{sms => admin/controller/app}/TestController.java (57%)
 create mode 100644 wisenergy-web-admin/src/main/java/cn/wisenergy/web/admin/controller/app/loginController.java

diff --git a/wisenergy-common/pom.xml b/wisenergy-common/pom.xml
index 1208563..3428c8b 100644
--- a/wisenergy-common/pom.xml
+++ b/wisenergy-common/pom.xml
@@ -140,6 +140,12 @@
             <artifactId>hutool-all</artifactId>
             <version>4.6.7</version>
         </dependency>
+        <dependency>
+            <groupId>com.aliyun</groupId>
+            <artifactId>aliyun-java-sdk-core</artifactId>
+            <version>RELEASE</version>
+            <scope>compile</scope>
+        </dependency>
     </dependencies>
 
     <!-- MAVEN构建 -->
diff --git a/wisenergy-common/src/main/java/cn/wisenergy/common/utils/DeviceIdUtil.java b/wisenergy-common/src/main/java/cn/wisenergy/common/utils/DeviceIdUtil.java
new file mode 100644
index 0000000..2221e43
--- /dev/null
+++ b/wisenergy-common/src/main/java/cn/wisenergy/common/utils/DeviceIdUtil.java
@@ -0,0 +1,23 @@
+package cn.wisenergy.common.utils;
+
+import java.util.zip.CRC32;
+
+/**
+ * 
+ * @author eaves.zhu
+ */
+public class DeviceIdUtil {
+/**
+ * @author eaves.zhu
+ * @param deviceId
+ * @return int 
+ * CRC32
+ */
+   public static long getCRC32(String deviceId){
+	        CRC32 crc32 = new CRC32();  
+	        crc32.update(deviceId.getBytes());
+	            long tmp = crc32.getValue();
+	            return tmp;
+   }
+
+}
\ No newline at end of file
diff --git a/wisenergy-common/src/main/java/cn/wisenergy/common/utils/ShareCodeUtil.java b/wisenergy-common/src/main/java/cn/wisenergy/common/utils/ShareCodeUtil.java
new file mode 100644
index 0000000..1cb8407
--- /dev/null
+++ b/wisenergy-common/src/main/java/cn/wisenergy/common/utils/ShareCodeUtil.java
@@ -0,0 +1,85 @@
+package cn.wisenergy.common.utils;
+
+import org.apache.log4j.Logger;
+
+
+/**
+ * 
+ * @author zen.wang zenyes@gmail.com
+ */
+public class ShareCodeUtil {
+
+    /** 自定义进制(0,1没有加入,容易与o,l混淆) */
+    private static final char[] r=new char[]{'F', 'L', 'G', 'W', '5', 'X', 'C', '3', '9', 'Z', 'M', '6', '7', 'Y', 'R', 'T', '2', 'H', 'S', '8', 'D', 'V', 'E', 'J', '4', 'K', 'Q', 'P', 'U', 'A', 'N', 'B'};
+
+    /** 进制长度 */
+    private static final int binLen=r.length;
+    
+    private static Logger logger = Logger.getLogger(ShareCodeUtil.class);
+    
+    private static final long startNumber = 100048576L;
+//    private static final long startNumber = 0L;
+
+
+    /**
+     * 
+     * @param id ID
+     * @return 随机码
+     */
+    public static String idToCode(long id,long costomStartNumber) {
+    	if(costomStartNumber<0){
+    		costomStartNumber = startNumber;
+    	}
+    	id += costomStartNumber;
+        char[] buf=new char[32];
+        int charPos=32;
+
+        while((id / binLen) > 0) {
+            int ind=(int)(id % binLen);
+            // System.out.println(num + "-->" + ind);
+            buf[--charPos]=r[ind];
+            id /= binLen;
+        }
+        buf[--charPos]=r[(int)(id % binLen)];
+        // System.out.println(num + "-->" + num % binLen);
+        String str=new String(buf, charPos, (32 - charPos));
+        return str.toUpperCase();
+    }
+    public static String idToCode(long idL){
+    	return idToCode(idL,-1L);
+    }
+    public static String idToCode(String id){
+    	long idL = Long.parseLong(id);
+    	return idToCode(idL,-1L);
+    }
+    public static String idToCode(String id,long costomStartNumber){
+    	long idL = Long.parseLong(id);
+    	return idToCode(idL,costomStartNumber);
+    }
+    
+
+    public static long codeToId(String code) {
+    	code = code.toUpperCase();
+        char chs[]=code.toCharArray();
+        long res=0L;
+        for(int i=0; i < chs.length; i++) {
+            int ind=0;
+            for(int j=0; j < binLen; j++) {
+                if(chs[i] == r[j]) {
+                    ind=j;
+                    break;
+                }
+            }
+            if(i > 0) {
+                res=res * binLen + ind;
+            } else {
+                res=ind;
+            }
+//             logger.debug(ind + "-->" + res);
+             
+        }
+        res -= startNumber;
+        return res;
+    }
+
+}
\ No newline at end of file
diff --git a/wisenergy-web-admin/src/main/java/cn/wisenergy/web/sms/SmsUtils.java b/wisenergy-common/src/main/java/cn/wisenergy/common/utils/SmsUtils.java
similarity index 96%
rename from wisenergy-web-admin/src/main/java/cn/wisenergy/web/sms/SmsUtils.java
rename to wisenergy-common/src/main/java/cn/wisenergy/common/utils/SmsUtils.java
index ce1d3a0..919cfe6 100644
--- a/wisenergy-web-admin/src/main/java/cn/wisenergy/web/sms/SmsUtils.java
+++ b/wisenergy-common/src/main/java/cn/wisenergy/common/utils/SmsUtils.java
@@ -1,6 +1,5 @@
-package cn.wisenergy.web.sms;
+package cn.wisenergy.common.utils;
 
-import cn.wisenergy.common.utils.StringUtil;
 import cn.wisenergy.web.config.SmsConfig;
 import com.alibaba.fastjson.JSONObject;
 import com.aliyuncs.CommonRequest;
diff --git a/wisenergy-web-admin/src/main/java/cn/wisenergy/web/config/SmsConfig.java b/wisenergy-common/src/main/java/cn/wisenergy/web/config/SmsConfig.java
similarity index 100%
rename from wisenergy-web-admin/src/main/java/cn/wisenergy/web/config/SmsConfig.java
rename to wisenergy-common/src/main/java/cn/wisenergy/web/config/SmsConfig.java
diff --git a/wisenergy-common/wisenergy-common.iml b/wisenergy-common/wisenergy-common.iml
index 51be60d..cfafed9 100644
--- a/wisenergy-common/wisenergy-common.iml
+++ b/wisenergy-common/wisenergy-common.iml
@@ -158,6 +158,16 @@
     <orderEntry type="library" name="Maven: org.apache.xmlbeans:xmlbeans:2.3.0" level="project" />
     <orderEntry type="library" name="Maven: stax:stax-api:1.0.1" level="project" />
     <orderEntry type="library" name="Maven: cn.hutool:hutool-all:4.6.7" level="project" />
+    <orderEntry type="library" name="Maven: com.aliyun:aliyun-java-sdk-core:4.5.18" level="project" />
+    <orderEntry type="library" name="Maven: com.google.code.gson:gson:2.8.5" level="project" />
+    <orderEntry type="library" name="Maven: commons-logging:commons-logging:1.2" level="project" />
+    <orderEntry type="library" name="Maven: javax.xml.bind:jaxb-api:2.3.1" level="project" />
+    <orderEntry type="library" name="Maven: javax.activation:javax.activation-api:1.2.0" level="project" />
+    <orderEntry type="library" name="Maven: org.jacoco:org.jacoco.agent:runtime:0.8.6" level="project" />
+    <orderEntry type="library" name="Maven: org.ini4j:ini4j:0.5.4" level="project" />
+    <orderEntry type="library" name="Maven: io.opentracing:opentracing-api:0.33.0" level="project" />
+    <orderEntry type="library" name="Maven: io.opentracing:opentracing-util:0.33.0" level="project" />
+    <orderEntry type="library" name="Maven: io.opentracing:opentracing-noop:0.33.0" level="project" />
     <orderEntry type="library" name="Maven: org.apache.commons:commons-lang3:3.8.1" level="project" />
     <orderEntry type="library" name="Maven: commons-lang:commons-lang:2.6" level="project" />
     <orderEntry type="library" name="Maven: commons-pool:commons-pool:1.6" level="project" />
diff --git a/wisenergy-mapper/src/main/java/cn/wisenergy/mapper/RecommendUserMapper.java b/wisenergy-mapper/src/main/java/cn/wisenergy/mapper/RecommendUserMapper.java
index c77f2d2..da0dc11 100644
--- a/wisenergy-mapper/src/main/java/cn/wisenergy/mapper/RecommendUserMapper.java
+++ b/wisenergy-mapper/src/main/java/cn/wisenergy/mapper/RecommendUserMapper.java
@@ -9,4 +9,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 public interface RecommendUserMapper extends BaseMapper<RecommendUser> {
 
     RecommendUser getByUserId(String userId);
+
+    Integer zcByUserId(String userId);
+
 }
diff --git a/wisenergy-mapper/src/main/java/cn/wisenergy/mapper/UsersMapper.java b/wisenergy-mapper/src/main/java/cn/wisenergy/mapper/UsersMapper.java
index 65737dc..c0310ae 100644
--- a/wisenergy-mapper/src/main/java/cn/wisenergy/mapper/UsersMapper.java
+++ b/wisenergy-mapper/src/main/java/cn/wisenergy/mapper/UsersMapper.java
@@ -53,7 +53,7 @@ public interface UsersMapper extends BaseMapper<User> {
      * @param userId 用户id
      * @return 用户信息
      */
-    User getByUserId(@Param("userId") String userId);
+    Integer getByUserId(@Param("userId") String userId);
 
     /**
      *  获取用户信息
@@ -76,6 +76,17 @@ public interface UsersMapper extends BaseMapper<User> {
     public List<User>	getUsersListByMap(Map<String,Object> param);
 
     //根据手机号查询用户Integer
-    Integer queryUsersByPhone(@Param("beInvitedCode")String userId);
+    Integer queryUsersByPhone(@Param("userId")String userId);
 
+    /**
+     * 用户注册
+     * @param userId
+     * @param inviteCode
+     * @param beInvitedCode
+     * @param userLevel
+     */
+    Integer save(@Param("userId")String userId, @Param("inviteCode") String inviteCode, @Param("beInvitedCode") String beInvitedCode, @Param("userLevel") Integer userLevel);
+    Integer insertbyint(@Param("userId")String userId,  @Param("beInvitedCode") String beInvitedCode);
+    Integer edit1(@Param("userId")String userId);
+    Integer getuserIdById(@Param("userId")String userId);
 }
diff --git a/wisenergy-mapper/src/main/resources/mapper/RecommendUserMapper.xml b/wisenergy-mapper/src/main/resources/mapper/RecommendUserMapper.xml
index ab7fa7e..b9fdae7 100644
--- a/wisenergy-mapper/src/main/resources/mapper/RecommendUserMapper.xml
+++ b/wisenergy-mapper/src/main/resources/mapper/RecommendUserMapper.xml
@@ -71,5 +71,15 @@
             user_id=#{userId}
         </where>
     </select>
+    <!--根据用户邀请码更新直推表-->
+    <select id="zcByUserId" >
+        select
+            id
+        from
+        <include refid="table"/>
+        <where>
+            user_id=#{userId}
+        </where>
+    </select>
 
 </mapper>
\ No newline at end of file
diff --git a/wisenergy-mapper/src/main/resources/mapper/UsersMapper.xml b/wisenergy-mapper/src/main/resources/mapper/UsersMapper.xml
index d178ef2..7b87ff1 100644
--- a/wisenergy-mapper/src/main/resources/mapper/UsersMapper.xml
+++ b/wisenergy-mapper/src/main/resources/mapper/UsersMapper.xml
@@ -145,9 +145,12 @@
         </where>
     </select>
 
-    <!--用户添加-->
+    <!--用户注册-->
     <insert id="save">
-        insert into user(user_id,password) value (#{userId},#{password})
+        insert into user(user_id,invite_code,be_invited_code,user_level) value (#{userId},#{inviteCode},#{beInvitedCode},#{userLevel})
+    </insert>
+    <insert id="insertbyint">
+        insert into user(user_id,be_invited_code) value (#{userId},#{beInvitedCode})
     </insert>
 
     <select id="queryUsersByPhone" resultType="java.lang.Integer">
@@ -159,6 +162,27 @@
             user_id=#{userId}
         </where>
     </select>
+    <select id="getuserIdById" resultType="cn.wisenergy.model.app.User">
+        select
+        id
+        from
+        <include refid="table"/>
+        <where>
+            user_id=#{userId}
+        </where>
+    </select>
+    <update id="edit1" parameterType="cn.wisenergy.model.app.User">
+        UPDATE
+        <include refid="table"/>
+        <set>
+            <if test="userLevel != null">user_level =#{userLevel},</if>
+            <if test="inviteCode != null">invite_code =#{inviteCode},</if>
+            update_time =now()
+        </set>
+        <where>
+            user_id = #{userId}
+        </where>
+    </update>
 
     <!--分页查询所有用户信息 -->
     <select id="getUsersListByMap" resultType="cn.wisenergy.model.app.User" parameterType="java.util.Map">
diff --git a/wisenergy-model/src/main/java/cn/wisenergy/model/app/Page.java b/wisenergy-model/src/main/java/cn/wisenergy/model/app/Page.java
index 7d605e8..ce4b7fe 100644
--- a/wisenergy-model/src/main/java/cn/wisenergy/model/app/Page.java
+++ b/wisenergy-model/src/main/java/cn/wisenergy/model/app/Page.java
@@ -44,7 +44,7 @@ public class Page<T> implements Serializable {
             this.list = list;
         }
 
-    public Page(int pageNo, int pageSize, Integer total) {
+    public Page(int pageNo, int pageSize,Integer total) {
             pageNo = (pageNo==0 )? DEFAULT_PAGE_NO : pageNo;
             pageSize = (pageSize==0 )?DEFAULT_PAGE_SIZE : pageSize;
             this.beginPos=(pageNo-1)*pageSize;
diff --git a/wisenergy-model/src/main/java/cn/wisenergy/model/app/SmsLog.java b/wisenergy-model/src/main/java/cn/wisenergy/model/app/SmsLog.java
index ef57322..1edabb7 100644
--- a/wisenergy-model/src/main/java/cn/wisenergy/model/app/SmsLog.java
+++ b/wisenergy-model/src/main/java/cn/wisenergy/model/app/SmsLog.java
@@ -1,12 +1,12 @@
 package cn.wisenergy.model.app;
-import java.io.Serializable;
+
 import java.util.Date;
-import java.math.BigDecimal;
 
-/***
-*   短信记录
-*/
-public class SmsLog implements Serializable {
+/**
+ *   短信记录
+ * Created by m1991 on 2021/2/28 22:56
+ */
+public class SmsLog {
     //
     private Long id;
     //短信类型(0:注册、登录验证码,1:修改密码,2:订单状态通知信息)
@@ -30,70 +30,91 @@ public class SmsLog implements Serializable {
     //是否删除(0:否,1:是)
     private Integer isDelete;
     //get set 方法
-    public void setId (Long  id){
-        this.id=id;
+    public Long getId() {
+        return id;
     }
-    public  Long getId(){
-        return this.id;
+
+    public void setId(Long id) {
+        this.id = id;
     }
-    public void setCodeType (Integer  codeType){
-        this.codeType=codeType;
+
+    public Integer getCodeType() {
+        return codeType;
     }
-    public  Integer getCodeType(){
-        return this.codeType;
+
+    public void setCodeType(Integer codeType) {
+        this.codeType = codeType;
     }
-    public void setPhone (String  phone){
-        this.phone=phone;
+
+    public String getPhone() {
+        return phone;
     }
-    public  String getPhone(){
-        return this.phone;
+
+    public void setPhone(String phone) {
+        this.phone = phone;
     }
-    public void setMessage (String  message){
-        this.message=message;
+
+    public String getMessage() {
+        return message;
     }
-    public  String getMessage(){
-        return this.message;
+
+    public void setMessage(String message) {
+        this.message = message;
     }
-    public void setFailInfo (String  failInfo){
-        this.failInfo=failInfo;
+
+    public String getFailInfo() {
+        return failInfo;
     }
-    public  String getFailInfo(){
-        return this.failInfo;
+
+    public void setFailInfo(String failInfo) {
+        this.failInfo = failInfo;
     }
-    public void setStatus (Integer  status){
-        this.status=status;
+
+    public Integer getStatus() {
+        return status;
     }
-    public  Integer getStatus(){
-        return this.status;
+
+    public void setStatus(Integer status) {
+        this.status = status;
     }
-    public void setCreatedUserId (Long  createdUserId){
-        this.createdUserId=createdUserId;
+
+    public Long getCreatedUserId() {
+        return createdUserId;
     }
-    public  Long getCreatedUserId(){
-        return this.createdUserId;
+
+    public void setCreatedUserId(Long createdUserId) {
+        this.createdUserId = createdUserId;
     }
-    public void setUpdatedUserId (Long  updatedUserId){
-        this.updatedUserId=updatedUserId;
+
+    public Long getUpdatedUserId() {
+        return updatedUserId;
     }
-    public  Long getUpdatedUserId(){
-        return this.updatedUserId;
+
+    public void setUpdatedUserId(Long updatedUserId) {
+        this.updatedUserId = updatedUserId;
     }
-    public void setCreatdTime (Date  creatdTime){
-        this.creatdTime=creatdTime;
+
+    public Date getCreatdTime() {
+        return creatdTime;
     }
-    public  Date getCreatdTime(){
-        return this.creatdTime;
+
+    public void setCreatdTime(Date creatdTime) {
+        this.creatdTime = creatdTime;
     }
-    public void setUpdatedTime (Date  updatedTime){
-        this.updatedTime=updatedTime;
+
+    public Date getUpdatedTime() {
+        return updatedTime;
     }
-    public  Date getUpdatedTime(){
-        return this.updatedTime;
+
+    public void setUpdatedTime(Date updatedTime) {
+        this.updatedTime = updatedTime;
     }
-    public void setIsDelete (Integer  isDelete){
-        this.isDelete=isDelete;
+
+    public Integer getIsDelete() {
+        return isDelete;
     }
-    public  Integer getIsDelete(){
-        return this.isDelete;
+
+    public void setIsDelete(Integer isDelete) {
+        this.isDelete = isDelete;
     }
 }
diff --git a/wisenergy-model/src/main/java/cn/wisenergy/model/app/User.java b/wisenergy-model/src/main/java/cn/wisenergy/model/app/User.java
index d3ac7d7..069cf1e 100644
--- a/wisenergy-model/src/main/java/cn/wisenergy/model/app/User.java
+++ b/wisenergy-model/src/main/java/cn/wisenergy/model/app/User.java
@@ -105,4 +105,99 @@ public class User extends Model<User> implements Serializable{
     @ApiModelProperty(name = "updateTime", value = "修改时间")
     private Date updateTime;
 
+    public Integer getId() {
+        return id;
+    }
+
+    public void setId(Integer id) {
+        this.id = id;
+    }
+
+    public String getUserId() {
+        return userId;
+    }
+
+    public void setUserId(String userId) {
+        this.userId = userId;
+    }
+
+    public String getPassword() {
+        return password;
+    }
+
+    public void setPassword(String password) {
+        this.password = password;
+    }
+
+    public int getUserLevel() {
+        return userLevel;
+    }
+
+    public void setUserLevel(int userLevel) {
+        this.userLevel = userLevel;
+    }
+
+    public BigDecimal getCrossBorderLine() {
+        return crossBorderLine;
+    }
+
+    public void setCrossBorderLine(BigDecimal crossBorderLine) {
+        this.crossBorderLine = crossBorderLine;
+    }
+
+    public String getIdCardNumber() {
+        return idCardNumber;
+    }
+
+    public void setIdCardNumber(String idCardNumber) {
+        this.idCardNumber = idCardNumber;
+    }
+
+    public String getFansNickname() {
+        return fansNickname;
+    }
+
+    public void setFansNickname(String fansNickname) {
+        this.fansNickname = fansNickname;
+    }
+
+    public String getFansId() {
+        return fansId;
+    }
+
+    public void setFansId(String fansId) {
+        this.fansId = fansId;
+    }
+
+    public String getInviteCode() {
+        return inviteCode;
+    }
+
+    public void setInviteCode(String inviteCode) {
+        this.inviteCode = inviteCode;
+    }
+
+    public String getBeInvitedCode() {
+        return beInvitedCode;
+    }
+
+    public void setBeInvitedCode(String beInvitedCode) {
+        this.beInvitedCode = beInvitedCode;
+    }
+
+    public Date getCreateTime() {
+        return createTime;
+    }
+
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+
+    public Date getUpdateTime() {
+        return updateTime;
+    }
+
+    public void setUpdateTime(Date updateTime) {
+        this.updateTime = updateTime;
+    }
 }
diff --git a/wisenergy-service/pom.xml b/wisenergy-service/pom.xml
index 3fc63d5..79b1ecd 100644
--- a/wisenergy-service/pom.xml
+++ b/wisenergy-service/pom.xml
@@ -72,28 +72,6 @@
             <artifactId>itext-asian</artifactId>
             <version>5.2.0</version>
         </dependency>
-
-        <!--有赞SDK-->
-        <dependency>
-            <groupId>com.youzan.cloud</groupId>
-            <artifactId>open-sdk-core</artifactId>
-            <version>1.0.7-RELEASE</version>
-        </dependency>
-        <dependency>
-            <groupId>com.youzan.cloud</groupId>
-            <artifactId>open-sdk-gen</artifactId>
-            <version>1.0.7.78771202102051104-RELEASE</version>
-        </dependency>
-        <dependency>
-            <groupId>com.youzan.cloud</groupId>
-            <artifactId>open-sdk-api</artifactId>
-            <version>1.0.7-RELEASE</version>
-        </dependency>
-        <dependency>
-            <groupId>com.youzan.cloud</groupId>
-            <artifactId>open-sdk-common</artifactId>
-            <version>1.0.7-RELEASE</version>
-        </dependency>
     </dependencies>
 
     <!-- MAVEN构建 -->
diff --git a/wisenergy-service/src/main/java/cn/wisenergy/service/app/UserService.java b/wisenergy-service/src/main/java/cn/wisenergy/service/app/UserService.java
index 0b02f6e..d2bdedf 100644
--- a/wisenergy-service/src/main/java/cn/wisenergy/service/app/UserService.java
+++ b/wisenergy-service/src/main/java/cn/wisenergy/service/app/UserService.java
@@ -3,8 +3,6 @@ package cn.wisenergy.service.app;
 import cn.wisenergy.common.utils.R;
 import cn.wisenergy.model.app.User;
 
-import java.util.List;
-
 /**
  * @ Description: 用户接口
  * @ Author     : 86187
@@ -19,16 +17,27 @@ public interface UserService {
      * @param userId 用户id
      * @return 用户信息
      */
-    R<User> getById(String userId);
+    R<Integer> getById(String userId);
 
     /**
      * 获取用户信息
      * @param userId 用户id
      * @return 用户信息
      */
-    User getByUserId(String userId);
+    Integer getByUserId(String userId);
 
     //根据手机号查询用户
     public User queryUsersByPhone(String id);
+    //根据OpenId查询用户
+    public User queryUsersByOpenId(String openId);
+
+    /**
+     *用户注册
+     */
+    Integer userByZx(String userId, String beInvitedCode);
+
+//    Integer selectbyint(String userId,String beInvitedCode);
+//
+//    Integer getuserIdById(String userId);
 
 }
diff --git a/wisenergy-service/src/main/java/cn/wisenergy/service/app/impl/UserServiceImpl.java b/wisenergy-service/src/main/java/cn/wisenergy/service/app/impl/UserServiceImpl.java
index 7e0e1a6..df0f945 100644
--- a/wisenergy-service/src/main/java/cn/wisenergy/service/app/impl/UserServiceImpl.java
+++ b/wisenergy-service/src/main/java/cn/wisenergy/service/app/impl/UserServiceImpl.java
@@ -1,6 +1,7 @@
 package cn.wisenergy.service.app.impl;
 
 import cn.wisenergy.common.utils.R;
+import cn.wisenergy.common.utils.ShareCodeUtil;
 import cn.wisenergy.mapper.UsersMapper;
 import cn.wisenergy.model.app.User;
 import cn.wisenergy.service.app.UserService;
@@ -10,6 +11,8 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.util.CollectionUtils;
 
+
+import javax.xml.transform.Result;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
@@ -28,13 +31,13 @@ public class UserServiceImpl extends ServiceImpl<UsersMapper, User> implements U
     private UsersMapper usersMapper;
 
     @Override
-    public R<User> getById(String userId) {
+    public R<Integer> getById(String userId) {
 
         return R.ok(usersMapper.getByUserId(userId));
     }
 
     @Override
-    public User getByUserId(String userId) {
+    public Integer getByUserId(String userId) {
         return usersMapper.getByUserId(userId);
     }
 
@@ -51,4 +54,38 @@ public class UserServiceImpl extends ServiceImpl<UsersMapper, User> implements U
         return null;
     }
 
+    @Override
+    public User queryUsersByOpenId(String id) {
+        return null;
+    }
+
+    @Override
+    public Integer userByZx(String userId, String beInvitedCode) {
+        /**
+         * 判断用户等级是否为空,空的话填写0
+         */
+        if(null==beInvitedCode || ""==beInvitedCode){
+            beInvitedCode= String.valueOf(1);
+        }
+//        插入用户手机号与推荐人邀请码
+        usersMapper.insertbyint(userId,beInvitedCode);
+        //根据插入的用户手机号,查询用户唯一ID
+        Integer yqm=usersMapper.getByUserId(userId);
+        //用户唯一ID调用生成6位邀请码
+        String inviteCode= ShareCodeUtil.idToCode(yqm);
+        //根据用户手机号,更新用户信息
+        User user = new User();
+        user.setInviteCode(inviteCode);
+        user.setUserLevel(0);
+        usersMapper.updateById(user);
+        //插入直推用户表
+
+        //插入用户团队表
+
+        //根据邀请码查询推荐人的普通用户字段+1
+
+        //根据邀请码递归所有团队成员普通用户+1
+
+    }
+
 }
diff --git a/wisenergy-web-admin/src/main/java/cn/wisenergy/web/sms/SmsController.java b/wisenergy-web-admin/src/main/java/cn/wisenergy/web/admin/controller/app/SmsController.java
similarity index 61%
rename from wisenergy-web-admin/src/main/java/cn/wisenergy/web/sms/SmsController.java
rename to wisenergy-web-admin/src/main/java/cn/wisenergy/web/admin/controller/app/SmsController.java
index 94fd7f4..f4d1845 100644
--- a/wisenergy-web-admin/src/main/java/cn/wisenergy/web/sms/SmsController.java
+++ b/wisenergy-web-admin/src/main/java/cn/wisenergy/web/admin/controller/app/SmsController.java
@@ -1,7 +1,11 @@
-package cn.wisenergy.web.sms;
+package cn.wisenergy.web.admin.controller.app;
 
 import cn.wisenergy.common.utils.RedisUtils;
 import cn.wisenergy.common.utils.StringUtil;
+import cn.wisenergy.web.sms.*;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
+import io.swagger.annotations.ApiOperation;
 import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.RequestMapping;
@@ -17,6 +21,17 @@ public class SmsController {
     @Autowired
     private RedisUtils redisUtils;
 
+    /**
+     *
+     * @param phone
+     * @param codeType 0注册/登录验证   1修改密码 2订单通知信息
+     * @return
+     * @throws Exception
+     */
+    @ApiOperation(value = "发送验证码", notes = "发送验证码", httpMethod = "POST", produces = "application/json; charset=UTF-8")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "phone", value = "用户手机号", required = true, dataType = "String"),
+            @ApiImplicitParam(name = "codeType", value = "验证码", dataType = "Integer")})
     @RequestMapping("/verifyCode")
     public Result verifyCode(String phone,Integer codeType) throws Exception {
         //判断phone和codeType是否符合输入类型
@@ -28,15 +43,15 @@ public class SmsController {
         }
         String key= StringUtil.formatKeyWithPrefix(Constants.RedisKey.PROJECT_PRIFIX,Constants.RedisKey.SMS_PRIFIX,phone,codeType+"");
         //判断是否超过60S
-        String oldCode=redisUtils.getValue(key);
-        if(!StringUtils.isBlank(oldCode)){
+        String Codekey=redisUtils.getValue(key);
+        if(!StringUtils.isBlank(Codekey)){
             throw new BaseException(ResultEnum.CODESEND_ERROR);
         }
         //生成随机数
         String code= MathUtils.random();
         //保存至Redis
-        redisUtils.set(key,code,Constants.Duration.MINUTE_INT);
-        boolean flag=smsUtils.sendMessage(phone,Constants.Sms.TemplateCode.LOGIN_OR_REGISTER,code);
+        redisUtils.set(Codekey,code,Constants.Duration.MINUTE_INT);
+        boolean flag=smsUtils.sendMessage(phone,Constants.Sms.TemplateCode.LOGIN_DL_REGISTER,code);
         return flag? ResultUtils.returnSuccess():ResultUtils.returnFail();
     }
 }
\ No newline at end of file
diff --git a/wisenergy-web-admin/src/main/java/cn/wisenergy/web/sms/TestController.java b/wisenergy-web-admin/src/main/java/cn/wisenergy/web/admin/controller/app/TestController.java
similarity index 57%
rename from wisenergy-web-admin/src/main/java/cn/wisenergy/web/sms/TestController.java
rename to wisenergy-web-admin/src/main/java/cn/wisenergy/web/admin/controller/app/TestController.java
index 16ecf87..b1b5430 100644
--- a/wisenergy-web-admin/src/main/java/cn/wisenergy/web/sms/TestController.java
+++ b/wisenergy-web-admin/src/main/java/cn/wisenergy/web/admin/controller/app/TestController.java
@@ -1,19 +1,22 @@
-package cn.wisenergy.web.sms;
+package cn.wisenergy.web.admin.controller.app;
 
-//import cn.est.config.UserConfig;
-//import cn.est.constants.ResultEnum;
-//import cn.est.dto.Result;
-//import cn.est.po.Brand;
-//import cn.est.service.BrandService;
-//import cn.est.utils.ResultUtils;
-//import cn.est.utils.SmsUtils;
-//import cn.est.utils.StringUtil;
+
+import cn.wisenergy.common.utils.SmsUtils;
+import cn.wisenergy.web.sms.Result;
+import cn.wisenergy.web.sms.ResultUtils;
+import cn.wisenergy.web.sms.ShareCodeUtil;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Controller;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.ResponseBody;
+import org.springframework.web.bind.annotation.RestController;
 
-@Controller
+@Api(tags = "短信服务测试,邀请码测试")
+@RestController
+@RequestMapping("/ZX")
+@Slf4j
 public class TestController {
 
 //    @Autowired
@@ -25,6 +28,7 @@ public class TestController {
 //    @Autowired
 //    private UserConfig useronfig;
 
+    @ApiOperation(value = "测试Hello Wolrd", notes = "测试", httpMethod = "POST", produces = "application/json; charset=UTF-8")
     @RequestMapping("/index")
     @ResponseBody
     public String index() {
@@ -49,17 +53,17 @@ public class TestController {
 
     public static void main(String [] args){
 
-        String b = ShareCodeUtil.idToCode(123456);
-       String a= ShareCodeUtil.idToCode(0,0+1);
+        String b = ShareCodeUtil.idToCode(1);
+       String a= ShareCodeUtil.idToCode(19919990669,0+1);
 
         System.out.println(b);
     }
 
+    @ApiOperation(value = "测试短信服务,发送手机号", notes = "测试短信服务,发送手机号", httpMethod = "POST", produces = "application/json; charset=UTF-8")
     @RequestMapping("/testSms")
     @ResponseBody
     public Result testException()throws Exception{
-
 //       System.out.println(useronfig.getUserName()+"---"+useronfig.getSex());
-       return smsUtils.sendMessage("18518666833","SMS_212170059","2111")?ResultUtils.returnSuccess():ResultUtils.returnFail();
+       return smsUtils.sendMessage("19919990669","SMS_212170059","2111")? ResultUtils.returnSuccess():ResultUtils.returnFail();
     }
 }
diff --git a/wisenergy-web-admin/src/main/java/cn/wisenergy/web/admin/controller/app/UserController.java b/wisenergy-web-admin/src/main/java/cn/wisenergy/web/admin/controller/app/UserController.java
index 34a9f41..1b88c62 100644
--- a/wisenergy-web-admin/src/main/java/cn/wisenergy/web/admin/controller/app/UserController.java
+++ b/wisenergy-web-admin/src/main/java/cn/wisenergy/web/admin/controller/app/UserController.java
@@ -79,49 +79,4 @@ public class UserController extends BaseController {
         return R.ok(token);
     }
 
-//    /**
-//     * 手机号登录
-//     * @param userId
-//     * @param sms
-//     * @return
-//     * @throws Exception
-//     */
-//    @ApiOperation(value = "获取用户手机号登录接口", notes = "获取用户手机号登录接口", httpMethod = "POST")
-//    @ApiImplicitParams({
-//            @ApiImplicitParam(name = "userId", value = "用户手机号", required = true, dataType = "String"),
-//            @ApiImplicitParam(name = "sms", value = "短信验证码", required = true, dataType = "String")})
-//    @RequestMapping("/login/sms")
-//    public Result loginBySms(String userId, String sms)throws Exception{
-//        User users=null;
-//        String key= StringUtil.formatKeyWithPrefix(Constants.RedisKey.PROJECT_PRIFIX,Constants.RedisKey.SMS_PRIFIX,userId,Constants.Sms.CodeType.LOGIN_OR_REGISTER+"");
-//        String redisCode=redisUtils.getValue(key);
-//        if(StringUtil.isBlank(redisCode) || !sms.equals(redisCode)){
-//            throw new BaseException(ResultEnum.FAIL_VERIFY);
-//        }
-//        redisUtils.delete(key);
-//        //根据手机号判断用户是否存在
-//        //不存在则保存用户信息
-//        users=userService.queryUsersByPhone(userId);
-//        if(null==users){
-//            users=new User();
-////            users.setAccount(phone);
-////            users.setUserName(phone);
-////            userService.qdtxAddUsers(users);
-//        }
-//        String token=createToken(users);
-//        if(!StringUtil.isBlank(token)){
-//            return ResultUtils.returnDataSuccess(StringUtil.createSimpleMap("token",token));
-//        }
-//        return ResultUtils.returnFail();
-//    }
-//
-//    public String createToken(User users)throws Exception{
-//        String token=StringUtil.createToken();
-//        //保存token
-//        String tokenKey=StringUtil.formatKeyWithPrefix(Constants.RedisKey.PROJECT_PRIFIX,Constants.RedisKey.TOKEN_PRIFIX,token);
-//        UsersDto usersDto=new UsersDto();
-//        BeanUtils.copyProperties(users,usersDto);
-//        redisUtils.set(tokenKey, JSONObject.toJSONString(usersDto),Constants.Duration.HALF_HOUR_INT);
-//        return token;
-//    }
 }
diff --git a/wisenergy-web-admin/src/main/java/cn/wisenergy/web/admin/controller/app/loginController.java b/wisenergy-web-admin/src/main/java/cn/wisenergy/web/admin/controller/app/loginController.java
new file mode 100644
index 0000000..a765cff
--- /dev/null
+++ b/wisenergy-web-admin/src/main/java/cn/wisenergy/web/admin/controller/app/loginController.java
@@ -0,0 +1,131 @@
+package cn.wisenergy.web.admin.controller.app;
+
+import cn.wisenergy.web.sms.*;
+import cn.wisenergy.common.utils.RedisUtils;
+import cn.wisenergy.common.utils.StringUtil;
+import cn.wisenergy.model.app.User;
+import cn.wisenergy.model.app.UsersDto;
+import cn.wisenergy.service.app.UserService;
+import com.alibaba.fastjson.JSONObject;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
+import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.BeanUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.RestController;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+/**
+ *
+ * Created by m1991 on 2021/3/2 13:35
+ */
+@Api(tags = "登录/注册")
+@Slf4j
+@RequestMapping("/api/user/login/sms")
+@RestController
+public class loginController {
+        @Autowired
+        private RedisUtils redisUtils;
+
+        @Autowired
+        private UserService usersService;
+
+        @Autowired
+        private Result result;
+
+    /**
+     * 手机登录接口
+     * @param userId
+     * @param sms
+     * @return
+     * @throws Exception
+     */
+
+    @ApiOperation(value = "登录", notes = "登录", httpMethod = "POST", produces = "application/json; charset=UTF-8")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "sms", value = "验证码", dataType = "String"),
+            @ApiImplicitParam(name = "userId", value = "用户手机号", required = true, dataType = "String")})
+        @RequestMapping("/login/sms")
+        public Result loginBySms(String userId,String sms)throws Exception{
+            User users=null;
+            String key= StringUtil.formatKeyWithPrefix(Constants.RedisKey.PROJECT_PRIFIX,Constants.RedisKey.SMS_PRIFIX,userId,Constants.Sms.CodeType.LOGIN_OR_REGISTER+"");
+            String redisCode=redisUtils.getValue(key);
+            if(StringUtil.isBlank(redisCode) || !sms.equals(redisCode)){
+                throw new BaseException(ResultEnum.FAIL_VERIFY);
+            }
+            redisUtils.delete(key);
+            //根据手机号判断用户是否存在
+            //不存在则保存用户信息--修改为提示用户注册
+            users=usersService.queryUsersByPhone(userId);
+
+            if(null==users){
+                throw new BaseException(ResultEnum.FAIL_ACCOUNT_NOT_EXIST);
+//                users=new User();
+//                users.setUserId(userId);
+//                usersService.qdtxAddUsers(users);;
+
+            }
+            String token=createToken(users);
+            if(!StringUtil.isBlank(token)){
+                return ResultUtils.returnDataSuccess(StringUtil.createSimpleMap("token",token));
+            }
+            return ResultUtils.returnFail();
+        }
+
+        public String createToken(User users)throws Exception{
+            String token=StringUtil.createToken();
+            //保存token
+            String tokenKey=StringUtil.formatKeyWithPrefix(Constants.RedisKey.PROJECT_PRIFIX,Constants.RedisKey.TOKEN_PRIFIX,token);
+            UsersDto usersDto=new UsersDto();
+            BeanUtils.copyProperties(users,usersDto);
+            redisUtils.set(tokenKey, JSONObject.toJSONString(usersDto),Constants.Duration.HALF_HOUR_INT);
+            return token;
+        }
+
+
+        @ApiOperation(value = "获取用户登录token信息", notes = "获取用户登录token信息", httpMethod = "POST", produces = "application/json; charset=UTF-8")
+        @RequestMapping("/info")
+        public Result info(HttpServletRequest request)throws Exception{
+            String token=request.getHeader("token");
+            String tokenKey=StringUtil.formatKeyWithPrefix(Constants.RedisKey.PROJECT_PRIFIX,Constants.RedisKey.TOKEN_PRIFIX,token);
+            String userDtoJson=redisUtils.getValue(tokenKey);
+            if(StringUtil.isBlank(userDtoJson)){
+                throw new BaseException(ResultEnum.FILE_NOT_LOGIN);
+            }
+            UsersDto usersDto=JSONObject.parseObject(userDtoJson,UsersDto.class);
+            usersDto.setPassword(null);
+            return ResultUtils.returnDataSuccess(userDtoJson);
+        }
+        //用户注册
+        @ApiOperation(value = "用户注册", notes = "用户注册", httpMethod = "POST", produces = "application/json; charset=UTF-8")
+        @ApiImplicitParams({
+                @ApiImplicitParam(name = "userId", value = "用户手机号", required = true, dataType = "String"),
+                @ApiImplicitParam(name = "beInvitedCode", value = "推荐人邀请码", dataType = "String"),
+                @ApiImplicitParam(name = "sms", value = "验证码", dataType = "String")
+                })
+        @RequestMapping("/register")
+        public Result register(@RequestParam String userId, @RequestParam String beInvitedCode, String sms)throws Exception {
+            User users=null;
+            String key= StringUtil.formatKeyWithPrefix(Constants.RedisKey.PROJECT_PRIFIX,Constants.RedisKey.SMS_PRIFIX,userId,Constants.Sms.CodeType.LOGIN_OR_REGISTER+"");
+            String redisCode=redisUtils.getValue(key);
+            if(StringUtil.isBlank(redisCode) || !sms.equals(redisCode)){
+                throw new BaseException(ResultEnum.FAIL_VERIFY);
+            }
+            redisUtils.delete(key);
+            //判断phone是否符合输入类型
+            if(!userId.matches(Constants.RegConstant.PHONE_REGSTR)){
+                throw new BaseException(ResultEnum.PHONE_ERROR);
+            }
+            usersService.userByZx(userId,beInvitedCode);
+
+            return ResultUtils.returnFail("注册成功!","0");
+            }
+
+    }
+
diff --git a/wisenergy-web-admin/src/main/java/cn/wisenergy/web/shiro/ShiroConfig.java b/wisenergy-web-admin/src/main/java/cn/wisenergy/web/shiro/ShiroConfig.java
index ebb9528..b94af85 100644
--- a/wisenergy-web-admin/src/main/java/cn/wisenergy/web/shiro/ShiroConfig.java
+++ b/wisenergy-web-admin/src/main/java/cn/wisenergy/web/shiro/ShiroConfig.java
@@ -63,13 +63,15 @@ public class ShiroConfig {
         filterChainDefinitionMap.put("/webjars/springfox-swagger-ui/**", "anon");
         filterChainDefinitionMap.put("/swagger-resources/**", "anon");
         filterChainDefinitionMap.put("/v2/api-docs", "anon");
+        filterChainDefinitionMap.put("/api/sms/verifyCode", "anon");
+        filterChainDefinitionMap.put("/api/sms/**", "anon");
         filterChainDefinitionMap.put("/upload_flowChart/**", "anon");//图片地址
         filterChainDefinitionMap.put("/webSocket/**", "anon");//socket
         filterChainDefinitionMap.put("/message/**", "anon");//消息推送接口
         filterChainDefinitionMap.put("/**", "oauth2");  // 其他路径均需要身份认证,一般位于最下面,优先级最低
 
         // 设置拦截器
-        shiroFilterFactoryBean.setFilterChainDefinitionMap(filterChainDefinitionMap);
+       shiroFilterFactoryBean.setFilterChainDefinitionMap(filterChainDefinitionMap);
         return shiroFilterFactoryBean;
     }
 
diff --git a/wisenergy-web-admin/src/main/java/cn/wisenergy/web/sms/Constants.java b/wisenergy-web-admin/src/main/java/cn/wisenergy/web/sms/Constants.java
index a4e8a01..826e0d4 100644
--- a/wisenergy-web-admin/src/main/java/cn/wisenergy/web/sms/Constants.java
+++ b/wisenergy-web-admin/src/main/java/cn/wisenergy/web/sms/Constants.java
@@ -48,14 +48,28 @@ public class Constants {
     //正则的一些常量
     public static class RegConstant{
         //手机号正则
-        public static String PHONE_REGSTR = "^[1][0-9]{10}$";
+        public static String PHONE_REGSTR = "^1[0-9]{10}$";
         //密码正则
         public static String PASSWORD_REGSTR = "^([A-Z]|[a-z]|[0-9]|[_]){6,10}$";
     }
     //SMS相关常量
     public static class Sms{
         public static class TemplateCode{
-            public static String LOGIN_OR_REGISTER="SMS_197895260";
+            //对存入redis的tokn用户进行标注
+            public static String LOGIN_BZ_REGISTER="xts";
+            //身份验证验证码
+            public static String LOGIN_SF_REGISTER="SMS_212170059";
+            //登录确认验证码
+            public static String LOGIN_DL_REGISTER="SMS_212170058";
+            //登录异常验证码
+            public static String LOGIN_DLYC_REGISTER="SMS_212170057";
+            //用户注册验证码
+            public static String LOGIN_ZC_REGISTER="SMS_212170056";
+            //修改密码验证码
+            public static String LOGIN_XGMM_REGISTER= "SMS_212170055";
+           // 信息变更验证码
+            public static String LOGIN_XXBG_REGISTER= "SMS_212170054";
+
         }
 
         public static class CodeType{
diff --git a/wisenergy-web-admin/src/main/java/cn/wisenergy/web/sms/ResultEnum.java b/wisenergy-web-admin/src/main/java/cn/wisenergy/web/sms/ResultEnum.java
index 8caca11..2dff8c8 100644
--- a/wisenergy-web-admin/src/main/java/cn/wisenergy/web/sms/ResultEnum.java
+++ b/wisenergy-web-admin/src/main/java/cn/wisenergy/web/sms/ResultEnum.java
@@ -16,7 +16,7 @@ public enum ResultEnum {
     FAIL_LOGIN("1002", "登录失败"),
     FAIL_VERIFY("1003", "验证码错误"),
     FAIL_ACCOUNT_EXIST("1004", "账号已存在"),
-    FAIL_ACCOUNT_NOT_EXIST("1005", "账号不存在"),
+    FAIL_ACCOUNT_NOT_EXIST("1005", "账号不存在,请注册!"),
     FAIL_TIMESTAMP_NOT_NULL("1006", "时间戳不能为空"),
     FAIL_VISIT_SOURCE_NOT_NULL("1007", "访问来源不能为空"),
     PHONE_ERROR("1008","手机号码格式不正确"),
diff --git a/wisenergy-web-admin/src/main/java/cn/wisenergy/web/sms/interceptor/ValidateParamInterceptor.java b/wisenergy-web-admin/src/main/java/cn/wisenergy/web/sms/interceptor/ValidateParamInterceptor.java
index e8ad166..ca2c56e 100644
--- a/wisenergy-web-admin/src/main/java/cn/wisenergy/web/sms/interceptor/ValidateParamInterceptor.java
+++ b/wisenergy-web-admin/src/main/java/cn/wisenergy/web/sms/interceptor/ValidateParamInterceptor.java
@@ -67,9 +67,9 @@ public class ValidateParamInterceptor extends HandlerInterceptorAdapter {
         // 阿里支付
         map.put("/api/pay/alipay", Arrays.asList("orderNo", "amount"));
         // 验证码登录、注册接口
-        map.put("/api/sms/login/sms", Arrays.asList("phone", "sms"));
+        map.put("/api/sms/login/sms", Arrays.asList("userId", "sms"));
         // 发送验证码接口
-        map.put("/api/sms/verifyCode", Arrays.asList("phone", "codeType"));
+        map.put("/api/sms/verifyCode", Arrays.asList("userId", "codeType"));
         return map;
     }
 
-- 
2.18.1