|
|
@@ -8,13 +8,16 @@ import beilv.carinformation.domain.CarInformation;
|
|
|
import beilv.carinformation.service.ICarInformationService;
|
|
|
import beilv.common.core.controller.BaseController;
|
|
|
import beilv.common.core.domain.AjaxResult;
|
|
|
+import beilv.common.core.page.PageDomain;
|
|
|
import beilv.common.core.page.TableDataInfo;
|
|
|
+import beilv.common.core.page.TableSupport;
|
|
|
import beilv.common.utils.DateUtils;
|
|
|
import beilv.common.utils.StringUtils;
|
|
|
import beilv.common.utils.uuid.IdUtils;
|
|
|
import beilv.competition.domain.Competition;
|
|
|
import beilv.competition.domain.RedisTask;
|
|
|
import beilv.competition.service.ICompetitionService;
|
|
|
+import beilv.system.domain.SysNotice;
|
|
|
import beilv.system.service.ISysConfigService;
|
|
|
import beilv.usermembershipcard.domain.UserMembershipCard;
|
|
|
import beilv.usermembershipcard.service.IUserMembershipCardService;
|
|
|
@@ -28,15 +31,14 @@ import beilv.voucher.domain.BeilvVoucherMember;
|
|
|
import beilv.voucher.service.IBeilvVoucherMemberService;
|
|
|
import beilv.wx.pay.controller.WxPayController;
|
|
|
import beilv.wx.pay.domain.vo.AppRefundParam;
|
|
|
+import com.github.pagehelper.PageHelper;
|
|
|
+import com.github.pagehelper.PageInfo;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.apache.commons.collections4.MapUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.data.redis.core.StringRedisTemplate;
|
|
|
import org.springframework.stereotype.Controller;
|
|
|
-import org.springframework.web.bind.annotation.PostMapping;
|
|
|
-import org.springframework.web.bind.annotation.RequestBody;
|
|
|
-import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
-import org.springframework.web.bind.annotation.ResponseBody;
|
|
|
+import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
import java.time.LocalDateTime;
|
|
|
import java.time.ZoneId;
|
|
|
@@ -47,7 +49,7 @@ import java.util.Map;
|
|
|
|
|
|
import static beilv.competition.domain.Constant.ORDER_QUEUE;
|
|
|
|
|
|
-@Controller
|
|
|
+@RestController
|
|
|
@Slf4j
|
|
|
@RequestMapping("/app-api/cardApp")
|
|
|
public class CardAppController extends BaseController {
|
|
|
@@ -192,10 +194,11 @@ public class CardAppController extends BaseController {
|
|
|
/**
|
|
|
* 查询我的订单
|
|
|
*/
|
|
|
- @PostMapping("/selectOrderList")
|
|
|
- @ResponseBody
|
|
|
- public AjaxResult selectOrderList(@RequestBody VipCardLog vipCardLog) {
|
|
|
- return AjaxResult.success(vipCardLogService.selectVipCardLogList(vipCardLog));
|
|
|
+ @GetMapping("/selectOrderList")
|
|
|
+ public AjaxResult selectOrderList(VipCardLog vipCardLog) {
|
|
|
+ startPage();
|
|
|
+ List<VipCardLog> list = vipCardLogService.selectVipCardLogList(vipCardLog);
|
|
|
+ return AjaxResult.success(getDataTable(list).getRows());
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
@@ -225,10 +228,11 @@ public class CardAppController extends BaseController {
|
|
|
/**
|
|
|
* 查询卡种信息列表
|
|
|
*/
|
|
|
- @PostMapping("/cardInformationlist")
|
|
|
- @ResponseBody
|
|
|
- public AjaxResult cardInformationlist(@RequestBody CarInformation carInformation) {
|
|
|
- return AjaxResult.success(carInformationService.selectCarInformationList(carInformation));
|
|
|
+ @GetMapping("/cardInformationlist")
|
|
|
+ public AjaxResult cardInformationlist(CarInformation carInformation) {
|
|
|
+ startPage();
|
|
|
+ List<CarInformation> list = carInformationService.selectCarInformationList(carInformation);
|
|
|
+ return AjaxResult.success(getDataTable(list).getRows());
|
|
|
}
|
|
|
|
|
|
@PostMapping("/getVipCardInfo")
|
|
|
@@ -240,32 +244,32 @@ public class CardAppController extends BaseController {
|
|
|
/**
|
|
|
* 查询用户会员卡列表
|
|
|
*/
|
|
|
- @PostMapping("/getUserCardList")
|
|
|
- @ResponseBody
|
|
|
- public AjaxResult getUserCardList(@RequestBody UserMembershipCard userMembershipCard) {
|
|
|
- return AjaxResult.success(userMembershipCardService.selectUserMembershipCardList(userMembershipCard));
|
|
|
+ @GetMapping("/getUserCardList")
|
|
|
+ public AjaxResult getUserCardList(UserMembershipCard userMembershipCard) {
|
|
|
+ startPage();
|
|
|
+ List<UserMembershipCard> list = userMembershipCardService.selectUserMembershipCardList(userMembershipCard);
|
|
|
+ return AjaxResult.success(getDataTable(list).getRows());
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 查询约场记录
|
|
|
*/
|
|
|
- @PostMapping("/selectYueQiuList")
|
|
|
- @ResponseBody
|
|
|
- public AjaxResult selectYueChangList(@RequestBody VipCardLog vipCardLog) {
|
|
|
+ @GetMapping("/selectYueQiuList")
|
|
|
+ public AjaxResult selectYueChangList(VipCardLog vipCardLog) {
|
|
|
startPage();
|
|
|
- TableDataInfo dataTable = getDataTable(vipCardLogService.selectYueQiuList(vipCardLog));
|
|
|
- return AjaxResult.success(dataTable.getRows());
|
|
|
+ List<Map<String, Object>> list = vipCardLogService.selectYueQiuList(vipCardLog);
|
|
|
+ return AjaxResult.success(getDataTable(list).getRows());
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 查询参赛记录 orderType = cansai
|
|
|
* 查询购买门票记录 orderType = menpiao
|
|
|
*/
|
|
|
- @PostMapping("/selectCompetitionList")
|
|
|
- @ResponseBody
|
|
|
- public AjaxResult selectCanSaiList(@RequestBody VipCardLog vipCardLog) {
|
|
|
+ @GetMapping("/selectCompetitionList")
|
|
|
+ public AjaxResult selectCanSaiList(VipCardLog vipCardLog) {
|
|
|
startPage();
|
|
|
- return AjaxResult.success(getDataTable(vipCardLogService.selectCanSaiList(vipCardLog)));
|
|
|
+ List<Map<String, Object>> list = vipCardLogService.selectCanSaiList(vipCardLog);
|
|
|
+ return AjaxResult.success(getDataTable(list).getRows());
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
@@ -416,16 +420,16 @@ public class CardAppController extends BaseController {
|
|
|
* userId
|
|
|
* amount_type
|
|
|
*/
|
|
|
- @PostMapping("/selectPointsTransactionHistory")
|
|
|
- @ResponseBody
|
|
|
- public AjaxResult selectPointsTransactionHistory(@RequestBody VipCardAmountLog amountLog){
|
|
|
+ @GetMapping("/selectPointsTransactionHistory")
|
|
|
+ public AjaxResult selectPointsTransactionHistory(VipCardAmountLog amountLog){
|
|
|
+ startPage();
|
|
|
HashMap<String, Object> result = new HashMap<>();
|
|
|
List<Map<String, Object>> maps = amountLogService.selectVipCardAmountLogListAndOrderInfo(amountLog);
|
|
|
maps.forEach(map->{
|
|
|
map.put("createTime", MapUtils.getString(map,"createTime").replace("T", " "));
|
|
|
});
|
|
|
|
|
|
- result.put("historyList",amountLogService.selectVipCardAmountLogListAndOrderInfo(amountLog));
|
|
|
+ result.put("historyList",maps);
|
|
|
if("1".equals(amountLog.getAmountType())){
|
|
|
result.put("balance", vipCardService.selectVipCardByUserId(amountLog.getUserId()).getBalance());
|
|
|
}else if("2".equals(amountLog.getAmountType())){
|