|
@@ -17,6 +17,7 @@ import com.yunzhi.marketing.service.IExtendContentService;
|
17
|
17
|
import com.yunzhi.marketing.service.ITaLiveActivityService;
|
18
|
18
|
import io.swagger.annotations.Api;
|
19
|
19
|
import io.swagger.annotations.ApiOperation;
|
|
20
|
+import me.chanjar.weixin.common.error.WxErrorException;
|
20
|
21
|
import org.slf4j.Logger;
|
21
|
22
|
import org.slf4j.LoggerFactory;
|
22
|
23
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
@@ -327,8 +328,15 @@ public class TaLiveActivityController extends BaseController {
|
327
|
328
|
|
328
|
329
|
@GetMapping("/admin/taLiveActivity/work/rooms")
|
329
|
330
|
public ResponseBean getWorkLivingRooms(@RequestParam("phone") String phone,
|
330
|
|
- HttpServletRequest request) throws Exception {
|
331
|
|
- String userid = workWxUtils.getUserByPhone(phone);
|
332
|
|
- return ResponseBean.success(workWxUtils.getLivingRoomsOfUser(userid));
|
|
331
|
+ HttpServletRequest request) {
|
|
332
|
+ try {
|
|
333
|
+ String userid = workWxUtils.getUserByPhone(phone);
|
|
334
|
+ return ResponseBean.success(workWxUtils.getLivingRoomsOfUser(userid));
|
|
335
|
+ } catch (WxErrorException e) {
|
|
336
|
+ return ResponseBean.error(e.getError().getErrorMsg(), ResponseBean.ERROR_UNAVAILABLE);
|
|
337
|
+ } catch (Exception e) {
|
|
338
|
+ e.printStackTrace();
|
|
339
|
+ return ResponseBean.error(e.getMessage(), ResponseBean.ERROR_UNAVAILABLE);
|
|
340
|
+ }
|
333
|
341
|
}
|
334
|
342
|
}
|