优化
This commit is contained in:
@ -0,0 +1,8 @@
|
||||
package com.ruoyi.common.service;
|
||||
|
||||
import com.ruoyi.bgt.domain.BgtProjectRecruit;
|
||||
|
||||
public interface IAsyncService {
|
||||
//异步修改招工状态为招满
|
||||
void updateRecruitStatus(BgtProjectRecruit recruit);
|
||||
}
|
||||
@ -0,0 +1,22 @@
|
||||
package com.ruoyi.common.service.impl;
|
||||
|
||||
import com.ruoyi.bgt.domain.BgtProjectRecruit;
|
||||
import com.ruoyi.bgt.service.IBgtProjectRecruitService;
|
||||
import com.ruoyi.common.service.IAsyncService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Lazy;
|
||||
import org.springframework.scheduling.annotation.Async;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Service
|
||||
public class AsyncServiceImpl implements IAsyncService {
|
||||
@Autowired
|
||||
private IBgtProjectRecruitService iBgtProjectRecruitService;
|
||||
|
||||
@Override
|
||||
@Async
|
||||
public void updateRecruitStatus(BgtProjectRecruit recruit) {
|
||||
recruit.setStatus("2");
|
||||
iBgtProjectRecruitService.updateById(recruit);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user