|
@ -4,9 +4,16 @@
|
|
|
package com.yihu.wlyy.web.third.health.bank;
|
|
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import com.yihu.wlyy.entity.patient.Patient;
|
|
|
import com.yihu.wlyy.entity.wechat.WechatTemplateConfig;
|
|
|
import com.yihu.wlyy.repository.patient.PatientDao;
|
|
|
import com.yihu.wlyy.repository.wechat.WechatTemplateConfigDao;
|
|
|
import com.yihu.wlyy.service.app.health.bank.CreditLogService;
|
|
|
import com.yihu.wlyy.service.app.health.bank.TaskService;
|
|
|
import com.yihu.wlyy.task.PushMsgTask;
|
|
|
import com.yihu.wlyy.util.DateUtil;
|
|
|
import com.yihu.wlyy.web.BaseController;
|
|
|
import com.yihu.wlyy.wechat.util.WeiXinAccessTokenUtils;
|
|
|
import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
import io.swagger.annotations.ApiParam;
|
|
@ -19,6 +26,9 @@ import org.springframework.web.bind.annotation.RequestMethod;
|
|
|
import org.springframework.web.bind.annotation.RequestParam;
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
import java.util.List;
|
|
|
import java.util.Map;
|
|
|
|
|
|
/**
|
|
|
* @author wangzhinan
|
|
|
* @create 2018-05-07 8:50
|
|
@ -34,6 +44,14 @@ public class AccountController extends BaseController {
|
|
|
private CreditLogService service;
|
|
|
@Autowired
|
|
|
private TaskService taskService;
|
|
|
@Autowired
|
|
|
private WechatTemplateConfigDao templateConfigDao;
|
|
|
@Autowired
|
|
|
private PushMsgTask pushMsgTask;
|
|
|
@Autowired
|
|
|
private WeiXinAccessTokenUtils weiXinAccessTokenUtils;
|
|
|
@Autowired
|
|
|
private PatientDao patientDao;
|
|
|
|
|
|
|
|
|
|
|
@ -141,4 +159,22 @@ public class AccountController extends BaseController {
|
|
|
return error(-1,e.getMessage());
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@RequestMapping(value = "/insertCredits",method = RequestMethod.POST)
|
|
|
@ApiOperation("添加积分")
|
|
|
public String insert(@ApiParam(name = "creditsDetail",value = "居民id集合")
|
|
|
@RequestParam(name = "creditsDetail") String creditsDetail){
|
|
|
try {
|
|
|
JSONObject object = JSONObject.parseObject(creditsDetail);
|
|
|
JSONObject result = service.insert(object);
|
|
|
|
|
|
String status = result.getString("status");
|
|
|
|
|
|
logger.info("健康银行居民新增积分:"+result.toString());
|
|
|
return write(200,"添加成功","data",result);
|
|
|
}catch (Exception e){
|
|
|
error(e);
|
|
|
return error(-1,e.getMessage());
|
|
|
}
|
|
|
}
|
|
|
}
|