Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
A
Afrishop refactored project
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
Whispa
Afrishop refactored project
Commits
f838cbca
提交
f838cbca
authored
12月 22, 2020
作者:
吴德鹏
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update adress|| order
上级
c673e852
显示空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
95 行增加
和
69 行删除
+95
-69
AddressController.java
...om/example/afrishop_v3/controllers/AddressController.java
+36
-34
OrderController.java
.../com/example/afrishop_v3/controllers/OrderController.java
+55
-33
TbCfAddressRepository.java
...example/afrishop_v3/repository/TbCfAddressRepository.java
+4
-2
没有找到文件。
src/main/java/com/example/afrishop_v3/controllers/AddressController.java
浏览文件 @
f838cbca
...
@@ -16,7 +16,7 @@ import java.util.Optional;
...
@@ -16,7 +16,7 @@ import java.util.Optional;
@RestController
@RestController
@RequestMapping
(
"/address"
)
@RequestMapping
(
"/address"
)
public
class
AddressController
extends
Controller
{
public
class
AddressController
extends
Controller
{
private
final
TbCfAddressRepository
repository
;
private
final
TbCfAddressRepository
repository
;
private
final
UserRepository
userRepository
;
private
final
UserRepository
userRepository
;
private
final
AuthenticationUser
user
;
private
final
AuthenticationUser
user
;
...
@@ -38,18 +38,22 @@ public class AddressController extends Controller{
...
@@ -38,18 +38,22 @@ public class AddressController extends Controller{
public
Result
addUserInfo
(
@RequestBody
TbCfAddress
address
)
{
public
Result
addUserInfo
(
@RequestBody
TbCfAddress
address
)
{
ResultCodeEnum
e
=
ResultCodeEnum
.
VALIDATE_ERROR
;
ResultCodeEnum
e
=
ResultCodeEnum
.
VALIDATE_ERROR
;
String
userId
=
user
.
userId
();
String
userId
=
user
.
userId
();
if
(
address
==
null
)
if
(
address
==
null
)
return
new
Result
(
e
.
getCode
(),
e
.
getDesc
());
return
new
Result
(
e
.
getCode
(),
e
.
getDesc
());
if
(
address
.
getAddressDetail
()
==
null
||
address
.
getAddressDetail
().
trim
().
isEmpty
())
if
(
address
.
getAddressDetail
()
==
null
||
address
.
getAddressDetail
().
trim
().
isEmpty
())
return
new
Result
(
e
.
getCode
(),
"Address is required"
);
return
new
Result
(
e
.
getCode
(),
"Address is required"
);
if
(
address
.
getDeliveryName
()
==
null
||
address
.
getDeliveryName
().
trim
().
isEmpty
())
if
(
address
.
getDeliveryName
()
==
null
||
address
.
getDeliveryName
().
trim
().
isEmpty
())
return
new
Result
(
e
.
getCode
(),
"Delivery name is required"
);
return
new
Result
(
e
.
getCode
(),
"Delivery name is required"
);
if
(
address
.
getPhone
()
==
null
||
address
.
getPhone
().
trim
().
isEmpty
())
if
(
address
.
getPhone
()
==
null
||
address
.
getPhone
().
trim
().
isEmpty
())
return
new
Result
(
e
.
getCode
(),
"Phone is required"
);
return
new
Result
(
e
.
getCode
(),
"Phone is required"
);
if
(
repository
.
existsByAddressDetailAndUserId
(
address
.
getAddressDetail
().
trim
(),
userId
))
if
(
repository
.
existsByAddressDetailAndUserId
(
address
.
getAddressDetail
().
trim
(),
userId
))
return
new
Result
(
e
.
getCode
(),
"Address already existed"
);
return
new
Result
(
e
.
getCode
(),
"Address already existed"
);
//客户新增第一条地址,设置为默认
if
(!
repository
.
existsByUserId
(
userId
))
{
address
.
setDefaultFlag
(
1
);
}
address
.
setAddressDetail
(
address
.
getAddressDetail
().
trim
());
address
.
setAddressDetail
(
address
.
getAddressDetail
().
trim
());
address
.
setUserId
(
userId
);
address
.
setUserId
(
userId
);
address
.
setCreateTime
(
new
Date
());
address
.
setCreateTime
(
new
Date
());
...
@@ -64,30 +68,30 @@ public class AddressController extends Controller{
...
@@ -64,30 +68,30 @@ public class AddressController extends Controller{
}
}
@GetMapping
(
"/findAddressById/{id}"
)
@GetMapping
(
"/findAddressById/{id}"
)
public
Result
findAddressById
(
@PathVariable
(
"id"
)
String
id
){
public
Result
findAddressById
(
@PathVariable
(
"id"
)
String
id
)
{
return
new
Result
(
repository
.
findById
(
id
));
return
new
Result
(
repository
.
findById
(
id
));
}
}
@PutMapping
(
"/{addressId}"
)
@PutMapping
(
"/{addressId}"
)
public
Result
editAddressInfo
(
@PathVariable
(
"addressId"
)
String
addressId
,
@RequestBody
TbCfAddress
address
)
{
public
Result
editAddressInfo
(
@PathVariable
(
"addressId"
)
String
addressId
,
@RequestBody
TbCfAddress
address
)
{
ResultCodeEnum
e
=
ResultCodeEnum
.
VALIDATE_ERROR
;
ResultCodeEnum
e
=
ResultCodeEnum
.
VALIDATE_ERROR
;
if
(
!
repository
.
existsById
(
addressId
)
)
if
(!
repository
.
existsById
(
addressId
)
)
return
new
Result
(
e
.
getCode
(),
"Address doesn't exist"
);
return
new
Result
(
e
.
getCode
(),
"Address doesn't exist"
);
String
userId
=
user
.
userId
();
String
userId
=
user
.
userId
();
if
(
address
==
null
)
if
(
address
==
null
)
return
new
Result
(
e
.
getCode
(),
e
.
getDesc
());
return
new
Result
(
e
.
getCode
(),
e
.
getDesc
());
if
(
address
.
getAddressDetail
()
==
null
||
address
.
getAddressDetail
().
trim
().
isEmpty
())
if
(
address
.
getAddressDetail
()
==
null
||
address
.
getAddressDetail
().
trim
().
isEmpty
())
return
new
Result
(
e
.
getCode
(),
"Address is required"
);
return
new
Result
(
e
.
getCode
(),
"Address is required"
);
if
(
address
.
getDeliveryName
()
==
null
||
address
.
getDeliveryName
().
trim
().
isEmpty
())
if
(
address
.
getDeliveryName
()
==
null
||
address
.
getDeliveryName
().
trim
().
isEmpty
())
return
new
Result
(
e
.
getCode
(),
"Delivery name is required"
);
return
new
Result
(
e
.
getCode
(),
"Delivery name is required"
);
if
(
address
.
getPhone
()
==
null
||
address
.
getPhone
().
trim
().
isEmpty
())
if
(
address
.
getPhone
()
==
null
||
address
.
getPhone
().
trim
().
isEmpty
())
return
new
Result
(
e
.
getCode
(),
"Phone is required"
);
return
new
Result
(
e
.
getCode
(),
"Phone is required"
);
if
(
repository
.
existsByAddressDetailAndUserIdAndAddressIdIsNot
(
address
.
getAddressDetail
().
trim
(),
userId
,
addressId
))
if
(
repository
.
existsByAddressDetailAndUserIdAndAddressIdIsNot
(
address
.
getAddressDetail
().
trim
(),
userId
,
addressId
))
return
new
Result
(
e
.
getCode
(),
"Address already existed"
);
return
new
Result
(
e
.
getCode
(),
"Address already existed"
);
address
.
setAddressDetail
(
address
.
getAddressDetail
().
trim
());
address
.
setAddressDetail
(
address
.
getAddressDetail
().
trim
());
address
.
setAddressId
(
addressId
);
address
.
setAddressId
(
addressId
);
...
@@ -99,13 +103,13 @@ public class AddressController extends Controller{
...
@@ -99,13 +103,13 @@ public class AddressController extends Controller{
@DeleteMapping
(
"/{addressId}"
)
@DeleteMapping
(
"/{addressId}"
)
public
Result
deleteAddressInfo
(
@PathVariable
(
"addressId"
)
String
addressId
)
{
public
Result
deleteAddressInfo
(
@PathVariable
(
"addressId"
)
String
addressId
)
{
Optional
<
TbCfAddress
>
byId
=
repository
.
findById
(
addressId
);
Optional
<
TbCfAddress
>
byId
=
repository
.
findById
(
addressId
);
if
(
byId
.
isPresent
()
)
{
if
(
byId
.
isPresent
())
{
TbCfAddress
address
=
byId
.
get
();
TbCfAddress
address
=
byId
.
get
();
TbCfUserInfo
user
=
this
.
user
.
user
();
TbCfUserInfo
user
=
this
.
user
.
user
();
TbCfAddress
cfAddress
=
user
.
getAddress
();
TbCfAddress
cfAddress
=
user
.
getAddress
();
if
(
cfAddress
!=
null
&&
cfAddress
.
getAddressId
().
equals
(
address
.
getAddressId
()))
{
if
(
cfAddress
!=
null
&&
cfAddress
.
getAddressId
().
equals
(
address
.
getAddressId
()))
{
user
.
setAddress
(
null
);
user
.
setAddress
(
null
);
userRepository
.
save
(
user
);
userRepository
.
save
(
user
);
}
}
...
@@ -119,7 +123,7 @@ public class AddressController extends Controller{
...
@@ -119,7 +123,7 @@ public class AddressController extends Controller{
public
Result
configDefaultAddress
(
@PathVariable
(
"addressId"
)
String
addressId
)
{
public
Result
configDefaultAddress
(
@PathVariable
(
"addressId"
)
String
addressId
)
{
Optional
<
TbCfAddress
>
byId
=
repository
.
findById
(
addressId
);
Optional
<
TbCfAddress
>
byId
=
repository
.
findById
(
addressId
);
if
(
byId
.
isPresent
()
)
{
if
(
byId
.
isPresent
())
{
TbCfAddress
address
=
byId
.
get
();
TbCfAddress
address
=
byId
.
get
();
TbCfUserInfo
user
=
this
.
user
.
user
();
TbCfUserInfo
user
=
this
.
user
.
user
();
...
@@ -140,12 +144,10 @@ public class AddressController extends Controller{
...
@@ -140,12 +144,10 @@ public class AddressController extends Controller{
}
}
@GetMapping
(
value
=
"/default"
)
@GetMapping
(
value
=
"/default"
)
public
Result
getDefaultAddress
()
{
public
Result
getDefaultAddress
()
{
TbCfAddress
address
=
user
.
user
().
getAddress
();
TbCfAddress
address
=
user
.
user
().
getAddress
();
return
new
Result
<>(
address
,
address
==
null
?
ResultCodeEnum
.
SERVICE_ERROR
.
getCode
()
:
ResultCodeEnum
.
SUCCESS
.
getCode
(),
""
);
return
new
Result
<>(
address
,
address
==
null
?
ResultCodeEnum
.
SERVICE_ERROR
.
getCode
()
:
ResultCodeEnum
.
SUCCESS
.
getCode
(),
""
);
}
}
}
}
src/main/java/com/example/afrishop_v3/controllers/OrderController.java
浏览文件 @
f838cbca
...
@@ -137,11 +137,18 @@ public class OrderController extends Controller {
...
@@ -137,11 +137,18 @@ public class OrderController extends Controller {
TbCfItemSkus
itemSkus
=
skuOptional
.
get
();
TbCfItemSkus
itemSkus
=
skuOptional
.
get
();
BigDecimal
orderPrice
=
itemSkus
.
getSkuPrice
().
multiply
(
new
BigDecimal
(
itemNum
));
BigDecimal
orderPrice
=
itemSkus
.
getSkuPrice
().
multiply
(
new
BigDecimal
(
itemNum
));
//校验优惠券是否可用
//校验优惠券是否可用
if
(
!
StringUtils
.
isBlank
(
toitableId
))
{
if
(
toitableId
!=
null
&&
!
toitableId
.
isEmpty
(
))
{
boolean
check
=
checkCoupon
(
toitableId
,
orderPrice
);
boolean
check
=
checkCoupon
(
toitableId
,
orderPrice
);
if
(!
check
)
{
if
(!
check
)
{
return
new
Result
<>(
code
,
"Coupon invalid !"
);
return
new
Result
<>(
code
,
"Coupon invalid !"
);
}
}
Optional
<
TbCfToicoupon
>
couponOptional
=
toicouponRepository
.
findById
(
toitableId
);
if
(
couponOptional
.
isPresent
())
{
TbCfCoupon
coupon
=
couponOptional
.
get
().
getCoupon
();
order
.
setCoupon
(
coupon
);
}
}
}
Map
<
String
,
Object
>
map
=
queryUserAvailableCoupons
(
orderPrice
);
Map
<
String
,
Object
>
map
=
queryUserAvailableCoupons
(
orderPrice
);
list
.
add
(
getCart
(
item
,
itemSku
,
itemNum
,
itemSkus
.
getSkuPrice
(),
itemSkus
));
list
.
add
(
getCart
(
item
,
itemSku
,
itemNum
,
itemSkus
.
getSkuPrice
(),
itemSkus
));
...
@@ -155,15 +162,15 @@ public class OrderController extends Controller {
...
@@ -155,15 +162,15 @@ public class OrderController extends Controller {
order
.
setCouponId
(
toitableId
);
order
.
setCouponId
(
toitableId
);
//Check coupon availability
//Check coupon availability
if
(
toitableId
!=
null
&&
!
toitableId
.
isEmpty
())
{
//
if (toitableId != null && !toitableId.isEmpty()) {
Optional
<
TbCfToicoupon
>
couponOptional
=
toicouponRepository
.
findById
(
toitableId
);
//
Optional<TbCfToicoupon> couponOptional = toicouponRepository.findById(toitableId);
//
//
if
(
couponOptional
.
isPresent
())
{
//
if (couponOptional.isPresent()) {
TbCfCoupon
coupon
=
couponOptional
.
get
().
getCoupon
();
//
TbCfCoupon coupon = couponOptional.get().getCoupon();
order
.
setCoupon
(
coupon
);
//
order.setCoupon(coupon);
}
//
}
}
//
}
order
.
setOpen
(
open
);
order
.
setOpen
(
open
);
order
.
setCouponMap
(
map
);
order
.
setCouponMap
(
map
);
order
.
getItemOrderListFromCartList
(
list
,
itemRepository
,
activityRepository
);
order
.
getItemOrderListFromCartList
(
list
,
itemRepository
,
activityRepository
);
...
@@ -174,6 +181,7 @@ public class OrderController extends Controller {
...
@@ -174,6 +181,7 @@ public class OrderController extends Controller {
public
boolean
checkCoupon
(
String
couponId
,
BigDecimal
orderPrice
)
{
public
boolean
checkCoupon
(
String
couponId
,
BigDecimal
orderPrice
)
{
logger
.
info
(
"orderPrice:"
+
orderPrice
);
logger
.
info
(
"orderPrice:"
+
orderPrice
);
logger
.
info
(
"user:"
+
user
.
userId
());
logger
.
info
(
"user:"
+
user
.
userId
());
logger
.
info
(
"coupon:"
+
couponId
);
Optional
<
TbCfToicoupon
>
byId
=
toicouponRepository
.
checkCouponAvailable
(
user
.
userId
(),
couponId
);
Optional
<
TbCfToicoupon
>
byId
=
toicouponRepository
.
checkCouponAvailable
(
user
.
userId
(),
couponId
);
if
(
byId
.
isPresent
())
{
if
(
byId
.
isPresent
())
{
TbCfToicoupon
coupon
=
byId
.
get
();
TbCfToicoupon
coupon
=
byId
.
get
();
...
@@ -198,11 +206,19 @@ public class OrderController extends Controller {
...
@@ -198,11 +206,19 @@ public class OrderController extends Controller {
Map
<
String
,
Object
>
couponMap
=
queryUserAvailableCoupons
(
orderPrice
);
Map
<
String
,
Object
>
couponMap
=
queryUserAvailableCoupons
(
orderPrice
);
int
code
=
ResultCodeEnum
.
VALIDATE_ERROR
.
getCode
();
int
code
=
ResultCodeEnum
.
VALIDATE_ERROR
.
getCode
();
//校验优惠券是否可用
//校验优惠券是否可用
if
(!
StringUtils
.
isBlank
(
toitableId
))
{
TbCfOrder
order
=
new
TbCfOrder
();
if
(
toitableId
!=
null
&&
!
toitableId
.
isEmpty
())
{
boolean
check
=
checkCoupon
(
toitableId
,
orderPrice
);
boolean
check
=
checkCoupon
(
toitableId
,
orderPrice
);
if
(!
check
)
{
if
(!
check
)
{
return
new
Result
<>(
code
,
"Coupon invalid !"
);
return
new
Result
<>(
code
,
"Coupon invalid !"
);
}
}
Optional
<
TbCfToicoupon
>
couponOptional
=
toicouponRepository
.
findById
(
toitableId
);
if
(
couponOptional
.
isPresent
())
{
TbCfCoupon
coupon
=
couponOptional
.
get
().
getCoupon
();
order
.
setCoupon
(
coupon
);
}
}
}
if
(
allByUserId
.
isEmpty
())
{
if
(
allByUserId
.
isEmpty
())
{
return
new
Result
<>(
code
,
"There are no items in the shopping cart"
);
return
new
Result
<>(
code
,
"There are no items in the shopping cart"
);
...
@@ -215,7 +231,6 @@ public class OrderController extends Controller {
...
@@ -215,7 +231,6 @@ public class OrderController extends Controller {
if
(
anyMatch
)
return
new
Result
<>(
code
,
"Items run out of stock"
);
if
(
anyMatch
)
return
new
Result
<>(
code
,
"Items run out of stock"
);
TbCfOrder
order
=
new
TbCfOrder
();
order
.
setCouponMap
(
couponMap
);
order
.
setCouponMap
(
couponMap
);
Optional
<
TbCfExpressTemplate
>
templateOptional
=
templateRepository
.
findFirstByIsDefault
(
1
);
Optional
<
TbCfExpressTemplate
>
templateOptional
=
templateRepository
.
findFirstByIsDefault
(
1
);
templateOptional
.
ifPresent
(
order:
:
setDefaultTemplate
);
templateOptional
.
ifPresent
(
order:
:
setDefaultTemplate
);
...
@@ -223,15 +238,15 @@ public class OrderController extends Controller {
...
@@ -223,15 +238,15 @@ public class OrderController extends Controller {
order
.
setCouponId
(
toitableId
);
order
.
setCouponId
(
toitableId
);
//Check if any coupon selected
//Check if any coupon selected
if
(
toitableId
!=
null
&&
!
toitableId
.
isEmpty
())
{
//
if (toitableId != null && !toitableId.isEmpty()) {
Optional
<
TbCfToicoupon
>
couponOptional
=
toicouponRepository
.
findById
(
toitableId
);
//
Optional<TbCfToicoupon> couponOptional = toicouponRepository.findById(toitableId);
//
//
if
(
couponOptional
.
isPresent
())
{
//
if (couponOptional.isPresent()) {
TbCfCoupon
coupon
=
couponOptional
.
get
().
getCoupon
();
//
TbCfCoupon coupon = couponOptional.get().getCoupon();
order
.
setCoupon
(
coupon
);
//
order.setCoupon(coupon);
}
//
}
}
//
}
order
.
setOpen
(
open
);
order
.
setOpen
(
open
);
order
.
getItemOrderListFromCartList
(
allByUserId
,
itemRepository
,
activityRepository
);
order
.
getItemOrderListFromCartList
(
allByUserId
,
itemRepository
,
activityRepository
);
...
@@ -317,12 +332,20 @@ public class OrderController extends Controller {
...
@@ -317,12 +332,20 @@ public class OrderController extends Controller {
orderPrice
=
orderPrice
.
add
(
cart
.
getItemPrice
().
multiply
(
new
BigDecimal
(
cart
.
getItemNum
())));
orderPrice
=
orderPrice
.
add
(
cart
.
getItemPrice
().
multiply
(
new
BigDecimal
(
cart
.
getItemNum
())));
}
}
}
}
TbCfOrder
order
=
new
TbCfOrder
();
//校验优惠券是否可用
//校验优惠券是否可用
if
(
!
StringUtils
.
isBlank
(
toitableId
))
{
if
(
toitableId
!=
null
&&
!
toitableId
.
isEmpty
(
))
{
boolean
check
=
checkCoupon
(
toitableId
,
orderPrice
);
boolean
check
=
checkCoupon
(
toitableId
,
orderPrice
);
if
(!
check
)
{
if
(!
check
)
{
return
new
Result
<>(
v_code
,
"Coupon invalid !"
);
return
new
Result
<>(
v_code
,
"Coupon invalid !"
);
}
}
Optional
<
TbCfToicoupon
>
couponOptional
=
toicouponRepository
.
findById
(
toitableId
);
if
(
couponOptional
.
isPresent
())
{
TbCfCoupon
coupon
=
couponOptional
.
get
().
getCoupon
();
order
.
setCoupon
(
coupon
);
}
}
}
Map
<
String
,
Object
>
map
=
queryUserAvailableCoupons
(
orderPrice
);
Map
<
String
,
Object
>
map
=
queryUserAvailableCoupons
(
orderPrice
);
...
@@ -347,7 +370,6 @@ public class OrderController extends Controller {
...
@@ -347,7 +370,6 @@ public class OrderController extends Controller {
}
}
TbCfOrder
order
=
new
TbCfOrder
();
order
.
setCouponMap
(
map
);
order
.
setCouponMap
(
map
);
order
.
setUserName
(
user
.
display
());
order
.
setUserName
(
user
.
display
());
...
@@ -368,16 +390,16 @@ public class OrderController extends Controller {
...
@@ -368,16 +390,16 @@ public class OrderController extends Controller {
order
.
setCouponId
(
toitableId
);
order
.
setCouponId
(
toitableId
);
TbCfToicoupon
tbCfToicoupon
=
null
;
TbCfToicoupon
tbCfToicoupon
=
null
;
if
(
toitableId
!=
null
&&
!
toitableId
.
isEmpty
())
{
//
if (toitableId != null && !toitableId.isEmpty()) {
Optional
<
TbCfToicoupon
>
couponOptional
=
toicouponRepository
.
findById
(
toitableId
);
//
Optional<TbCfToicoupon> couponOptional = toicouponRepository.findById(toitableId);
//
//
if
(
couponOptional
.
isPresent
())
{
//
if (couponOptional.isPresent()) {
tbCfToicoupon
=
couponOptional
.
get
();
//
tbCfToicoupon = couponOptional.get();
TbCfCoupon
coupon
=
tbCfToicoupon
.
getCoupon
();
//
TbCfCoupon coupon = tbCfToicoupon.getCoupon();
order
.
setCoupon
(
coupon
);
//
order.setCoupon(coupon);
}
else
logger
.
warn
(
"Invalid Coupon "
+
toitableId
);
//
} else logger.warn("Invalid Coupon " + toitableId);
}
//
}
order
.
setUserId
(
userId
);
order
.
setUserId
(
userId
);
...
...
src/main/java/com/example/afrishop_v3/repository/TbCfAddressRepository.java
浏览文件 @
f838cbca
...
@@ -10,15 +10,17 @@ import org.springframework.transaction.annotation.Transactional;
...
@@ -10,15 +10,17 @@ import org.springframework.transaction.annotation.Transactional;
import
java.util.List
;
import
java.util.List
;
public
interface
TbCfAddressRepository
extends
PagingAndSortingRepository
<
TbCfAddress
,
String
>
{
public
interface
TbCfAddressRepository
extends
PagingAndSortingRepository
<
TbCfAddress
,
String
>
{
List
<
TbCfAddress
>
findAllByUserId
(
String
userId
,
Sort
sort
);
List
<
TbCfAddress
>
findAllByUserId
(
String
userId
,
Sort
sort
);
@Transactional
@Transactional
@Modifying
@Modifying
@Query
(
value
=
"update tb_cf_address set default_flag=0 where user_id=:user_id"
,
nativeQuery
=
true
)
@Query
(
value
=
"update tb_cf_address set default_flag=0 where user_id=:user_id"
,
nativeQuery
=
true
)
void
resetToDefault
(
@Param
(
"user_id"
)
String
userId
);
void
resetToDefault
(
@Param
(
"user_id"
)
String
userId
);
boolean
existsByAddressDetailAndUserId
(
String
addressDetail
,
String
userId
);
boolean
existsByAddressDetailAndUserId
(
String
addressDetail
,
String
userId
);
boolean
existsByAddressDetailAndUserIdAndAddressIdIsNot
(
String
addressDetail
,
String
userId
,
String
addressId
);
boolean
existsByAddressDetailAndUserIdAndAddressIdIsNot
(
String
addressDetail
,
String
userId
,
String
addressId
);
boolean
existsByUserId
(
String
userId
);
}
}
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论