| | |
| | | package com.xcong.excoin.configurations.interceptor; |
| | | |
| | | import com.xcong.excoin.common.LoginUserUtils; |
| | | import com.xcong.excoin.common.contants.AppContants; |
| | | import com.xcong.excoin.common.system.base.BaseEntity; |
| | | import com.xcong.excoin.modules.member.entity.MemberEntity; |
| | | import lombok.extern.slf4j.Slf4j; |
| | |
| | | import org.apache.ibatis.session.defaults.DefaultSqlSession; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import java.lang.reflect.Field; |
| | | import java.util.*; |
| | | |
| | | /** |
| | |
| | | MemberEntity member = LoginUserUtils.getAppLoginUser(); |
| | | if (o instanceof BaseEntity) { |
| | | BaseEntity baseEntity = (BaseEntity) o; |
| | | if (member != null) { |
| | | baseEntity.setCreateBy(member.getUsername()); |
| | | baseEntity.setUpdateBy(member.getUsername()); |
| | | } else { |
| | | baseEntity.setCreateBy(AppContants.SYSTEM_USER); |
| | | baseEntity.setUpdateBy(AppContants.SYSTEM_USER); |
| | | } |
| | | baseEntity.setCreateTime(new Date()); |
| | | baseEntity.setUpdateTime(new Date()); |
| | | } |
| | |
| | | MemberEntity member = LoginUserUtils.getAppLoginUser(); |
| | | if (o instanceof BaseEntity) { |
| | | BaseEntity baseEntity = (BaseEntity) o; |
| | | if (member != null) { |
| | | baseEntity.setUpdateBy(member.getUsername()); |
| | | } else { |
| | | baseEntity.setUpdateBy(AppContants.SYSTEM_USER); |
| | | } |
| | | baseEntity.setUpdateTime(new Date()); |
| | | } |
| | | } |