Browse Source

重构国际化,网关开发,公共模块开发。

master
caojianbin 8 months ago
parent
commit
c6eebff0d8
  1. 79
      ecell-internationalize/ecell-internationalize-common/ecell-internationalize-common-system/pom.xml
  2. 43
      ecell-internationalize/ecell-internationalize-common/ecell-internationalize-common-system/src/main/java/com/ecell/internationalize/common/sysytem/config/MybatisPlusPageConfig.java
  3. 38
      ecell-internationalize/ecell-internationalize-common/ecell-internationalize-common-system/src/main/java/com/ecell/internationalize/common/sysytem/constant/ExceptionResultConstant.java
  4. 248
      ecell-internationalize/ecell-internationalize-common/ecell-internationalize-common-system/src/main/java/com/ecell/internationalize/common/sysytem/constant/FieldConstant.java
  5. 15
      ecell-internationalize/ecell-internationalize-common/ecell-internationalize-common-system/src/main/java/com/ecell/internationalize/common/sysytem/constant/OssClientConstants.java
  6. 55
      ecell-internationalize/ecell-internationalize-common/ecell-internationalize-common-system/src/main/java/com/ecell/internationalize/common/sysytem/constant/ServiceExceptionResultConstant.java
  7. 12
      ecell-internationalize/ecell-internationalize-common/ecell-internationalize-common-system/src/main/java/com/ecell/internationalize/common/sysytem/entity/ChatOssDto.java
  8. 19
      ecell-internationalize/ecell-internationalize-common/ecell-internationalize-common-system/src/main/java/com/ecell/internationalize/common/sysytem/entity/CheckVersionUpload.java
  9. 168
      ecell-internationalize/ecell-internationalize-common/ecell-internationalize-common-system/src/main/java/com/ecell/internationalize/common/sysytem/entity/DeviceOwnerInfoApp.java
  10. 62
      ecell-internationalize/ecell-internationalize-common/ecell-internationalize-common-system/src/main/java/com/ecell/internationalize/common/sysytem/entity/HeartTemperatureConfig.java
  11. 54
      ecell-internationalize/ecell-internationalize-common/ecell-internationalize-common-system/src/main/java/com/ecell/internationalize/common/sysytem/entity/HeartTemperatureRecord.java
  12. 79
      ecell-internationalize/ecell-internationalize-common/ecell-internationalize-common-system/src/main/java/com/ecell/internationalize/common/sysytem/entity/ImeiFamilyInfo.java
  13. 66
      ecell-internationalize/ecell-internationalize-common/ecell-internationalize-common-system/src/main/java/com/ecell/internationalize/common/sysytem/entity/ImeiSosInfo.java
  14. 9
      ecell-internationalize/ecell-internationalize-common/ecell-internationalize-common-system/src/main/java/com/ecell/internationalize/common/sysytem/entity/PositioningModelInfo.java
  15. 106
      ecell-internationalize/ecell-internationalize-common/ecell-internationalize-common-system/src/main/java/com/ecell/internationalize/common/sysytem/entity/SysMenu.java
  16. 84
      ecell-internationalize/ecell-internationalize-common/ecell-internationalize-common-system/src/main/java/com/ecell/internationalize/common/sysytem/entity/SysOperateInfo.java
  17. 71
      ecell-internationalize/ecell-internationalize-common/ecell-internationalize-common-system/src/main/java/com/ecell/internationalize/common/sysytem/entity/SysRole.java
  18. 17
      ecell-internationalize/ecell-internationalize-common/ecell-internationalize-common-system/src/main/java/com/ecell/internationalize/common/sysytem/fallback/SysOperatorInfoFeignClientFallBack.java
  19. 21
      ecell-internationalize/ecell-internationalize-common/ecell-internationalize-common-system/src/main/java/com/ecell/internationalize/common/sysytem/feign/SysOperatorInfoFeignClient.java
  20. 70
      ecell-internationalize/ecell-internationalize-common/ecell-internationalize-common-system/src/main/java/com/ecell/internationalize/common/sysytem/utlis/AesUtil.java
  21. 8
      ecell-internationalize/ecell-internationalize-common/ecell-internationalize-common-system/src/main/java/com/ecell/internationalize/common/sysytem/utlis/HttpUtil.java
  22. 1
      ecell-internationalize/ecell-internationalize-common/pom.xml
  23. 8
      ecell-internationalize/ecell-internationalize-gateway/src/main/java/com/ecell/internationalize/gateway/constant/MessagesConstant.java

79
ecell-internationalize/ecell-internationalize-common/ecell-internationalize-common-system/pom.xml

@ -0,0 +1,79 @@ @@ -0,0 +1,79 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>ecell-internationalize-common</artifactId>
<groupId>com.ecell.internationalize.common</groupId>
<version>1.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>com.ecell.internationalize.common.sysytem</groupId>
<artifactId>ecell-internationalize-common-system</artifactId>
<dependencies>
<!--lombok依赖 -->
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
</dependency>
<dependency>
<groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId>
<version>1.1.0.Final</version>
</dependency>
<!--mybatis - plus依赖 -->
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-boot-starter</artifactId>
<version>3.1.1</version>
</dependency>
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus</artifactId>
<version>3.1.1</version>
</dependency>
<!-- Swagger -->
<dependency>
<groupId>io.swagger</groupId>
<artifactId>swagger-annotations</artifactId>
</dependency>
<dependency>
<groupId>com.ecell.internationalize.common.core</groupId>
<artifactId>ecell-internationalize-core</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.ecell.internationalize.common.security</groupId>
<artifactId>ecell-internationalize-security</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
<!-- aliyun OSS存储SDK-->
<dependency>
<groupId>com.aliyun.oss</groupId>
<artifactId>aliyun-sdk-oss</artifactId>
<version>3.8.0</version>
</dependency>
<!-- SpringBoot-Mail相关依赖 -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-mail</artifactId>
</dependency>
</dependencies>
</project>

43
ecell-internationalize/ecell-internationalize-common/ecell-internationalize-common-system/src/main/java/com/ecell/internationalize/common/sysytem/config/MybatisPlusPageConfig.java

