From 7773cae0ea4e260709197247e17fe2bce533ff7b Mon Sep 17 00:00:00 2001 From: chenyouting <514333061@qq.com> Date: Fri, 5 Sep 2025 10:52:53 +0800 Subject: [PATCH] =?UTF-8?q?=E9=85=8D=E7=BD=AE=E6=96=87=E4=BB=B6=E6=8F=90?= =?UTF-8?q?=E4=BA=A42?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mqtt/config/MqttPropertiesConfig.java | 1 + .../web/service/AppRegisterService.java | 3 +- .../src/main/resources/application-dev.yml | 116 +++++++++--------- .../com/fuyuanshen/app/domain/AppUser.java | 2 +- .../fuyuanshen/app/domain/vo/AppUserVo.java | 4 + .../app/service/impl/AppUserServiceImpl.java | 4 +- .../mapper/app/AppBusinessFileMapper.xml | 5 +- .../equipment/domain/vo/AppDeviceVo.java | 5 + pom.xml | 11 +- 9 files changed, 82 insertions(+), 69 deletions(-) diff --git a/fys-admin/src/main/java/com/fuyuanshen/global/mqtt/config/MqttPropertiesConfig.java b/fys-admin/src/main/java/com/fuyuanshen/global/mqtt/config/MqttPropertiesConfig.java index 6c5d7db..52f15ac 100644 --- a/fys-admin/src/main/java/com/fuyuanshen/global/mqtt/config/MqttPropertiesConfig.java +++ b/fys-admin/src/main/java/com/fuyuanshen/global/mqtt/config/MqttPropertiesConfig.java @@ -16,4 +16,5 @@ public class MqttPropertiesConfig { private String subTopic; private String pubClientId; private String pubTopic; + private String enabled; } \ No newline at end of file diff --git a/fys-admin/src/main/java/com/fuyuanshen/web/service/AppRegisterService.java b/fys-admin/src/main/java/com/fuyuanshen/web/service/AppRegisterService.java index 9b61425..b83f94d 100644 --- a/fys-admin/src/main/java/com/fuyuanshen/web/service/AppRegisterService.java +++ b/fys-admin/src/main/java/com/fuyuanshen/web/service/AppRegisterService.java @@ -79,7 +79,8 @@ public class AppRegisterService { boolean exist = TenantHelper.dynamic(tenantId, () -> { return appUserMapper.exists(new LambdaQueryWrapper() - .eq(AppUser::getUserName, appUser.getUserName())); + .eq(AppUser::getUserName, appUser.getUserName()) + .eq(AppUser::getUserType, UserType.APP_USER.getUserType())); }); if (exist) { throw new UserException("user.register.save.error", username); diff --git a/fys-admin/src/main/resources/application-dev.yml b/fys-admin/src/main/resources/application-dev.yml index e27d051..5478436 100644 --- a/fys-admin/src/main/resources/application-dev.yml +++ b/fys-admin/src/main/resources/application-dev.yml @@ -1,3 +1,6 @@ +--- # 临时文件存储位置 避免临时文件被系统清理报错 +spring.servlet.multipart.location: /fys/server/temp + --- # 监控中心配置 spring.boot.admin.client: # 增加客户端开关 @@ -8,15 +11,15 @@ spring.boot.admin.client: metadata: username: ${spring.boot.admin.client.username} userpassword: ${spring.boot.admin.client.password} - username: ${monitor.username} - password: ${monitor.password} + username: @monitor.username@ + password: @monitor.password@ --- # snail-job 配置 snail-job: enabled: false # 需要在 SnailJob 后台组管理创建对应名称的组,然后创建任务的时候选择对应的组,才能正确分派任务 group: "fys_group" - # SnailJob 接入验证令牌 详见 script/sql/ry_job.sql `sj_group_config` 表 + # SnailJob 接入验证令牌 详见 script/sql/ry_job.sql `sj_group_config`表 token: "SJ_cKqBTPzCsWA3VyuCfFoccmuIEGXjr5KT" server: host: 127.0.0.1 @@ -37,7 +40,7 @@ spring: # 动态数据源文档 https://www.kancloud.cn/tracy5546/dynamic-datasource/content dynamic: # 性能分析插件(有性能损耗 不建议生产环境使用) - p6spy: true + p6spy: false # 设置默认的数据源或者数据源组,默认值即为 master primary: master # 严格模式 匹配不到数据源则报错 @@ -49,35 +52,35 @@ spring: driverClassName: com.mysql.cj.jdbc.Driver # jdbc 所有参数配置参考 https://lionli.blog.csdn.net/article/details/122018562 # rewriteBatchedStatements=true 批处理优化 大幅提升批量插入更新删除性能(对数据库有性能损耗 使用批量操作应考虑性能问题) - url: jdbc:mysql://120.79.224.186:3366/fys-vue?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true + url: jdbc:mysql://47.107.152.87:3306/fys-vue?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true username: root - password: 1fys@QWER.. -# # 从库数据源 -# slave: -# lazy: true -# type: ${spring.datasource.type} -# driverClassName: com.mysql.cj.jdbc.Driver -# url: jdbc:mysql://localhost:3306/ry-vue?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true -# username: -# password: -# oracle: -# type: ${spring.datasource.type} -# driverClassName: oracle.jdbc.OracleDriver -# url: jdbc:oracle:thin:@//localhost:1521/XE -# username: ROOT -# password: root -# postgres: -# type: ${spring.datasource.type} -# driverClassName: org.postgresql.Driver -# url: jdbc:postgresql://localhost:5432/postgres?useUnicode=true&characterEncoding=utf8&useSSL=true&autoReconnect=true&reWriteBatchedInserts=true -# username: root -# password: root -# sqlserver: -# type: ${spring.datasource.type} -# driverClassName: com.microsoft.sqlserver.jdbc.SQLServerDriver -# url: jdbc:sqlserver://localhost:1433;DatabaseName=tempdb;SelectMethod=cursor;encrypt=false;rewriteBatchedStatements=true -# username: SA -# password: root + password: Jz_5623_cl1 + # # 从库数据源 + # slave: + # lazy: true + # type: ${spring.datasource.type} + # driverClassName: com.mysql.cj.jdbc.Driver + # url: jdbc:mysql://localhost:3306/ry-vue?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true + # username: + # password: + # oracle: + # type: ${spring.datasource.type} + # driverClassName: oracle.jdbc.OracleDriver + # url: jdbc:oracle:thin:@//localhost:1521/XE + # username: ROOT + # password: root + # postgres: + # type: ${spring.datasource.type} + # driverClassName: org.postgresql.Driver + # url: jdbc:postgresql://localhost:5432/postgres?useUnicode=true&characterEncoding=utf8&useSSL=true&autoReconnect=true&reWriteBatchedInserts=true + # username: root + # password: root + # sqlserver: + # type: ${spring.datasource.type} + # driverClassName: com.microsoft.sqlserver.jdbc.SQLServerDriver + # url: jdbc:sqlserver://localhost:1433;DatabaseName=tempdb;SelectMethod=cursor;encrypt=false;rewriteBatchedStatements=true + # username: SA + # password: root hikari: # 最大连接池数量 maxPoolSize: 20 @@ -98,13 +101,13 @@ spring: spring.data: redis: # 地址 - host: 120.79.224.186 + host: 47.107.152.87 # 端口,默认为6379 - port: 26379 + port: 6379 # 数据库索引 - database: 2 + database: 1 # redis 密码必须配置 - password: 1fys@QWER.. + password: re_fs_11520631 # 连接超时时间 timeout: 10s # 是否开启ssl @@ -115,17 +118,17 @@ redisson: # redis key前缀 keyPrefix: # 线程池数量 - threads: 4 + threads: 16 # Netty线程池数量 - nettyThreads: 8 + nettyThreads: 32 # 单节点配置 singleServerConfig: # 客户端名称 不能用中文 clientName: fys-Vue-Plus # 最小空闲连接数 - connectionMinimumIdleSize: 8 + connectionMinimumIdleSize: 32 # 连接池大小 - connectionPoolSize: 32 + connectionPoolSize: 64 # 连接空闲超时,单位:毫秒 idleConnectionTimeout: 10000 # 命令等待超时,单位:毫秒 @@ -177,12 +180,11 @@ sms: access-key-id: LTAI5tDGfJd4kMvrGtvyzCHz # 称为accessSecret有些称之为apiSecret access-key-secret: a4ZlVHVSYeMQHn0p1R18thA6xCdHQh - #模板ID 非必须配置,如果使用sendMessage的快速发送需此配置 + #模板ID 非必须配置,如果使用sendMessage的快速发送需此配置 template-id: SMS_324526343 - #模板变量 上述模板的变量 + #模板变量 上述模板的变量 templateName: code signature: 深圳市富源晟科技 -# sdk-app-id: 您的sdkAppId config2: # 厂商标识,标定此配置是哪个厂商,详细请看厂商标识介绍部分 supplier: tencent @@ -191,7 +193,6 @@ sms: signature: 您的短信签名 sdk-app-id: 您的sdkAppId - --- # 三方授权 justauth: # 前端外网访问地址 @@ -206,11 +207,11 @@ justauth: redirect-uri: ${justauth.address}/social-callback?source=maxkey topiam: # topiam 服务器地址 - server-url: http://127.0.0.1:1898/api/v1/authorize/y0q************spq***********8ol + server-url: http://127.0.0.1:1989/api/v1/authorize/y0q************spq***********8ol client-id: 449c4*********937************759 client-secret: ac7***********1e0************28d redirect-uri: ${justauth.address}/social-callback?source=topiam - scopes: [openid, email, phone, profile] + scopes: [ openid, email, phone, profile ] qq: client-id: 10**********6 client-secret: 1f7d08**********5b7**********29e @@ -276,6 +277,18 @@ justauth: redirect-uri: ${justauth.address}/social-callback?source=gitea +# MQTT配置 +mqtt: + username: admin + password: fys123456 + url: tcp://47.107.152.87:1883 + subClientId: fys_subClient + subTopic: worker/location/# + pubTopic: B/# + pubClientId: fys_pubClient + enabled: false + + # 文件存储路径 file: mac: @@ -296,13 +309,4 @@ file: app_avatar: pic: C:\eladmin\file\ #设备图片存储路径 #ip: http://fuyuanshen.com:81/ #服务器地址 - ip: https://fuyuanshen.com/ #服务器地址 -# MQTT配置 -mqtt: - username: admin - password: fys123456 - url: tcp://47.107.152.87:1883 - subClientId: fys_subClient - subTopic: worker/location/# - pubTopic: B/# - pubClientId: fys_pubClient \ No newline at end of file + ip: https://fuyuanshen.com/ #服务器地址 \ No newline at end of file diff --git a/fys-modules/fys-app/src/main/java/com/fuyuanshen/app/domain/AppUser.java b/fys-modules/fys-app/src/main/java/com/fuyuanshen/app/domain/AppUser.java index c712f53..34e231a 100644 --- a/fys-modules/fys-app/src/main/java/com/fuyuanshen/app/domain/AppUser.java +++ b/fys-modules/fys-app/src/main/java/com/fuyuanshen/app/domain/AppUser.java @@ -99,6 +99,6 @@ public class AppUser extends TenantEntity { /** * 地区 */ - private String region; +// private String region; } diff --git a/fys-modules/fys-app/src/main/java/com/fuyuanshen/app/domain/vo/AppUserVo.java b/fys-modules/fys-app/src/main/java/com/fuyuanshen/app/domain/vo/AppUserVo.java index 3468ed1..2d27793 100644 --- a/fys-modules/fys-app/src/main/java/com/fuyuanshen/app/domain/vo/AppUserVo.java +++ b/fys-modules/fys-app/src/main/java/com/fuyuanshen/app/domain/vo/AppUserVo.java @@ -5,6 +5,8 @@ import java.util.Date; import com.baomidou.mybatisplus.annotation.FieldFill; import com.baomidou.mybatisplus.annotation.TableField; import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; import com.fuyuanshen.app.domain.AppUser; import cn.idev.excel.annotation.ExcelIgnoreUnannotated; import cn.idev.excel.annotation.ExcelProperty; @@ -87,6 +89,8 @@ public class AppUserVo implements Serializable { * 密码 */ @ExcelProperty(value = "密码") + @JsonIgnore + @JsonProperty private String password; /** diff --git a/fys-modules/fys-app/src/main/java/com/fuyuanshen/app/service/impl/AppUserServiceImpl.java b/fys-modules/fys-app/src/main/java/com/fuyuanshen/app/service/impl/AppUserServiceImpl.java index 57cc522..856ad6a 100644 --- a/fys-modules/fys-app/src/main/java/com/fuyuanshen/app/service/impl/AppUserServiceImpl.java +++ b/fys-modules/fys-app/src/main/java/com/fuyuanshen/app/service/impl/AppUserServiceImpl.java @@ -177,7 +177,7 @@ public class AppUserServiceImpl implements IAppUserService { appUserVo.setNickName(user.getNickName()); appUserVo.setGender(user.getSex()); appUserVo.setPhone(user.getPhonenumber()); - appUserVo.setRegion(user.getRegion()); +// appUserVo.setRegion(user.getRegion()); if(user.getAvatar() != null){ SysOssVo oss = sysOssService.getById(user.getAvatar()); if(oss != null){ @@ -203,7 +203,7 @@ public class AppUserServiceImpl implements IAppUserService { updUser.setAvatar(oss.getOssId()); } - updUser.setRegion(bo.getRegion()); +// updUser.setRegion(bo.getRegion()); updUser.setSex(bo.getGender()); return baseMapper.update(updUser, new LambdaQueryWrapper().eq(AppUser::getUserId, appUser.getUserId())); } diff --git a/fys-modules/fys-app/src/main/resources/mapper/app/AppBusinessFileMapper.xml b/fys-modules/fys-app/src/main/resources/mapper/app/AppBusinessFileMapper.xml index f74efe4..7db35e7 100644 --- a/fys-modules/fys-app/src/main/resources/mapper/app/AppBusinessFileMapper.xml +++ b/fys-modules/fys-app/src/main/resources/mapper/app/AppBusinessFileMapper.xml @@ -8,7 +8,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" select a.id,a.business_id,a.file_id,b.file_name,b.url fileUrl from app_business_file a left join sys_oss b on a.file_id = b.oss_id where 1=1 - a.create_by = #{createBy} + and a.create_by = #{createBy} and a.business_id = #{businessId} @@ -19,9 +19,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" and a.file_type = #{fileType} - - and a.create_by = #{createBy} - order by a.create_time desc diff --git a/fys-modules/fys-equipment/src/main/java/com/fuyuanshen/equipment/domain/vo/AppDeviceVo.java b/fys-modules/fys-equipment/src/main/java/com/fuyuanshen/equipment/domain/vo/AppDeviceVo.java index aafc6fc..43295ff 100644 --- a/fys-modules/fys-equipment/src/main/java/com/fuyuanshen/equipment/domain/vo/AppDeviceVo.java +++ b/fys-modules/fys-equipment/src/main/java/com/fuyuanshen/equipment/domain/vo/AppDeviceVo.java @@ -57,6 +57,11 @@ public class AppDeviceVo implements Serializable { */ private Date bindingTime; + /** + * 绑定人 + */ + private Date bindingBy; + /** * 在线状态(0离线,1在线) */ diff --git a/pom.xml b/pom.xml index ab9130f..0ee4220 100644 --- a/pom.xml +++ b/pom.xml @@ -83,6 +83,10 @@ fys 123456 + + + true + @@ -92,14 +96,11 @@ prod prod - warn + info fys 123456 - - - true - + jingquan