升级mybatis-plus到3.5.3.1

This commit is contained in:
FrozenWatermelon
2023-03-15 13:38:56 +08:00
parent d72313146e
commit 07f919b8ab
8 changed files with 19 additions and 54 deletions

View File

@@ -63,7 +63,7 @@ public class AddrController {
if (addrParam.getAddrId() != null && addrParam.getAddrId() != 0) {
return ServerResponseEntity.showFailMsg("该地址已存在");
}
int addrCount = userAddrService.count(new LambdaQueryWrapper<UserAddr>().eq(UserAddr::getUserId, userId));
long addrCount = userAddrService.count(new LambdaQueryWrapper<UserAddr>().eq(UserAddr::getUserId, userId));
UserAddr userAddr = mapperFacade.map(addrParam, UserAddr.class);
if (addrCount == 0) {

View File

@@ -91,9 +91,9 @@ public class UserCollectionController {
*/
@GetMapping("count")
@Operation(summary = "查询用户收藏商品数量" , description = "查询用户收藏商品数量")
public int findUserCollectionCount() {
public ServerResponseEntity<Long> findUserCollectionCount() {
String userId = SecurityUtils.getUser().getUserId();
return userCollectionService.count(new LambdaQueryWrapper<UserCollection>().eq(UserCollection::getUserId, userId));
return ServerResponseEntity.success(userCollectionService.count(new LambdaQueryWrapper<UserCollection>().eq(UserCollection::getUserId, userId)));
}
@GetMapping("/prods")