|
|
@@ -779,32 +779,32 @@ public class FsUserCourseVideoServiceImpl implements IFsUserCourseVideoService
|
|
|
|
|
|
String contactWay = "";
|
|
|
|
|
|
-// QwUser qwUser = qwUserMapper.selectQwUserById(Long.parseLong(qwUserById));
|
|
|
-// if (qwUser==null){
|
|
|
-// return R.error("客服不存在");
|
|
|
-// }
|
|
|
-// if (StringUtils.isNotEmpty(qwUser.getContactWay())){
|
|
|
-// contactWay = qwUser.getContactWay();
|
|
|
-// }
|
|
|
-// else {
|
|
|
-// String qwUserId = "[\"" + qwUser.getQwUserId() + "\"]";
|
|
|
-// List<String> users = JSON.parseArray(qwUserId, String.class);
|
|
|
-// QwAddContactWayParam qwAddContactWayParam = new QwAddContactWayParam();
|
|
|
-// qwAddContactWayParam.setType(1);
|
|
|
-// qwAddContactWayParam.setScene(2);
|
|
|
-// qwAddContactWayParam.setUser(users);
|
|
|
-// qwAddContactWayParam.setSkip_verify(true);
|
|
|
-// QwAddContactWayResult qwAddContactWayResult = qwApiService.addContactWay(qwAddContactWayParam, qwUser.getCorpId());
|
|
|
-// if (qwAddContactWayResult.getErrcode() == 0) {
|
|
|
-// qwUser.setContactWay(qwAddContactWayResult.getQr_code());
|
|
|
-// qwUser.setConfigId(qwAddContactWayResult.getConfig_id());
|
|
|
-// qwUserMapper.updateQwUser(qwUser);
|
|
|
-// contactWay = qwUser.getContactWay();
|
|
|
-// } else {
|
|
|
-// return R.error("请联系管理员>>>"+qwAddContactWayResult.getErrmsg());
|
|
|
-// }
|
|
|
-// }
|
|
|
- return R.error(400,"您的绑定关系有误,请联系您的客服人员").put("qrcode",contactWay);
|
|
|
+ QwUser qwUser = qwUserMapper.selectQwUserById(Long.parseLong(qwUserById));
|
|
|
+ if (qwUser==null){
|
|
|
+ return R.error("客服不存在");
|
|
|
+ }
|
|
|
+ if (StringUtils.isNotEmpty(qwUser.getContactWay())){
|
|
|
+ contactWay = qwUser.getContactWay();
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ String qwUserId = "[\"" + qwUser.getQwUserId() + "\"]";
|
|
|
+ List<String> users = JSON.parseArray(qwUserId, String.class);
|
|
|
+ QwAddContactWayParam qwAddContactWayParam = new QwAddContactWayParam();
|
|
|
+ qwAddContactWayParam.setType(1);
|
|
|
+ qwAddContactWayParam.setScene(2);
|
|
|
+ qwAddContactWayParam.setUser(users);
|
|
|
+ qwAddContactWayParam.setSkip_verify(false);
|
|
|
+ QwAddContactWayResult qwAddContactWayResult = qwApiService.addContactWay(qwAddContactWayParam, qwUser.getCorpId());
|
|
|
+ if (qwAddContactWayResult.getErrcode() == 0) {
|
|
|
+ qwUser.setContactWay(qwAddContactWayResult.getQr_code());
|
|
|
+ qwUser.setConfigId(qwAddContactWayResult.getConfig_id());
|
|
|
+ qwUserMapper.updateQwUser(qwUser);
|
|
|
+ contactWay = qwUser.getContactWay();
|
|
|
+ } else {
|
|
|
+ return R.error("请联系管理员>>>"+qwAddContactWayResult.getErrmsg());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return R.error(400,msg).put("qrcode",contactWay);
|
|
|
}
|
|
|
|
|
|
@Override
|