@ -0,0 +1,43 @@ @@ -0,0 +1,43 @@
package com.ecell.internationalize.common.sysytem.config;
import com.baomidou.mybatisplus.core.handlers.MetaObjectHandler;
import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
import com.ecell.internationalize.common.core.utils.StringUtils;
import com.ecell.internationalize.common.security.utils.SecurityUtils;
import com.ecell.internationalize.common.sysytem.constant.FieldConstant;
import org.apache.ibatis.reflection.MetaObject;
import org.springframework.context.annotation.Bean;
import java.util.Date;
/**
* @author borui
*/
public class MybatisPlusPageConfig implements MetaObjectHandler {
/**
* 分页插件交给Spring管理
* @return 分页插件的实例
*/
@Bean
public PaginationInterceptor paginationInterceptor() {
return new PaginationInterceptor();
}
@Override
public void insertFill(MetaObject metaObject) {
setFieldValByName(FieldConstant.CREATE_TIME, new Date(), metaObject);
if (StringUtils.isNotEmpty(SecurityUtils.getUsername())){
setFieldValByName(FieldConstant.CREATE_USER, SecurityUtils.getUsername(),metaObject);
}
}
@Override
public void updateFill(MetaObject metaObject) {
setFieldValByName(FieldConstant.UPDATE_TIME, new Date(), metaObject);
if (StringUtils.isNotEmpty(SecurityUtils.getUsername())){
setFieldValByName(FieldConstant.UPDATE_USER,SecurityUtils.getUsername(),metaObject);
}
}
}

38
ecell-internationalize/ecell-internationalize-common/ecell-internationalize-common-system/src/main/java/com/ecell/internationalize/common/sysytem/constant/ExceptionResultConstant.java

@ -0,0 +1,38 @@ @@ -0,0 +1,38 @@
package com.ecell.internationalize.common.sysytem.constant;
import java.util.HashMap;
import java.util.Map;
/**
* @author borui
*/
public class ExceptionResultConstant {
public static final Map<String,String> RESULT_MAP = new HashMap<>(16);
static {
RESULT_MAP.put("密码不能为空", "messages.pwd.empty");
RESULT_MAP.put("长度需要在6和32之间", "messages.pwd.length");
RESULT_MAP.put("联系人电话号码不能为空", "messages.firm.phone");
RESULT_MAP.put("厂商名称不能为空", "messages.firm.name");
RESULT_MAP.put("企业联系人不能为空", "messages.firm.man");
RESULT_MAP.put("合作开始时间不能为空", "messages.firm.startTime");
RESULT_MAP.put("企业地址不能为空", "messages.firm.location");
RESULT_MAP.put("厂商编号不能为空", "messages.firm.code");
RESULT_MAP.put("推广人员不能为空", "messages.firm.salesMan");
RESULT_MAP.put("企业邮箱不能为空", "messages.firm.email");
RESULT_MAP.put("合作结束时间不能为空", "messages.firm.endTime");
RESULT_MAP.put("类别名称不能为空", "messages.category.name");
RESULT_MAP.put("排序序号不能为空", "messages.category.order");
RESULT_MAP.put("所属消息类别不能为空", "messages.content.category");
RESULT_MAP.put("消息内容不能为空", "messages.content.name");
RESULT_MAP.put("是否热门问题不能为空", "messages.content.hot");
RESULT_MAP.put("用户类别不能为空", "messages.user.type");
RESULT_MAP.put("热门搜索内容不能为空", "messages.activity.search");
RESULT_MAP.put("banner图链接不能为空", "messages.banner.link");
RESULT_MAP.put("banner图标题不能为空", "messages.banner.title");
RESULT_MAP.put("广告商名称不能为空", "messages.advert.name");
RESULT_MAP.put("广告商标识不能为空", "messages.advert.flag");
RESULT_MAP.put("渠道商名称不能为空", "messages.channel.name");
RESULT_MAP.put("APP渠道标识不能为空", "messages.channel.flag");
}
}

248
ecell-internationalize/ecell-internationalize-common/ecell-internationalize-common-system/src/main/java/com/ecell/internationalize/common/sysytem/constant/FieldConstant.java

