|
@ -28,13 +28,16 @@ public class DoctorQuickReplyController extends BaseController {
|
|
|
|
|
|
@RequestMapping(value = "/add", method = RequestMethod.POST)
|
|
|
@ApiOperation(value = "添加快捷回复")
|
|
|
public String addReply(@RequestParam @ApiParam(value = "快捷回复内容") String content) {
|
|
|
public String addReply(
|
|
|
@RequestParam(value = "content", required = true) @ApiParam(value = "快捷回复内容") String content,
|
|
|
@ApiParam(name = "type", value = "快捷回复类型(1为续方咨询)", defaultValue = "0")
|
|
|
@RequestParam(value = "type", required = false, defaultValue = "0") String type) {
|
|
|
try {
|
|
|
if (StringUtils.isEmpty(content)) {
|
|
|
return error(-1, "快捷回复内容不能为空");
|
|
|
}
|
|
|
|
|
|
DoctorQuickReply reply = quickReplyService.addReply(getUID(), content);
|
|
|
DoctorQuickReply reply = quickReplyService.addReply(getUID(), content,type);
|
|
|
|
|
|
if (reply != null) {
|
|
|
return write(200, "添加成功", "data", reply);
|
|
@ -50,7 +53,9 @@ public class DoctorQuickReplyController extends BaseController {
|
|
|
@ApiOperation(value = "修改快捷回复")
|
|
|
@ObserverRequired
|
|
|
public String modifyReply(@RequestParam @ApiParam(value = "快捷回复ID") Long id,
|
|
|
@RequestParam @ApiParam(value = "快捷回复内容") String content) {
|
|
|
@RequestParam @ApiParam(value = "快捷回复内容") String content,
|
|
|
@ApiParam(name = "type", value = "快捷回复类型(1为续方咨询)", defaultValue = "0")
|
|
|
@RequestParam(value = "type", required = false, defaultValue = "0") String type) {
|
|
|
try {
|
|
|
if (id == null || id < 1) {
|
|
|
return error(-1, "快捷回复ID不能为空");
|
|
@ -59,7 +64,7 @@ public class DoctorQuickReplyController extends BaseController {
|
|
|
return error(-1, "快捷回复内容不能为空");
|
|
|
}
|
|
|
|
|
|
DoctorQuickReply reply = quickReplyService.modifyReply(id, content);
|
|
|
DoctorQuickReply reply = quickReplyService.modifyReply(id, content,type);
|
|
|
|
|
|
if (reply != null) {
|
|
|
return write(200, "添加成功", "data", reply);
|
|
@ -150,9 +155,10 @@ public class DoctorQuickReplyController extends BaseController {
|
|
|
|
|
|
@RequestMapping(value = "/list", method = RequestMethod.GET)
|
|
|
@ApiOperation(value = "快捷回复列表")
|
|
|
public String replyList() {
|
|
|
public String replyList(@ApiParam(name = "type", value = "快捷回复类型(1为续方咨询)", defaultValue = "0")
|
|
|
@RequestParam(value = "type", required = false, defaultValue = "0") String type) {
|
|
|
try {
|
|
|
List<DoctorQuickReply> replies = quickReplyService.getDoctorReplyList(getUID());
|
|
|
List<DoctorQuickReply> replies = quickReplyService.getDoctorReplyList(getUID(),type);
|
|
|
return write(200, "查询成功", "data", replies);
|
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|