package com.gxwebsoft.common.task;

import com.gxwebsoft.common.core.utils.RequestUtil;
import com.gxwebsoft.common.core.web.BaseController;
import com.gxwebsoft.common.system.entity.User;
import com.gxwebsoft.common.system.service.UserRoleService;
import com.gxwebsoft.common.system.service.UserService;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * 定时任务
 *
 * @author 科技小王子
 * @since 2022-12-15 19:11:07
 */
@Tag(name = "定时任务")
@RestController
@RequestMapping("/api/love/scheduling")
public class AddUserTaskController extends BaseController {
  @Resource
  private RequestUtil requestUtil;
  @Resource
  private UserRoleService userRoleService;

  /**
   * 模拟注册用户
   * @Scheduled(fixedDelay = 1000, initialDelay = 1000)
   */
  @Scheduled(fixedDelay = 1000, initialDelay = 1000)
  public void addUserProfile() {
//    final User userId = requestUtil.getCoreUserInfoByUserId(27344);
  }

}
