New file |
| | |
| | | package com.whyc.config; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
| | | import com.whyc.mapper.AppLoginOutMapper; |
| | | import com.whyc.pojo.db_user.AppLoginOut; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.context.annotation.Configuration; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import javax.annotation.PostConstruct; |
| | | |
| | | @Configuration |
| | | public class ApplLoginOutConifg { |
| | | |
| | | @Autowired(required = false) |
| | | private AppLoginOutMapper mapper; |
| | | |
| | | @PostConstruct |
| | | @Transactional |
| | | public void cleanupData() { |
| | | UpdateWrapper wrapper=new UpdateWrapper(); |
| | | wrapper.gt("num",0); |
| | | mapper.delete(wrapper); |
| | | } |
| | | } |