jar
jinlin
2025-03-04 23f02e6b45dd7cf0ab2e7827144913ca59575ea4
src/main/java/com/example/server/entity/FieldMetaObjectHandler.java
@@ -12,6 +12,7 @@
import com.example.client.entity.PlatformEntity;
import com.example.client.entity.PlatformLogEntity;
import com.example.client.entity.TenantEntity;
import com.example.server.progressTrack.model.TeamEntity;
import com.example.server.user.model.SysUser;
import com.example.server.utils.CacheUtils;
import org.apache.ibatis.reflection.MetaObject;
@@ -37,6 +38,12 @@
        DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
        // 将当前日期格式化为字符串
        String date = currentDate.format(formatter);
        if (object instanceof TeamEntity) {
            TeamEntity entity = (TeamEntity) object;
            entity.setCreateTeam(user.getBoatfleet());// 创建者
            entity.setUpdateTeam(user.getBoatfleet());// 创建者
        }
        if (object instanceof PlatformLogEntity) {
            PlatformLogEntity entity = (PlatformLogEntity) object;
@@ -69,6 +76,10 @@
            entity.setUpdateDate(date);// 更新时间
        }
        if (object instanceof TeamEntity) {
            TeamEntity entity = (TeamEntity) object;
            entity.setUpdateTeam(user.getBoatfleet());// 创建者
        }
    }
    private boolean isEmpty(Long value) {