From b13c66a7dbfbac7b9ad640288723c404920d1f8b Mon Sep 17 00:00:00 2001 From: caojianbin <1910336823> Date: Sun, 24 Mar 2024 14:27:50 +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=94=A8=E6=88=B7=E6=A8=A1=E5=9D=97=E5=BC=80=E5=8F=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../system/constant/ExceptionResultConstant.java | 38 ++++ .../common/system/constant/FieldConstant.java | 248 +++++++++++++++++++++ .../common/system/entity/ChatOssDto.java | 12 + .../common/system/entity/CheckVersionUpload.java | 19 ++ .../common/system/entity/DeviceOwnerInfoApp.java | 168 ++++++++++++++ .../system/entity/HeartTemperatureConfig.java | 62 ++++++ .../system/entity/HeartTemperatureRecord.java | 54 +++++ .../common/system/entity/ImeiFamilyInfo.java | 79 +++++++ .../common/system/entity/ImeiSosInfo.java | 66 ++++++ .../common/system/utlis/AesUtil.java | 70 ++++++ .../common/system/utlis/HttpUtil.java | 8 + .../sysytem/constant/ExceptionResultConstant.java | 38 ---- .../common/sysytem/constant/FieldConstant.java | 248 --------------------- .../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 ------ .../common/sysytem/utlis/AesUtil.java | 70 ------ .../common/sysytem/utlis/HttpUtil.java | 8 - .../security/config/ExceptionAdviceConfig.java | 27 +++ .../system/security/entity/FirmManageVO.java | 24 ++ .../system/security/entity/MenuTree.java | 37 +++ .../fallback/FirmManageFeignServiceFallBack.java | 34 +++ .../security/feign/FirmManageFeignClient.java | 38 ++++ .../src/main/resources/application-dev.yml | 68 ++++++ .../src/main/resources/bootstrap.yml | 25 +++ 29 files changed, 1077 insertions(+), 824 deletions(-) create mode 100644 ecell-internationalize/ecell-internationalize-common/ecell-internationalize-common-system/src/main/java/com/ecell/internationalize/common/system/constant/ExceptionResultConstant.java create mode 100644 ecell-internationalize/ecell-internationalize-common/ecell-internationalize-common-system/src/main/java/com/ecell/internationalize/common/system/constant/FieldConstant.java create mode 100644 ecell-internationalize/ecell-internationalize-common/ecell-internationalize-common-system/src/main/java/com/ecell/internationalize/common/system/entity/ChatOssDto.java create mode 100644 ecell-internationalize/ecell-internationalize-common/ecell-internationalize-common-system/src/main/java/com/ecell/internationalize/common/system/entity/CheckVersionUpload.java create mode 100644 ecell-internationalize/ecell-internationalize-common/ecell-internationalize-common-system/src/main/java/com/ecell/internationalize/common/system/entity/DeviceOwnerInfoApp.java create mode 100644 ecell-internationalize/ecell-internationalize-common/ecell-internationalize-common-system/src/main/java/com/ecell/internationalize/common/system/entity/HeartTemperatureConfig.java create mode 100644 ecell-internationalize/ecell-internationalize-common/ecell-internationalize-common-system/src/main/java/com/ecell/internationalize/common/system/entity/HeartTemperatureRecord.java create mode 100644 ecell-internationalize/ecell-internationalize-common/ecell-internationalize-common-system/src/main/java/com/ecell/internationalize/common/system/entity/ImeiFamilyInfo.java create mode 100644 ecell-internationalize/ecell-internationalize-common/ecell-internationalize-common-system/src/main/java/com/ecell/internationalize/common/system/entity/ImeiSosInfo.java create mode 100644 ecell-internationalize/ecell-internationalize-common/ecell-internationalize-common-system/src/main/java/com/ecell/internationalize/common/system/utlis/AesUtil.java create mode 100644 ecell-internationalize/ecell-internationalize-common/ecell-internationalize-common-system/src/main/java/com/ecell/internationalize/common/system/utlis/HttpUtil.java delete mode 100644 ecell-internationalize/ecell-internationalize-common/ecell-internationalize-common-system/src/main/java/com/ecell/internationalize/common/sysytem/constant/ExceptionResultConstant.java delete mode 100644 ecell-internationalize/ecell-internationalize-common/ecell-internationalize-common-system/src/main/java/com/ecell/internationalize/common/sysytem/constant/FieldConstant.java delete mode 100644 ecell-internationalize/ecell-internationalize-common/ecell-internationalize-common-system/src/main/java/com/ecell/internationalize/common/sysytem/entity/ChatOssDto.java delete mode 100644 ecell-internationalize/ecell-internationalize-common/ecell-internationalize-common-system/src/main/java/com/ecell/internationalize/common/sysytem/entity/CheckVersionUpload.java delete mode 100644 ecell-internationalize/ecell-internationalize-common/ecell-internationalize-common-system/src/main/java/com/ecell/internationalize/common/sysytem/entity/DeviceOwnerInfoApp.java delete mode 100644 ecell-internationalize/ecell-internationalize-common/ecell-internationalize-common-system/src/main/java/com/ecell/internationalize/common/sysytem/entity/HeartTemperatureConfig.java delete mode 100644 ecell-internationalize/ecell-internationalize-common/ecell-internationalize-common-system/src/main/java/com/ecell/internationalize/common/sysytem/entity/HeartTemperatureRecord.java delete mode 100644 ecell-internationalize/ecell-internationalize-common/ecell-internationalize-common-system/src/main/java/com/ecell/internationalize/common/sysytem/entity/ImeiFamilyInfo.java delete mode 100644 ecell-internationalize/ecell-internationalize-common/ecell-internationalize-common-system/src/main/java/com/ecell/internationalize/common/sysytem/entity/ImeiSosInfo.java delete mode 100644 ecell-internationalize/ecell-internationalize-common/ecell-internationalize-common-system/src/main/java/com/ecell/internationalize/common/sysytem/utlis/AesUtil.java delete mode 100644 ecell-internationalize/ecell-internationalize-common/ecell-internationalize-common-system/src/main/java/com/ecell/internationalize/common/sysytem/utlis/HttpUtil.java create mode 100644 ecell-internationalize/ecell-internationalize-system-security/src/main/java/com/ecell/internationalize/system/security/config/ExceptionAdviceConfig.java create mode 100644 ecell-internationalize/ecell-internationalize-system-security/src/main/java/com/ecell/internationalize/system/security/entity/FirmManageVO.java create mode 100644 ecell-internationalize/ecell-internationalize-system-security/src/main/java/com/ecell/internationalize/system/security/entity/MenuTree.java create mode 100644 ecell-internationalize/ecell-internationalize-system-security/src/main/java/com/ecell/internationalize/system/security/fallback/FirmManageFeignServiceFallBack.java create mode 100644 ecell-internationalize/ecell-internationalize-system-security/src/main/java/com/ecell/internationalize/system/security/feign/FirmManageFeignClient.java create mode 100644 ecell-internationalize/ecell-internationalize-system-security/src/main/resources/application-dev.yml create mode 100644 ecell-internationalize/ecell-internationalize-system-security/src/main/resources/bootstrap.yml diff --git a/ecell-internationalize/ecell-internationalize-common/ecell-internationalize-common-system/src/main/java/com/ecell/internationalize/common/system/constant/ExceptionResultConstant.java b/ecell-internationalize/ecell-internationalize-common/ecell-internationalize-common-system/src/main/java/com/ecell/internationalize/common/system/constant/ExceptionResultConstant.java new file mode 100644 index 0000000..509b0c4 --- /dev/null +++ b/ecell-internationalize/ecell-internationalize-common/ecell-internationalize-common-system/src/main/java/com/ecell/internationalize/common/system/constant/ExceptionResultConstant.java @@ -0,0 +1,38 @@ +package com.ecell.internationalize.common.system.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/system/constant/FieldConstant.java b/ecell-internationalize/ecell-internationalize-common/ecell-internationalize-common-system/src/main/java/com/ecell/internationalize/common/system/constant/FieldConstant.java new file mode 100644 index 0000000..53c96f2 --- /dev/null +++ b/ecell-internationalize/ecell-internationalize-common/ecell-internationalize-common-system/src/main/java/com/ecell/internationalize/common/system/constant/FieldConstant.java @@ -0,0 +1,248 @@ +package com.ecell.internationalize.common.system.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/system/entity/ChatOssDto.java b/ecell-internationalize/ecell-internationalize-common/ecell-internationalize-common-system/src/main/java/com/ecell/internationalize/common/system/entity/ChatOssDto.java new file mode 100644 index 0000000..f46a337 --- /dev/null +++ b/ecell-internationalize/ecell-internationalize-common/ecell-internationalize-common-system/src/main/java/com/ecell/internationalize/common/system/entity/ChatOssDto.java @@ -0,0 +1,12 @@ +package com.ecell.internationalize.common.system.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/system/entity/CheckVersionUpload.java b/ecell-internationalize/ecell-internationalize-common/ecell-internationalize-common-system/src/main/java/com/ecell/internationalize/common/system/entity/CheckVersionUpload.java new file mode 100644 index 0000000..94de247 --- /dev/null +++ b/ecell-internationalize/ecell-internationalize-common/ecell-internationalize-common-system/src/main/java/com/ecell/internationalize/common/system/entity/CheckVersionUpload.java @@ -0,0 +1,19 @@ +package com.ecell.internationalize.common.system.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/system/entity/DeviceOwnerInfoApp.java b/ecell-internationalize/ecell-internationalize-common/ecell-internationalize-common-system/src/main/java/com/ecell/internationalize/common/system/entity/DeviceOwnerInfoApp.java new file mode 100644 index 0000000..e741aa1 --- /dev/null +++ b/ecell-internationalize/ecell-internationalize-common/ecell-internationalize-common-system/src/main/java/com/ecell/internationalize/common/system/entity/DeviceOwnerInfoApp.java @@ -0,0 +1,168 @@ +package com.ecell.internationalize.common.system.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/system/entity/HeartTemperatureConfig.java b/ecell-internationalize/ecell-internationalize-common/ecell-internationalize-common-system/src/main/java/com/ecell/internationalize/common/system/entity/HeartTemperatureConfig.java new file mode 100644 index 0000000..ca46c88 --- /dev/null +++ b/ecell-internationalize/ecell-internationalize-common/ecell-internationalize-common-system/src/main/java/com/ecell/internationalize/common/system/entity/HeartTemperatureConfig.java @@ -0,0 +1,62 @@ +package com.ecell.internationalize.common.system.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/system/entity/HeartTemperatureRecord.java b/ecell-internationalize/ecell-internationalize-common/ecell-internationalize-common-system/src/main/java/com/ecell/internationalize/common/system/entity/HeartTemperatureRecord.java new file mode 100644 index 0000000..c1d41d2 --- /dev/null +++ b/ecell-internationalize/ecell-internationalize-common/ecell-internationalize-common-system/src/main/java/com/ecell/internationalize/common/system/entity/HeartTemperatureRecord.java @@ -0,0 +1,54 @@ +package com.ecell.internationalize.common.system.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/system/entity/ImeiFamilyInfo.java b/ecell-internationalize/ecell-internationalize-common/ecell-internationalize-common-system/src/main/java/com/ecell/internationalize/common/system/entity/ImeiFamilyInfo.java new file mode 100644 index 0000000..81e181b --- /dev/null +++ b/ecell-internationalize/ecell-internationalize-common/ecell-internationalize-common-system/src/main/java/com/ecell/internationalize/common/system/entity/ImeiFamilyInfo.java @@ -0,0 +1,79 @@ +package com.ecell.internationalize.common.system.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/system/entity/ImeiSosInfo.java b/ecell-internationalize/ecell-internationalize-common/ecell-internationalize-common-system/src/main/java/com/ecell/internationalize/common/system/entity/ImeiSosInfo.java new file mode 100644 index 0000000..322caf6 --- /dev/null +++ b/ecell-internationalize/ecell-internationalize-common/ecell-internationalize-common-system/src/main/java/com/ecell/internationalize/common/system/entity/ImeiSosInfo.java @@ -0,0 +1,66 @@ +package com.ecell.internationalize.common.system.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/system/utlis/AesUtil.java b/ecell-internationalize/ecell-internationalize-common/ecell-internationalize-common-system/src/main/java/com/ecell/internationalize/common/system/utlis/AesUtil.java new file mode 100644 index 0000000..7a59933 --- /dev/null +++ b/ecell-internationalize/ecell-internationalize-common/ecell-internationalize-common-system/src/main/java/com/ecell/internationalize/common/system/utlis/AesUtil.java @@ -0,0 +1,70 @@ +package com.ecell.internationalize.common.system.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/system/utlis/HttpUtil.java b/ecell-internationalize/ecell-internationalize-common/ecell-internationalize-common-system/src/main/java/com/ecell/internationalize/common/system/utlis/HttpUtil.java new file mode 100644 index 0000000..27c59b4 --- /dev/null +++ b/ecell-internationalize/ecell-internationalize-common/ecell-internationalize-common-system/src/main/java/com/ecell/internationalize/common/system/utlis/HttpUtil.java @@ -0,0 +1,8 @@ +package com.ecell.internationalize.common.system.utlis; + +/** + * @author borui + */ +public class HttpUtil { + +} 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 deleted file mode 100644 index 843fdd7..0000000 --- a/ecell-internationalize/ecell-internationalize-common/ecell-internationalize-common-system/src/main/java/com/ecell/internationalize/common/sysytem/constant/ExceptionResultConstant.java +++ /dev/null @@ -1,38 +0,0 @@ -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 deleted file mode 100644 index 958bc7f..0000000 --- a/ecell-internationalize/ecell-internationalize-common/ecell-internationalize-common-system/src/main/java/com/ecell/internationalize/common/sysytem/constant/FieldConstant.java +++ /dev/null @@ -1,248 +0,0 @@ -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/entity/ChatOssDto.java b/ecell-internationalize/ecell-internationalize-common/ecell-internationalize-common-system/src/main/java/com/ecell/internationalize/common/sysytem/entity/ChatOssDto.java deleted file mode 100644 index d8c5464..0000000 --- a/ecell-internationalize/ecell-internationalize-common/ecell-internationalize-common-system/src/main/java/com/ecell/internationalize/common/sysytem/entity/ChatOssDto.java +++ /dev/null @@ -1,12 +0,0 @@ -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 deleted file mode 100644 index 42226e4..0000000 --- a/ecell-internationalize/ecell-internationalize-common/ecell-internationalize-common-system/src/main/java/com/ecell/internationalize/common/sysytem/entity/CheckVersionUpload.java +++ /dev/null @@ -1,19 +0,0 @@ -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 deleted file mode 100644 index eeb60c2..0000000 --- a/ecell-internationalize/ecell-internationalize-common/ecell-internationalize-common-system/src/main/java/com/ecell/internationalize/common/sysytem/entity/DeviceOwnerInfoApp.java +++ /dev/null @@ -1,168 +0,0 @@ -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 deleted file mode 100644 index d70f9ad..0000000 --- a/ecell-internationalize/ecell-internationalize-common/ecell-internationalize-common-system/src/main/java/com/ecell/internationalize/common/sysytem/entity/HeartTemperatureConfig.java +++ /dev/null @@ -1,62 +0,0 @@ -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 deleted file mode 100644 index 68eaf9f..0000000 --- a/ecell-internationalize/ecell-internationalize-common/ecell-internationalize-common-system/src/main/java/com/ecell/internationalize/common/sysytem/entity/HeartTemperatureRecord.java +++ /dev/null @@ -1,54 +0,0 @@ -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 deleted file mode 100644 index b9a7208..0000000 --- a/ecell-internationalize/ecell-internationalize-common/ecell-internationalize-common-system/src/main/java/com/ecell/internationalize/common/sysytem/entity/ImeiFamilyInfo.java +++ /dev/null @@ -1,79 +0,0 @@ -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 deleted file mode 100644 index 661bfa2..0000000 --- a/ecell-internationalize/ecell-internationalize-common/ecell-internationalize-common-system/src/main/java/com/ecell/internationalize/common/sysytem/entity/ImeiSosInfo.java +++ /dev/null @@ -1,66 +0,0 @@ -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/utlis/AesUtil.java b/ecell-internationalize/ecell-internationalize-common/ecell-internationalize-common-system/src/main/java/com/ecell/internationalize/common/sysytem/utlis/AesUtil.java deleted file mode 100644 index cc33fec..0000000 --- a/ecell-internationalize/ecell-internationalize-common/ecell-internationalize-common-system/src/main/java/com/ecell/internationalize/common/sysytem/utlis/AesUtil.java +++ /dev/null @@ -1,70 +0,0 @@ -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 deleted file mode 100644 index 364f1d4..0000000 --- a/ecell-internationalize/ecell-internationalize-common/ecell-internationalize-common-system/src/main/java/com/ecell/internationalize/common/sysytem/utlis/HttpUtil.java +++ /dev/null @@ -1,8 +0,0 @@ -package com.ecell.internationalize.common.sysytem.utlis; - -/** - * @author borui - */ -public class HttpUtil { - -} diff --git a/ecell-internationalize/ecell-internationalize-system-security/src/main/java/com/ecell/internationalize/system/security/config/ExceptionAdviceConfig.java b/ecell-internationalize/ecell-internationalize-system-security/src/main/java/com/ecell/internationalize/system/security/config/ExceptionAdviceConfig.java new file mode 100644 index 0000000..d2d6753 --- /dev/null +++ b/ecell-internationalize/ecell-internationalize-system-security/src/main/java/com/ecell/internationalize/system/security/config/ExceptionAdviceConfig.java @@ -0,0 +1,27 @@ +package com.ecell.internationalize.system.security.config; + +import com.ecell.internationalize.common.core.utils.locale.LocaleUtil; +import com.ecell.internationalize.common.core.web.domain.AjaxResult; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.web.bind.annotation.ExceptionHandler; +import org.springframework.web.bind.annotation.RestControllerAdvice; + +/** + * @author borui + */ +@RestControllerAdvice +public class ExceptionAdviceConfig { + private static final Logger logger = LoggerFactory.getLogger(ExceptionAdviceConfig.class); + /** + * 全局异常处理,配置国际化 + * @Author: liy + * @Date: 2022/7/8 13:53 + */ + @ExceptionHandler(Exception.class) + public AjaxResult exceptionHandler(Exception e) { + e.printStackTrace(); + logger.error("异常错误信息:{}",e.getCause().getMessage()); + return AjaxResult.error(LocaleUtil.getMessage("messages.error")); + } +} diff --git a/ecell-internationalize/ecell-internationalize-system-security/src/main/java/com/ecell/internationalize/system/security/entity/FirmManageVO.java b/ecell-internationalize/ecell-internationalize-system-security/src/main/java/com/ecell/internationalize/system/security/entity/FirmManageVO.java new file mode 100644 index 0000000..e09535c --- /dev/null +++ b/ecell-internationalize/ecell-internationalize-system-security/src/main/java/com/ecell/internationalize/system/security/entity/FirmManageVO.java @@ -0,0 +1,24 @@ +package com.ecell.internationalize.system.security.entity; + +import lombok.Data; + +/** + * @author borui + */ +@Data +public class FirmManageVO { + private static final long serialVersionUID = 1L; + /** + * 厂商Id + */ + private String firmId; + + /** + * 厂商名称 + */ + private String firmName; + /** + * 账号状态 0:禁用 1:启用 + */ + private String status; +} diff --git a/ecell-internationalize/ecell-internationalize-system-security/src/main/java/com/ecell/internationalize/system/security/entity/MenuTree.java b/ecell-internationalize/ecell-internationalize-system-security/src/main/java/com/ecell/internationalize/system/security/entity/MenuTree.java new file mode 100644 index 0000000..192325e --- /dev/null +++ b/ecell-internationalize/ecell-internationalize-system-security/src/main/java/com/ecell/internationalize/system/security/entity/MenuTree.java @@ -0,0 +1,37 @@ +package com.ecell.internationalize.system.security.entity; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.io.Serializable; + +/** + * @author borui + */ +@Data +@ApiModel(value = "权限树") +@EqualsAndHashCode(callSuper = true) +public class MenuTree extends TreeNode implements Serializable { + /** + * 菜单名称 + */ + @ApiModelProperty(value = "菜单名称") + private String menuName; + /** + * 路由 + */ + @ApiModelProperty(value = "路由") + private String path; + + public MenuTree() { + } + + public MenuTree(MenuVO menuVO) { + this.menuId = menuVO.getMenuId(); + this.parentId = menuVO.getParentId(); + this.menuName = menuVO.getMenuName(); + this.path=menuVO.getPath(); + } +} diff --git a/ecell-internationalize/ecell-internationalize-system-security/src/main/java/com/ecell/internationalize/system/security/fallback/FirmManageFeignServiceFallBack.java b/ecell-internationalize/ecell-internationalize-system-security/src/main/java/com/ecell/internationalize/system/security/fallback/FirmManageFeignServiceFallBack.java new file mode 100644 index 0000000..9d926ca --- /dev/null +++ b/ecell-internationalize/ecell-internationalize-system-security/src/main/java/com/ecell/internationalize/system/security/fallback/FirmManageFeignServiceFallBack.java @@ -0,0 +1,34 @@ +package com.ecell.internationalize.system.security.fallback; +import com.ecell.internationalize.common.core.exception.ServiceException; +import com.ecell.internationalize.common.core.utils.locale.LocaleUtil; +import com.ecell.internationalize.common.core.web.domain.AjaxResult; +import com.ecell.internationalize.common.system.constant.FieldConstant; +import com.ecell.internationalize.system.security.entity.FirmManageVO; +import com.ecell.internationalize.system.security.feign.FirmManageFeignClient; +import org.springframework.stereotype.Component; + +import java.util.List; + +/** + * 服务熔断降级 + * @Title: FirmManageFeignClient + * @Author: liy + * @Date: 2022/7/18 15:09 + */ +@Component +public class FirmManageFeignServiceFallBack implements FirmManageFeignClient { + @Override + public AjaxResult queryAll() { + throw new ServiceException(LocaleUtil.getMessage(FieldConstant.MESSAGES_FALLBACK_INFO)); + } + + @Override + public AjaxResult findById(String firmId) { + throw new ServiceException(LocaleUtil.getMessage(FieldConstant.MESSAGES_FALLBACK_INFO)); + } + + @Override + public List getAgent() { + throw new ServiceException(LocaleUtil.getMessage(FieldConstant.MESSAGES_FALLBACK_INFO)); + } +} diff --git a/ecell-internationalize/ecell-internationalize-system-security/src/main/java/com/ecell/internationalize/system/security/feign/FirmManageFeignClient.java b/ecell-internationalize/ecell-internationalize-system-security/src/main/java/com/ecell/internationalize/system/security/feign/FirmManageFeignClient.java new file mode 100644 index 0000000..31587e3 --- /dev/null +++ b/ecell-internationalize/ecell-internationalize-system-security/src/main/java/com/ecell/internationalize/system/security/feign/FirmManageFeignClient.java @@ -0,0 +1,38 @@ +package com.ecell.internationalize.system.security.feign; + +import com.ecell.internationalize.common.core.web.domain.AjaxResult; +import com.ecell.internationalize.system.security.entity.FirmManageVO; +import org.springframework.cloud.openfeign.FeignClient; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestParam; + +import java.util.List; + +/** + * 厂商Feign + * @Title: FirmManageFeignClient + * @Author: liy + * @Date: 2022/7/25 17:33 + */ +@FeignClient(value = "yisai-system",contextId ="yisai-system001") +public interface FirmManageFeignClient { + /** + * 查询所有厂商信息 + * @return List + */ + @GetMapping("firm_manage/firm/queryAll") + AjaxResult queryAll(); + /** + * 根据ID查询厂商信息 + * @param firmId 实体对象 + * @return List + */ + @GetMapping("firm_manage/firm/queryById") + AjaxResult findById(@RequestParam("firmId") String firmId); + /** + * 查询所有厂商、代理商信息 + * @return List + */ + @GetMapping("firm_manage/firm/queryAllData") + List getAgent(); +} diff --git a/ecell-internationalize/ecell-internationalize-system-security/src/main/resources/application-dev.yml b/ecell-internationalize/ecell-internationalize-system-security/src/main/resources/application-dev.yml new file mode 100644 index 0000000..22baaaf --- /dev/null +++ b/ecell-internationalize/ecell-internationalize-system-security/src/main/resources/application-dev.yml @@ -0,0 +1,68 @@ +spring: + # 配置国际化资源文件路径 + messages: + basename: i18n/messages + encoding: UTF-8 + datasource: + driver-class-name: com.mysql.cj.jdbc.Driver + url: jdbc:mysql://192.168.0.108:3306/ys-business?serverTimeZone=UTC + username: root + password: 123456 + #数据源的其他配置 + druid: + initial-size: 5 + min-idle: 5 + max-active: 20 + max-wait: 60000 + time-between-eviction-runs-millis: 60000 + min-evictable-idle-time-millis: 300000 + validation-query: SELECT 1 FROM DUAL + testWhileIdle: true + testOnBorrow: false + testOnReturn: false + poolPreparedStatements: true + maxPoolPreparedStatementPerConnectionSize: 20 + redis: + host: 120.77.209.176 + port: 6379 + database: 2 + password: Ecell...20201001 + #设置静态资源路径,多个以逗号分隔 + web: + resources: + static-locations: classpath:static/ +mybatis: + #配置SQL映射文件路径 + mapper-locations: classpath:mapper/*.xml + # 搜索指定包别名 + typeAliasesPackage: com.yisai.system.security + #驼峰命名 + configuration: + map-underscore-to-camel-case: true +# feign 配置 +feign: + sentinel: + enabled: true + okhttp: + enabled: true + httpclient: + enabled: false + client: + config: + default: + connectTimeout: 10000 + readTimeout: 60000 + compression: + request: + enabled: true + response: + enabled: true +# 暴露监控端点 +management: + endpoints: + web: + exposure: + include: '*' +logging: + level: + com.yisai.system.security.mapper: debug diff --git a/ecell-internationalize/ecell-internationalize-system-security/src/main/resources/bootstrap.yml b/ecell-internationalize/ecell-internationalize-system-security/src/main/resources/bootstrap.yml new file mode 100644 index 0000000..8f1c23a --- /dev/null +++ b/ecell-internationalize/ecell-internationalize-system-security/src/main/resources/bootstrap.yml @@ -0,0 +1,25 @@ +# Tomcat +server: + port: 9299 + +# Spring +spring: + application: + # 应用名称 + name: yisai-system-security + profiles: + # 环境配置 + active: dev + cloud: + nacos: + discovery: + # 服务注册地址 + server-addr: ecell-nacos:8848 + config: + # 配置中心地址 + server-addr: ecell-nacos:8848 + # 配置文件格式 + file-extension: yml + # 共享配置 + shared-configs: + - application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}