bmmx 1 жил өмнө
parent
commit
1761e4cec0

+ 2 - 1
src/main/java/com/om/exception/BadReqException.java

@@ -1,5 +1,6 @@
 package com.om.exception;
 
+import com.om.utils.ResultCode;
 import lombok.Data;
 
 /**
@@ -8,7 +9,7 @@ import lombok.Data;
  */
 @Data
 public class BadReqException extends RuntimeException {
-    private final Integer code = 400;
+    private final Integer code = ResultCode.SERVICE_HANDLE_ERROR;
     private String message = "错误请求";
 
     public BadReqException(String message) {

+ 7 - 1
src/main/java/com/om/exception/BizException.java

@@ -1,5 +1,6 @@
 package com.om.exception;
 
+import com.om.utils.ResultCode;
 import lombok.Data;
 
 /**
@@ -8,12 +9,17 @@ import lombok.Data;
  */
 @Data
 public class BizException extends RuntimeException {
-    private final Integer code = 500;
+    private Integer code = ResultCode.SERVICE_HANDLE_ERROR;
     private String message = "业务异常";
 
     public BizException(String message) {
         this.message = message;
     }
 
+    public BizException(String message,Integer code) {
+        this.message = message;
+        this.code = code;
+    }
+
 
 }

+ 3 - 6
src/main/java/com/om/service/impl/BrandServiceImpl.java

@@ -18,10 +18,7 @@ import com.om.service.IBrandClientService;
 import com.om.service.IBrandService;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.om.service.IClientService;
-import com.om.utils.AesUtil;
-import com.om.utils.JwtUtils;
-import com.om.utils.Result;
-import com.om.utils.UserContext;
+import com.om.utils.*;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 
@@ -257,9 +254,9 @@ public class BrandServiceImpl extends ServiceImpl<BrandMapper, Brand> implements
     }
 
     @Override
-    public Result<List<BrandVO>> getAPPList(AppBaseDTO dto) {
+    public Result getAPPList(AppBaseDTO dto) {
         if (BeanUtil.isEmpty(dto)){
-            throw new BadReqException("数据为空");
+            return Result.fail("未获取到数据").result(ResultCode.NO_DATA);
         }
 
         String guid = dto.getGuid();

+ 4 - 3
src/main/java/com/om/service/impl/BrushFileServiceImpl.java

@@ -14,6 +14,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.om.utils.AesUtil;
 import com.om.utils.JwtUtils;
 import com.om.utils.Result;
+import com.om.utils.ResultCode;
 import org.springframework.stereotype.Service;
 
 
@@ -39,9 +40,9 @@ public class BrushFileServiceImpl extends ServiceImpl<BrushFileMapper, BrushFile
     private IBrushDescriptionService brushDescriptionService;
 
     @Override
-    public Result<List<AppBrushFileVO>> getBrushFileList(AppBrushFileDTO dto) {
+    public Result getBrushFileList(AppBrushFileDTO dto) {
         if (BeanUtil.isEmpty(dto)){
-            throw new BadReqException("数据为空");
+            return Result.fail("未获取到数据").result(ResultCode.NO_DATA);
         }
 
         String brandCode = dto.getBrandCode();
@@ -55,7 +56,7 @@ public class BrushFileServiceImpl extends ServiceImpl<BrushFileMapper, BrushFile
                 .list();
 
         if (brushFileList.isEmpty()){
-            return Result.ok();
+            return Result.fail("未获取到数据").result(ResultCode.NO_DATA);
         }
         List<AppBrushFileVO> brushFileVOList = new ArrayList<>();
         for (BrushFile brushFile : brushFileList) {

+ 4 - 7
src/main/java/com/om/service/impl/DiagnosisVersionInfoServiceImpl.java

@@ -12,10 +12,7 @@ import com.om.exception.BadReqException;
 import com.om.mapper.DiagnosisVersionInfoMapper;
 import com.om.service.*;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.om.utils.AesUtil;
-import com.om.utils.JwtUtils;
-import com.om.utils.Result;
-import com.om.utils.UserContext;
+import com.om.utils.*;
 import io.swagger.v3.oas.annotations.parameters.RequestBody;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.lang.StringUtils;
@@ -272,10 +269,10 @@ public class DiagnosisVersionInfoServiceImpl extends ServiceImpl<DiagnosisVersio
     }
 
     @Override
-    public Result<List<VehicleDates>> diagnosisVersionInfoUpdate(AppDiagVersionUpdateDTO dto) {
+    public Result diagnosisVersionInfoUpdate(AppDiagVersionUpdateDTO dto) {
 
         if (BeanUtil.isEmpty(dto)) {
-            throw new BadReqException("参数为空!!!");
+            return Result.fail("未获取到数据").result(ResultCode.NO_DATA);
         }
 
         List<VehicleDates> brandInfo = dto.getBrandInfo();
@@ -296,7 +293,7 @@ public class DiagnosisVersionInfoServiceImpl extends ServiceImpl<DiagnosisVersio
                     .gt(DiagnosisVersionInfo::getVersionNum, version)
                     .one();
             if (BeanUtil.isEmpty(diagnosisVersionInfo)) {
-                return Result.ok();
+                return Result.fail("未获取到数据").result(ResultCode.NO_DATA);
             }
             //根据品牌id查询品牌
             Brand brand = brandService.getById(diagnosisVersionInfo.getBrandId());

+ 2 - 2
src/main/java/com/om/service/impl/DiagnosticMenuServiceImpl.java

@@ -172,9 +172,9 @@ public class DiagnosticMenuServiceImpl extends ServiceImpl<DiagnosticMenuMapper,
     }
 
     @Override
-    public Result<AppMenuVO> menuUpdate(AppmenuUpdateDTO dto) {
+    public Result menuUpdate(AppmenuUpdateDTO dto) {
         if (BeanUtil.isEmpty(dto)){
-            throw new BadReqException("数据为空!");
+            return Result.fail("未获取到数据").result(ResultCode.NO_DATA);
         }
         String version = dto.getVersion();
 

+ 4 - 3
src/main/java/com/om/service/impl/DistributorServiceImpl.java

@@ -20,6 +20,7 @@ import com.om.service.IUserService;
 import com.om.utils.AesUtil;
 import com.om.utils.JwtUtils;
 import com.om.utils.Result;
+import com.om.utils.ResultCode;
 import org.springframework.stereotype.Service;
 
 import javax.annotation.Resource;
@@ -151,7 +152,7 @@ public class DistributorServiceImpl extends ServiceImpl<DistributorMapper, Distr
     }
 
     @Override
-    public Result<APpDistributorVO> AppGetById(AppBaseDTO dto) {
+    public Result AppGetById(AppBaseDTO dto) {
         String guid = dto.getGuid();
         GuidDTO guidDTO = AesUtil.getGuidDTOFromGuid(guid);
         Integer userId = guidDTO.getUserId();
@@ -159,7 +160,7 @@ public class DistributorServiceImpl extends ServiceImpl<DistributorMapper, Distr
         //查询用户所在的维修厂id
         User user = userService.getById(userId);
         if (BeanUtil.isEmpty(user)){
-            throw new BadReqException("该用户不存在");
+            return Result.fail("用户不存在").result(ResultCode.USER_NO_EXIST);
         }
 
         Integer distributorId = user.getDistributorId();
@@ -183,7 +184,7 @@ public class DistributorServiceImpl extends ServiceImpl<DistributorMapper, Distr
         //查询用户所在的维修厂id
         User user = userService.getById(userId);
         if (BeanUtil.isEmpty(user)){
-            throw new BadReqException("该用户不存在");
+            return Result.fail("用户不存在").result(ResultCode.USER_NO_EXIST);
         }
         Integer distributorId = user.getDistributorId();
 

+ 9 - 9
src/main/java/com/om/service/impl/RepairServiceImpl.java

@@ -81,7 +81,7 @@ public class RepairServiceImpl extends ServiceImpl<RepairMapper, Repair> impleme
         User user = userService.getById(userId);
         // 判断数据、
         if (BeanUtil.isEmpty(dto)) {
-            throw new BadReqException("数据为空");
+            return Result.fail("未获取到数据").result(ResultCode.NO_DATA);
         }
 
         Repair repair = BeanUtil.copyProperties(dto, Repair.class);
@@ -127,14 +127,14 @@ public class RepairServiceImpl extends ServiceImpl<RepairMapper, Repair> impleme
     }
 
     @Override
-    public Result<AppRepairQueryPageVO> AppGetPageList(APPRepairQueryPageDTO dto) {
+    public Result AppGetPageList(APPRepairQueryPageDTO dto) {
         String guid = dto.getGuid();
         GuidDTO guidDTO = AesUtil.getGuidDTOFromGuid(guid);
         Integer userId = guidDTO.getUserId();
 
         User user = userService.getById(userId);
         if (BeanUtil.isEmpty(user)) {
-            throw new BizException("用户不存在");
+            return Result.fail("用户不存在").result(ResultCode.NO_DATA);
         }
         //获取数据
         Integer pageIndex = dto.getPageIndex();
@@ -147,7 +147,7 @@ public class RepairServiceImpl extends ServiceImpl<RepairMapper, Repair> impleme
                 .page(new Page<>(pageIndex, pageSize));
 
         if (BeanUtil.isEmpty(page)) {
-            throw new BadReqException("请求失败");
+            return Result.fail("未获取到数据").result(ResultCode.NO_DATA);
         }
 
         AppRepairQueryPageVO vo = new AppRepairQueryPageVO();
@@ -205,7 +205,7 @@ public class RepairServiceImpl extends ServiceImpl<RepairMapper, Repair> impleme
         Integer id = dto.getDiagnosticReportId();
         Repair repair = this.getById(id);
         if (repair == null) {
-            throw new BadReqException("删除错误");
+            throw new BadReqException("该诊断报告不存在");
         }
 
         String electronicControlIds = repair.getElectronicControlIds();
@@ -236,7 +236,7 @@ public class RepairServiceImpl extends ServiceImpl<RepairMapper, Repair> impleme
     public Result<RepairVO> getByIds(Integer id) {
         Repair repair = this.getById(id);
         if (repair == null) {
-            throw new BadReqException("查询错误");
+            throw new BadReqException("该诊断报告不存在");
         }
 
         String electronicControlIds = repair.getElectronicControlIds();
@@ -430,7 +430,7 @@ public class RepairServiceImpl extends ServiceImpl<RepairMapper, Repair> impleme
     }
 
     @Override
-    public Result<String> reportH5(Integer id) {
+    public Result reportH5(Integer id) {
         //根据id查询报告是否存在
         Repair repair = this.getById(id);
 
@@ -452,7 +452,7 @@ public class RepairServiceImpl extends ServiceImpl<RepairMapper, Repair> impleme
                 .eq(User::getUsername, username)
                 .one();
         if (BeanUtil.isEmpty(user)){
-            throw new BadReqException("该用户不存在");
+           return Result.fail("用户不存在").result(ResultCode.USER_NO_EXIST);
         }
 
         Map<String,String> companyMap = new HashMap<>();
@@ -555,7 +555,7 @@ public class RepairServiceImpl extends ServiceImpl<RepairMapper, Repair> impleme
                 .eq(User::getUsername, username)
                 .one();
         if (BeanUtil.isEmpty(user)){
-            throw new BadReqException("该用户不存在");
+            return Result.fail("用户不存在").result(ResultCode.USER_NO_EXIST);
         }
 
         if (type.equals("company")){

+ 36 - 24
src/main/java/com/om/service/impl/UserServiceImpl.java

@@ -15,10 +15,7 @@ import com.om.exception.CustomerAuthenticationException;
 import com.om.mapper.UserMapper;
 import com.om.service.*;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.om.utils.AesUtil;
-import com.om.utils.JwtUtils;
-import com.om.utils.Result;
-import com.om.utils.UserContext;
+import com.om.utils.*;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.lang3.StringUtils;
 import org.springframework.data.redis.core.RedisTemplate;
@@ -71,7 +68,7 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements IU
 
 
     @Override
-    public Result<UserLoginVO> login(UserLoginDTO dto) {
+    public Result login(UserLoginDTO dto) {
         //从dto中获取数据
         String username = dto.getUsername();
         String password = dto.getPassword();
@@ -83,7 +80,7 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements IU
         //判断数据是否为空
         if (StringUtils.isBlank(username) || StringUtils.isBlank(password) || StringUtils.isBlank(clientNum) ||
                 StringUtils.isBlank(deviceSn) || type == null) {
-            throw new BadReqException("数据为空!!");
+            return Result.fail("未获取到数据").result(ResultCode.NO_DATA);
         }
 
         //根据用户名查询用户
@@ -93,25 +90,27 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements IU
 
         //判断用户是否存在
         if (BeanUtil.isEmpty(user)) {
-            throw new BadReqException("该用户不存在!!");
+            return Result.fail("用户不存在").result(ResultCode.USER_NO_EXIST);
         }
 
 
         //密码加密
         try {
             password = AesUtil.Encrypt(password);
-            System.out.println(password);
         } catch (Exception e) {
-            throw new BizException("密码加密出错");
+            throw new BizException("密码加密出错",ResultCode.PASSWORD_ENCRYPT_ERROR);
         }
         //判断密码是否正确
-        if (!password.equals(user.getPassword())) {
-            throw new BadReqException("密码错误");
+        if (StringUtils.equals(password,user.getPassword())) {
+            return Result.fail("密码错误").result(ResultCode.PASSWORD_ERROR);
         }
         if (user.getState() == 0) {
-            throw new BadReqException("该用户已被禁用");
+            return Result.fail("用户被禁用").result(ResultCode.USER_DISABLED);
         }
         //  绑定 客户端编号 和 设备 序列号  ( 判断type是登录(0)还是激活(1) )
+        if (!user.getDeviceSn().equals(dto.getDeviceSn())){
+            return Result.error().message("账号尚未激活").result(ResultCode.USER_NO_ACTIVATE);
+        }
         if (type == 1) {
             user.setDeviceSn(deviceSn);
         }
@@ -144,12 +143,17 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements IU
 
         if (!BeanUtil.isEmpty(userVciList)) {
             List<VciInfoVO> vciInfoVOList = new ArrayList<>();
+            int defaultCount = 0;
             for (UserVci userVci : userVciList) {
                 VciInfoVO vciInfoVO = new VciInfoVO();
                 Integer vciInfoId = userVci.getVciInfoId();
                 VciInfo vciInfo = vciInfoService.getById(vciInfoId);
+                if (BeanUtil.isEmpty(vciInfo)){
+                    throw new BadReqException("该VCI设备不存在");
+                }
                 if (userVci.getIsDefault() == 1) {
                     userLoginVO.setVciSn(vciInfo.getVciNum());
+                    defaultCount++;
                 }
                 vciInfoVO.setVciNum(vciInfo.getVciNum());
                 vciInfoVO.setState(String.valueOf(vciInfo.getState()));
@@ -159,6 +163,9 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements IU
 
                 vciInfoVOList.add(vciInfoVO);
             }
+            if (defaultCount!=1){
+                return Result.fail("设备已是默认状态").result(ResultCode.VCI_DEFAULTED);
+            }
 
             userLoginVO.setVciInfoList(vciInfoVOList);
         }
@@ -304,7 +311,7 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements IU
     public Result password(AppUserUpdatePwdDTO dto) {
 
         if (BeanUtil.isEmpty(dto)) {
-            throw new BadReqException("参数为空");
+            return Result.fail("未获取到数据").result(ResultCode.NO_DATA);
         }
         String guid = dto.getGuid();
         GuidDTO guidDTO = AesUtil.getGuidDTOFromGuid(guid);
@@ -313,12 +320,12 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements IU
 
         User user = getById(userId);
         if (user == null) {
-            return Result.error();
+            return Result.error().message("用户不存在").result(ResultCode.USER_NO_EXIST);
         }
         try {
             user.setPassword(AesUtil.Encrypt(dto.getNewPassword()));
         } catch (Exception e) {
-            throw new BizException("密码加密出错");
+            return Result.fail("密码加密出错").result(ResultCode.PASSWORD_ENCRYPT_ERROR);
         }
         this.updateById(user);
 
@@ -330,20 +337,20 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements IU
     public Result register(UserLoginDTO userLoginDTO) {
         User user = new User();
         if (userLoginDTO.getUsername() == null || userLoginDTO.getPassword() == null) {
-            return Result.error().message("用户名密码为空");
+            return Result.error().message("用户名密码为空").result(ResultCode.NO_DATA);
         }
         if (userLoginDTO.getPassword().equals(userLoginDTO.getRePassword())){
-            return Result.error().message("两次密码不一样");
+            return Result.error().message("两次密码不一样").result(ResultCode.PASSWORD_ERROR);
         }
         user.setUsername(userLoginDTO.getUsername());
         try {
             user.setPassword(AesUtil.Encrypt(userLoginDTO.getPassword()));
         } catch (Exception e) {
-            throw new BizException("密码加密出错");
+            return Result.error().message("密码加密错误").result(ResultCode.PASSWORD_ENCRYPT_ERROR);
         }
         boolean save = save(user);
         if (!save) {
-            return Result.error();
+            throw new BizException("数据库操作失败");
         }
         return Result.ok();
     }
@@ -356,7 +363,7 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements IU
 
         User user = getById(userId);
         if (user == null) {
-            return Result.error();
+            return Result.error().message("用户不存在").result(ResultCode.USER_NO_EXIST);
         }
         user.setUsername(dto.getUsername());
         LambdaQueryWrapper<User> queryWrapper = new LambdaQueryWrapper<>();
@@ -389,7 +396,7 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements IU
     public Result updateVci(AppBaseDTO dto) {
 
         if (BeanUtil.isEmpty(dto)) {
-            throw new BadReqException("参数为空");
+            return Result.error().message("参数为空").result(ResultCode.NO_DATA);
         }
         String guid = dto.getGuid();
         GuidDTO guidDTO = AesUtil.getGuidDTOFromGuid(guid);
@@ -399,7 +406,7 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements IU
                 .eq(VciInfo::getVciNum, vciSn)
                 .one();
         if (vciInfo == null) {
-            return Result.error();
+            return Result.error().message("VCI设备不存在").result(ResultCode.SERVICE_HANDLE_ERROR);
         }
         UserVci userVci = userVciService.lambdaQuery()
                 .eq(UserVci::getUserId, userId)
@@ -411,7 +418,7 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements IU
         queryWrapper.eq(VciInfo::getId, vciInfo.getId());
         boolean update = vciInfoService.update(vciInfo, queryWrapper);
         if (!update) {
-            return Result.error();
+            throw new BizException("数据库操作失败");
         }
 
         return Result.ok();
@@ -419,13 +426,18 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements IU
 
     @Override
     public Result bindingVci(AppBindVO bindVO) {
+        if (BeanUtil.isEmpty(bindVO)){
+            return Result.error().message("参数为空").result(ResultCode.NO_DATA);
+        }
         Integer userId = bindVO.getAppUserId();
         String vciNum = bindVO.getSn();
 
         LambdaQueryWrapper<VciInfo> vciInfoLambdaQueryWrapper = new LambdaQueryWrapper<>();
         vciInfoLambdaQueryWrapper.eq(VciInfo::getVciNum, vciNum);
         VciInfo vciInfo = vciInfoService.getOne(vciInfoLambdaQueryWrapper);
-
+        if (vciInfo == null) {
+            return Result.error().message("VCI设备不存在").result(ResultCode.SERVICE_HANDLE_ERROR);
+        }
         UserVci userVci = new UserVci();
         userVci.setUserId(userId);
         userVci.setVciInfoId(vciInfo.getId());

+ 4 - 3
src/main/java/com/om/service/impl/VciInfoServiceImpl.java

@@ -16,6 +16,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.om.utils.AesUtil;
 import com.om.utils.JwtUtils;
 import com.om.utils.Result;
+import com.om.utils.ResultCode;
 import org.springframework.context.annotation.Bean;
 import org.springframework.stereotype.Service;
 
@@ -184,9 +185,9 @@ public class VciInfoServiceImpl extends ServiceImpl<VciInfoMapper, VciInfo> impl
     }
 
     @Override
-    public Result<AppSDKVO> VciUpdate(AppBaseDTO dto) {
+    public Result VciUpdate(AppBaseDTO dto) {
         if (BeanUtil.isEmpty(dto)){
-            throw new BadReqException("数据为空");
+           return Result.fail("未获取到数据").result(ResultCode.NO_DATA);
         }
 
         String guid = dto.getGuid();
@@ -235,7 +236,7 @@ public class VciInfoServiceImpl extends ServiceImpl<VciInfoMapper, VciInfo> impl
                 .list().stream().map(c -> c.getAppId()).collect(Collectors.toList());
         List<App> apps = appService.listByIds(appIds);
         if (apps.isEmpty()){
-            return Result.ok();
+            return Result.error().result(ResultCode.SERVICE_HANDLE_ERROR);
         }
         for (App app : apps) {
             appData appData1 = BeanUtil.copyProperties(app, appData.class);

+ 7 - 4
src/main/java/com/om/service/impl/WxscServiceImpl.java

@@ -14,6 +14,7 @@ import com.om.mapper.WxscMapper;
 import com.om.service.IWxscService;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.om.utils.Result;
+import com.om.utils.ResultCode;
 import org.springframework.context.annotation.Bean;
 import org.springframework.stereotype.Service;
 
@@ -42,9 +43,9 @@ public class WxscServiceImpl extends ServiceImpl<WxscMapper, Wxsc> implements IW
   }
 
     @Override
-    public Result<AppWxscQueryPageVO> appGetPageList(AppWxscQueryPageDTO dto) {
+    public Result appGetPageList(AppWxscQueryPageDTO dto) {
       if (BeanUtil.isEmpty(dto)){
-          throw new BadReqException("数据为空");
+          return Result.fail("未获取到数据").result(ResultCode.NO_DATA);
       }
 
         Integer pageIndex = dto.getPageIndex();
@@ -82,9 +83,11 @@ public class WxscServiceImpl extends ServiceImpl<WxscMapper, Wxsc> implements IW
         Integer id = dto.getId();
         String language = dto.getLanguage();
 
-        //todo  language
         //根据id查询
-        Wxsc wxsc = this.getById(id);
+        Wxsc wxsc = this.lambdaQuery()
+                .eq(Wxsc::getId, id)
+                .eq(Wxsc::getLang, language)
+                .one();
 
         if (BeanUtil.isEmpty(wxsc)){
             throw new BadReqException("该维修资料不存在!");

+ 91 - 0
src/main/java/com/om/utils/ResultCode.java

@@ -18,4 +18,95 @@ public class ResultCode {
      * 访问受限,授权过期状态码
      */
     public static final int AUTH_EX = 403;
+
+    /**
+     * 请求成功
+     */
+    public static final Integer REQUEST_SUCCESS = 10000;
+
+    /**
+     * 未获取到数据
+     */
+    public static final Integer NO_DATA = 24001;
+
+    /**
+     * guid过期
+     */
+    public static final Integer GUID_EXPIRE = 24002;
+
+    /**
+     * 用户不存在
+     */
+    public static final Integer USER_NO_EXIST = 24039;
+
+    /**
+     * 用户已被注销
+     */
+    public static final Integer USER_CANCELED = 31005;
+
+    /**
+     * 用户名不存在
+     */
+    public static final Integer USERNAME_NO_EXIST = 32001;
+
+    /**
+     * 密码错误
+     */
+    public static final Integer PASSWORD_ERROR = 32002;
+
+    /**
+     * 密码加密错误
+     */
+    public static final Integer PASSWORD_ENCRYPT_ERROR = 32004;
+
+    /**
+     * 用户被禁用
+     */
+    public static final Integer USER_DISABLED = 32003;
+
+    /**
+     * 设备已是默认状态
+     */
+    public static final Integer VCI_DEFAULTED = 33005;
+
+    /**
+     * 服务器处理异常
+     */
+    public static final Integer SERVICE_HANDLE_ERROR = 53001;
+
+    /**
+     * 签名校验失败
+     */
+    public static final Integer SIGN_VERIFICATION_FAILED = 53002;
+
+    /**
+     * 时间戳校验失败
+     */
+    public static final Integer TIME_VERIFICATION_FAILED = 53003;
+
+    /**
+     * 错误的请求方法
+     */
+    public static final Integer REQUEST_METHOD_ERROR = 53004;
+
+    /**
+     * 错误的请求参数
+     */
+    public static final Integer REQUEST_ARGS_ERROR = 53005;
+
+    /**
+     * 错误的 accesstoken
+     */
+    public static final Integer ACCESS_TOKEN_ERROR = 53006;
+
+    /**
+     * 验证码无效
+     */
+    public static final Integer CODE_ERROR = 53007;
+
+    /**
+     * 账号尚未激活
+     */
+    public static final Integer USER_NO_ACTIVATE = 32004;
+
 }