Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
A
Afrishop refactored project
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
Whispa
Afrishop refactored project
Commits
d386f12a
提交
d386f12a
authored
11月 30, 2020
作者:
Whispa
浏览文件
操作
浏览文件
下载
差异文件
Merge remote-tracking branch 'origin/master'
上级
efb2061a
b286ac31
显示空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
115 行增加
和
55 行删除
+115
-55
ActivityController.java
...m/example/afrishop_v3/controllers/ActivityController.java
+12
-0
CartController.java
...a/com/example/afrishop_v3/controllers/CartController.java
+7
-7
CouponController.java
...com/example/afrishop_v3/controllers/CouponController.java
+24
-24
OrderController.java
.../com/example/afrishop_v3/controllers/OrderController.java
+58
-23
TbCfOrder.java
src/main/java/com/example/afrishop_v3/models/TbCfOrder.java
+12
-1
TbCfCartRecordRRepository.java
...ple/afrishop_v3/repository/TbCfCartRecordRRepository.java
+2
-0
没有找到文件。
src/main/java/com/example/afrishop_v3/controllers/ActivityController.java
0 → 100644
浏览文件 @
d386f12a
package
com
.
example
.
afrishop_v3
.
controllers
;
import
org.springframework.web.bind.annotation.RestController
;
/**
* @Auther: wudepeng
* @Date: 2020/11/30
* @Description:
*/
@RestController
public
class
ActivityController
{
}
src/main/java/com/example/afrishop_v3/controllers/CartController.java
浏览文件 @
d386f12a
...
@@ -137,19 +137,19 @@ public class CartController extends Controller {
...
@@ -137,19 +137,19 @@ public class CartController extends Controller {
return
new
Result
();
return
new
Result
();
}
}
@
GetMapping
(
"/changeCartStatus/{cartId}
/{status}"
)
@
PutMapping
(
"/changeCartStatus
/{status}"
)
public
Result
changeCartStatus
(
@
PathVariable
(
"cartId"
)
String
cartId
,
public
Result
changeCartStatus
(
@
RequestBody
String
[]
cartIds
,
@PathVariable
(
"status"
)
Integer
status
)
{
@PathVariable
(
"status"
)
Integer
status
)
{
if
(
StringUtils
.
isBlank
(
cartId
)
||
status
==
null
)
{
if
(
cartIds
==
null
||
status
==
null
)
{
return
new
Result
(
ResultCodeEnum
.
SERVICE_ERROR
.
getCode
(),
return
new
Result
(
ResultCodeEnum
.
SERVICE_ERROR
.
getCode
(),
"The parameter cannot be null"
);
"The parameter cannot be null"
);
}
}
Optional
<
TbCfCartRecordR
>
byId
=
repository
.
findById
(
cartId
);
List
<
TbCfCartRecordR
>
cartList
=
repository
.
findAllByCartRecordIdIn
(
cartIds
);
if
(
byId
.
isPresent
())
{
cartList
.
forEach
(
cart
->
{
TbCfCartRecordR
cart
=
byId
.
get
();
cart
.
setCheckFlag
(
status
);
cart
.
setCheckFlag
(
status
);
repository
.
save
(
cart
);
repository
.
save
(
cart
);
}
});
return
new
Result
();
return
new
Result
();
}
}
...
...
src/main/java/com/example/afrishop_v3/controllers/CouponController.java
浏览文件 @
d386f12a
...
@@ -66,28 +66,28 @@ public class CouponController {
...
@@ -66,28 +66,28 @@ public class CouponController {
return
new
Result
(
ResultCodeEnum
.
ERROR
.
getCode
(),
"The coupon has been snapped up"
);
return
new
Result
(
ResultCodeEnum
.
ERROR
.
getCode
(),
"The coupon has been snapped up"
);
}
}
/**
//
/**
* 查询用户未使用的优惠券,可用的排在顶部
//
* 查询用户未使用的优惠券,可用的排在顶部
*/
//
*/
@GetMapping
(
"/selectCoupon"
)
//
@GetMapping("/selectCoupon")
public
Result
queryUserAvailableCoupons
(
@RequestParam
(
"orderPrice"
)
BigDecimal
orderPrice
)
{
//
public Result queryUserAvailableCoupons(@RequestParam("orderPrice") BigDecimal orderPrice) {
Map
<
String
,
Object
>
couponMap
=
new
HashMap
<>();
//
Map<String, Object> couponMap = new HashMap<>();
//可使用的优惠券
//
//可使用的优惠券
LinkedList
<
TbCfToicoupon
>
availableCoupon
=
new
LinkedList
();
//
LinkedList<TbCfToicoupon> availableCoupon = new LinkedList();
//不可使用的优惠券
//
//不可使用的优惠券
LinkedList
<
TbCfToicoupon
>
unAvailableCoupon
=
new
LinkedList
();
//
LinkedList<TbCfToicoupon> unAvailableCoupon = new LinkedList();
List
<
TbCfToicoupon
>
couponList
=
repository
.
queryUserAvailableCoupon
(
user
.
userId
());
//
List<TbCfToicoupon> couponList = repository.queryUserAvailableCoupon(user.userId());
couponList
.
forEach
(
coupon
->
{
//
couponList.forEach(coupon -> {
boolean
available
=
orderPrice
.
compareTo
(
coupon
.
withAmount
())
>=
0
;
//
boolean available = orderPrice.compareTo(coupon.withAmount()) >= 0;
if
(
available
)
{
//
if (available) {
availableCoupon
.
add
(
coupon
);
//
availableCoupon.add(coupon);
}
else
{
//
} else {
unAvailableCoupon
.
add
(
coupon
);
//
unAvailableCoupon.add(coupon);
}
//
}
});
//
});
couponMap
.
put
(
"availableCoupon"
,
availableCoupon
);
//
couponMap.put("availableCoupon", availableCoupon);
couponMap
.
put
(
"unAvailableCoupon"
,
unAvailableCoupon
);
//
couponMap.put("unAvailableCoupon", unAvailableCoupon);
//
return
new
Result
(
couponMap
);
//
return new Result(couponMap);
}
//
}
}
}
src/main/java/com/example/afrishop_v3/controllers/OrderController.java
浏览文件 @
d386f12a
...
@@ -35,6 +35,7 @@ import static org.springframework.data.domain.Sort.Order.desc;
...
@@ -35,6 +35,7 @@ import static org.springframework.data.domain.Sort.Order.desc;
@RestController
@RestController
@RequestMapping
(
"/order"
)
@RequestMapping
(
"/order"
)
public
class
OrderController
extends
Controller
{
public
class
OrderController
extends
Controller
{
private
final
TbCfToicouponRepository
couponRepository
;
private
final
TbCfOrderRepository
repository
;
private
final
TbCfOrderRepository
repository
;
private
final
TbCfCartRecordRRepository
cartRepository
;
private
final
TbCfCartRecordRRepository
cartRepository
;
private
final
TbCfAddressRepository
addressRepository
;
private
final
TbCfAddressRepository
addressRepository
;
...
@@ -47,7 +48,8 @@ public class OrderController extends Controller {
...
@@ -47,7 +48,8 @@ public class OrderController extends Controller {
private
final
AuthenticationUser
user
;
private
final
AuthenticationUser
user
;
private
static
Logger
logger
=
LoggerFactory
.
getLogger
(
OrderController
.
class
);
private
static
Logger
logger
=
LoggerFactory
.
getLogger
(
OrderController
.
class
);
public
OrderController
(
TbCfOrderRepository
repository
,
TbCfCartRecordRRepository
cartRepository
,
TbCfAddressRepository
addressRepository
,
TbCfToicouponRepository
toicouponRepository
,
TbCfStationItemRepository
itemRepository
,
TbCfItemSkuRepository
itemSkuRepository
,
TbCfItemCommentRepository
commentRepository
,
TbCfExpressTemplateRepository
templateRepository
,
@Qualifier
(
"tbCfExchangeRepository"
)
TbCfExchangeRepository
exchangeRepository
,
AuthenticationUser
user
)
{
public
OrderController
(
TbCfToicouponRepository
couponRepository
,
TbCfOrderRepository
repository
,
TbCfCartRecordRRepository
cartRepository
,
TbCfAddressRepository
addressRepository
,
TbCfToicouponRepository
toicouponRepository
,
TbCfStationItemRepository
itemRepository
,
TbCfItemSkuRepository
itemSkuRepository
,
TbCfItemCommentRepository
commentRepository
,
TbCfExpressTemplateRepository
templateRepository
,
@Qualifier
(
"tbCfExchangeRepository"
)
TbCfExchangeRepository
exchangeRepository
,
AuthenticationUser
user
)
{
this
.
couponRepository
=
couponRepository
;
this
.
repository
=
repository
;
this
.
repository
=
repository
;
this
.
cartRepository
=
cartRepository
;
this
.
cartRepository
=
cartRepository
;
this
.
addressRepository
=
addressRepository
;
this
.
addressRepository
=
addressRepository
;
...
@@ -60,7 +62,7 @@ public class OrderController extends Controller {
...
@@ -60,7 +62,7 @@ public class OrderController extends Controller {
this
.
user
=
user
;
this
.
user
=
user
;
}
}
private
TbCfCartRecordR
getCart
(
TbCfStationItem
item
,
String
itemSku
,
Integer
itemNum
,
BigDecimal
price
,
String
itemSkuId
,
String
image
)
{
private
TbCfCartRecordR
getCart
(
TbCfStationItem
item
,
String
itemSku
,
Integer
itemNum
,
BigDecimal
price
,
String
itemSkuId
,
String
image
)
{
TbCfCartRecordR
record
=
new
TbCfCartRecordR
();
TbCfCartRecordR
record
=
new
TbCfCartRecordR
();
...
@@ -73,7 +75,7 @@ public class OrderController extends Controller {
...
@@ -73,7 +75,7 @@ public class OrderController extends Controller {
record
.
setTemplate
(
item
.
getExpress
());
record
.
setTemplate
(
item
.
getExpress
());
record
.
setItemTitle
(
item
.
getItemName
());
record
.
setItemTitle
(
item
.
getItemName
());
record
.
setItemPrice
(
price
);
record
.
setItemPrice
(
price
);
record
.
setItemImg
(
image
==
null
?
item
.
catchSingleImage
()
:
image
);
record
.
setItemImg
(
image
==
null
?
item
.
catchSingleImage
()
:
image
);
return
record
;
return
record
;
}
}
...
@@ -99,6 +101,7 @@ public class OrderController extends Controller {
...
@@ -99,6 +101,7 @@ public class OrderController extends Controller {
@RequestParam
(
value
=
"toitableId"
,
required
=
false
)
String
toitableId
)
{
@RequestParam
(
value
=
"toitableId"
,
required
=
false
)
String
toitableId
)
{
TbCfOrder
order
=
new
TbCfOrder
();
TbCfOrder
order
=
new
TbCfOrder
();
Optional
<
TbCfExpressTemplate
>
templateOptional
=
templateRepository
.
findFirstByIsDefault
(
1
);
Optional
<
TbCfExpressTemplate
>
templateOptional
=
templateRepository
.
findFirstByIsDefault
(
1
);
templateOptional
.
ifPresent
(
order:
:
setDefaultTemplate
);
templateOptional
.
ifPresent
(
order:
:
setDefaultTemplate
);
...
@@ -119,10 +122,11 @@ public class OrderController extends Controller {
...
@@ -119,10 +122,11 @@ public class OrderController extends Controller {
TbCfStationItem
item
=
byId
.
get
();
TbCfStationItem
item
=
byId
.
get
();
List
<
TbCfCartRecordR
>
list
=
new
ArrayList
<>();
List
<
TbCfCartRecordR
>
list
=
new
ArrayList
<>();
TbCfItemSkus
itemSkus
=
skuOptional
.
get
();
TbCfItemSkus
itemSkus
=
skuOptional
.
get
();
list
.
add
(
getCart
(
item
,
itemSku
,
itemNum
,
itemSkus
.
getSkuPrice
(),
itemSkuId
,
itemSkus
.
getSkuImg
()));
BigDecimal
orderPrice
=
itemSkus
.
getSkuPrice
().
multiply
(
new
BigDecimal
(
itemNum
));
Map
<
String
,
Object
>
map
=
queryUserAvailableCoupons
(
orderPrice
);
list
.
add
(
getCart
(
item
,
itemSku
,
itemNum
,
itemSkus
.
getSkuPrice
(),
itemSkuId
,
itemSkus
.
getSkuImg
()));
order
.
setCouponId
(
toitableId
);
order
.
setCouponId
(
toitableId
);
if
(
toitableId
!=
null
&&
!
toitableId
.
isEmpty
())
{
if
(
toitableId
!=
null
&&
!
toitableId
.
isEmpty
())
{
...
@@ -135,7 +139,7 @@ public class OrderController extends Controller {
...
@@ -135,7 +139,7 @@ public class OrderController extends Controller {
}
}
}
}
order
.
setCouponMap
(
map
);
order
.
getItemOrderListFromCartList
(
list
,
itemRepository
);
order
.
getItemOrderListFromCartList
(
list
,
itemRepository
);
return
new
Result
<>(
order
);
return
new
Result
<>(
order
);
...
@@ -145,13 +149,19 @@ public class OrderController extends Controller {
...
@@ -145,13 +149,19 @@ public class OrderController extends Controller {
public
Result
<
TbCfOrder
>
settleAccount
(
@RequestBody
String
[]
ids
,
@RequestParam
(
value
=
"toitableId"
,
required
=
false
)
String
toitableId
)
{
public
Result
<
TbCfOrder
>
settleAccount
(
@RequestBody
String
[]
ids
,
@RequestParam
(
value
=
"toitableId"
,
required
=
false
)
String
toitableId
)
{
//String userId = user.userId();
//String userId = user.userId();
List
<
TbCfCartRecordR
>
allByUserId
=
cartRepository
.
findAllByCartRecordIdIn
(
ids
);
List
<
TbCfCartRecordR
>
allByUserId
=
cartRepository
.
findAllByCartRecordIdIn
(
ids
);
BigDecimal
orderPrice
=
BigDecimal
.
ZERO
;
for
(
TbCfCartRecordR
cart
:
allByUserId
)
{
orderPrice
=
orderPrice
.
add
(
cart
.
getItemPrice
().
multiply
(
new
BigDecimal
(
cart
.
getItemNum
())));
}
Map
<
String
,
Object
>
couponMap
=
queryUserAvailableCoupons
(
orderPrice
);
if
(
allByUserId
.
isEmpty
())
{
if
(
allByUserId
.
isEmpty
())
{
return
new
Result
<>(
ResultCodeEnum
.
VALIDATE_ERROR
.
getCode
(),
"There are no items in the shopping cart"
);
return
new
Result
<>(
ResultCodeEnum
.
VALIDATE_ERROR
.
getCode
(),
"There are no items in the shopping cart"
);
}
}
TbCfOrder
order
=
new
TbCfOrder
();
TbCfOrder
order
=
new
TbCfOrder
();
order
.
setCouponMap
(
couponMap
);
Optional
<
TbCfExpressTemplate
>
templateOptional
=
templateRepository
.
findFirstByIsDefault
(
1
);
Optional
<
TbCfExpressTemplate
>
templateOptional
=
templateRepository
.
findFirstByIsDefault
(
1
);
templateOptional
.
ifPresent
(
order:
:
setDefaultTemplate
);
templateOptional
.
ifPresent
(
order:
:
setDefaultTemplate
);
...
@@ -208,6 +218,7 @@ public class OrderController extends Controller {
...
@@ -208,6 +218,7 @@ public class OrderController extends Controller {
boolean
payNow
=
!
noPayNow
;
boolean
payNow
=
!
noPayNow
;
// BigDecimal orderPrice=BigDecimal.ZERO;
if
(
payNow
)
{
if
(
payNow
)
{
Optional
<
TbCfStationItem
>
byId
=
itemRepository
.
findById
(
itemId
);
Optional
<
TbCfStationItem
>
byId
=
itemRepository
.
findById
(
itemId
);
...
@@ -229,8 +240,8 @@ public class OrderController extends Controller {
...
@@ -229,8 +240,8 @@ public class OrderController extends Controller {
// }
// }
TbCfItemSkus
skuObj
=
skuOptional
.
get
();
TbCfItemSkus
skuObj
=
skuOptional
.
get
();
// orderPrice=skuObj.getSkuPrice().multiply(new BigDecimal(itemNum));
allByUserId
.
add
(
getCart
(
stationItem
,
itemSku
,
itemNum
,
skuObj
.
getSkuPrice
(),
itemSkuId
,
skuObj
.
getSkuImg
()));
allByUserId
.
add
(
getCart
(
stationItem
,
itemSku
,
itemNum
,
skuObj
.
getSkuPrice
(),
itemSkuId
,
skuObj
.
getSkuImg
()));
}
else
{
}
else
{
System
.
out
.
println
(
Arrays
.
toString
(
tbCfOrder
.
getIds
()));
System
.
out
.
println
(
Arrays
.
toString
(
tbCfOrder
.
getIds
()));
...
@@ -242,8 +253,12 @@ public class OrderController extends Controller {
...
@@ -242,8 +253,12 @@ public class OrderController extends Controller {
// if (!success) {
// if (!success) {
// return new Result<>(v_code, "Goods in short stock!");
// return new Result<>(v_code, "Goods in short stock!");
// }
// }
// }
// for (TbCfCartRecordR cart : allByUserId) {
// orderPrice = orderPrice.add(cart.getItemPrice().multiply(new BigDecimal(cart.getItemNum())));
// }
// }
}
}
// Map<String, Object> map = queryUserAvailableCoupons(orderPrice);
String
addressId
=
tbCfOrder
.
getDeliveryAddressId
();
String
addressId
=
tbCfOrder
.
getDeliveryAddressId
();
...
@@ -260,7 +275,7 @@ public class OrderController extends Controller {
...
@@ -260,7 +275,7 @@ public class OrderController extends Controller {
TbCfOrder
order
=
new
TbCfOrder
();
TbCfOrder
order
=
new
TbCfOrder
();
// order.setCouponMap(map);
order
.
setUserName
(
user
.
display
());
order
.
setUserName
(
user
.
display
());
TbCfAddress
address
=
addressOptional
.
get
();
TbCfAddress
address
=
addressOptional
.
get
();
...
@@ -305,7 +320,6 @@ public class OrderController extends Controller {
...
@@ -305,7 +320,6 @@ public class OrderController extends Controller {
TbCfOrder
save
=
repository
.
save
(
order
);
TbCfOrder
save
=
repository
.
save
(
order
);
if
(
tbCfToicoupon
!=
null
)
{
if
(
tbCfToicoupon
!=
null
)
{
tbCfToicoupon
.
setEnableFlag
(
0
);
tbCfToicoupon
.
setEnableFlag
(
0
);
toicouponRepository
.
save
(
tbCfToicoupon
);
toicouponRepository
.
save
(
tbCfToicoupon
);
...
@@ -317,10 +331,10 @@ public class OrderController extends Controller {
...
@@ -317,10 +331,10 @@ public class OrderController extends Controller {
String
[]
strings
=
collect
.
toArray
(
new
String
[]{});
String
[]
strings
=
collect
.
toArray
(
new
String
[]{});
if
(
payNow
)
{
if
(
payNow
)
{
cartRepository
.
updateItemQuantity_
(
itemId
,
itemNum
);
cartRepository
.
updateItemQuantity_
(
itemId
,
itemNum
);
cartRepository
.
updateSkuQuantity_
(
itemSkuId
,
itemNum
);
cartRepository
.
updateSkuQuantity_
(
itemSkuId
,
itemNum
);
}
else
{
}
else
{
cartRepository
.
updateSkuQuantity
(
strings
);
cartRepository
.
updateSkuQuantity
(
strings
);
cartRepository
.
updateItemQuantity
(
strings
);
cartRepository
.
updateItemQuantity
(
strings
);
}
}
...
@@ -365,9 +379,9 @@ public class OrderController extends Controller {
...
@@ -365,9 +379,9 @@ public class OrderController extends Controller {
Page
<
OrderCount
>
list
;
Page
<
OrderCount
>
list
;
PageRequest
of
=
PageRequest
.
of
(
pageNum
,
pageSize
,
sort
(
sort
));
PageRequest
of
=
PageRequest
.
of
(
pageNum
,
pageSize
,
sort
(
sort
));
String
userId
=
user
.
getUserId
();
String
userId
=
user
.
getUserId
();
if
(
orderStatus
!=
null
)
{
if
(
orderStatus
!=
null
)
{
list
=
repository
.
findAllByUserIdWithStatus
(
userId
,
user
,
orderStatus
,
of
);
list
=
repository
.
findAllByUserIdWithStatus
(
userId
,
user
,
orderStatus
,
of
);
}
else
}
else
list
=
repository
.
findAllByUserId
(
userId
,
user
,
of
);
list
=
repository
.
findAllByUserId
(
userId
,
user
,
of
);
list
.
forEach
(
v
->
v
.
getOrder
().
setCommentCount
(
v
.
getCommented
()));
list
.
forEach
(
v
->
v
.
getOrder
().
setCommentCount
(
v
.
getCommented
()));
...
@@ -472,7 +486,7 @@ public class OrderController extends Controller {
...
@@ -472,7 +486,7 @@ public class OrderController extends Controller {
String
minutes
=
"160"
;
String
minutes
=
"160"
;
Date
current
=
new
Date
();
Date
current
=
new
Date
();
if
(
!
optionalTbCfOrder
.
isPresent
()
)
{
if
(!
optionalTbCfOrder
.
isPresent
())
{
return
new
Result
<>(
ResultCodeEnum
.
VALIDATE_ERROR
.
getCode
(),
"Order not found"
);
return
new
Result
<>(
ResultCodeEnum
.
VALIDATE_ERROR
.
getCode
(),
"Order not found"
);
}
}
...
@@ -483,13 +497,13 @@ public class OrderController extends Controller {
...
@@ -483,13 +497,13 @@ public class OrderController extends Controller {
Calendar
instance
=
Calendar
.
getInstance
();
Calendar
instance
=
Calendar
.
getInstance
();
instance
.
setTime
(
orderTime
);
instance
.
setTime
(
orderTime
);
instance
.
add
(
Calendar
.
DATE
,
1
);
instance
.
add
(
Calendar
.
DATE
,
1
);
long
time
=
instance
.
getTime
().
getTime
();
long
time
=
instance
.
getTime
().
getTime
();
long
difference
=
time
-
current
.
getTime
();
long
difference
=
time
-
current
.
getTime
();
if
(
difference
>
0
)
{
if
(
difference
>
0
)
{
Duration
duration
=
Duration
.
ofMillis
(
difference
);
Duration
duration
=
Duration
.
ofMillis
(
difference
);
...
@@ -506,4 +520,25 @@ public class OrderController extends Controller {
...
@@ -506,4 +520,25 @@ public class OrderController extends Controller {
return
new
Result
<>(
tbCfOrder
,
"Order found !"
);
return
new
Result
<>(
tbCfOrder
,
"Order found !"
);
}
}
public
Map
<
String
,
Object
>
queryUserAvailableCoupons
(
BigDecimal
orderPrice
)
{
Map
<
String
,
Object
>
couponMap
=
new
HashMap
<>();
//可使用的优惠券
LinkedList
<
TbCfToicoupon
>
availableCoupon
=
new
LinkedList
();
//不可使用的优惠券
LinkedList
<
TbCfToicoupon
>
unAvailableCoupon
=
new
LinkedList
();
List
<
TbCfToicoupon
>
couponList
=
couponRepository
.
queryUserAvailableCoupon
(
user
.
userId
());
couponList
.
forEach
(
coupon
->
{
boolean
available
=
orderPrice
.
compareTo
(
coupon
.
withAmount
())
>=
0
;
if
(
available
)
{
availableCoupon
.
add
(
coupon
);
}
else
{
unAvailableCoupon
.
add
(
coupon
);
}
});
couponMap
.
put
(
"availableCoupon"
,
availableCoupon
);
couponMap
.
put
(
"unAvailableCoupon"
,
unAvailableCoupon
);
return
couponMap
;
}
}
}
src/main/java/com/example/afrishop_v3/models/TbCfOrder.java
浏览文件 @
d386f12a
...
@@ -155,7 +155,18 @@ public class TbCfOrder {
...
@@ -155,7 +155,18 @@ public class TbCfOrder {
*/
*/
private
String
remarkInfo
;
private
String
remarkInfo
;
// @JsonIgnore
@Transient
private
Map
<
String
,
Object
>
couponMap
;
public
Map
<
String
,
Object
>
getCouponMap
()
{
return
couponMap
;
}
public
void
setCouponMap
(
Map
<
String
,
Object
>
couponMap
)
{
this
.
couponMap
=
couponMap
;
}
// @JsonIgnore
// @JoinColumn(columnDefinition = "user_id",name = "user_id")
// @JoinColumn(columnDefinition = "user_id",name = "user_id")
// @ManyToOne(fetch = FetchType.LAZY)
// @ManyToOne(fetch = FetchType.LAZY)
// private TbCfUserInfo userInfo;
// private TbCfUserInfo userInfo;
...
...
src/main/java/com/example/afrishop_v3/repository/TbCfCartRecordRRepository.java
浏览文件 @
d386f12a
...
@@ -23,6 +23,8 @@ public interface TbCfCartRecordRRepository extends PagingAndSortingRepository<Tb
...
@@ -23,6 +23,8 @@ public interface TbCfCartRecordRRepository extends PagingAndSortingRepository<Tb
List
<
TbCfCartRecordR
>
findAllByCartRecordIdIn
(
String
[]
ids
);
List
<
TbCfCartRecordR
>
findAllByCartRecordIdIn
(
String
[]
ids
);
@Modifying
@Transactional
void
deleteAllByCartRecordIdIn
(
String
[]
ids
);
void
deleteAllByCartRecordIdIn
(
String
[]
ids
);
@Modifying
@Modifying
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论