Skip to content

Commit 0c2471a

Browse files
committed
Merge branch '1.2.x'
2 parents 9d6a19f + 4deb1f6 commit 0c2471a

File tree

86 files changed

+3056
-1639
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

86 files changed

+3056
-1639
lines changed

app-builder/plugins/aipp-northbound/src/main/java/modelengine/fit/jade/aipp/northbound/controller/UserFeedbackController.java

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616
import modelengine.fit.jane.common.response.Rsp;
1717
import modelengine.fit.jane.task.gateway.Authenticator;
1818
import modelengine.fitframework.annotation.Component;
19-
import modelengine.jade.app.engine.base.dto.UsrFeedbackDto;
20-
import modelengine.jade.app.engine.base.service.UsrFeedbackService;
19+
import modelengine.jade.app.engine.base.dto.UserFeedbackDto;
20+
import modelengine.jade.app.engine.base.service.UserFeedbackService;
2121

2222
/**
2323
* 用户反馈北向接口。
@@ -28,54 +28,54 @@
2828
@Component
2929
@RequestMapping(path = "/api/app/v1/aipp/user")
3030
public class UserFeedbackController extends AbstractController {
31-
private final UsrFeedbackService usrFeedbackService;
31+
private final UserFeedbackService userFeedbackService;
3232

3333
/**
34-
* 用身份校验器 {@link Authenticator} 和 Aipp 用户反馈功能接口 {@link UsrFeedbackService} 构造 {@link UserFeedbackController}。
34+
* 用身份校验器 {@link Authenticator} 和 Aipp 用户反馈功能接口 {@link UserFeedbackService} 构造 {@link UserFeedbackController}。
3535
*
3636
* @param authenticator 表示身份校验器的 {@link Authenticator}。
37-
* @param usrFeedbackService 表示 Aipp 用户反馈功能接口的 {@link UsrFeedbackService}。
37+
* @param userFeedbackService 表示 Aipp 用户反馈功能接口的 {@link UserFeedbackService}。
3838
*/
39-
public UserFeedbackController(Authenticator authenticator, UsrFeedbackService usrFeedbackService) {
39+
public UserFeedbackController(Authenticator authenticator, UserFeedbackService userFeedbackService) {
4040
super(authenticator);
41-
this.usrFeedbackService = usrFeedbackService;
41+
this.userFeedbackService = userFeedbackService;
4242
}
4343

4444
/**
4545
* 创建用户反馈记录。
4646
*
47-
* @param usrFeedbackDto 表示用户反馈消息体的 {@link UsrFeedbackDto}。
47+
* @param userFeedbackDto 表示用户反馈消息体的 {@link UserFeedbackDto}。
4848
*/
4949
@PostMapping(path = "/feedback", summary = "创建用户反馈记录",
5050
description = "该接口用于创建用户对一个对话实例的反馈记录。")
51-
public Rsp<Void> createUsrFeedback(@RequestBody UsrFeedbackDto usrFeedbackDto) {
52-
this.usrFeedbackService.create(usrFeedbackDto);
51+
public Rsp<Void> createUsrFeedback(@RequestBody UserFeedbackDto userFeedbackDto) {
52+
this.userFeedbackService.create(userFeedbackDto);
5353
return Rsp.ok();
5454
}
5555

5656
/**
5757
* 更新用户反馈信息。
5858
*
59-
* @param usrFeedbackDto 表示用户反馈消息体的 {@link UsrFeedbackDto}。
59+
* @param userFeedbackDto 表示用户反馈消息体的 {@link UserFeedbackDto}。
6060
* @param instanceId 表示对话实例 Id 的 {@link String}。
6161
*/
6262
@PatchMapping(path = "/feedback/{instanceId}", summary = "更新用户反馈记录",
6363
description = "该接口用于更新用户对一个对话实例反馈记录。")
6464
public Rsp<Void> updateUsrFeedback(@PathVariable("instanceId") String instanceId,
65-
@RequestBody UsrFeedbackDto usrFeedbackDto) {
66-
this.usrFeedbackService.updateOne(instanceId, usrFeedbackDto);
65+
@RequestBody UserFeedbackDto userFeedbackDto) {
66+
this.userFeedbackService.updateOne(instanceId, userFeedbackDto);
6767
return Rsp.ok();
6868
}
6969

7070
/**
7171
* 通过 logId 查询用户反馈记录
7272
*
7373
* @param instanceId 表示对话实例 Id 的 {@link String}。
74-
* @return 表示反馈记录的 {@link UsrFeedbackDto}。
74+
* @return 表示反馈记录的 {@link UserFeedbackDto}。
7575
*/
7676
@GetMapping(path = "/feedback/{instanceId}", summary = "查询用户反馈记录",
7777
description = "该接口可以通过待查询实例的唯一标识符来查询实例的反馈记录。")
78-
public Rsp<UsrFeedbackDto> getAllAnswerByInstanceId(@PathVariable("instanceId") String instanceId) {
79-
return Rsp.ok(this.usrFeedbackService.getUsrFeedbackByInstanceId(instanceId));
78+
public Rsp<UserFeedbackDto> getAllAnswerByInstanceId(@PathVariable("instanceId") String instanceId) {
79+
return Rsp.ok(this.userFeedbackService.getUserFeedbackByInstanceId(instanceId));
8080
}
8181
}

app-builder/plugins/aipp-plugin/src/main/java/modelengine/fit/jober/aipp/controller/AppBuilderAppController.java

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -455,6 +455,21 @@ public Rsp<AppBuilderAppDto> recoverApp(HttpClassicServerRequest httpRequest,
455455
return Rsp.ok(this.appService.recoverApp(appId, recoverAppId, contextOf(httpRequest, tenantId)));
456456
}
457457

458+
/**
459+
* 更新访客模式状态。
460+
*
461+
* @param path 表示应用的短标识的 {@link String}。
462+
* @param isGuest 表示访客状态的 {@link Boolean}。
463+
* @return 表示是否打开游客模式的 {@link Rsp}{@code <}{@link Void}{@code >}。
464+
*/
465+
@CarverSpan(value = "operation.appBuilderApp.updateGuestMode")
466+
@PutMapping(value = "/guest/{path}", description = "更新访客模式状态")
467+
public Rsp<Void> updateGuestMode(@PathVariable("path") String path,
468+
@RequestParam(value = "allow_guest", defaultValue = "false") Boolean isGuest) {
469+
this.appService.updateGuestMode(path, isGuest);
470+
return Rsp.ok();
471+
}
472+
458473
private AppQueryCondition buildAppQueryCondition(AppQueryCondition cond, String type) {
459474
cond.setType(type);
460475
if (cond.getExcludeNames() == null) {

0 commit comments

Comments
 (0)