DeviceChargingJob.java 729 B

12345678910111213141516171819202122232425262728293031
  1. package com.xy.job;
  2. import com.xxl.job.core.biz.model.ReturnT;
  3. import com.xxl.job.core.handler.annotation.XxlJob;
  4. import com.xy.mapper.DeviceChargingMapper;
  5. import lombok.AllArgsConstructor;
  6. import lombok.extern.slf4j.Slf4j;
  7. import org.springframework.stereotype.Component;
  8. /**
  9. * 设备计费job
  10. */
  11. @Slf4j
  12. @Component
  13. @AllArgsConstructor
  14. public class DeviceChargingJob {
  15. private DeviceChargingMapper deviceChargingMapper;
  16. /**
  17. * 扣除设备管理费剩余天数
  18. *
  19. * @return
  20. */
  21. @XxlJob("deviceChargingX")
  22. public ReturnT<String> deviceChargingX() {
  23. deviceChargingMapper.updateChargingX();
  24. log.info("设备试用时间扣除完成~");
  25. return ReturnT.SUCCESS;
  26. }
  27. }