12345678910111213141516171819202122232425262728293031 |
- package com.xy.job;
- import com.xxl.job.core.biz.model.ReturnT;
- import com.xxl.job.core.handler.annotation.XxlJob;
- import com.xy.mapper.DeviceChargingMapper;
- import lombok.AllArgsConstructor;
- import lombok.extern.slf4j.Slf4j;
- import org.springframework.stereotype.Component;
- /**
- * 设备计费job
- */
- @Slf4j
- @Component
- @AllArgsConstructor
- public class DeviceChargingJob {
- private DeviceChargingMapper deviceChargingMapper;
- /**
- * 扣除设备管理费剩余天数
- *
- * @return
- */
- @XxlJob("deviceChargingX")
- public ReturnT<String> deviceChargingX() {
- deviceChargingMapper.updateChargingX();
- log.info("设备试用时间扣除完成~");
- return ReturnT.SUCCESS;
- }
- }
|