@ -0,0 +1,248 @@ @@ -0,0 +1,248 @@
package com.ecell.internationalize.common.sysytem.constant;
import java.util.HashMap;
import java.util.Map;
/**
* @author borui
*/
public class FieldConstant {
/**国际化文件的key */
public static final String MESSAGES_TITLE="messages.title";
/**成功返回结果 */
public static final String MESSAGES_SUCCESS="messages.success";
/**失败返回结果 */
public static final String MESSAGES_ERROR="messages.error";
/**请求头lang,国家语言标识 */
public static final String LANG="lang";
/**创建时间 */
public static final String CREATE_TIME="createTime";
/**更新时间 */
public static final String UPDATE_TIME="updateTime";
/**创建人 */
public static final String CREATE_USER="createUser";
/**更新人 */
public static final String UPDATE_USER="updateUser";
/**连接符 */
public static final String CONN_CHAR="_";
/** 登录账号(手机号) */
public static final String PHONE="phone";
/** 厂商名称 */
public static final String FIRM_NAME="firmName";
/** iMei设备 */
public static final String I_MEI="iMei";
/** 渠道 */
public static final String CHANNEL="channel";
/** 当前页 */
public static final String CURRENT="current";
/** 当前页条数 */
public static final String SIZE="pageSize";
/** 状态 */
public static final String STATUS="status";
/** 数字 */
public static final String MATH_ONE="1";
/** 类别名称 */
public static final String CATEGORY_NAME="category_name";
/** 厂商名称 */
public static final String FIRM_NAME_COLUMN="firm_name";
/** 存在类别名称值返回结果 */
public static final String MESSAGES_CATEGORY_NAME="messages.category.exit";
/** 存在厂商名称值返回结果 */
public static final String FIRM_NAME_EXIT="messages.firm.exit";
/** 用户账号 */
public static final String USER_ACCOUNT="userAccount";
/** 用户类型 */
public static final String USER_TYPE="userType";
/** banner标题 */
public static final String BANNER_TITLE="title";
/** jpg */
public static final String JPG=".jpg";
/** png */
public static final String PNG=".png";
/** 图片上传错误返回结果 */
public static final String UPLOAD_FAIL="messages.upload.fail";
/** 相对路径 */
public static final String PATH="yisai-modules/yisai-system/src/main/resources";
/** 修改头像相对路径 */
public static final String IMAGE_PATH="yisai-modules/yisai-system-security/src/main/resources";
/** 日期格式 */
public static final String DATE_FORMAT="yyyyMMdd";
public static final String STATIC_IMAGE="static/image/";
public static final String IMAGE="image/";
public static final String USER_IMAGE="image/user.png";
/** 活动标题 */
public static final String ACTIVITY_TITLE="activityTitle";
/** 活动类别 */
public static final String ACTIVITY_CATEGORY="activityCategory";
/** 年龄阶段 */
public static final String ACTIVITY_AGE="activityAge";
/** 活动区域 */
public static final String ACTIVITY_AREAS="activityAreas";
/** 父级节点*/
public static final String TREE_ROOT_ID="-1";
public static final String PARENT_ID="parent_id";
/** 登陆失败 */
public static final String LOGIN_FAIL = "Error";
/**失败返回结果 */
public static final String MESSAGES_LOGIN_EMPTY="messages.login.empty";
/**熔断降级结果 */
public static final String MESSAGES_FALLBACK_INFO="messages.fallback.info";
/** 查询结果为空返回 */
public static final String MESSAGES_LOGIN_ERROR="messages.login.error";
/** 账号被删除 */
public static final String DELETED="0";
/** 账号被删除提示 */
public static final String MESSAGES_ACCOUNT_DELETE="messages.account.delete";
/** 密码错误 */
public static final String MESSAGES_ERROR_PASSWORD="messages.error.password";
/** 账号被停用提示 */
public static final String MESSAGES_ACCOUNT_STOP="messages.account.stop";
/**
* 缓存有效期默认720分钟
*/
public static final long EXPIRATION = 720;
public static final long MILLIS_MINUTE = 60 * 1000;
/**
* 权限缓存前缀
*/
public static final String LOGIN_TOKEN_KEY = "login_tokens:";
public static final Integer FAIL_CODE=500;
public static final String ADMIN="1";
/** 用户账号*/
public static final String ACCOUNT="account";
/** 用户昵称*/
public static final String NICK_NAME="nickName";
/** 账号状态 0正常 1停用*/
public static final String ACCOUNT_STATUS="status";
/** 存在用户账号返回结果 */
public static final String ACCOUNT_EXIT="messages.account.exit";
/** 存在用户账号返回结果 */
public static final String NOT_PERMISSION="messages.not.permission";
/** 未删除*/
public static final String DEL_FLAG="1";
/** 角色名称*/
public static final String ROLE_NAME="role_name";
/** 存在用户角色返回结果 */
public static final String SYS_ROLE_EXIT="messages.role.exit";
/** 删除标识*/
public static final String USER_DEL_FLAG="del_flag";
/** 用户管理*/
public static final String USER_MANAGE="messages.user.management";
/** 角色管理*/
public static final String ROLE_MANAGE="messages.role.management";
/** 新增操作 所有新增可使用同一变量名*/
public static final String SAVE_OPERATOR="messages.save.operator";
/** 修改操作 所有修改可使用同一变量名*/
public static final String UPDATE_OPERATOR="messages.update.operator";
/** 删除操作 所有删除可使用同一变量名*/
public static final String DELETE_OPERATOR="messages.delete.operator";
/** 修改状态操作 所有修改状态可使用同一变量名*/
public static final String CHANGE_STATUS_OPERATOR="messages.change.operator";
/** 操作状态为失败*/
public static final String OPERATOR_FAIL="0";
/** 操作状态为成功*/
public static final String OPERATOR_SUCCESS="1";
/** 系统异常*/
public static final String SYSTEM_ERROR="messages.system.error";
/** 状态码500*/
public static final Integer CODE_FIVE=500;
/** code*/
public static final String CODE="code";
/** msg*/
public static final String MSG="msg";
/** 活动Banner管理*/
public static final String ACTIVITY_BANNER_BANNER="messages.activity.banner";
/** 活动banner图发布/取消发布操作*/
public static final String ACTIVITY_BANNER_PUBLISH="messages.activity.banner.publish";
/** 活动管理*/
public static final String ACTIVITY_BANNER="messages.activity.manage";
/** 活动发布/取消发布操作*/
public static final String ACTIVITY_PUBLISH="messages.activity.publish";
/** 热门搜索功能*/
public static final String HOT_SEARCH="messages.hot.search";
/** 广告配置功能*/
public static final String ADVERT_MANAGE="messages.advert.manage";
/** 文字滚动广告功能*/
public static final String WORD_ROLL_ADVERT="messages.word.roll";
/** 渠道管理*/
public static final String CHANNEL_MANAGE="messages.channel.manage";
/** 厂商管理*/
public static final String FIRM_MANAGE="messages.firm.manage";
/** 首页Banner图功能*/
public static final String HOME_BANNER_MANAGE="messages.home.banner";
/** 首页Banner发布/取消发布功能*/
public static final String HOME_BANNER_PUBLISH="messages.home.banner.publish";
/** 消息分类功能*/
public static final String MESSAGE_CATEGORY="messages.category.function";
/** 消息内容功能*/
public static final String MESSAGE_CONTENT="messages.category.content";
/** 是否热门问题*/
public static final String IS_HOT_QUESTION="messages.hot.question";
/** 系统消息*/
public static final String SYSTEM_MESSAGE_CONTENT="messages.system.content";
/** 用户操作*/
public static final String USER_OPERATOR="messages.user.operator";
/** 用户启用/停用账号操作*/
public static final String USER_CHANGE_ACCOUNT="messages.user.change";
/** 2*/
public static final String SECOND_FLAG="2";
/** admin用户禁止删除*/
public static final String ADMIN_NOT_DELETE="messages.not.delete";
/** 重置密码*/
public static final String RESET_PASSWORD="messages.reset.password";
/** 管理员用户禁止重置密码*/
public static final String ADMIN_NOT_RESET="messages.admin.prohibit";
/** 新旧密码不一致*/
public static final String DIFFERENT_PWD="messages.different.password";
/** 修改用户个人信息*/
public static final String UPDATE_USER_INFO="messages.update.userInfo";
public static final Map<String,String> TYPE_MAP = new HashMap<>(16);
static {
TYPE_MAP.put("1", "activity_category");
TYPE_MAP.put("2", "activity_age");
TYPE_MAP.put("3", "activity_areas");
}
/** 邮箱验证码标题*/
public static final String EMAIL_SUBJECT="messages.email.subject";
/** 邮箱验证码正文*/
public static final String EMAIL_TEXT_PRE="messages.email.text_pre";
/** 邮箱验证码正文*/
public static final String EMAIL_TEXT_TAIL="messages.email.text_tail";
/** 邮箱验证码过期*/
public static final String EMAIL_CODE_EXPIRE="messages.email.code.expire";
/** 邮箱验证码错误*/
public static final String EMAIL_CODE_FAIL="messages.email.code.fail";
/** 注册邮箱已存在*/
public static final String EMAIL_REGISTER_EXIT="messages.email.register.exit";
/** 登录用户不存在*/
public static final String EMAIL_LOGIN_EXIT="messages.login.not.exit";
/** 用户已被停用*/
public static final String EMAIL_STOP="messages.email.stop";
/** 用户密码错误*/
public static final String EMAIL_PWD_ERROR="messages.pwd.error";
/** 不合法的请求*/
public static final String BAD_REQUEST="messages.bad.request";
/** 未绑定设备*/
public static final String NOT_BIND_DEVICE="messages.not.bind";
/** 查询的设备型号为空*/
public static final String DEVICE_IS_NULL="messages.device.empty";
/** 闹钟数量*/
public static final String ALARM_CLOCK_NUMBER="messages.clock.number";
/** 管理员操作*/
public static final String ADMIN_OPERATION="messages.admin.operation";
/** 未找到绑定的用户*/
public static final String DEVICE_BIND_USER="messages.bind.user";
/** 多台终端登录返回*/
public static final String USER_HAS_LOGIN="messages.user.hasLogin";
/** 安全围栏数量不能超过4个 */
public static final String RAILS_COUNT="rails.count";
/** 新增版本更新操作*/
public static final String VERSION_UPDATE="messages.version.update";
/** 上传APK文件提示*/
public static final String VERSION_APK_UPLOAD="messages.version.apk";
/** 新增、更新版本更新已存在最新记录*/
public static final String VERSION_HAS_EXIT="messages.has.exit";
}

