main
parent
14c9ae0b15
commit
eb15b382db
|
|
@ -216,6 +216,14 @@ public class PayController extends BaseController
|
||||||
@ApiOperation(value = "0元支付", notes = "兑换码支付", httpMethod = "POST")
|
@ApiOperation(value = "0元支付", notes = "兑换码支付", httpMethod = "POST")
|
||||||
public AjaxResult test(@RequestBody UseExchangeArg useExchangeArg) throws ParseException {
|
public AjaxResult test(@RequestBody UseExchangeArg useExchangeArg) throws ParseException {
|
||||||
Long userId = useExchangeArg.getUserId();
|
Long userId = useExchangeArg.getUserId();
|
||||||
|
AppOrder entity = new AppOrder();
|
||||||
|
entity.setLevel(1);
|
||||||
|
entity.setUserId(userId);
|
||||||
|
entity.setPayStatus(2);
|
||||||
|
List<AppOrder> list = appOrderMapper.selectAppOrderList(entity);
|
||||||
|
if (list != null && list.size() > 0) {
|
||||||
|
return AjaxResult.error(2001,"您已体验过7天无理由试用,不可重复试用!");
|
||||||
|
}
|
||||||
// 生成订单信息
|
// 生成订单信息
|
||||||
AppOrder order = new AppOrder();
|
AppOrder order = new AppOrder();
|
||||||
order.setPrice("0");
|
order.setPrice("0");
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
package com.ruoyi.app.service.impl;
|
package com.ruoyi.app.service.impl;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
|
@ -54,6 +55,8 @@ public class AppEventsServiceImpl implements IAppEventsService
|
||||||
List<AppEventsUser> list = appEventsUserMapper.selectAppEventsUserList(appEventsUser);
|
List<AppEventsUser> list = appEventsUserMapper.selectAppEventsUserList(appEventsUser);
|
||||||
if (list != null && list.size() > 0) {
|
if (list != null && list.size() > 0) {
|
||||||
appEvents.setIds(list.stream().map(x->x.getEventsId()).distinct().collect(Collectors.toList()));
|
appEvents.setIds(list.stream().map(x->x.getEventsId()).distinct().collect(Collectors.toList()));
|
||||||
|
} else {
|
||||||
|
return new ArrayList<>();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return appEventsMapper.selectAppEventsList(appEvents);
|
return appEventsMapper.selectAppEventsList(appEvents);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue