|
|
@@ -1,5 +1,6 @@
|
|
|
package org.jeecg.modules.business.controller;
|
|
|
|
|
|
+import java.math.BigDecimal;
|
|
|
import java.util.Arrays;
|
|
|
import java.util.List;
|
|
|
import java.util.Map;
|
|
|
@@ -9,9 +10,13 @@ import java.io.UnsupportedEncodingException;
|
|
|
import java.net.URLDecoder;
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
+import javax.validation.constraints.DecimalMin;
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
|
|
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
|
|
+import com.fasterxml.jackson.annotation.JsonFormat;
|
|
|
+import org.apache.commons.lang3.ObjectUtils;
|
|
|
+import org.apache.poi.hpsf.Decimal;
|
|
|
import org.jeecg.common.api.vo.Result;
|
|
|
import org.jeecg.common.system.query.QueryGenerator;
|
|
|
import org.jeecg.common.util.oConvertUtils;
|
|
|
@@ -21,6 +26,7 @@ import org.jeecg.modules.business.dto.ProvideCouponsUsedDto;
|
|
|
import org.jeecg.modules.business.entity.BusMarketCoupons;
|
|
|
import org.jeecg.modules.business.entity.BusMarketCouponsCashUsed;
|
|
|
import org.jeecg.modules.business.entity.BusMarketCouponsUsed;
|
|
|
+import org.jeecg.modules.business.entity.BusMarketMealCouponsUsed;
|
|
|
import org.jeecg.modules.business.enums.CouponsStatusEnum;
|
|
|
import org.jeecg.modules.business.service.IBusMarketCouponsCashUsedService;
|
|
|
|
|
|
@@ -31,6 +37,7 @@ import lombok.extern.slf4j.Slf4j;
|
|
|
|
|
|
import org.jeecg.modules.business.service.IBusMarketCouponsService;
|
|
|
import org.jeecg.modules.business.service.IBusMarketCouponsUsedService;
|
|
|
+import org.jeecg.modules.system.entity.SysUser;
|
|
|
import org.jeecgframework.poi.excel.ExcelImportUtil;
|
|
|
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
|
|
|
import org.jeecgframework.poi.excel.entity.ExportParams;
|
|
|
@@ -94,6 +101,29 @@ public class BusMarketCouponsCashUsedController extends JeecgController<BusMarke
|
|
|
});
|
|
|
return Result.OK(pageList);
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 获取可用优惠券
|
|
|
+ * @param pageNo
|
|
|
+ * @param pageSize
|
|
|
+ * @param hotelId
|
|
|
+ * @param conditions 满多少金额
|
|
|
+ * @param mobile 手机号
|
|
|
+ * @param req
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @ApiOperation(value="获取可用优惠券", notes="获取可用优惠券")
|
|
|
+ @GetMapping(value = "/memeberCouponList")
|
|
|
+ public Result<IPage<BusMarketMealCouponsUsed>> memeberCouponList(@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
|
|
+ @RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
|
|
+ @RequestParam(name="hotelId", required = true) String hotelId,
|
|
|
+ @RequestParam(name="conditions", required = true) @JsonFormat() BigDecimal conditions,
|
|
|
+ @RequestParam(name="mobile", required = true) String mobile,
|
|
|
+ HttpServletRequest req) {
|
|
|
+ Page<BusMarketMealCouponsUsed> page = new Page<BusMarketMealCouponsUsed>(pageNo, pageSize);
|
|
|
+ IPage<BusMarketMealCouponsUsed> pageList = busMarketCouponsCashUsedService.memeberCouponList(page, hotelId, conditions, mobile);
|
|
|
+ return Result.OK(pageList);
|
|
|
+ }
|
|
|
|
|
|
/**
|
|
|
* 添加
|