15
ecell-internationalize/ecell-internationalize-common/ecell-internationalize-common-system/src/main/java/com/ecell/internationalize/common/sysytem/constant/OssClientConstants.java

@ -0,0 +1,15 @@ @@ -0,0 +1,15 @@
package com.ecell.internationalize.common.sysytem.constant;
/**
* @author borui
*/
public class OssClientConstants {
/**阿里云API的外网域名*/
public static final String ENDPOINT = "oss-cn-hongkong.aliyuncs.com";
/**阿里云API的密钥Access Key ID*/
public static final String ACCESS_KEY_ID = "LTAI5tGgDc4djPkxsGBpf5uT";
/**阿里云API的密钥Access Key Secret*/
public static final String ACCESS_KEY_SECRET = "Gmli0GH6jDmhu9S5mdwjHwaPHRHEZp";
/**阿里云API的bucket名称*/
public static final String BUCKET_NAME = "ecellwatch-abroad";
}

55
ecell-internationalize/ecell-internationalize-common/ecell-internationalize-common-system/src/main/java/com/ecell/internationalize/common/sysytem/constant/ServiceExceptionResultConstant.java

@ -0,0 +1,55 @@ @@ -0,0 +1,55 @@
package com.ecell.internationalize.common.sysytem.constant;
import java.util.HashMap;
import java.util.Map;
/**
* @author borui
*/
public class ServiceExceptionResultConstant {
public static final Map<String,String> RESULT_MSG_MAP = new HashMap<>();
static {
RESULT_MSG_MAP.put("IMEI长度有误","messages.imei.length");
RESULT_MSG_MAP.put("此设备ID不存在","messages.deviceId.error");
RESULT_MSG_MAP.put("删除失败,数据不能为空","messages.delDevice.error");
RESULT_MSG_MAP.put("删除失败,请联系管理员","messages.delImei.error");
RESULT_MSG_MAP.put("导入IMEI数据不能为空","messages.importImei.error");
RESULT_MSG_MAP.put("该设备型号ID有误","messages.deviceModel.error");
RESULT_MSG_MAP.put("导入SOS数据不能为空","messages.importSOS.error");
RESULT_MSG_MAP.put("导入白名单数据不能为空","messages.importWhite.error");
RESULT_MSG_MAP.put("用户有误请重新登录","messages.userLog.error");
RESULT_MSG_MAP.put("此视频类型已绑定设备不能删除","messages.videoModel.error");
RESULT_MSG_MAP.put("messages.import.money.thousand.error","messages.import.money.thousand.error");
RESULT_MSG_MAP.put("messages.import.two.hundred.error","messages.import.two.hundred.error");
RESULT_MSG_MAP.put("messages.delete.device.sing.error","messages.delete.device.sing.error");
RESULT_MSG_MAP.put("messages.device.unBing.error","messages.device.unBing.error");
RESULT_MSG_MAP.put("messagesParameterError","messages.parameter.error");
RESULT_MSG_MAP.put("messagesIsPhoneNull","messages.isPhone.null");
RESULT_MSG_MAP.put("messagesImeiIsNull","messages.imei.isNull");
RESULT_MSG_MAP.put("messagesImeiNotAudit","messages.imei.notAudit");
RESULT_MSG_MAP.put("messagesMaximumLimitExceeded","messages.maximum.limit.exceeded");
RESULT_MSG_MAP.put("messagesDevicePhone","messages.device.phone");
RESULT_MSG_MAP.put("messagesBindingDeviceError","messages.binding.device.error");
RESULT_MSG_MAP.put("messagesBindingDeviceIsNotNull","messages.binding.device.isNotNull");
RESULT_MSG_MAP.put("messagesBindingVideoType","messages.binding.video.type");
RESULT_MSG_MAP.put("messagesApplyError","messages.apply.error");
RESULT_MSG_MAP.put("messagesBindingNotError","messages.binding.not.error");
RESULT_MSG_MAP.put("messagesApplyFollowError","messages.apply.follow.error");
RESULT_MSG_MAP.put("messagesUnbindingError","messages.unbinding.error");
RESULT_MSG_MAP.put("messagesUserDoesNotExist","messages.user.does.not.exist");
RESULT_MSG_MAP.put("messagesAdminIdNotNull","messages.adminId.not.null");
RESULT_MSG_MAP.put("messagesUserIdNotNull","messages.userId.not.null");
RESULT_MSG_MAP.put("messagesDeviceAttentionError","messages.deviceAttention.error");
RESULT_MSG_MAP.put("messagesAttentionNotExist","messages.attention.not.exist");
RESULT_MSG_MAP.put("messagesGroupInfo","messages.group.info");
RESULT_MSG_MAP.put("messagesDeviceOwnerInfo","messages.device.owner.info");
RESULT_MSG_MAP.put("messageDeviceAuditError","message.device.audit.error");
RESULT_MSG_MAP.put("messagesPositioningModelError","messages.positioning.model.error");
RESULT_MSG_MAP.put("messages.imei.track.error","messages.imei.track.error");
RESULT_MSG_MAP.put("messages.IOS.send.error","messages.IOS.send.error");
RESULT_MSG_MAP.put("messages.length.error","messages.length.error");
RESULT_MSG_MAP.put("messagesIsPhoneBound","phone.has.exit");
RESULT_MSG_MAP.put("messages.limit.max.error","messages.limit.max.error");
}
}

