|
|
@ -320,16 +320,8 @@ public class ChatMessageServiceImpl implements ChatMessageService {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (chatModel != null) {
|
|
|
|
if (chatModel != null) {
|
|
|
|
String role = "";
|
|
|
|
|
|
|
|
if (phase > 2){
|
|
|
|
|
|
|
|
role = chatModel.getRole().get(0);
|
|
|
|
|
|
|
|
}else
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
role = chatModel.getRole().get(1);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//角色条件
|
|
|
|
//角色条件
|
|
|
|
builder.append(String.format(chatModel.getRole().get(phase), chatCommentsDto.getPeriod(), chatCommentsDto.getSubject()));
|
|
|
|
builder.append(String.format(chatModel.getRole().get(0), chatCommentsDto.getPeriod(), chatCommentsDto.getSubject()));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
ChatModelDto finalChatModel = chatModel;
|
|
|
|
ChatModelDto finalChatModel = chatModel;
|
|
|
@ -355,7 +347,7 @@ public class ChatMessageServiceImpl implements ChatMessageService {
|
|
|
|
// 使用String.format方法生成最终的字符串
|
|
|
|
// 使用String.format方法生成最终的字符串
|
|
|
|
builder.append(String.format(
|
|
|
|
builder.append(String.format(
|
|
|
|
chat,
|
|
|
|
chat,
|
|
|
|
wisdomComments.getName(),
|
|
|
|
chatCommentsDto.getName(),
|
|
|
|
wisdomComments.getYear(),
|
|
|
|
wisdomComments.getYear(),
|
|
|
|
wisdomComments.getSemester(),
|
|
|
|
wisdomComments.getSemester(),
|
|
|
|
wisdomComments.getJoinAll(),
|
|
|
|
wisdomComments.getJoinAll(),
|
|
|
@ -400,6 +392,8 @@ public class ChatMessageServiceImpl implements ChatMessageService {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
int count = 1;
|
|
|
|
int count = 1;
|
|
|
|
|
|
|
|
//昵称
|
|
|
|
|
|
|
|
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(),
|
|
|
@ -423,7 +417,7 @@ public class ChatMessageServiceImpl implements ChatMessageService {
|
|
|
|
if (subjectComments.isEmpty()) {
|
|
|
|
if (subjectComments.isEmpty()) {
|
|
|
|
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.getName()));
|
|
|
|
String name = "";
|
|
|
|
String name = "";
|
|
|
|
//拼接学科数组
|
|
|
|
//拼接学科数组
|
|
|
|
for (WisdomSubjectComments comments : subjectComments) {
|
|
|
|
for (WisdomSubjectComments comments : subjectComments) {
|
|
|
@ -453,7 +447,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.getName()));
|
|
|
|
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()));
|
|
|
@ -466,8 +460,7 @@ public class ChatMessageServiceImpl implements ChatMessageService {
|
|
|
|
case "artSubject":{
|
|
|
|
case "artSubject":{
|
|
|
|
List<ArtSubjectDto> artSubjects;
|
|
|
|
List<ArtSubjectDto> artSubjects;
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
artSubjects = JSON.parseObject(strData, new TypeReference<List<ArtSubjectDto>>() {
|
|
|
|
artSubjects = JSON.parseObject(strData, new TypeReference<List<ArtSubjectDto>>() {});
|
|
|
|
});
|
|
|
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
} catch (Exception e) {
|
|
|
|
throw new ServiceException(ErrorCode.PARAMS_ERROR.getCode(), "请求参数异常");
|
|
|
|
throw new ServiceException(ErrorCode.PARAMS_ERROR.getCode(), "请求参数异常");
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -496,7 +489,6 @@ public class ChatMessageServiceImpl implements ChatMessageService {
|
|
|
|
//德育
|
|
|
|
//德育
|
|
|
|
case "moral":{
|
|
|
|
case "moral":{
|
|
|
|
builder.append(finalChatModel.getChat());
|
|
|
|
builder.append(finalChatModel.getChat());
|
|
|
|
|
|
|
|
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
default:
|
|
|
|
default:
|
|
|
@ -506,9 +498,9 @@ 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、返回评语内容,不要开头提示语,开头不出现特殊字符。");
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
builder.append("限制条件如下:1、200字左右;2、[#返回评语内容#,#不要开头提示语#,#开头不出现特殊字符#]。");
|
|
|
|
builder.append("限制条件如下:1、200字左右;2、返回评语内容;不要开头提示语;开头允许出现特殊字符。");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return builder.toString();
|
|
|
|
return builder.toString();
|
|
|
|
} catch (Exception e) {
|
|
|
|
} catch (Exception e) {
|
|
|
|