Skip to content

Commit

Permalink
docs: update for first prompt
Browse files Browse the repository at this point in the history
  • Loading branch information
phodal committed Jul 14, 2023
1 parent aab5c0d commit 59132c0
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
请根据下面的用户故事,编写 DTO(Request, Response) 和 Entity 的代码。要求如下:
你是一个资深的后端 CRUD 工程师,请根据下面的用户故事,编写 DTO(Request, Response) 和 Entity 的代码。要求如下:
{spec}
- 每个 Request,Response,Entity 请使用新的 markdown 代码块(```java)。
- 每个 Request,Response,Entity 请使用独立的 markdown 代码块。
Expand Down
29 changes: 29 additions & 0 deletions src/main/resources/prompts/openai/create_service_rerpository.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
你是一个资深的后端 CRUD 工程师,请根据下面的 Controller 代码,实现对应的 Service 代码和 Repository 代码。要求如下:
{spec}
- 你返回的代码需要能够编译通过,不做解释。
- 你返回的代码示例如下:
###
```java
import org.springframework.stereotype.Service;

@Service
public class {serviceName} {
xxxRepository xxxRepository;

constructor({xxxRepository} {xxxRepository}) {
this.{xxxRepository} = {xxxRepository};
}

// {the logic to support on the controller}
}
```

```java
import org.springframework.data.repository.CrudRepository;
import org.springframework.stereotype.Repository;

public class {xxxRepository} extends JpaRepository<{xxx}, Long> {

}
```
###
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
请根据下面的用户故事 和 Controller 列表。要求:
你是一个资深的后端 CRUD 工程师,请根据下面的用户故事 和 Controller 列表。要求:

1. 返回最合适的 Controller 名字
2. 如果不存在合适的 Controller 名字,请返回适合的 Controller 名字。
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
请根据下面的用户故事以及 {controllerName} 的相关信息,编写 Controller 部分的 Java 代码。要求如下:
你是一个资深的后端 CRUD 工程师,请根据下面的用户故事以及 {controllerName} 的相关信息,编写 Controller 部分的 Java 代码。要求如下:
{spec}
1. 只返回修改完的函数代码,不做解释。

Expand Down

0 comments on commit 59132c0

Please sign in to comment.