12
ecell-internationalize/ecell-internationalize-common/ecell-internationalize-common-system/src/main/java/com/ecell/internationalize/common/sysytem/entity/ChatOssDto.java

@ -0,0 +1,12 @@ @@ -0,0 +1,12 @@
package com.ecell.internationalize.common.sysytem.entity;
import lombok.Data;
/**
* @author borui
*/
@Data
public class ChatOssDto {
private String url;
private String fileName;
}

19
ecell-internationalize/ecell-internationalize-common/ecell-internationalize-common-system/src/main/java/com/ecell/internationalize/common/sysytem/entity/CheckVersionUpload.java

@ -0,0 +1,19 @@ @@ -0,0 +1,19 @@
package com.ecell.internationalize.common.sysytem.entity;
import lombok.Data;
import java.io.Serializable;
/**
* @author borui
*/
@Data
public class CheckVersionUpload implements Serializable {
private static final long serialVersionUID=1L;
private String url;
private String fileName;
private String getSuffix;
}

168
ecell-internationalize/ecell-internationalize-common/ecell-internationalize-common-system/src/main/java/com/ecell/internationalize/common/sysytem/entity/DeviceOwnerInfoApp.java

@ -0,0 +1,168 @@ @@ -0,0 +1,168 @@
package com.ecell.internationalize.common.sysytem.entity;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import java.io.Serializable;
import java.util.Date;
/**
* @author borui
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="DeviceOwnerInfoApp对象", description="设备拥有者信息")
public class DeviceOwnerInfoApp implements Serializable {
private static final long serialVersionUID=1L;
@ApiModelProperty(value = "主键ID")
@TableId(value = "id",type = IdType.INPUT)
private String id;
@ApiModelProperty(value = "设备imei")
private String imei;
@ApiModelProperty(value = "设备拥有者名字")
private String name;
@ApiModelProperty(value = "设备拥有者性别")
private String sex;
@ApiModelProperty(value = "设备拥有者生日")
private String birthday;
@ApiModelProperty(value = "设备拥有者身高")
private String height;
@ApiModelProperty(value = "设备拥有者体重")
private String weight;
@ApiModelProperty(value = "今日步数")
private Integer step;
@ApiModelProperty(value = "当前翻滚次数")
@TableField("rollNum")
private Integer rollNum;
@ApiModelProperty(value = " 小红花个数")
private Integer flower;
@ApiModelProperty(value = "SOS 短信报警开关(0.关,1.开)")
@TableField("SOS_AL")
private String sosAl;
@ApiModelProperty(value = "低电短信报警开关(0.关,1.开)")
@TableField("LOWBAT_AL")
private String lowbatAl;
@ApiModelProperty(value = "设备电话号码")
private String phone;
@ApiModelProperty(value = "头像文件名 xxx.jpg")
private String image;
@ApiModelProperty(value = "通讯录个数上限")
private Integer contactUpperLimit;
@ApiModelProperty(value = "运营商标识(0 :移动,1 :联通 ,2 :电信)")
private String networkOperator;
@ApiModelProperty(value = "设备激活时间")
@TableField("activateTime")
private Date activateTime;
@ApiModelProperty(value = "设备当前音量等级")
private Integer volume;
@ApiModelProperty(value = "电量百分比")
private Integer battery;
@ApiModelProperty(value = "电量最高等级")
private Integer maxLevel;
@ApiModelProperty(value = "电量当前等级")
private Integer currLevel;
@ApiModelProperty(value = "预留电量省电模式")
@TableField("powerModel")
private Integer powerModel;
@ApiModelProperty(example = "是否拒绝陌生人来电(默认为0,(0.否,1.是)")
@TableField("rejectStrange")
private String rejectStrange;
@ApiModelProperty(value = "设备当前定位模式")
@TableField("locMode")
private String locMode;
@ApiModelProperty(value = "最后一次保存的电量")
@TableField("lastBattery")
private Integer lastBattery;
@ApiModelProperty(value = "是否已同步数据(0.否,1.是 默认为:0)")
private String sync;
@ApiModelProperty(value = "设备首次登录系统时间")
@TableField("firstLoginTime")
private Date firstLoginTime;
@ApiModelProperty(value = "设备最后一次登录系统时间")
@TableField("lastloginTime")
private Date lastloginTime;
@ApiModelProperty(value = "最后一次视频通话的id")
private String videoId;
@ApiModelProperty(value = "最新的一次视频通话的id")
@TableField("new_video_id")
private String newVideoId;
@ApiModelProperty(value = "视频通话总秒数(手表所有的视频通话的总秒数)")
private Integer videoTotalcalltime;
@ApiModelProperty(value = "语音通话总秒数(手表所有的视频通话的总秒数)")
private Integer voiceTotalcalltime;
@ApiModelProperty(value = "创建人(这里实际存的是邮箱,第一次绑定添加设备的人的邮箱)")
// @TableField(value ="create_user" ,fill = FieldFill.DEFAULT)
private String createUser;
@ApiModelProperty(value = "创建时间")
@TableField(value = "create_time",fill = FieldFill.INSERT)
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date createTime;
/**
* 与孩子关系
*/
@TableField(exist = false)
@ApiModelProperty(example = "与孩子关系")
private String relation;
/**
* 拨号盘开关
*/
@ApiModelProperty(example = "拨号盘开关(默认0,1 (打开) 或 0 (关闭))")
private String dialSwitch;
@ApiModelProperty(example = "定位模型ID")
private String positioningModelId;
@ApiModelProperty(example = "定位模型间隔(分钟)")
@TableField("positioning_interval")
private int positioningInterval;
@ApiModelProperty(example = "手表连接佰锐视频的id")
private Integer baiRuiId;
}

