|
|
@@ -22,8 +22,8 @@ import com.goafanti.customer.service.CustomerService;
|
|
|
import com.goafanti.user.service.UserService;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
|
-import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
-import org.springframework.web.bind.annotation.RestController;
|
|
|
+import org.springframework.scheduling.annotation.Scheduled;
|
|
|
+import org.springframework.stereotype.Component;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
import java.time.LocalDateTime;
|
|
|
@@ -35,8 +35,8 @@ import java.util.List;
|
|
|
import java.util.UUID;
|
|
|
|
|
|
|
|
|
-//@Component
|
|
|
-@RestController
|
|
|
+@Component
|
|
|
+//@RestController
|
|
|
public class ReleaseUserTask {
|
|
|
@Resource
|
|
|
private CustomerService customerService;
|
|
|
@@ -66,8 +66,8 @@ public class ReleaseUserTask {
|
|
|
*
|
|
|
*/
|
|
|
// @Scheduled(cron = "0 23 9 * * ?")
|
|
|
- @RequestMapping("/open/test")
|
|
|
-// @Scheduled(cron = "0 0 1 * * ?")
|
|
|
+// @RequestMapping("/open/test")
|
|
|
+ @Scheduled(cron = "0 0 1 * * ?")
|
|
|
public void startTask() {
|
|
|
try {
|
|
|
List<User> userList = userService.selectUserByRoleName("营销员", "营销经理");
|