|
@@ -36,21 +36,29 @@ public class LifeCouponController {
|
|
|
return R.fail("失败");
|
|
return R.fail("失败");
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 修改库存数量
|
|
|
|
|
+ *
|
|
|
|
|
+ * @param id 主键
|
|
|
|
|
+ * @param singleQty 库存数量
|
|
|
|
|
+ * @return boolean
|
|
|
|
|
+ */
|
|
|
|
|
+ @ApiOperation("修改库存数量")
|
|
|
|
|
+ @GetMapping("/updateCouponSingleQty")
|
|
|
|
|
+ public R<Boolean> updateCouponSingleQty(@RequestParam("id") Integer id, @RequestParam("singleQty") Integer singleQty) {
|
|
|
|
|
+ log.info("LifeCouponController.updateCouponSingleQty?id={}&singleQty={}", id, singleQty);
|
|
|
|
|
+ if (lifeCouponService.updateCouponSingleQty(id, singleQty)) {
|
|
|
|
|
+ return R.success("成功");
|
|
|
|
|
+ }
|
|
|
|
|
+ return R.fail("失败");
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
@ApiOperation("代金劵列表")
|
|
@ApiOperation("代金劵列表")
|
|
|
- @ApiImplicitParams({@ApiImplicitParam(name = "page", value = "页数", dataType = "Integer", paramType = "query", required = true),
|
|
|
|
|
- @ApiImplicitParam(name = "size", value = "页容", dataType = "Integer", paramType = "query", required = true),
|
|
|
|
|
- @ApiImplicitParam(name = "storeId", value = "门店id", dataType = "Integer", paramType = "query", required = true),
|
|
|
|
|
- @ApiImplicitParam(name = "status", value = "状态", dataType = "Integer", paramType = "query", required = true),
|
|
|
|
|
- @ApiImplicitParam(name = "name", value = "名称", dataType = "Integer", paramType = "query", required = false)
|
|
|
|
|
- })
|
|
|
|
|
|
|
+ @ApiImplicitParams({@ApiImplicitParam(name = "page", value = "页数", dataType = "Integer", paramType = "query", required = true), @ApiImplicitParam(name = "size", value = "页容", dataType = "Integer", paramType = "query", required = true), @ApiImplicitParam(name = "storeId", value = "门店id", dataType = "Integer", paramType = "query", required = true), @ApiImplicitParam(name = "status", value = "状态", dataType = "Integer", paramType = "query", required = true), @ApiImplicitParam(name = "name", value = "名称", dataType = "Integer", paramType = "query"), @ApiImplicitParam(name = "dataType", value = "数据类型: 0:正式数据, 1:草稿数据", dataType = "Integer", paramType = "query", defaultValue = "0")})
|
|
|
@GetMapping("/getCouponList")
|
|
@GetMapping("/getCouponList")
|
|
|
- private R<IPage<LifeCoupon>> getCouponList(@RequestParam(value = "page", defaultValue = "1") int page,
|
|
|
|
|
- @RequestParam(value = "size", defaultValue = "10") int size,
|
|
|
|
|
- @RequestParam("storeId") String storeId,
|
|
|
|
|
- @RequestParam("status") String status,
|
|
|
|
|
- @RequestParam(value = "name",required = false) String name) {
|
|
|
|
|
- log.info("LifeCouponController.getCouponList?page={},size={},storeId={},status={},name={}", page, size, storeId, status, name);
|
|
|
|
|
- return R.data(lifeCouponService.getCouponList(page, size, storeId, status, name));
|
|
|
|
|
|
|
+ private R<IPage<LifeCoupon>> getCouponList(@RequestParam(value = "page", defaultValue = "1") int page, @RequestParam(value = "size", defaultValue = "10") int size, @RequestParam("storeId") String storeId, @RequestParam("status") String status, @RequestParam(value = "name", required = false) String name, @RequestParam(value = "dataType", defaultValue = "0") Integer dataType) {
|
|
|
|
|
+ log.info("LifeCouponController.getCouponList?page={},size={},storeId={},status={},name={},dataType={}", page, size, storeId, status, name, dataType);
|
|
|
|
|
+ return R.data(lifeCouponService.getCouponList(page, size, storeId, status, name, dataType));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@ApiOperation("暂停恢复优惠券")
|
|
@ApiOperation("暂停恢复优惠券")
|
|
@@ -71,8 +79,7 @@ public class LifeCouponController {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@ApiOperation("核销订单")
|
|
@ApiOperation("核销订单")
|
|
|
- @ApiImplicitParams({@ApiImplicitParam(name = "storeId", value = "门店id", dataType = "Integer", paramType = "query", required = true),
|
|
|
|
|
- @ApiImplicitParam(name = "quanCode", value = "券码", dataType = "Integer", paramType = "query", required = true)})
|
|
|
|
|
|
|
+ @ApiImplicitParams({@ApiImplicitParam(name = "storeId", value = "门店id", dataType = "Integer", paramType = "query", required = true), @ApiImplicitParam(name = "quanCode", value = "券码", dataType = "Integer", paramType = "query", required = true)})
|
|
|
@GetMapping("/verify")
|
|
@GetMapping("/verify")
|
|
|
public R<Map<String, String>> verify(@RequestParam("storeId") String storeId, @RequestParam("quanCode") String quanCode) {
|
|
public R<Map<String, String>> verify(@RequestParam("storeId") String storeId, @RequestParam("quanCode") String quanCode) {
|
|
|
log.info("LifeCouponController.verify?storeId={},quanCode={}", storeId, quanCode);
|
|
log.info("LifeCouponController.verify?storeId={},quanCode={}", storeId, quanCode);
|
|
@@ -82,9 +89,7 @@ public class LifeCouponController {
|
|
|
@ApiOperation("获取优惠券状态")
|
|
@ApiOperation("获取优惠券状态")
|
|
|
@ApiOperationSupport(order = 1)
|
|
@ApiOperationSupport(order = 1)
|
|
|
@GetMapping("/getCouponStatus")
|
|
@GetMapping("/getCouponStatus")
|
|
|
- @ApiImplicitParams({
|
|
|
|
|
- @ApiImplicitParam(name = "couponId", value = "优惠券id", dataType = "String", paramType = "query", required = true),
|
|
|
|
|
- })
|
|
|
|
|
|
|
+ @ApiImplicitParams({@ApiImplicitParam(name = "couponId", value = "优惠券id", dataType = "String", paramType = "query", required = true),})
|
|
|
public R<LifeCouponStatusVo> getCouponStatus(@RequestParam(value = "couponId") String couponId) {
|
|
public R<LifeCouponStatusVo> getCouponStatus(@RequestParam(value = "couponId") String couponId) {
|
|
|
log.info("LifeDiscountCouponController.getCouponStatus?couponId={}", couponId);
|
|
log.info("LifeDiscountCouponController.getCouponStatus?couponId={}", couponId);
|
|
|
try {
|
|
try {
|
|
@@ -97,20 +102,11 @@ public class LifeCouponController {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@ApiOperation("节假日列表")
|
|
@ApiOperation("节假日列表")
|
|
|
- @ApiImplicitParams({@ApiImplicitParam(name = "page", value = "页数", dataType = "Integer", paramType = "query", required = true),
|
|
|
|
|
- @ApiImplicitParam(name = "size", value = "页容", dataType = "Integer", paramType = "query", required = true),
|
|
|
|
|
- @ApiImplicitParam(name = "year", value = "年份", dataType = "String", paramType = "query", required = false),
|
|
|
|
|
- @ApiImplicitParam(name = "openFlag", value = "是否启用(0:未启用,1:已启用)", dataType = "String", paramType = "query", required = false),
|
|
|
|
|
- @ApiImplicitParam(name = "holidayName", value = "节假日名称", dataType = "String", paramType = "query", required = false)
|
|
|
|
|
- })
|
|
|
|
|
|
|
+ @ApiImplicitParams({@ApiImplicitParam(name = "page", value = "页数", dataType = "Integer", paramType = "query", required = true), @ApiImplicitParam(name = "size", value = "页容", dataType = "Integer", paramType = "query", required = true), @ApiImplicitParam(name = "year", value = "年份", dataType = "String", paramType = "query", required = false), @ApiImplicitParam(name = "openFlag", value = "是否启用(0:未启用,1:已启用)", dataType = "String", paramType = "query", required = false), @ApiImplicitParam(name = "holidayName", value = "节假日名称", dataType = "String", paramType = "query", required = false)})
|
|
|
@GetMapping("/getHolidayList")
|
|
@GetMapping("/getHolidayList")
|
|
|
- private R<IPage<EssentialHolidayComparison>> getHolidayList(@RequestParam(value = "page", defaultValue = "1") int page,
|
|
|
|
|
- @RequestParam(value = "size", defaultValue = "10") int size,
|
|
|
|
|
- @RequestParam("year") String year,
|
|
|
|
|
- @RequestParam("openFlag") String openFlag,
|
|
|
|
|
- @RequestParam("holidayName") String holidayName) {
|
|
|
|
|
- log.info("LifeCouponController.getHolidayList?page={},size={},year={},openFlag={},holidayName={}", page, size, year,openFlag, holidayName);
|
|
|
|
|
- return R.data(lifeCouponService.getHolidayList(page, size, year,openFlag, holidayName));
|
|
|
|
|
|
|
+ private R<IPage<EssentialHolidayComparison>> getHolidayList(@RequestParam(value = "page", defaultValue = "1") int page, @RequestParam(value = "size", defaultValue = "10") int size, @RequestParam("year") String year, @RequestParam("openFlag") String openFlag, @RequestParam("holidayName") String holidayName) {
|
|
|
|
|
+ log.info("LifeCouponController.getHolidayList?page={},size={},year={},openFlag={},holidayName={}", page, size, year, openFlag, holidayName);
|
|
|
|
|
+ return R.data(lifeCouponService.getHolidayList(page, size, year, openFlag, holidayName));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@ApiOperation("保存节假日")
|
|
@ApiOperation("保存节假日")
|