62
ecell-internationalize/ecell-internationalize-common/ecell-internationalize-common-system/src/main/java/com/ecell/internationalize/common/sysytem/entity/HeartTemperatureConfig.java

@ -0,0 +1,62 @@ @@ -0,0 +1,62 @@
package com.ecell.internationalize.common.sysytem.entity;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import java.io.Serializable;
import java.util.Date;
/**
* @author borui
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="HeartTemperatureConfig对象", description="心率/体温配置表")
public class HeartTemperatureConfig implements Serializable {
private static final long serialVersionUID=1L;
@ApiModelProperty(example = "主键Id")
private String id;
@ApiModelProperty(example = "设备imei")
private String imei;
@ApiModelProperty(example = "体温/心率的频率 (30分钟|默认) (60分钟) (90分钟)")
private Integer heartTemperatureFreq;
@ApiModelProperty(example = "最后一次体温/心率")
private String lastHeartTemperature;
@ApiModelProperty(example = "最后一次体温/心率的时间")
private Integer lastHeartTemperatureTime;
@ApiModelProperty(example = "上限")
private String upper;
@ApiModelProperty(example = "下限")
private String lower;
@ApiModelProperty(example = "功能是否启用 0:关闭, 1:打开")
private String switchOn;
@ApiModelProperty(example = "创建人",hidden = true)
private String createUser;
@ApiModelProperty(example = "创建时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
private Date createTime;
@ApiModelProperty(example = "修改人",hidden = true)
private String updateUser;
@ApiModelProperty(example = "修改时间",hidden = true)
private Date updateTime;
@ApiModelProperty(example = "类型:1:心率配置,2:体温配置")
private String type;
}

54
ecell-internationalize/ecell-internationalize-common/ecell-internationalize-common-system/src/main/java/com/ecell/internationalize/common/sysytem/entity/HeartTemperatureRecord.java

@ -0,0 +1,54 @@ @@ -0,0 +1,54 @@
package com.ecell.internationalize.common.sysytem.entity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import java.io.Serializable;
import java.util.Date;
/**
* @author borui
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="HeartTemperatureRecord对象", description="心率/体温记录表")
public class HeartTemperatureRecord implements Serializable {
private static final long serialVersionUID=1L;
@ApiModelProperty(example = "主键Id")
private String id;
@ApiModelProperty(example = "设备imei")
private String imei;
@ApiModelProperty(example = "心率/体温数据,多少次/分钟")
private String heartTemperatureRate;
@ApiModelProperty(example = "创建人",hidden = true)
private String createUser;
@ApiModelProperty(example = "创建时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
private Date createTime;
@ApiModelProperty(example = "修改人",hidden = true)
private String updateUser;
@ApiModelProperty(example = "修改时间",hidden = true)
private Date updateTime;
@ApiModelProperty(example = "类型:1:心率记录,2:体温记录")
private String type;
@ApiModelProperty(example = "生成记录时的时间戳")
private Integer timeStamp;
@TableField(exist = false)
private String name;
}

79
ecell-internationalize/ecell-internationalize-common/ecell-internationalize-common-system/src/main/java/com/ecell/internationalize/common/sysytem/entity/ImeiFamilyInfo.java

@ -0,0 +1,79 @@ @@ -0,0 +1,79 @@
package com.ecell.internationalize.common.sysytem.entity;
import com.ecell.internationalize.common.core.annotation.Excel;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import java.io.Serializable;
import java.time.LocalDateTime;
/**
* @author borui
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="ImeiFamilyInfo对象", description="")
public class ImeiFamilyInfo implements Serializable {
private static final long serialVersionUID=1L;
@ApiModelProperty(value = "id")
private String imeiFamilyId;
@ApiModelProperty(value = "设备imei号")
@Excel(name = "imei",type = Excel.Type.IMPORT)
private String imei;
@ApiModelProperty(value = "亲情号昵称1")
@Excel(name = "familyNameOne",type = Excel.Type.IMPORT)
private String familyNameOne;
@ApiModelProperty(value = "亲情号1")
@Excel(name = "familyPhoneOne",type = Excel.Type.IMPORT)
private String familyPhoneOne;
@ApiModelProperty(value = "亲情号昵称2")
@Excel(name = "familyNameTwo",type = Excel.Type.IMPORT)
private String familyNameTwo;
@ApiModelProperty(value = "亲情号2")
@Excel(name = "familyPhoneTwo",type = Excel.Type.IMPORT)
private String familyPhoneTwo;
@ApiModelProperty(value = "亲情号昵称3")
@Excel(name = "familyNameThree",type = Excel.Type.IMPORT)
private String familyNameThree;
@ApiModelProperty(value = "亲情号3")
@Excel(name = "familyPhoneThree",type = Excel.Type.IMPORT)
private String familyPhoneThree;
@ApiModelProperty(value = "亲情号昵称3")
@Excel(name = "familyNameFour",type = Excel.Type.IMPORT)
private String familyNameFour;
@ApiModelProperty(value = "亲情号4")
@Excel(name = "familyPhoneFour",type = Excel.Type.IMPORT)
private String familyPhoneFour;
@ApiModelProperty(value = "是否删除(0.是,1否。默认1)")
private String delFlag;
@ApiModelProperty(value = "创建人")
private String createUser;
@ApiModelProperty(value = "修改人")
private String updateUser;
@ApiModelProperty(value = "创建时间")
private LocalDateTime createTime;
@ApiModelProperty(value = "修改时间")
private LocalDateTime updateTime;
@ApiModelProperty(value = "(来源,1.PC 2.APP)")
private String source;
}

66
ecell-internationalize/ecell-internationalize-common/ecell-internationalize-common-system/src/main/java/com/ecell/internationalize/common/sysytem/entity/ImeiSosInfo.java

@ -0,0 +1,66 @@ @@ -0,0 +1,66 @@
package com.ecell.internationalize.common.sysytem.entity;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.ecell.internationalize.common.core.annotation.Excel;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import java.io.Serializable;
import java.util.Date;
/**
* @author borui
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="ImeiSosInfo对象", description="")
public class ImeiSosInfo implements Serializable {
private static final long serialVersionUID=1L;
@ApiModelProperty(value = "id,编辑必传")
@TableId(value = "imei_sos_id",type = IdType.INPUT)
private String imeiSosId;
@ApiModelProperty(value = "设备imei号")
@Excel(name = "imei",type = Excel.Type.IMPORT)
private String imei;
@ApiModelProperty(value = "SOS号码1")
@Excel(name = "sosPhoneOne",type = Excel.Type.IMPORT)
private String sosPhoneOne;
@ApiModelProperty(value = "SOS号码2")
@Excel(name = "sosPhoneTwo",type = Excel.Type.IMPORT)
private String sosPhoneTwo;
@ApiModelProperty(value = "SOS号码3")
@Excel(name = "sosPhoneThree",type = Excel.Type.IMPORT)
private String sosPhoneThree;
@ApiModelProperty(value = "是否删除(0.是,1.否.默认1)")
private String delFlag;
@ApiModelProperty(value = "创建人")
private String createUser;
@ApiModelProperty(value = "修改人")
private String updateUser;
@ApiModelProperty(value = "创建时间")
@TableField(value = "create_time",fill = FieldFill.INSERT)
private Date createTime;
@ApiModelProperty(value = "修改时间")
@TableField(value = "update_time",fill = FieldFill.INSERT_UPDATE)
private Date updateTime;
@ApiModelProperty(value = "(来源,1.PC 2.APP)")
private String source;
}

9
ecell-internationalize/ecell-internationalize-common/ecell-internationalize-common-system/src/main/java/com/ecell/internationalize/common/sysytem/entity/PositioningModelInfo.java

@ -0,0 +1,9 @@ @@ -0,0 +1,9 @@
package com.ecell.internationalize.common.sysytem.entity;
import java.io.Serializable;
/**
* @author borui
*/
public class PositioningModelInfo implements Serializable {
}

