From c6eebff0d8f24583e31d393583fb3c06dd3f0d73 Mon Sep 17 00:00:00 2001 From: caojianbin <1910336823> Date: Thu, 21 Mar 2024 17:33:45 +0800 Subject: [PATCH] =?UTF-8?q?=E9=87=8D=E6=9E=84=E5=9B=BD=E9=99=85=E5=8C=96,?= =?UTF-8?q?=E7=BD=91=E5=85=B3=E5=BC=80=E5=8F=91,=E5=85=AC=E5=85=B1?= =?UTF-8?q?=E6=A8=A1=E5=9D=97=E5=BC=80=E5=8F=91=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ecell-internationalize-common-system/pom.xml | 79 +++++++ .../sysytem/config/MybatisPlusPageConfig.java | 43 ++++ .../sysytem/constant/ExceptionResultConstant.java | 38 ++++ .../common/sysytem/constant/FieldConstant.java | 248 +++++++++++++++++++++ .../sysytem/constant/OssClientConstants.java | 15 ++ .../constant/ServiceExceptionResultConstant.java | 55 +++++ .../common/sysytem/entity/ChatOssDto.java | 12 + .../common/sysytem/entity/CheckVersionUpload.java | 19 ++ .../common/sysytem/entity/DeviceOwnerInfoApp.java | 168 ++++++++++++++ .../sysytem/entity/HeartTemperatureConfig.java | 62 ++++++ .../sysytem/entity/HeartTemperatureRecord.java | 54 +++++ .../common/sysytem/entity/ImeiFamilyInfo.java | 79 +++++++ .../common/sysytem/entity/ImeiSosInfo.java | 66 ++++++ .../sysytem/entity/PositioningModelInfo.java | 9 + .../common/sysytem/entity/SysMenu.java | 106 +++++++++ .../common/sysytem/entity/SysOperateInfo.java | 84 +++++++ .../common/sysytem/entity/SysRole.java | 71 ++++++ .../SysOperatorInfoFeignClientFallBack.java | 17 ++ .../sysytem/feign/SysOperatorInfoFeignClient.java | 21 ++ .../common/sysytem/utlis/AesUtil.java | 70 ++++++ .../common/sysytem/utlis/HttpUtil.java | 8 + .../ecell-internationalize-common/pom.xml | 1 + .../gateway/constant/MessagesConstant.java | 8 +- 23 files changed, 1330 insertions(+), 3 deletions(-) create mode 100644 ecell-internationalize/ecell-internationalize-common/ecell-internationalize-common-system/pom.xml create mode 100644 ecell-internationalize/ecell-internationalize-common/ecell-internationalize-common-system/src/main/java/com/ecell/internationalize/common/sysytem/config/MybatisPlusPageConfig.java create mode 100644 ecell-internationalize/ecell-internationalize-common/ecell-internationalize-common-system/src/main/java/com/ecell/internationalize/common/sysytem/constant/ExceptionResultConstant.java create mode 100644 ecell-internationalize/ecell-internationalize-common/ecell-internationalize-common-system/src/main/java/com/ecell/internationalize/common/sysytem/constant/FieldConstant.java create mode 100644 ecell-internationalize/ecell-internationalize-common/ecell-internationalize-common-system/src/main/java/com/ecell/internationalize/common/sysytem/constant/OssClientConstants.java create mode 100644 ecell-internationalize/ecell-internationalize-common/ecell-internationalize-common-system/src/main/java/com/ecell/internationalize/common/sysytem/constant/ServiceExceptionResultConstant.java create mode 100644 ecell-internationalize/ecell-internationalize-common/ecell-internationalize-common-system/src/main/java/com/ecell/internationalize/common/sysytem/entity/ChatOssDto.java create mode 100644 ecell-internationalize/ecell-internationalize-common/ecell-internationalize-common-system/src/main/java/com/ecell/internationalize/common/sysytem/entity/CheckVersionUpload.java create mode 100644 ecell-internationalize/ecell-internationalize-common/ecell-internationalize-common-system/src/main/java/com/ecell/internationalize/common/sysytem/entity/DeviceOwnerInfoApp.java create mode 100644 ecell-internationalize/ecell-internationalize-common/ecell-internationalize-common-system/src/main/java/com/ecell/internationalize/common/sysytem/entity/HeartTemperatureConfig.java create mode 100644 ecell-internationalize/ecell-internationalize-common/ecell-internationalize-common-system/src/main/java/com/ecell/internationalize/common/sysytem/entity/HeartTemperatureRecord.java create mode 100644 ecell-internationalize/ecell-internationalize-common/ecell-internationalize-common-system/src/main/java/com/ecell/internationalize/common/sysytem/entity/ImeiFamilyInfo.java create mode 100644 ecell-internationalize/ecell-internationalize-common/ecell-internationalize-common-system/src/main/java/com/ecell/internationalize/common/sysytem/entity/ImeiSosInfo.java create mode 100644 ecell-internationalize/ecell-internationalize-common/ecell-internationalize-common-system/src/main/java/com/ecell/internationalize/common/sysytem/entity/PositioningModelInfo.java create mode 100644 ecell-internationalize/ecell-internationalize-common/ecell-internationalize-common-system/src/main/java/com/ecell/internationalize/common/sysytem/entity/SysMenu.java create mode 100644 ecell-internationalize/ecell-internationalize-common/ecell-internationalize-common-system/src/main/java/com/ecell/internationalize/common/sysytem/entity/SysOperateInfo.java create mode 100644 ecell-internationalize/ecell-internationalize-common/ecell-internationalize-common-system/src/main/java/com/ecell/internationalize/common/sysytem/entity/SysRole.java create mode 100644 ecell-internationalize/ecell-internationalize-common/ecell-internationalize-common-system/src/main/java/com/ecell/internationalize/common/sysytem/fallback/SysOperatorInfoFeignClientFallBack.java create mode 100644 ecell-internationalize/ecell-internationalize-common/ecell-internationalize-common-system/src/main/java/com/ecell/internationalize/common/sysytem/feign/SysOperatorInfoFeignClient.java create mode 100644 ecell-internationalize/ecell-internationalize-common/ecell-internationalize-common-system/src/main/java/com/ecell/internationalize/common/sysytem/utlis/AesUtil.java create mode 100644 ecell-internationalize/ecell-internationalize-common/ecell-internationalize-common-system/src/main/java/com/ecell/internationalize/common/sysytem/utlis/HttpUtil.java diff --git a/ecell-internationalize/ecell-internationalize-common/ecell-internationalize-common-system/pom.xml b/ecell-internationalize/ecell-internationalize-common/ecell-internationalize-common-system/pom.xml new file mode 100644 index 0000000..ef784ce --- /dev/null +++ b/ecell-internationalize/ecell-internationalize-common/ecell-internationalize-common-system/pom.xml @@ -0,0 +1,79 @@ + + + + ecell-internationalize-common + com.ecell.internationalize.common + 1.0-SNAPSHOT + + 4.0.0 + + com.ecell.internationalize.common.sysytem + ecell-internationalize-common-system + + + + + org.projectlombok + lombok + true + + + com.fasterxml.jackson.core + jackson-annotations + + + + javax.validation + validation-api + 1.1.0.Final + + + + + com.baomidou + mybatis-plus-boot-starter + 3.1.1 + + + + com.baomidou + mybatis-plus + 3.1.1 + + + + + io.swagger + swagger-annotations + + + + com.ecell.internationalize.common.core + ecell-internationalize-core + 1.0-SNAPSHOT + + + com.ecell.internationalize.common.security + ecell-internationalize-security + 1.0-SNAPSHOT + + + + + + + com.aliyun.oss + aliyun-sdk-oss + 3.8.0 + + + + org.springframework.boot + spring-boot-starter-mail + + + + + \ No newline at end of file diff --git a/ecell-internationalize/ecell-internationalize-common/ecell-internationalize-common-system/src/main/java/com/ecell/internationalize/common/sysytem/config/MybatisPlusPageConfig.java b/ecell-internationalize/ecell-internationalize-common/ecell-internationalize-common-system/src/main/java/com/ecell/internationalize/common/sysytem/config/MybatisPlusPageConfig.java new file mode 100644 index 0000000..e8773df --- /dev/null +++ b/ecell-internationalize/ecell-internationalize-common/ecell-internationalize-common-system/src/main/java/com/ecell/internationalize/common/sysytem/config/MybatisPlusPageConfig.java @@ -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); + } + + } +} diff --git a/ecell-internationalize/ecell-internationalize-common/ecell-internationalize-common-system/src/main/java/com/ecell/internationalize/common/sysytem/constant/ExceptionResultConstant.java b/ecell-internationalize/ecell-internationalize-common/ecell-internationalize-common-system/src/main/java/com/ecell/internationalize/common/sysytem/constant/ExceptionResultConstant.java new file mode 100644 index 0000000..843fdd7 --- /dev/null +++ b/ecell-internationalize/ecell-internationalize-common/ecell-internationalize-common-system/src/main/java/com/ecell/internationalize/common/sysytem/constant/ExceptionResultConstant.java @@ -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 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"); + + } +} diff --git a/ecell-internationalize/ecell-internationalize-common/ecell-internationalize-common-system/src/main/java/com/ecell/internationalize/common/sysytem/constant/FieldConstant.java b/ecell-internationalize/ecell-internationalize-common/ecell-internationalize-common-system/src/main/java/com/ecell/internationalize/common/sysytem/constant/FieldConstant.java new file mode 100644 index 0000000..958bc7f --- /dev/null +++ b/ecell-internationalize/ecell-internationalize-common/ecell-internationalize-common-system/src/main/java/com/ecell/internationalize/common/sysytem/constant/FieldConstant.java @@ -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 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"; +} diff --git a/ecell-internationalize/ecell-internationalize-common/ecell-internationalize-common-system/src/main/java/com/ecell/internationalize/common/sysytem/constant/OssClientConstants.java b/ecell-internationalize/ecell-internationalize-common/ecell-internationalize-common-system/src/main/java/com/ecell/internationalize/common/sysytem/constant/OssClientConstants.java new file mode 100644 index 0000000..1a27423 --- /dev/null +++ b/ecell-internationalize/ecell-internationalize-common/ecell-internationalize-common-system/src/main/java/com/ecell/internationalize/common/sysytem/constant/OssClientConstants.java @@ -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"; +} diff --git a/ecell-internationalize/ecell-internationalize-common/ecell-internationalize-common-system/src/main/java/com/ecell/internationalize/common/sysytem/constant/ServiceExceptionResultConstant.java b/ecell-internationalize/ecell-internationalize-common/ecell-internationalize-common-system/src/main/java/com/ecell/internationalize/common/sysytem/constant/ServiceExceptionResultConstant.java new file mode 100644 index 0000000..2ad163e --- /dev/null +++ b/ecell-internationalize/ecell-internationalize-common/ecell-internationalize-common-system/src/main/java/com/ecell/internationalize/common/sysytem/constant/ServiceExceptionResultConstant.java @@ -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 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"); + + } +} diff --git a/ecell-internationalize/ecell-internationalize-common/ecell-internationalize-common-system/src/main/java/com/ecell/internationalize/common/sysytem/entity/ChatOssDto.java b/ecell-internationalize/ecell-internationalize-common/ecell-internationalize-common-system/src/main/java/com/ecell/internationalize/common/sysytem/entity/ChatOssDto.java new file mode 100644 index 0000000..d8c5464 --- /dev/null +++ b/ecell-internationalize/ecell-internationalize-common/ecell-internationalize-common-system/src/main/java/com/ecell/internationalize/common/sysytem/entity/ChatOssDto.java @@ -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; +} diff --git a/ecell-internationalize/ecell-internationalize-common/ecell-internationalize-common-system/src/main/java/com/ecell/internationalize/common/sysytem/entity/CheckVersionUpload.java b/ecell-internationalize/ecell-internationalize-common/ecell-internationalize-common-system/src/main/java/com/ecell/internationalize/common/sysytem/entity/CheckVersionUpload.java new file mode 100644 index 0000000..42226e4 --- /dev/null +++ b/ecell-internationalize/ecell-internationalize-common/ecell-internationalize-common-system/src/main/java/com/ecell/internationalize/common/sysytem/entity/CheckVersionUpload.java @@ -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; +} diff --git a/ecell-internationalize/ecell-internationalize-common/ecell-internationalize-common-system/src/main/java/com/ecell/internationalize/common/sysytem/entity/DeviceOwnerInfoApp.java b/ecell-internationalize/ecell-internationalize-common/ecell-internationalize-common-system/src/main/java/com/ecell/internationalize/common/sysytem/entity/DeviceOwnerInfoApp.java new file mode 100644 index 0000000..eeb60c2 --- /dev/null +++ b/ecell-internationalize/ecell-internationalize-common/ecell-internationalize-common-system/src/main/java/com/ecell/internationalize/common/sysytem/entity/DeviceOwnerInfoApp.java @@ -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; + + +} diff --git a/ecell-internationalize/ecell-internationalize-common/ecell-internationalize-common-system/src/main/java/com/ecell/internationalize/common/sysytem/entity/HeartTemperatureConfig.java b/ecell-internationalize/ecell-internationalize-common/ecell-internationalize-common-system/src/main/java/com/ecell/internationalize/common/sysytem/entity/HeartTemperatureConfig.java new file mode 100644 index 0000000..d70f9ad --- /dev/null +++ b/ecell-internationalize/ecell-internationalize-common/ecell-internationalize-common-system/src/main/java/com/ecell/internationalize/common/sysytem/entity/HeartTemperatureConfig.java @@ -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; +} diff --git a/ecell-internationalize/ecell-internationalize-common/ecell-internationalize-common-system/src/main/java/com/ecell/internationalize/common/sysytem/entity/HeartTemperatureRecord.java b/ecell-internationalize/ecell-internationalize-common/ecell-internationalize-common-system/src/main/java/com/ecell/internationalize/common/sysytem/entity/HeartTemperatureRecord.java new file mode 100644 index 0000000..68eaf9f --- /dev/null +++ b/ecell-internationalize/ecell-internationalize-common/ecell-internationalize-common-system/src/main/java/com/ecell/internationalize/common/sysytem/entity/HeartTemperatureRecord.java @@ -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; +} diff --git a/ecell-internationalize/ecell-internationalize-common/ecell-internationalize-common-system/src/main/java/com/ecell/internationalize/common/sysytem/entity/ImeiFamilyInfo.java b/ecell-internationalize/ecell-internationalize-common/ecell-internationalize-common-system/src/main/java/com/ecell/internationalize/common/sysytem/entity/ImeiFamilyInfo.java new file mode 100644 index 0000000..b9a7208 --- /dev/null +++ b/ecell-internationalize/ecell-internationalize-common/ecell-internationalize-common-system/src/main/java/com/ecell/internationalize/common/sysytem/entity/ImeiFamilyInfo.java @@ -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; +} diff --git a/ecell-internationalize/ecell-internationalize-common/ecell-internationalize-common-system/src/main/java/com/ecell/internationalize/common/sysytem/entity/ImeiSosInfo.java b/ecell-internationalize/ecell-internationalize-common/ecell-internationalize-common-system/src/main/java/com/ecell/internationalize/common/sysytem/entity/ImeiSosInfo.java new file mode 100644 index 0000000..661bfa2 --- /dev/null +++ b/ecell-internationalize/ecell-internationalize-common/ecell-internationalize-common-system/src/main/java/com/ecell/internationalize/common/sysytem/entity/ImeiSosInfo.java @@ -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; + +} diff --git a/ecell-internationalize/ecell-internationalize-common/ecell-internationalize-common-system/src/main/java/com/ecell/internationalize/common/sysytem/entity/PositioningModelInfo.java b/ecell-internationalize/ecell-internationalize-common/ecell-internationalize-common-system/src/main/java/com/ecell/internationalize/common/sysytem/entity/PositioningModelInfo.java new file mode 100644 index 0000000..921a4a9 --- /dev/null +++ b/ecell-internationalize/ecell-internationalize-common/ecell-internationalize-common-system/src/main/java/com/ecell/internationalize/common/sysytem/entity/PositioningModelInfo.java @@ -0,0 +1,9 @@ +package com.ecell.internationalize.common.sysytem.entity; + +import java.io.Serializable; + +/** + * @author borui + */ +public class PositioningModelInfo implements Serializable { +} diff --git a/ecell-internationalize/ecell-internationalize-common/ecell-internationalize-common-system/src/main/java/com/ecell/internationalize/common/sysytem/entity/SysMenu.java b/ecell-internationalize/ecell-internationalize-common/ecell-internationalize-common-system/src/main/java/com/ecell/internationalize/common/sysytem/entity/SysMenu.java new file mode 100644 index 0000000..846af4c --- /dev/null +++ b/ecell-internationalize/ecell-internationalize-common/ecell-internationalize-common-system/src/main/java/com/ecell/internationalize/common/sysytem/entity/SysMenu.java @@ -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 children = new ArrayList(); + /** 是否为外链(0是 1否) */ + private String isFrame; + /** 是否缓存(0缓存 1不缓存) */ + private String isCache; + +} diff --git a/ecell-internationalize/ecell-internationalize-common/ecell-internationalize-common-system/src/main/java/com/ecell/internationalize/common/sysytem/entity/SysOperateInfo.java b/ecell-internationalize/ecell-internationalize-common/ecell-internationalize-common-system/src/main/java/com/ecell/internationalize/common/sysytem/entity/SysOperateInfo.java new file mode 100644 index 0000000..a926117 --- /dev/null +++ b/ecell-internationalize/ecell-internationalize-common/ecell-internationalize-common-system/src/main/java/com/ecell/internationalize/common/sysytem/entity/SysOperateInfo.java @@ -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; +} diff --git a/ecell-internationalize/ecell-internationalize-common/ecell-internationalize-common-system/src/main/java/com/ecell/internationalize/common/sysytem/entity/SysRole.java b/ecell-internationalize/ecell-internationalize-common/ecell-internationalize-common-system/src/main/java/com/ecell/internationalize/common/sysytem/entity/SysRole.java new file mode 100644 index 0000000..c437582 --- /dev/null +++ b/ecell-internationalize/ecell-internationalize-common/ecell-internationalize-common-system/src/main/java/com/ecell/internationalize/common/sysytem/entity/SysRole.java @@ -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; +} diff --git a/ecell-internationalize/ecell-internationalize-common/ecell-internationalize-common-system/src/main/java/com/ecell/internationalize/common/sysytem/fallback/SysOperatorInfoFeignClientFallBack.java b/ecell-internationalize/ecell-internationalize-common/ecell-internationalize-common-system/src/main/java/com/ecell/internationalize/common/sysytem/fallback/SysOperatorInfoFeignClientFallBack.java new file mode 100644 index 0000000..a2d7181 --- /dev/null +++ b/ecell-internationalize/ecell-internationalize-common/ecell-internationalize-common-system/src/main/java/com/ecell/internationalize/common/sysytem/fallback/SysOperatorInfoFeignClientFallBack.java @@ -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("服务不存在或者端口错误"); + } +} diff --git a/ecell-internationalize/ecell-internationalize-common/ecell-internationalize-common-system/src/main/java/com/ecell/internationalize/common/sysytem/feign/SysOperatorInfoFeignClient.java b/ecell-internationalize/ecell-internationalize-common/ecell-internationalize-common-system/src/main/java/com/ecell/internationalize/common/sysytem/feign/SysOperatorInfoFeignClient.java new file mode 100644 index 0000000..eb70c59 --- /dev/null +++ b/ecell-internationalize/ecell-internationalize-common/ecell-internationalize-common-system/src/main/java/com/ecell/internationalize/common/sysytem/feign/SysOperatorInfoFeignClient.java @@ -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); +} diff --git a/ecell-internationalize/ecell-internationalize-common/ecell-internationalize-common-system/src/main/java/com/ecell/internationalize/common/sysytem/utlis/AesUtil.java b/ecell-internationalize/ecell-internationalize-common/ecell-internationalize-common-system/src/main/java/com/ecell/internationalize/common/sysytem/utlis/AesUtil.java new file mode 100644 index 0000000..cc33fec --- /dev/null +++ b/ecell-internationalize/ecell-internationalize-common/ecell-internationalize-common-system/src/main/java/com/ecell/internationalize/common/sysytem/utlis/AesUtil.java @@ -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; + } + +} diff --git a/ecell-internationalize/ecell-internationalize-common/ecell-internationalize-common-system/src/main/java/com/ecell/internationalize/common/sysytem/utlis/HttpUtil.java b/ecell-internationalize/ecell-internationalize-common/ecell-internationalize-common-system/src/main/java/com/ecell/internationalize/common/sysytem/utlis/HttpUtil.java new file mode 100644 index 0000000..364f1d4 --- /dev/null +++ b/ecell-internationalize/ecell-internationalize-common/ecell-internationalize-common-system/src/main/java/com/ecell/internationalize/common/sysytem/utlis/HttpUtil.java @@ -0,0 +1,8 @@ +package com.ecell.internationalize.common.sysytem.utlis; + +/** + * @author borui + */ +public class HttpUtil { + +} diff --git a/ecell-internationalize/ecell-internationalize-common/pom.xml b/ecell-internationalize/ecell-internationalize-common/pom.xml index e3b11c5..821006e 100644 --- a/ecell-internationalize/ecell-internationalize-common/pom.xml +++ b/ecell-internationalize/ecell-internationalize-common/pom.xml @@ -20,6 +20,7 @@ ecell-internationalize-security ecell-internationalize-swagger ecell-internationalize-syspush + ecell-internationalize-common-system diff --git a/ecell-internationalize/ecell-internationalize-gateway/src/main/java/com/ecell/internationalize/gateway/constant/MessagesConstant.java b/ecell-internationalize/ecell-internationalize-gateway/src/main/java/com/ecell/internationalize/gateway/constant/MessagesConstant.java index 99f5762..b735cf1 100644 --- a/ecell-internationalize/ecell-internationalize-gateway/src/main/java/com/ecell/internationalize/gateway/constant/MessagesConstant.java +++ b/ecell-internationalize/ecell-internationalize-gateway/src/main/java/com/ecell/internationalize/gateway/constant/MessagesConstant.java @@ -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 { if (MessagesConstant.Language_ZH.equals(zh)) { msg = zh_msg; } else { - msg = en_msg; + // msg = en_msg; + msg = zh_msg; } } else { List list = request.getHeaders().get("accept-language"); @@ -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; } }