Skip to content

Commit 17b83f5

Browse files
committed
modify
1 parent b996088 commit 17b83f5

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,13 @@ CREATE TABLE `user_info` (
4949
</mapper>
5050

5151
```
52-
将其保存为```get_user.xml```
52+
将其保存为```get_user.xml```
53+
5354
2. 转cpp代码
5455
```shell
5556
python cpp_xml.py get_user.xml #生成相应cpp代码
5657
```
58+
生成的相应cpp代码中包含以下内容:
5759
* 作为查询条件出入的参数类
5860
```cpp
5961
struct GetUserInfoParam {
@@ -95,7 +97,7 @@ std::string GetUserInfoSql (const GetUserInfoParam &param) {
9597
* 执行sql并获取结果集
9698
```cpp
9799
std::vector<GetUserInfoEntity>
98-
GetUserInfoResultByName (ColumnLabelSqlHandler *sql_handler, const GetUserInfoParam &param) {
100+
GetUserInfoResult (ColumnLabelSqlHandler *sql_handler, const GetUserInfoParam &param) {
99101
std::vector<GetUserInfoEntity> ret;
100102
auto sql = GetUserInfoSql(param);
101103
sql_handler->ExecuteQuery(sql);

cpp_xml.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ def make_get_result_func(self, item, result_name, param_name, get_ret_way):
181181

182182
# 函数名
183183
sql_func_name = item.getAttribute("id")
184-
sql_func_name += "ResultByName"
184+
sql_func_name += "Result"
185185
self.make_result_func += " " + sql_func_name
186186

187187
sql_handler_type = ""

0 commit comments

Comments
 (0)