diff --git a/fishery-common/fishery-common-mybatis/src/main/java/com/limap/common/mybatis/handler/FieldMetaObjectHandler.java b/fishery-common/fishery-common-mybatis/src/main/java/com/limap/common/mybatis/handler/FieldMetaObjectHandler.java
index 1ff1ec1..8bc01c5 100644
--- a/fishery-common/fishery-common-mybatis/src/main/java/com/limap/common/mybatis/handler/FieldMetaObjectHandler.java
+++ b/fishery-common/fishery-common-mybatis/src/main/java/com/limap/common/mybatis/handler/FieldMetaObjectHandler.java
@@ -45,16 +45,14 @@ public class FieldMetaObjectHandler implements MetaObjectHandler {
@Override
public void updateFill(MetaObject metaObject) {
-// LoginUser loginUser = SecurityUtils.getLoginUser();
LoginUser loginUser = null;
try{
loginUser = SecurityUtils.getLoginUser();
- // 更新者
- strictUpdateFill(metaObject, UPDATE_BY, String.class, loginUser.getUsername());
-
}catch (Exception e){
- log.error("获取用户信息失败");
+ // 定时任务等后台任务无用户上下文,使用系统默认值
}
+ // 更新者
+ strictUpdateFill(metaObject, UPDATE_BY, String.class, loginUser == null ? "系统修改" : loginUser.getUsername());
// 更新时间
strictUpdateFill(metaObject, UPDATE_TIME, Date.class, new Date());
}
diff --git a/fishery-core/src/main/resources/mapper/AquPayOrderMapper.xml b/fishery-core/src/main/resources/mapper/AquPayOrderMapper.xml
index 545bec0..80d27bd 100644
--- a/fishery-core/src/main/resources/mapper/AquPayOrderMapper.xml
+++ b/fishery-core/src/main/resources/mapper/AquPayOrderMapper.xml
@@ -21,6 +21,9 @@
diff --git a/fishery-core/src/main/resources/mapper/BasicProfitSharingUserMapper.xml b/fishery-core/src/main/resources/mapper/BasicProfitSharingUserMapper.xml
index 34d4093..450cbbd 100644
--- a/fishery-core/src/main/resources/mapper/BasicProfitSharingUserMapper.xml
+++ b/fishery-core/src/main/resources/mapper/BasicProfitSharingUserMapper.xml
@@ -2,37 +2,42 @@
-
+
+
+
-
diff --git a/fishery-core/src/main/resources/mapper/BasicUserBindInfoMapper.xml b/fishery-core/src/main/resources/mapper/BasicUserBindInfoMapper.xml
index 18fe8a2..2ae5d28 100644
--- a/fishery-core/src/main/resources/mapper/BasicUserBindInfoMapper.xml
+++ b/fishery-core/src/main/resources/mapper/BasicUserBindInfoMapper.xml
@@ -6,22 +6,22 @@
- SELECT SerialNum as device_name,IotId as iot_id,DeviceType as type,BindTime as bind_time,ad.Id as device_id,
- au.Id app_user,UserName app_user_name,MobilePhone app_user_tel
- FROM `aqu_device` ad
- left join aqu_user au on ad.UserId = au.Id
+ SELECT serial_num as device_name,iot_id as iot_id,device_type as type,bind_time as bind_time,ad.id as device_id,
+ au.id app_user,user_name app_user_name,mobile_phone app_user_tel
+ FROM aqu_device ad
+ left join aqu_user au on ad.user_id = au.id
- and SerialNum = #{deviceName}
+ and serial_num = #{deviceName}
- SELECT a.Id id,a.DeviceId deviceId ,a.`Index` `index`,a.SwitchName switchName, a.DetectElectricValue detectElectricValue,
- a.DetectVoltageValue detectVoltageValue,a.ConnectVoltageType connectVoltageType,a.PondId pondId,a.RateElectricValue rateElectricValue,
- a.IsOpen openStatus
- FROM `aqu_device_switch` a
- left join aqu_device ad on a.DeviceId = ad.Id
+ SELECT a.id id,a.device_id deviceId ,a."index" "index",a.switch_name switchName, a.detect_electric_value detectElectricValue,
+ a.detect_voltage_value detectVoltageValue,a.connect_voltage_type connectVoltageType,a.pond_id pondId,a.rate_electric_value rateElectricValue,
+ a.is_open openStatus
+ FROM aqu_device_switch a
+ left join aqu_device ad on a.device_id = ad.id
- and ad.SerialNum = #{deviceName}
+ and ad.serial_num = #{deviceName}