diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/base/BaseSensorInfoController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/base/BaseSensorInfoController.java index 9867f9d..6d0447c 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/base/BaseSensorInfoController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/base/BaseSensorInfoController.java @@ -124,6 +124,8 @@ public class BaseSensorInfoController extends BaseController @ResponseBody public AjaxResult addSave(BaseSensorInfo baseSensorInfo) { + baseSensorInfo.setCreateBy(ShiroUtils.getLoginName()); + baseSensorInfo.setCreateTime(new Date()); return toAjax(baseSensorInfoService.insertBaseSensorInfo(baseSensorInfo)); } diff --git a/ruoyi-admin/src/main/resources/application-druid.yml b/ruoyi-admin/src/main/resources/application-druid.yml index 76b2e87..8ecf966 100644 --- a/ruoyi-admin/src/main/resources/application-druid.yml +++ b/ruoyi-admin/src/main/resources/application-druid.yml @@ -6,12 +6,12 @@ spring: druid: # 主库数据源 master: -# url: jdbc:mysql://121.36.58.109:3306/jrm-intelligent-iot?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 -# username: root -# password: Haiwei123456 - url: jdbc:mysql://localhost:3306/jrm-intelligent-iot?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 + url: jdbc:mysql://121.36.58.109:3306/jrm-intelligent-iot?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 username: root - password: root + password: Haiwei123456 +# url: jdbc:mysql://localhost:3306/jrm-intelligent-iot?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 +# username: root +# password: root # 从库数据源 slave: # 从数据源开关/默认关闭 diff --git a/ruoyi-admin/src/main/resources/templates/base/sensorInfo/sensorInfo.html b/ruoyi-admin/src/main/resources/templates/base/sensorInfo/sensorInfo.html index 18d430e..51c5b9c 100644 --- a/ruoyi-admin/src/main/resources/templates/base/sensorInfo/sensorInfo.html +++ b/ruoyi-admin/src/main/resources/templates/base/sensorInfo/sensorInfo.html @@ -170,7 +170,7 @@ }, { field: 'sensorAddress', - title: '传感器地址(网络地址)' + title: '网络地址' }, { field: 'orderNum', @@ -186,19 +186,23 @@ }, { field: 'createBy', - title: '创建人' + title: '创建人', + visible: false }, { field: 'createTime', - title: '创建时间' + title: '创建时间', + visible: false }, { field: 'updateBy', - title: '更新人' + title: '更新人', + visible: false }, { field: 'updateTime', - title: '更新时间' + title: '更新时间', + visible: false }, { title: '操作',