106
ecell-internationalize/ecell-internationalize-common/ecell-internationalize-common-system/src/main/java/com/ecell/internationalize/common/sysytem/entity/SysMenu.java

@ -0,0 +1,106 @@ @@ -0,0 +1,106 @@
package com.ecell.internationalize.common.sysytem.entity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
/**
* @author borui
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("sys_menu")
public class SysMenu implements Serializable {
private static final long serialVersionUID=1L;
/**
* 主键Id
*/
@TableId("menu_id")
private String menuId;
/**
* 菜单名称
*/
private String menuName;
/**
* 父菜单ID
*/
private String parentId;
/**
* 显示顺序
*/
private Integer showOrder;
/**
* 路由地址
*/
private String path;
/**
* 菜单类型M目录 C菜单 F按钮
*/
private String menuType;
/**
* 菜单状态0显示 1隐藏
*/
private String visible;
/**
* 权限标识
*/
private String perms;
/**
* 菜单图标
*/
private String icon;
/**
* 创建人
*/
private String createUser;
/**
* 创建时间
*/
private Date createTime;
/**
* 修改人
*/
private String updateUser;
/**
* 修改时间
*/
private Date updateTime;
/**
* 组件路径
*/
private String component;
/**
* 路由参数
*/
private String query;
/** 子菜单 */
@TableField(exist = false)
private List<SysMenu> children = new ArrayList<SysMenu>();
/** 是否为外链(0是 1否) */
private String isFrame;
/** 是否缓存(0缓存 1不缓存) */
private String isCache;
}

84
ecell-internationalize/ecell-internationalize-common/ecell-internationalize-common-system/src/main/java/com/ecell/internationalize/common/sysytem/entity/SysOperateInfo.java

@ -0,0 +1,84 @@ @@ -0,0 +1,84 @@
package com.ecell.internationalize.common.sysytem.entity;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import java.io.Serializable;
import java.util.Date;
/**
* @author borui
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("sys_operate_info")
public class SysOperateInfo implements Serializable {
private static final long serialVersionUID=1L;
/**
* 主键Id
*/
@TableId("id")
private String id;
/**
* 用户账号
*/
private String account;
/**
* 登录IP地址
*/
private String loginIp;
/**
* 提示信息
*/
private String msg;
/**
* 操作时间
*/
private Date accessTime;
/**
* 操作模块
*/
private String operationModule;
/**
* 创建人
*/
private String createUser;
/**
* 创建时间
*/
@TableField(value = "create_time",fill = FieldFill.INSERT)
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date createTime;
/**
* 修改人
*/
private String updateUser;
/**
* 修改时间
*/
@TableField(value = "update_time",fill = FieldFill.UPDATE)
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date updateTime;
/**
* 异常信息
*/
private String errorMsg;
/**
* 操作状态0失败1成功
*/
private String status;
}

71
ecell-internationalize/ecell-internationalize-common/ecell-internationalize-common-system/src/main/java/com/ecell/internationalize/common/sysytem/entity/SysRole.java

@ -0,0 +1,71 @@ @@ -0,0 +1,71 @@
package com.ecell.internationalize.common.sysytem.entity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import java.io.Serializable;
import java.util.Date;
/**
* @author borui
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("sys_role")
public class SysRole implements Serializable {
private static final long serialVersionUID=1L;
/**
* 主键Id
*/
@TableId("role_id")
private String roleId;
/**
* 角色名称
*/
private String roleName;
/**
* 角色权限字符串
*/
private String roleKey;
/**
* 角色状态0正常 1停用
*/
private String status;
/**
* 删除标识0已删除1正常
*/
private String delFlag;
/**
* 创建人
*/
private String createUser;
/**
* 创建时间
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date createTime;
/**
* 修改人
*/
private String updateUser;
/**
* 修改时间
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date updateTime;
/** 菜单组 */
@TableField(exist = false)
private String[] menuIds;
}

