|
@ -945,19 +945,23 @@ public class ThirdJkEduArticleService extends BaseService {
|
|
|
|
|
|
/**************************************************** behaver *******************************************************/
|
|
/**************************************************** behaver *******************************************************/
|
|
|
|
|
|
public void saveBehavior(String articleId,String userId) throws Exception {
|
|
|
|
|
|
public void saveBehavior(String articleId,String userId,Integer behaviorAction,Integer number) throws Exception {
|
|
JSONObject json = null;
|
|
JSONObject json = null;
|
|
try{
|
|
try{
|
|
JSONObject param = new JSONObject();
|
|
JSONObject param = new JSONObject();
|
|
param.put("articleId",articleId);// 文章ID
|
|
param.put("articleId",articleId);// 文章ID
|
|
Patient patient = patientDao.findByCode(userId);
|
|
Patient patient = patientDao.findByCode(userId);
|
|
|
|
Doctor doctor = doctorDao.findByCode(userId);
|
|
String cName = "";
|
|
String cName = "";
|
|
if(patient!=null){
|
|
if(patient!=null){
|
|
cName = patient.getName();
|
|
cName = patient.getName();
|
|
|
|
}else if(doctor!=null){
|
|
|
|
cName = doctor.getName();
|
|
}
|
|
}
|
|
param.put("cName",cName);//用户名称
|
|
param.put("cName",cName);//用户名称
|
|
param.put("userId",userId);//用户ID
|
|
param.put("userId",userId);//用户ID
|
|
|
|
|
|
|
|
param.put("behaviorAction",behaviorAction);//用户
|
|
|
|
param.put("number",number);//用户
|
|
String response = httpClientUtil.httpPost(articleBaseUrl+"/WsPlatform/rest", getParamsMap(saveBehavior, param.toString(), "1"));
|
|
String response = httpClientUtil.httpPost(articleBaseUrl+"/WsPlatform/rest", getParamsMap(saveBehavior, param.toString(), "1"));
|
|
json = JSON.parseObject(response);
|
|
json = JSON.parseObject(response);
|
|
}catch (Exception e) {
|
|
}catch (Exception e) {
|