mybatisplus的as
时间: 2023-09-03 07:08:04 浏览: 101
Mybatis-plus的as是用于设置字段的别名。在使用Mybatis-plus进行查询时,可以使用as方法给字段设置一个别名。这样可以方便在查询结果中使用别名来获取对应的字段值。例如,可以使用以下代码给字段设置别名:
```
@TableField(value = "ssl", as = "ssl_alias")
private BigDecimal ssl;
```
在查询结果中,可以通过别名"ssl_alias"来获取对应的字段值。这样可以使代码更加清晰和易于理解。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *2* [MyBatis、MyBatisPlus转义数据库关键字](https://blog.csdn.net/qq_35624642/article/details/126333124)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
- *3* [java课程设计项目:基于SpringBoot的在线订餐系统.zip](https://download.csdn.net/download/qq_35831906/88222416)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文