Commit 78dbbbb2 authored by 唐峰's avatar 唐峰

定时任务微信获取用户异常增加日志排查

parent fb662dba
...@@ -14,7 +14,9 @@ import cn.quantgroup.xyqb.model.session.SessionStruct; ...@@ -14,7 +14,9 @@ import cn.quantgroup.xyqb.model.session.SessionStruct;
import cn.quantgroup.xyqb.repository.IUserRepository; import cn.quantgroup.xyqb.repository.IUserRepository;
import cn.quantgroup.xyqb.service.wechat.IWechatService; import cn.quantgroup.xyqb.service.wechat.IWechatService;
import cn.quantgroup.xyqb.session.XyqbSessionContextHolder; import cn.quantgroup.xyqb.session.XyqbSessionContextHolder;
import com.alibaba.fastjson.JSONObject;
import com.google.common.collect.Lists; import com.google.common.collect.Lists;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections.CollectionUtils; import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
...@@ -25,6 +27,7 @@ import org.springframework.web.bind.annotation.RestController; ...@@ -25,6 +27,7 @@ import org.springframework.web.bind.annotation.RestController;
import java.util.List; import java.util.List;
import java.util.stream.Collectors; import java.util.stream.Collectors;
@Slf4j
@RestController @RestController
@RequestMapping("/api/v2/user") @RequestMapping("/api/v2/user")
public class UserApiV2Controller implements IBaseController { public class UserApiV2Controller implements IBaseController {
...@@ -181,7 +184,14 @@ public class UserApiV2Controller implements IBaseController { ...@@ -181,7 +184,14 @@ public class UserApiV2Controller implements IBaseController {
throw new BizException(BizExceptionEnum.UN_EXIT_USER); throw new BizException(BizExceptionEnum.UN_EXIT_USER);
} }
return JsonResult.buildSuccessResultGeneric(UserBean.from(userList, wechatUserInfo)); try {
log.info("获取批量信息,userList:{}, wechatList:{}", JSONObject.toJSONString(userList), JSONObject.toJSONString(wechatUserInfo));
List<UserBean> from = UserBean.from(userList, wechatUserInfo);
return JsonResult.buildSuccessResultGeneric(from);
} catch (Exception e) {
log.error("获取批量信息异常:{}",e.getMessage(),e);
}
return JsonResult.buildErrorStateResult("获取用户信息执行出错",null );
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment