|
|
@@ -8,12 +8,15 @@ import javax.annotation.Resource;
|
|
|
|
|
|
import org.springframework.scheduling.annotation.Scheduled;
|
|
|
import org.springframework.stereotype.Component;
|
|
|
+import org.springframework.stereotype.Controller;
|
|
|
+import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
|
|
|
import com.goafanti.common.model.User;
|
|
|
import com.goafanti.customer.bo.LockingReleaseBo;
|
|
|
import com.goafanti.customer.service.CustomerService;
|
|
|
import com.goafanti.user.service.UserService;
|
|
|
-@Component
|
|
|
+//@Component
|
|
|
+@Controller
|
|
|
public class ReleaseUserTask {
|
|
|
@Resource
|
|
|
private CustomerService customerServiceImpl;
|
|
|
@@ -23,7 +26,8 @@ public class ReleaseUserTask {
|
|
|
/**
|
|
|
* 每天凌晨一点释放客户和业务
|
|
|
*/
|
|
|
- @Scheduled(cron = "0 0 1 * * ?")
|
|
|
+ //@Scheduled(cron = "0 0 1 * * ?")
|
|
|
+ @RequestMapping(value = "/releaseUser")
|
|
|
public void releaseUser(){
|
|
|
Date releaseTime = new Date();
|
|
|
List<User> userList = userServiceImpl.selectUserByRoleName("营销员");
|