17
ecell-internationalize/ecell-internationalize-common/ecell-internationalize-common-system/src/main/java/com/ecell/internationalize/common/sysytem/fallback/SysOperatorInfoFeignClientFallBack.java

@ -0,0 +1,17 @@ @@ -0,0 +1,17 @@
package com.ecell.internationalize.common.sysytem.fallback;
import com.ecell.internationalize.common.core.exception.ServiceException;
import com.ecell.internationalize.common.sysytem.entity.SysOperateInfo;
import com.ecell.internationalize.common.sysytem.feign.SysOperatorInfoFeignClient;
import org.springframework.stereotype.Component;
/**
* @author borui
*/
@Component
public class SysOperatorInfoFeignClientFallBack implements SysOperatorInfoFeignClient {
@Override
public void save(SysOperateInfo sysOperateInfo) {
throw new ServiceException("服务不存在或者端口错误");
}
}

21
ecell-internationalize/ecell-internationalize-common/ecell-internationalize-common-system/src/main/java/com/ecell/internationalize/common/sysytem/feign/SysOperatorInfoFeignClient.java

@ -0,0 +1,21 @@ @@ -0,0 +1,21 @@
package com.ecell.internationalize.common.sysytem.feign;
import com.ecell.internationalize.common.sysytem.entity.SysOperateInfo;
import com.ecell.internationalize.common.sysytem.fallback.SysOperatorInfoFeignClientFallBack;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
/**
* @author borui
*/
@FeignClient(value = "yisai-system-security",fallback = SysOperatorInfoFeignClientFallBack.class)
public interface SysOperatorInfoFeignClient {
/**
* 新增操作日志信息
* @param sysOperateInfo 实体对象
* @return 结果
*/
@PostMapping("sys_user/operator/save")
void save(@RequestBody SysOperateInfo sysOperateInfo);
}

70
ecell-internationalize/ecell-internationalize-common/ecell-internationalize-common-system/src/main/java/com/ecell/internationalize/common/sysytem/utlis/AesUtil.java

@ -0,0 +1,70 @@ @@ -0,0 +1,70 @@
package com.ecell.internationalize.common.sysytem.utlis;
import org.bouncycastle.jce.provider.BouncyCastleProvider;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import javax.crypto.Cipher;
import javax.crypto.spec.IvParameterSpec;
import javax.crypto.spec.SecretKeySpec;
import java.security.Security;
import java.util.Base64;
/**
* @author borui
*/
public class AesUtil {
private static final Logger log = LoggerFactory.getLogger(AesUtil.class);
private static final String SECRET_KEY="89b13fsdfa7cf5db1XXXX759a2bc89d2";
private static final String VECTOR_FACTOR="ecellapp12345678";
static {
try {
Security.addProvider(new BouncyCastleProvider());
} catch (Exception e) {
log.info("出始化出错:{}",e.getMessage());
}
}
public static String encrypt(String src){
String s=null;
try {
byte[] bytes = SECRET_KEY.getBytes();
SecretKeySpec secretKeySpec = new SecretKeySpec(bytes, "AES");
Cipher cipher = Cipher.getInstance("AES/CBC/PKCS7Padding");
IvParameterSpec ips=new IvParameterSpec(VECTOR_FACTOR.getBytes());
cipher.init(Cipher.ENCRYPT_MODE,secretKeySpec,ips);
byte[] bytes1 = cipher.doFinal(src.getBytes());
byte[] encode = Base64.getEncoder().encode(bytes1);
String s1=new String(encode);
s=String.copyValueOf(s1.toCharArray(),0,encode.length);
} catch (Exception e) {
log.info("encrypt:{}",e.getMessage());
}
return s;
}
public static String decrypt(String s){
String s1=null;
try {
byte[] bytes = SECRET_KEY.getBytes();
SecretKeySpec secretKeySpec = new SecretKeySpec(bytes, "AES");
Cipher cipher = Cipher.getInstance("AES/CBC/PKCS7Padding");
IvParameterSpec ips=new IvParameterSpec(VECTOR_FACTOR.getBytes());
cipher.init(Cipher.DECRYPT_MODE,secretKeySpec,ips);
byte[] decode = Base64.getDecoder().decode(s.getBytes());
byte[] bytes1 = cipher.doFinal(decode);
s1=new String(bytes1);
} catch (Exception e) {
log.info("decrypt:{}",e.getMessage());
}
return s1;
}
}

8
ecell-internationalize/ecell-internationalize-common/ecell-internationalize-common-system/src/main/java/com/ecell/internationalize/common/sysytem/utlis/HttpUtil.java

@ -0,0 +1,8 @@ @@ -0,0 +1,8 @@
package com.ecell.internationalize.common.sysytem.utlis;
/**
* @author borui
*/
public class HttpUtil {
}

1
ecell-internationalize/ecell-internationalize-common/pom.xml

@ -20,6 +20,7 @@ @@ -20,6 +20,7 @@
<module>ecell-internationalize-security</module>
<module>ecell-internationalize-swagger</module>
<module>ecell-internationalize-syspush</module>
<module>ecell-internationalize-common-system</module>
</modules>
<properties>

8
ecell-internationalize/ecell-internationalize-gateway/src/main/java/com/ecell/internationalize/gateway/constant/MessagesConstant.java

@ -62,7 +62,7 @@ public class MessagesConstant { @@ -62,7 +62,7 @@ public class MessagesConstant {
/**语言类型 英文*/
public static final String Language_EN="en";
/**语言类型 key*/
public static final String HEADER_KEY="yisailanguage";
public static final String HEADER_KEY="ecell-language";
/**
@ -80,7 +80,8 @@ public class MessagesConstant { @@ -80,7 +80,8 @@ public class MessagesConstant {
if (MessagesConstant.Language_ZH.equals(zh)) {
msg = zh_msg;
} else {
msg = en_msg;
// msg = en_msg;
msg = zh_msg;
}
} else {
List<String> list = request.getHeaders().get("accept-language");
@ -91,7 +92,8 @@ public class MessagesConstant { @@ -91,7 +92,8 @@ public class MessagesConstant {
if (MessagesConstant.Language_ZH.equals(s)) {
msg = zh_msg;
} else {
msg = en_msg;
// msg = en_msg;
msg = zh_msg;
}
}

Loading…
Cancel
Save