|
|
@@ -2,6 +2,8 @@ package com.goafanti.customer.service.impl;
|
|
|
|
|
|
import com.alibaba.fastjson.JSON;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
+import com.goafanti.common.bo.Error;
|
|
|
+import com.goafanti.common.bo.Result;
|
|
|
import com.goafanti.common.dao.UserArchivesMapper;
|
|
|
import com.goafanti.common.dao.UserMapper;
|
|
|
import com.goafanti.common.model.User;
|
|
|
@@ -62,13 +64,12 @@ public class UserOutboundServiceImpl extends BaseMybatisDao<UserArchivesMapper>
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public Object callNumber(InputCallNumber in) {
|
|
|
+ public Result callNumber(InputCallNumber in) {
|
|
|
String msg =null;
|
|
|
if (StringUtils.isNotBlank(in.getUid())){
|
|
|
User u =userMapper.queryById(in.getUid());
|
|
|
if (u.getCallStatus()==1){
|
|
|
- msg = "该用户正在通话中";
|
|
|
- return msg;
|
|
|
+ return new Result().error(new Error("该用户正在通话中"));
|
|
|
}
|
|
|
}
|
|
|
String url= default_url +"/openapi/"+version+"/callNumber";
|
|
|
@@ -88,7 +89,7 @@ public class UserOutboundServiceImpl extends BaseMybatisDao<UserArchivesMapper>
|
|
|
JSONObject result = jsonObject.getJSONObject("result");
|
|
|
msg = result.getString("msg");
|
|
|
if (StringUtils.isNotBlank(msg)){
|
|
|
- return msg;
|
|
|
+ return new Result().error(new Error(msg));
|
|
|
}
|
|
|
if (StringUtils.isNotBlank(in.getUid())){
|
|
|
User u =new User();
|
|
|
@@ -96,7 +97,7 @@ public class UserOutboundServiceImpl extends BaseMybatisDao<UserArchivesMapper>
|
|
|
u.setCallStatus(1);
|
|
|
userMapper.update(u);
|
|
|
}
|
|
|
- return s;
|
|
|
+ return new Result().data("呼叫成功");
|
|
|
}
|
|
|
|
|
|
@Override
|