|
|
@ -392,8 +392,10 @@ public class ChatMessageServiceImpl implements ChatMessageService {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
int count = 1;
|
|
|
|
int count = 1;
|
|
|
|
|
|
|
|
if(finalChatModel.getChat() != null && !chatCommentsDto.getName().isEmpty()){
|
|
|
|
//昵称
|
|
|
|
//昵称
|
|
|
|
builder.append(String.format(finalChatModel.getChat().get(0), chatCommentsDto.getName()));
|
|
|
|
builder.append(String.format(finalChatModel.getChat().get(0), chatCommentsDto.getName()));
|
|
|
|
|
|
|
|
}
|
|
|
|
for (WisdomExamCommentsDto examComment : examComments) {
|
|
|
|
for (WisdomExamCommentsDto examComment : examComments) {
|
|
|
|
builder.append(String.format(finalChatModel.getCycleChats().get(0), count, examComment.getName(),
|
|
|
|
builder.append(String.format(finalChatModel.getCycleChats().get(0), count, examComment.getName(),
|
|
|
|
examComment.getTime(), examComment.getScore(), examComment.getScoreRate(),
|
|
|
|
examComment.getTime(), examComment.getScore(), examComment.getScoreRate(),
|
|
|
@ -409,15 +411,21 @@ public class ChatMessageServiceImpl implements ChatMessageService {
|
|
|
|
case "wisdomSubject": {
|
|
|
|
case "wisdomSubject": {
|
|
|
|
List<WisdomSubjectComments> subjectComments;
|
|
|
|
List<WisdomSubjectComments> subjectComments;
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
subjectComments = JSON.parseObject(strData, new TypeReference<List<WisdomSubjectComments>>() {
|
|
|
|
subjectComments = JSON.parseObject(strData, new TypeReference<List<WisdomSubjectComments>>() {});
|
|
|
|
});
|
|
|
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
} catch (Exception e) {
|
|
|
|
throw new ServiceException(ErrorCode.PARAMS_ERROR.getCode(), "请求参数异常");
|
|
|
|
throw new ServiceException(ErrorCode.PARAMS_ERROR.getCode(), "请求参数异常");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (subjectComments.isEmpty()) {
|
|
|
|
if (subjectComments.isEmpty()) {
|
|
|
|
throw new ServiceException(ErrorCode.PARAMS_ERROR.getCode(), "请求参数异常");
|
|
|
|
throw new ServiceException(ErrorCode.PARAMS_ERROR.getCode(), "请求参数异常");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
builder.append(String.format(finalChatModel.getChat().get(0), chatCommentsDto.getName()));
|
|
|
|
if(finalChatModel.getChat() != null && !chatCommentsDto.getName().isEmpty()){
|
|
|
|
|
|
|
|
builder.append(String.format(finalChatModel.getChat().get(1), chatCommentsDto.getName()));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else {
|
|
|
|
|
|
|
|
if (finalChatModel.getChat() != null) {
|
|
|
|
|
|
|
|
builder.append(finalChatModel.getChat().get(0));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
String name = "";
|
|
|
|
String name = "";
|
|
|
|
//拼接学科数组
|
|
|
|
//拼接学科数组
|
|
|
|
for (WisdomSubjectComments comments : subjectComments) {
|
|
|
|
for (WisdomSubjectComments comments : subjectComments) {
|
|
|
@ -447,7 +455,13 @@ public class ChatMessageServiceImpl implements ChatMessageService {
|
|
|
|
throw new ServiceException(ErrorCode.PARAMS_ERROR.getCode(), "请求参数异常");
|
|
|
|
throw new ServiceException(ErrorCode.PARAMS_ERROR.getCode(), "请求参数异常");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
builder.append(String.format(finalChatModel.getChat().get(0), chatCommentsDto.getName()));
|
|
|
|
if(finalChatModel.getChat() != null && !chatCommentsDto.getName().isEmpty()) {
|
|
|
|
|
|
|
|
builder.append(String.format(finalChatModel.getChat().get(1), chatCommentsDto.getName()));
|
|
|
|
|
|
|
|
}else {
|
|
|
|
|
|
|
|
if (finalChatModel.getChat() != null) {
|
|
|
|
|
|
|
|
builder.append(finalChatModel.getChat().get(0));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
for (ArtLatitudeDto artLatitude : artLatitudes)
|
|
|
|
for (ArtLatitudeDto artLatitude : artLatitudes)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
builder.append(String.format(finalChatModel.getCycleChats().get(0), artLatitude.getQuotaN1(),artLatitude.getQuotaP1(), artLatitude.getQuotaN2(),artLatitude.getQuotaP2(), artLatitude.getQuotaN3(),artLatitude.getQuotaP3(), artLatitude.getPercent(),artLatitude.getLevel()));
|
|
|
|
builder.append(String.format(finalChatModel.getCycleChats().get(0), artLatitude.getQuotaN1(),artLatitude.getQuotaP1(), artLatitude.getQuotaN2(),artLatitude.getQuotaP2(), artLatitude.getQuotaN3(),artLatitude.getQuotaP3(), artLatitude.getPercent(),artLatitude.getLevel()));
|
|
|
@ -469,7 +483,7 @@ public class ChatMessageServiceImpl implements ChatMessageService {
|
|
|
|
throw new ServiceException(ErrorCode.PARAMS_ERROR.getCode(), "请求参数异常");
|
|
|
|
throw new ServiceException(ErrorCode.PARAMS_ERROR.getCode(), "请求参数异常");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
builder.append(finalChatModel.getChat());
|
|
|
|
builder.append(String.format(finalChatModel.getChat().get(0), chatCommentsDto.getSubject()));
|
|
|
|
for (ArtSubjectDto artSubject : artSubjects){
|
|
|
|
for (ArtSubjectDto artSubject : artSubjects){
|
|
|
|
builder.append(String.format(finalChatModel.getCycleChats().get(0), artSubject.getDimension(),artSubject.getBlock(), artSubject.getPoint(),artSubject.getScore(), artSubject.getTotalScore(),artSubject.getPercent()));
|
|
|
|
builder.append(String.format(finalChatModel.getCycleChats().get(0), artSubject.getDimension(),artSubject.getBlock(), artSubject.getPoint(),artSubject.getScore(), artSubject.getTotalScore(),artSubject.getPercent()));
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -498,9 +512,11 @@ public class ChatMessageServiceImpl implements ChatMessageService {
|
|
|
|
if (chatCommentsDto.getSize() > 0) {
|
|
|
|
if (chatCommentsDto.getSize() > 0) {
|
|
|
|
builder.append("限制条件如下:1、")
|
|
|
|
builder.append("限制条件如下:1、")
|
|
|
|
.append(chatCommentsDto.getSize())
|
|
|
|
.append(chatCommentsDto.getSize())
|
|
|
|
.append("字左右;2、返回评语内容,不要开头提示语,开头不出现特殊字符。");
|
|
|
|
.append("字左右;2、返回评语内容;不要开头提示语;开头不允许出现特殊字符。");
|
|
|
|
|
|
|
|
//.append("字左右;2、返回评语的内容: 评语的开篇不允许出现提示语;评语的开篇不允许出现特殊字符。");
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
builder.append("限制条件如下:1、200字左右;2、返回评语内容;不要开头提示语;开头允许出现特殊字符。");
|
|
|
|
builder.append("限制条件如下:1、200字左右;2、返回评语内容;不要开头提示语;开头不允许出现特殊字符。");
|
|
|
|
|
|
|
|
//builder.append("限制条件如下:1、200字左右;2、返回评语的内容: 评语的开篇不允许出现提示语;评语的开篇不允许出现特殊字符。");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return builder.toString();
|
|
|
|
return builder.toString();
|
|
|
|
} catch (Exception e) {
|
|
|
|
} catch (Exception e) {
|
|
|
|