推荐用户随机一条
This commit is contained in:
@@ -45,6 +45,8 @@ public class PaymentController {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private IUserCourseBuyService userCourseBuyService;
|
private IUserCourseBuyService userCourseBuyService;
|
||||||
@Autowired
|
@Autowired
|
||||||
|
private WumenUserService wumenUserService;
|
||||||
|
@Autowired
|
||||||
private ITCommodityService commodityService;
|
private ITCommodityService commodityService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private ITCustomerPointDetailService customerPointDetailService;
|
private ITCustomerPointDetailService customerPointDetailService;
|
||||||
@@ -355,6 +357,15 @@ public class PaymentController {
|
|||||||
.orderByAsc(UserCourseBuy::getCreateTime)
|
.orderByAsc(UserCourseBuy::getCreateTime)
|
||||||
.last("limit 3"));
|
.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);
|
return R.ok().putData("list",list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user