Commit 5fdbd73a by 水库浪子

添加异步注解

1 parent b793ae95
......@@ -12,6 +12,7 @@ import com.linkwechat.wecom.domain.WeCustomer;
import com.linkwechat.wecom.domain.vo.WeMakeCustomerTag;
import com.linkwechat.wecom.service.IWeCustomerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Lazy;
import org.springframework.security.core.context.SecurityContext;
import org.springframework.security.core.context.SecurityContextHolder;
import org.springframework.validation.annotation.Validated;
......@@ -30,7 +31,9 @@ import java.util.List;
@RequestMapping("/wecom/customer")
public class WeCustomerController extends BaseController
{
@Autowired
@Lazy
private IWeCustomerService weCustomerService;
......
......@@ -26,6 +26,7 @@ import com.linkwechat.wecom.domain.vo.WeMakeCustomerTag;
import com.linkwechat.wecom.mapper.WeCustomerMapper;
import com.linkwechat.wecom.service.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Async;
import org.springframework.security.core.context.SecurityContext;
import org.springframework.security.core.context.SecurityContextHolder;
import org.springframework.stereotype.Service;
......@@ -121,6 +122,7 @@ public class WeCustomerServiceImpl extends ServiceImpl<WeCustomerMapper, WeCusto
* @return
*/
@Override
@Async
@Transactional(rollbackFor = Exception.class)
public void synchWeCustomer() {
FollowUserList followUserList = weCustomerClient.getFollowUserList();
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!