|
|
@@ -12,6 +12,9 @@ import javax.mail.MessagingException;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.scheduling.annotation.Scheduled;
|
|
|
import org.springframework.stereotype.Component;
|
|
|
+import org.springframework.stereotype.Controller;
|
|
|
+import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
+import org.springframework.web.bind.annotation.RequestMethod;
|
|
|
|
|
|
import com.goafanti.common.bo.EmailBo;
|
|
|
import com.goafanti.common.constant.AFTConstants;
|
|
|
@@ -26,7 +29,7 @@ import com.goafanti.customer.bo.LockingReleaseBo;
|
|
|
import com.goafanti.customer.service.CustomerService;
|
|
|
import com.goafanti.user.service.UserService;
|
|
|
@Component
|
|
|
-//@Controller
|
|
|
+@Controller
|
|
|
public class ReleaseUserTask {
|
|
|
@Resource
|
|
|
private CustomerService customerServiceImpl;
|
|
|
@@ -42,7 +45,7 @@ public class ReleaseUserTask {
|
|
|
*/
|
|
|
|
|
|
@Scheduled(cron = "0 0 1 * * ?")
|
|
|
-// @RequestMapping(value = "/open/updateUser", method = RequestMethod.GET)
|
|
|
+ @RequestMapping(value = "/open/updateUser", method = RequestMethod.GET)
|
|
|
public void updateUser(){
|
|
|
LoggerUtils.debug(getClass(), "==============客户释放开始============");
|
|
|
Date releaseTime = new Date();
|
|
|
@@ -92,7 +95,7 @@ public class ReleaseUserTask {
|
|
|
if(lockBusinessList.size()>0) customerServiceImpl.updateReleaseLock(lockBusinessList,releaseTime);
|
|
|
if(lockUserList.size()>0) userServiceImpl.updateReleaseLock(lockUserList);*/
|
|
|
|
|
|
- } catch (Exception e) {
|
|
|
+ } catch (InterruptedException e) {
|
|
|
Notice n =new Notice(UUID.randomUUID().toString(),new Date(),0,"1",NoticeStatus.TASK_PATENT_ERROR.getCode(),"==============客户释放失败================");
|
|
|
noticeMapper.insert(n);
|
|
|
EmailBo emailBo = new EmailBo( "释放客户失败", AFTConstants.ADMIN_EMAIL, "超管", "平台", "系统", "释放客户失败");
|