推荐用户随机一条
This commit is contained in:
@@ -45,6 +45,8 @@ public class PaymentController {
|
||||
@Autowired
|
||||
private IUserCourseBuyService userCourseBuyService;
|
||||
@Autowired
|
||||
private WumenUserService wumenUserService;
|
||||
@Autowired
|
||||
private ITCommodityService commodityService;
|
||||
@Autowired
|
||||
private ITCustomerPointDetailService customerPointDetailService;
|
||||
@@ -355,6 +357,15 @@ public class PaymentController {
|
||||
.orderByAsc(UserCourseBuy::getCreateTime)
|
||||
.last("limit 3"));
|
||||
}
|
||||
if (list.isEmpty()) {
|
||||
Map<String,Object> map = new HashMap<>();
|
||||
WumenUser user = wumenUserService.getOne(new MPJLambdaWrapper<WumenUser>()
|
||||
.select(WumenUser::getTel)
|
||||
.orderByAsc("rand()")
|
||||
.isNotNull(WumenUser::getTel).last("limit 1"));
|
||||
map.put("tel",user.getTel());
|
||||
list.add(map);
|
||||
}
|
||||
return R.ok().putData("list",list);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user