parent
3feb95f41d
commit
50c240e6d4
|
|
@ -19,7 +19,7 @@ import java.lang.annotation.*;
|
|||
// 表示通过aop框架暴露该代理对象,AopContext能够访问(AOP开启)
|
||||
@EnableAspectJAutoProxy(exposeProxy = true)
|
||||
// 指定要扫描的Mapper类的包的路径
|
||||
@MapperScan({"com.ruoyi.**.mapper","com.xjs.**.mapper"})
|
||||
@MapperScan({"com.ruoyi.**.mapper","com.xjs.**.mapper","com.xjs.**.dao"})
|
||||
// 开启线程异步执行
|
||||
@EnableAsync
|
||||
// 自动加载类
|
||||
|
|
|
|||
|
|
@ -0,0 +1,69 @@
|
|||
/**
|
||||
* Copyright (c) 2016-2019 人人开源 All rights reserved.
|
||||
*
|
||||
* https://www.renren.io
|
||||
*
|
||||
* 版权所有,侵权必究!
|
||||
*/
|
||||
|
||||
package com.xjs.utils;
|
||||
|
||||
import org.apache.http.HttpStatus;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 返回数据
|
||||
*
|
||||
* @author Mark sunlightcs@gmail.com
|
||||
*/
|
||||
public class R extends HashMap<String, Object> {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public R() {
|
||||
put("code", 0);
|
||||
put("msg", "success");
|
||||
}
|
||||
|
||||
public static R error() {
|
||||
return error(HttpStatus.SC_INTERNAL_SERVER_ERROR, "未知异常,请联系管理员");
|
||||
}
|
||||
|
||||
public static R error(String msg) {
|
||||
return error(HttpStatus.SC_INTERNAL_SERVER_ERROR, msg);
|
||||
}
|
||||
|
||||
public static R error(int code, String msg) {
|
||||
R r = new R();
|
||||
r.put("code", code);
|
||||
r.put("msg", msg);
|
||||
return r;
|
||||
}
|
||||
|
||||
public static R ok(String msg) {
|
||||
R r = new R();
|
||||
r.put("msg", msg);
|
||||
return r;
|
||||
}
|
||||
|
||||
public static R ok(Map<String, Object> map) {
|
||||
R r = new R();
|
||||
r.putAll(map);
|
||||
return r;
|
||||
}
|
||||
|
||||
public static R ok() {
|
||||
return new R();
|
||||
}
|
||||
|
||||
public R put(String key, Object value) {
|
||||
super.put(key, value);
|
||||
return this;
|
||||
}
|
||||
public Integer getCode() {
|
||||
|
||||
return (Integer) this.get("code");
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
package com.xjs.mall.coupon;
|
||||
|
||||
import com.ruoyi.common.security.annotation.EnableCustomConfig;
|
||||
import com.ruoyi.common.security.annotation.EnableRyFeignClients;
|
||||
import com.ruoyi.common.swagger.annotation.EnableCustomSwagger2;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
|
||||
/**
|
||||
* 商城Coupon启动器
|
||||
* @author xiejs
|
||||
* @since 2022-03-15
|
||||
*/
|
||||
@SpringBootApplication
|
||||
@EnableCustomConfig
|
||||
@EnableCustomSwagger2
|
||||
@EnableRyFeignClients
|
||||
public class MallCouponApp {
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(MallCouponApp.class, args);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,84 @@
|
|||
package com.xjs.mall.coupon.controller;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Map;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import com.xjs.mall.coupon.entity.CouponEntity;
|
||||
import com.xjs.mall.coupon.service.CouponService;
|
||||
import com.xjs.utils.PageUtils;
|
||||
import com.xjs.utils.R;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 优惠券信息
|
||||
*
|
||||
* @author xiejs
|
||||
* @email 1294405880@qq.com
|
||||
* @date 2022-03-15 10:25:21
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("coupon/coupon")
|
||||
public class CouponController {
|
||||
@Autowired
|
||||
private CouponService couponService;
|
||||
|
||||
/**
|
||||
* 列表
|
||||
*/
|
||||
@RequestMapping("/list")
|
||||
public R list(@RequestParam Map<String, Object> params){
|
||||
PageUtils page = couponService.queryPage(params);
|
||||
|
||||
return R.ok().put("page", page);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 信息
|
||||
*/
|
||||
@RequestMapping("/info/{id}")
|
||||
public R info(@PathVariable("id") Long id){
|
||||
CouponEntity coupon = couponService.getById(id);
|
||||
|
||||
return R.ok().put("coupon", coupon);
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*/
|
||||
@RequestMapping("/save")
|
||||
public R save(@RequestBody CouponEntity coupon){
|
||||
couponService.save(coupon);
|
||||
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*/
|
||||
@RequestMapping("/update")
|
||||
public R update(@RequestBody CouponEntity coupon){
|
||||
couponService.updateById(coupon);
|
||||
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
@RequestMapping("/delete")
|
||||
public R delete(@RequestBody Long[] ids){
|
||||
couponService.removeByIds(Arrays.asList(ids));
|
||||
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,84 @@
|
|||
package com.xjs.mall.coupon.controller;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Map;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import com.xjs.mall.coupon.entity.CouponHistoryEntity;
|
||||
import com.xjs.mall.coupon.service.CouponHistoryService;
|
||||
import com.xjs.utils.PageUtils;
|
||||
import com.xjs.utils.R;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 优惠券领取历史记录
|
||||
*
|
||||
* @author xiejs
|
||||
* @email 1294405880@qq.com
|
||||
* @date 2022-03-15 10:25:21
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("coupon/couponhistory")
|
||||
public class CouponHistoryController {
|
||||
@Autowired
|
||||
private CouponHistoryService couponHistoryService;
|
||||
|
||||
/**
|
||||
* 列表
|
||||
*/
|
||||
@RequestMapping("/list")
|
||||
public R list(@RequestParam Map<String, Object> params){
|
||||
PageUtils page = couponHistoryService.queryPage(params);
|
||||
|
||||
return R.ok().put("page", page);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 信息
|
||||
*/
|
||||
@RequestMapping("/info/{id}")
|
||||
public R info(@PathVariable("id") Long id){
|
||||
CouponHistoryEntity couponHistory = couponHistoryService.getById(id);
|
||||
|
||||
return R.ok().put("couponHistory", couponHistory);
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*/
|
||||
@RequestMapping("/save")
|
||||
public R save(@RequestBody CouponHistoryEntity couponHistory){
|
||||
couponHistoryService.save(couponHistory);
|
||||
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*/
|
||||
@RequestMapping("/update")
|
||||
public R update(@RequestBody CouponHistoryEntity couponHistory){
|
||||
couponHistoryService.updateById(couponHistory);
|
||||
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
@RequestMapping("/delete")
|
||||
public R delete(@RequestBody Long[] ids){
|
||||
couponHistoryService.removeByIds(Arrays.asList(ids));
|
||||
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,84 @@
|
|||
package com.xjs.mall.coupon.controller;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Map;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import com.xjs.mall.coupon.entity.CouponSpuCategoryRelationEntity;
|
||||
import com.xjs.mall.coupon.service.CouponSpuCategoryRelationService;
|
||||
import com.xjs.utils.PageUtils;
|
||||
import com.xjs.utils.R;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 优惠券分类关联
|
||||
*
|
||||
* @author xiejs
|
||||
* @email 1294405880@qq.com
|
||||
* @date 2022-03-15 10:25:21
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("coupon/couponspucategoryrelation")
|
||||
public class CouponSpuCategoryRelationController {
|
||||
@Autowired
|
||||
private CouponSpuCategoryRelationService couponSpuCategoryRelationService;
|
||||
|
||||
/**
|
||||
* 列表
|
||||
*/
|
||||
@RequestMapping("/list")
|
||||
public R list(@RequestParam Map<String, Object> params){
|
||||
PageUtils page = couponSpuCategoryRelationService.queryPage(params);
|
||||
|
||||
return R.ok().put("page", page);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 信息
|
||||
*/
|
||||
@RequestMapping("/info/{id}")
|
||||
public R info(@PathVariable("id") Long id){
|
||||
CouponSpuCategoryRelationEntity couponSpuCategoryRelation = couponSpuCategoryRelationService.getById(id);
|
||||
|
||||
return R.ok().put("couponSpuCategoryRelation", couponSpuCategoryRelation);
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*/
|
||||
@RequestMapping("/save")
|
||||
public R save(@RequestBody CouponSpuCategoryRelationEntity couponSpuCategoryRelation){
|
||||
couponSpuCategoryRelationService.save(couponSpuCategoryRelation);
|
||||
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*/
|
||||
@RequestMapping("/update")
|
||||
public R update(@RequestBody CouponSpuCategoryRelationEntity couponSpuCategoryRelation){
|
||||
couponSpuCategoryRelationService.updateById(couponSpuCategoryRelation);
|
||||
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
@RequestMapping("/delete")
|
||||
public R delete(@RequestBody Long[] ids){
|
||||
couponSpuCategoryRelationService.removeByIds(Arrays.asList(ids));
|
||||
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,84 @@
|
|||
package com.xjs.mall.coupon.controller;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Map;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import com.xjs.mall.coupon.entity.CouponSpuRelationEntity;
|
||||
import com.xjs.mall.coupon.service.CouponSpuRelationService;
|
||||
import com.xjs.utils.PageUtils;
|
||||
import com.xjs.utils.R;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 优惠券与产品关联
|
||||
*
|
||||
* @author xiejs
|
||||
* @email 1294405880@qq.com
|
||||
* @date 2022-03-15 10:25:21
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("coupon/couponspurelation")
|
||||
public class CouponSpuRelationController {
|
||||
@Autowired
|
||||
private CouponSpuRelationService couponSpuRelationService;
|
||||
|
||||
/**
|
||||
* 列表
|
||||
*/
|
||||
@RequestMapping("/list")
|
||||
public R list(@RequestParam Map<String, Object> params){
|
||||
PageUtils page = couponSpuRelationService.queryPage(params);
|
||||
|
||||
return R.ok().put("page", page);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 信息
|
||||
*/
|
||||
@RequestMapping("/info/{id}")
|
||||
public R info(@PathVariable("id") Long id){
|
||||
CouponSpuRelationEntity couponSpuRelation = couponSpuRelationService.getById(id);
|
||||
|
||||
return R.ok().put("couponSpuRelation", couponSpuRelation);
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*/
|
||||
@RequestMapping("/save")
|
||||
public R save(@RequestBody CouponSpuRelationEntity couponSpuRelation){
|
||||
couponSpuRelationService.save(couponSpuRelation);
|
||||
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*/
|
||||
@RequestMapping("/update")
|
||||
public R update(@RequestBody CouponSpuRelationEntity couponSpuRelation){
|
||||
couponSpuRelationService.updateById(couponSpuRelation);
|
||||
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
@RequestMapping("/delete")
|
||||
public R delete(@RequestBody Long[] ids){
|
||||
couponSpuRelationService.removeByIds(Arrays.asList(ids));
|
||||
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,84 @@
|
|||
package com.xjs.mall.coupon.controller;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Map;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import com.xjs.mall.coupon.entity.HomeAdvEntity;
|
||||
import com.xjs.mall.coupon.service.HomeAdvService;
|
||||
import com.xjs.utils.PageUtils;
|
||||
import com.xjs.utils.R;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 首页轮播广告
|
||||
*
|
||||
* @author xiejs
|
||||
* @email 1294405880@qq.com
|
||||
* @date 2022-03-15 10:25:21
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("coupon/homeadv")
|
||||
public class HomeAdvController {
|
||||
@Autowired
|
||||
private HomeAdvService homeAdvService;
|
||||
|
||||
/**
|
||||
* 列表
|
||||
*/
|
||||
@RequestMapping("/list")
|
||||
public R list(@RequestParam Map<String, Object> params){
|
||||
PageUtils page = homeAdvService.queryPage(params);
|
||||
|
||||
return R.ok().put("page", page);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 信息
|
||||
*/
|
||||
@RequestMapping("/info/{id}")
|
||||
public R info(@PathVariable("id") Long id){
|
||||
HomeAdvEntity homeAdv = homeAdvService.getById(id);
|
||||
|
||||
return R.ok().put("homeAdv", homeAdv);
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*/
|
||||
@RequestMapping("/save")
|
||||
public R save(@RequestBody HomeAdvEntity homeAdv){
|
||||
homeAdvService.save(homeAdv);
|
||||
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*/
|
||||
@RequestMapping("/update")
|
||||
public R update(@RequestBody HomeAdvEntity homeAdv){
|
||||
homeAdvService.updateById(homeAdv);
|
||||
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
@RequestMapping("/delete")
|
||||
public R delete(@RequestBody Long[] ids){
|
||||
homeAdvService.removeByIds(Arrays.asList(ids));
|
||||
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,84 @@
|
|||
package com.xjs.mall.coupon.controller;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Map;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import com.xjs.mall.coupon.entity.HomeSubjectEntity;
|
||||
import com.xjs.mall.coupon.service.HomeSubjectService;
|
||||
import com.xjs.utils.PageUtils;
|
||||
import com.xjs.utils.R;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 首页专题表【jd首页下面很多专题,每个专题链接新的页面,展示专题商品信息】
|
||||
*
|
||||
* @author xiejs
|
||||
* @email 1294405880@qq.com
|
||||
* @date 2022-03-15 10:25:21
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("coupon/homesubject")
|
||||
public class HomeSubjectController {
|
||||
@Autowired
|
||||
private HomeSubjectService homeSubjectService;
|
||||
|
||||
/**
|
||||
* 列表
|
||||
*/
|
||||
@RequestMapping("/list")
|
||||
public R list(@RequestParam Map<String, Object> params){
|
||||
PageUtils page = homeSubjectService.queryPage(params);
|
||||
|
||||
return R.ok().put("page", page);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 信息
|
||||
*/
|
||||
@RequestMapping("/info/{id}")
|
||||
public R info(@PathVariable("id") Long id){
|
||||
HomeSubjectEntity homeSubject = homeSubjectService.getById(id);
|
||||
|
||||
return R.ok().put("homeSubject", homeSubject);
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*/
|
||||
@RequestMapping("/save")
|
||||
public R save(@RequestBody HomeSubjectEntity homeSubject){
|
||||
homeSubjectService.save(homeSubject);
|
||||
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*/
|
||||
@RequestMapping("/update")
|
||||
public R update(@RequestBody HomeSubjectEntity homeSubject){
|
||||
homeSubjectService.updateById(homeSubject);
|
||||
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
@RequestMapping("/delete")
|
||||
public R delete(@RequestBody Long[] ids){
|
||||
homeSubjectService.removeByIds(Arrays.asList(ids));
|
||||
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,84 @@
|
|||
package com.xjs.mall.coupon.controller;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Map;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import com.xjs.mall.coupon.entity.HomeSubjectSpuEntity;
|
||||
import com.xjs.mall.coupon.service.HomeSubjectSpuService;
|
||||
import com.xjs.utils.PageUtils;
|
||||
import com.xjs.utils.R;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 专题商品
|
||||
*
|
||||
* @author xiejs
|
||||
* @email 1294405880@qq.com
|
||||
* @date 2022-03-15 10:25:21
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("coupon/homesubjectspu")
|
||||
public class HomeSubjectSpuController {
|
||||
@Autowired
|
||||
private HomeSubjectSpuService homeSubjectSpuService;
|
||||
|
||||
/**
|
||||
* 列表
|
||||
*/
|
||||
@RequestMapping("/list")
|
||||
public R list(@RequestParam Map<String, Object> params){
|
||||
PageUtils page = homeSubjectSpuService.queryPage(params);
|
||||
|
||||
return R.ok().put("page", page);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 信息
|
||||
*/
|
||||
@RequestMapping("/info/{id}")
|
||||
public R info(@PathVariable("id") Long id){
|
||||
HomeSubjectSpuEntity homeSubjectSpu = homeSubjectSpuService.getById(id);
|
||||
|
||||
return R.ok().put("homeSubjectSpu", homeSubjectSpu);
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*/
|
||||
@RequestMapping("/save")
|
||||
public R save(@RequestBody HomeSubjectSpuEntity homeSubjectSpu){
|
||||
homeSubjectSpuService.save(homeSubjectSpu);
|
||||
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*/
|
||||
@RequestMapping("/update")
|
||||
public R update(@RequestBody HomeSubjectSpuEntity homeSubjectSpu){
|
||||
homeSubjectSpuService.updateById(homeSubjectSpu);
|
||||
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
@RequestMapping("/delete")
|
||||
public R delete(@RequestBody Long[] ids){
|
||||
homeSubjectSpuService.removeByIds(Arrays.asList(ids));
|
||||
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,84 @@
|
|||
package com.xjs.mall.coupon.controller;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Map;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import com.xjs.mall.coupon.entity.MemberPriceEntity;
|
||||
import com.xjs.mall.coupon.service.MemberPriceService;
|
||||
import com.xjs.utils.PageUtils;
|
||||
import com.xjs.utils.R;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 商品会员价格
|
||||
*
|
||||
* @author xiejs
|
||||
* @email 1294405880@qq.com
|
||||
* @date 2022-03-15 10:25:21
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("coupon/memberprice")
|
||||
public class MemberPriceController {
|
||||
@Autowired
|
||||
private MemberPriceService memberPriceService;
|
||||
|
||||
/**
|
||||
* 列表
|
||||
*/
|
||||
@RequestMapping("/list")
|
||||
public R list(@RequestParam Map<String, Object> params){
|
||||
PageUtils page = memberPriceService.queryPage(params);
|
||||
|
||||
return R.ok().put("page", page);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 信息
|
||||
*/
|
||||
@RequestMapping("/info/{id}")
|
||||
public R info(@PathVariable("id") Long id){
|
||||
MemberPriceEntity memberPrice = memberPriceService.getById(id);
|
||||
|
||||
return R.ok().put("memberPrice", memberPrice);
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*/
|
||||
@RequestMapping("/save")
|
||||
public R save(@RequestBody MemberPriceEntity memberPrice){
|
||||
memberPriceService.save(memberPrice);
|
||||
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*/
|
||||
@RequestMapping("/update")
|
||||
public R update(@RequestBody MemberPriceEntity memberPrice){
|
||||
memberPriceService.updateById(memberPrice);
|
||||
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
@RequestMapping("/delete")
|
||||
public R delete(@RequestBody Long[] ids){
|
||||
memberPriceService.removeByIds(Arrays.asList(ids));
|
||||
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,84 @@
|
|||
package com.xjs.mall.coupon.controller;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Map;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import com.xjs.mall.coupon.entity.SeckillPromotionEntity;
|
||||
import com.xjs.mall.coupon.service.SeckillPromotionService;
|
||||
import com.xjs.utils.PageUtils;
|
||||
import com.xjs.utils.R;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 秒杀活动
|
||||
*
|
||||
* @author xiejs
|
||||
* @email 1294405880@qq.com
|
||||
* @date 2022-03-15 10:25:21
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("coupon/seckillpromotion")
|
||||
public class SeckillPromotionController {
|
||||
@Autowired
|
||||
private SeckillPromotionService seckillPromotionService;
|
||||
|
||||
/**
|
||||
* 列表
|
||||
*/
|
||||
@RequestMapping("/list")
|
||||
public R list(@RequestParam Map<String, Object> params){
|
||||
PageUtils page = seckillPromotionService.queryPage(params);
|
||||
|
||||
return R.ok().put("page", page);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 信息
|
||||
*/
|
||||
@RequestMapping("/info/{id}")
|
||||
public R info(@PathVariable("id") Long id){
|
||||
SeckillPromotionEntity seckillPromotion = seckillPromotionService.getById(id);
|
||||
|
||||
return R.ok().put("seckillPromotion", seckillPromotion);
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*/
|
||||
@RequestMapping("/save")
|
||||
public R save(@RequestBody SeckillPromotionEntity seckillPromotion){
|
||||
seckillPromotionService.save(seckillPromotion);
|
||||
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*/
|
||||
@RequestMapping("/update")
|
||||
public R update(@RequestBody SeckillPromotionEntity seckillPromotion){
|
||||
seckillPromotionService.updateById(seckillPromotion);
|
||||
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
@RequestMapping("/delete")
|
||||
public R delete(@RequestBody Long[] ids){
|
||||
seckillPromotionService.removeByIds(Arrays.asList(ids));
|
||||
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,84 @@
|
|||
package com.xjs.mall.coupon.controller;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Map;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import com.xjs.mall.coupon.entity.SeckillSessionEntity;
|
||||
import com.xjs.mall.coupon.service.SeckillSessionService;
|
||||
import com.xjs.utils.PageUtils;
|
||||
import com.xjs.utils.R;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 秒杀活动场次
|
||||
*
|
||||
* @author xiejs
|
||||
* @email 1294405880@qq.com
|
||||
* @date 2022-03-15 10:25:21
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("coupon/seckillsession")
|
||||
public class SeckillSessionController {
|
||||
@Autowired
|
||||
private SeckillSessionService seckillSessionService;
|
||||
|
||||
/**
|
||||
* 列表
|
||||
*/
|
||||
@RequestMapping("/list")
|
||||
public R list(@RequestParam Map<String, Object> params){
|
||||
PageUtils page = seckillSessionService.queryPage(params);
|
||||
|
||||
return R.ok().put("page", page);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 信息
|
||||
*/
|
||||
@RequestMapping("/info/{id}")
|
||||
public R info(@PathVariable("id") Long id){
|
||||
SeckillSessionEntity seckillSession = seckillSessionService.getById(id);
|
||||
|
||||
return R.ok().put("seckillSession", seckillSession);
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*/
|
||||
@RequestMapping("/save")
|
||||
public R save(@RequestBody SeckillSessionEntity seckillSession){
|
||||
seckillSessionService.save(seckillSession);
|
||||
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*/
|
||||
@RequestMapping("/update")
|
||||
public R update(@RequestBody SeckillSessionEntity seckillSession){
|
||||
seckillSessionService.updateById(seckillSession);
|
||||
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
@RequestMapping("/delete")
|
||||
public R delete(@RequestBody Long[] ids){
|
||||
seckillSessionService.removeByIds(Arrays.asList(ids));
|
||||
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,84 @@
|
|||
package com.xjs.mall.coupon.controller;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Map;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import com.xjs.mall.coupon.entity.SeckillSkuNoticeEntity;
|
||||
import com.xjs.mall.coupon.service.SeckillSkuNoticeService;
|
||||
import com.xjs.utils.PageUtils;
|
||||
import com.xjs.utils.R;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 秒杀商品通知订阅
|
||||
*
|
||||
* @author xiejs
|
||||
* @email 1294405880@qq.com
|
||||
* @date 2022-03-15 10:25:21
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("coupon/seckillskunotice")
|
||||
public class SeckillSkuNoticeController {
|
||||
@Autowired
|
||||
private SeckillSkuNoticeService seckillSkuNoticeService;
|
||||
|
||||
/**
|
||||
* 列表
|
||||
*/
|
||||
@RequestMapping("/list")
|
||||
public R list(@RequestParam Map<String, Object> params){
|
||||
PageUtils page = seckillSkuNoticeService.queryPage(params);
|
||||
|
||||
return R.ok().put("page", page);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 信息
|
||||
*/
|
||||
@RequestMapping("/info/{id}")
|
||||
public R info(@PathVariable("id") Long id){
|
||||
SeckillSkuNoticeEntity seckillSkuNotice = seckillSkuNoticeService.getById(id);
|
||||
|
||||
return R.ok().put("seckillSkuNotice", seckillSkuNotice);
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*/
|
||||
@RequestMapping("/save")
|
||||
public R save(@RequestBody SeckillSkuNoticeEntity seckillSkuNotice){
|
||||
seckillSkuNoticeService.save(seckillSkuNotice);
|
||||
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*/
|
||||
@RequestMapping("/update")
|
||||
public R update(@RequestBody SeckillSkuNoticeEntity seckillSkuNotice){
|
||||
seckillSkuNoticeService.updateById(seckillSkuNotice);
|
||||
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
@RequestMapping("/delete")
|
||||
public R delete(@RequestBody Long[] ids){
|
||||
seckillSkuNoticeService.removeByIds(Arrays.asList(ids));
|
||||
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,84 @@
|
|||
package com.xjs.mall.coupon.controller;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Map;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import com.xjs.mall.coupon.entity.SeckillSkuRelationEntity;
|
||||
import com.xjs.mall.coupon.service.SeckillSkuRelationService;
|
||||
import com.xjs.utils.PageUtils;
|
||||
import com.xjs.utils.R;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 秒杀活动商品关联
|
||||
*
|
||||
* @author xiejs
|
||||
* @email 1294405880@qq.com
|
||||
* @date 2022-03-15 10:25:21
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("coupon/seckillskurelation")
|
||||
public class SeckillSkuRelationController {
|
||||
@Autowired
|
||||
private SeckillSkuRelationService seckillSkuRelationService;
|
||||
|
||||
/**
|
||||
* 列表
|
||||
*/
|
||||
@RequestMapping("/list")
|
||||
public R list(@RequestParam Map<String, Object> params){
|
||||
PageUtils page = seckillSkuRelationService.queryPage(params);
|
||||
|
||||
return R.ok().put("page", page);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 信息
|
||||
*/
|
||||
@RequestMapping("/info/{id}")
|
||||
public R info(@PathVariable("id") Long id){
|
||||
SeckillSkuRelationEntity seckillSkuRelation = seckillSkuRelationService.getById(id);
|
||||
|
||||
return R.ok().put("seckillSkuRelation", seckillSkuRelation);
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*/
|
||||
@RequestMapping("/save")
|
||||
public R save(@RequestBody SeckillSkuRelationEntity seckillSkuRelation){
|
||||
seckillSkuRelationService.save(seckillSkuRelation);
|
||||
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*/
|
||||
@RequestMapping("/update")
|
||||
public R update(@RequestBody SeckillSkuRelationEntity seckillSkuRelation){
|
||||
seckillSkuRelationService.updateById(seckillSkuRelation);
|
||||
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
@RequestMapping("/delete")
|
||||
public R delete(@RequestBody Long[] ids){
|
||||
seckillSkuRelationService.removeByIds(Arrays.asList(ids));
|
||||
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,84 @@
|
|||
package com.xjs.mall.coupon.controller;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Map;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import com.xjs.mall.coupon.entity.SkuFullReductionEntity;
|
||||
import com.xjs.mall.coupon.service.SkuFullReductionService;
|
||||
import com.xjs.utils.PageUtils;
|
||||
import com.xjs.utils.R;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 商品满减信息
|
||||
*
|
||||
* @author xiejs
|
||||
* @email 1294405880@qq.com
|
||||
* @date 2022-03-15 10:25:21
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("coupon/skufullreduction")
|
||||
public class SkuFullReductionController {
|
||||
@Autowired
|
||||
private SkuFullReductionService skuFullReductionService;
|
||||
|
||||
/**
|
||||
* 列表
|
||||
*/
|
||||
@RequestMapping("/list")
|
||||
public R list(@RequestParam Map<String, Object> params){
|
||||
PageUtils page = skuFullReductionService.queryPage(params);
|
||||
|
||||
return R.ok().put("page", page);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 信息
|
||||
*/
|
||||
@RequestMapping("/info/{id}")
|
||||
public R info(@PathVariable("id") Long id){
|
||||
SkuFullReductionEntity skuFullReduction = skuFullReductionService.getById(id);
|
||||
|
||||
return R.ok().put("skuFullReduction", skuFullReduction);
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*/
|
||||
@RequestMapping("/save")
|
||||
public R save(@RequestBody SkuFullReductionEntity skuFullReduction){
|
||||
skuFullReductionService.save(skuFullReduction);
|
||||
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*/
|
||||
@RequestMapping("/update")
|
||||
public R update(@RequestBody SkuFullReductionEntity skuFullReduction){
|
||||
skuFullReductionService.updateById(skuFullReduction);
|
||||
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
@RequestMapping("/delete")
|
||||
public R delete(@RequestBody Long[] ids){
|
||||
skuFullReductionService.removeByIds(Arrays.asList(ids));
|
||||
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,84 @@
|
|||
package com.xjs.mall.coupon.controller;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Map;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import com.xjs.mall.coupon.entity.SkuLadderEntity;
|
||||
import com.xjs.mall.coupon.service.SkuLadderService;
|
||||
import com.xjs.utils.PageUtils;
|
||||
import com.xjs.utils.R;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 商品阶梯价格
|
||||
*
|
||||
* @author xiejs
|
||||
* @email 1294405880@qq.com
|
||||
* @date 2022-03-15 10:25:21
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("coupon/skuladder")
|
||||
public class SkuLadderController {
|
||||
@Autowired
|
||||
private SkuLadderService skuLadderService;
|
||||
|
||||
/**
|
||||
* 列表
|
||||
*/
|
||||
@RequestMapping("/list")
|
||||
public R list(@RequestParam Map<String, Object> params){
|
||||
PageUtils page = skuLadderService.queryPage(params);
|
||||
|
||||
return R.ok().put("page", page);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 信息
|
||||
*/
|
||||
@RequestMapping("/info/{id}")
|
||||
public R info(@PathVariable("id") Long id){
|
||||
SkuLadderEntity skuLadder = skuLadderService.getById(id);
|
||||
|
||||
return R.ok().put("skuLadder", skuLadder);
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*/
|
||||
@RequestMapping("/save")
|
||||
public R save(@RequestBody SkuLadderEntity skuLadder){
|
||||
skuLadderService.save(skuLadder);
|
||||
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*/
|
||||
@RequestMapping("/update")
|
||||
public R update(@RequestBody SkuLadderEntity skuLadder){
|
||||
skuLadderService.updateById(skuLadder);
|
||||
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
@RequestMapping("/delete")
|
||||
public R delete(@RequestBody Long[] ids){
|
||||
skuLadderService.removeByIds(Arrays.asList(ids));
|
||||
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,84 @@
|
|||
package com.xjs.mall.coupon.controller;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Map;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import com.xjs.mall.coupon.entity.SpuBoundsEntity;
|
||||
import com.xjs.mall.coupon.service.SpuBoundsService;
|
||||
import com.xjs.utils.PageUtils;
|
||||
import com.xjs.utils.R;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 商品spu积分设置
|
||||
*
|
||||
* @author xiejs
|
||||
* @email 1294405880@qq.com
|
||||
* @date 2022-03-15 10:25:21
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("coupon/spubounds")
|
||||
public class SpuBoundsController {
|
||||
@Autowired
|
||||
private SpuBoundsService spuBoundsService;
|
||||
|
||||
/**
|
||||
* 列表
|
||||
*/
|
||||
@RequestMapping("/list")
|
||||
public R list(@RequestParam Map<String, Object> params){
|
||||
PageUtils page = spuBoundsService.queryPage(params);
|
||||
|
||||
return R.ok().put("page", page);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 信息
|
||||
*/
|
||||
@RequestMapping("/info/{id}")
|
||||
public R info(@PathVariable("id") Long id){
|
||||
SpuBoundsEntity spuBounds = spuBoundsService.getById(id);
|
||||
|
||||
return R.ok().put("spuBounds", spuBounds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*/
|
||||
@RequestMapping("/save")
|
||||
public R save(@RequestBody SpuBoundsEntity spuBounds){
|
||||
spuBoundsService.save(spuBounds);
|
||||
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*/
|
||||
@RequestMapping("/update")
|
||||
public R update(@RequestBody SpuBoundsEntity spuBounds){
|
||||
spuBoundsService.updateById(spuBounds);
|
||||
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
@RequestMapping("/delete")
|
||||
public R delete(@RequestBody Long[] ids){
|
||||
spuBoundsService.removeByIds(Arrays.asList(ids));
|
||||
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
package com.xjs.mall.coupon.dao;
|
||||
|
||||
import com.xjs.mall.coupon.entity.CouponEntity;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 优惠券信息
|
||||
*
|
||||
* @author xiejs
|
||||
* @email 1294405880@qq.com
|
||||
* @date 2022-03-15 10:25:21
|
||||
*/
|
||||
public interface CouponDao extends BaseMapper<CouponEntity> {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
package com.xjs.mall.coupon.dao;
|
||||
|
||||
import com.xjs.mall.coupon.entity.CouponHistoryEntity;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 优惠券领取历史记录
|
||||
*
|
||||
* @author xiejs
|
||||
* @email 1294405880@qq.com
|
||||
* @date 2022-03-15 10:25:21
|
||||
*/
|
||||
public interface CouponHistoryDao extends BaseMapper<CouponHistoryEntity> {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
package com.xjs.mall.coupon.dao;
|
||||
|
||||
import com.xjs.mall.coupon.entity.CouponSpuCategoryRelationEntity;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 优惠券分类关联
|
||||
*
|
||||
* @author xiejs
|
||||
* @email 1294405880@qq.com
|
||||
* @date 2022-03-15 10:25:21
|
||||
*/
|
||||
public interface CouponSpuCategoryRelationDao extends BaseMapper<CouponSpuCategoryRelationEntity> {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
package com.xjs.mall.coupon.dao;
|
||||
|
||||
import com.xjs.mall.coupon.entity.CouponSpuRelationEntity;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 优惠券与产品关联
|
||||
*
|
||||
* @author xiejs
|
||||
* @email 1294405880@qq.com
|
||||
* @date 2022-03-15 10:25:21
|
||||
*/
|
||||
public interface CouponSpuRelationDao extends BaseMapper<CouponSpuRelationEntity> {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
package com.xjs.mall.coupon.dao;
|
||||
|
||||
import com.xjs.mall.coupon.entity.HomeAdvEntity;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 首页轮播广告
|
||||
*
|
||||
* @author xiejs
|
||||
* @email 1294405880@qq.com
|
||||
* @date 2022-03-15 10:25:21
|
||||
*/
|
||||
public interface HomeAdvDao extends BaseMapper<HomeAdvEntity> {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
package com.xjs.mall.coupon.dao;
|
||||
|
||||
import com.xjs.mall.coupon.entity.HomeSubjectEntity;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 首页专题表【jd首页下面很多专题,每个专题链接新的页面,展示专题商品信息】
|
||||
*
|
||||
* @author xiejs
|
||||
* @email 1294405880@qq.com
|
||||
* @date 2022-03-15 10:25:21
|
||||
*/
|
||||
public interface HomeSubjectDao extends BaseMapper<HomeSubjectEntity> {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
package com.xjs.mall.coupon.dao;
|
||||
|
||||
import com.xjs.mall.coupon.entity.HomeSubjectSpuEntity;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 专题商品
|
||||
*
|
||||
* @author xiejs
|
||||
* @email 1294405880@qq.com
|
||||
* @date 2022-03-15 10:25:21
|
||||
*/
|
||||
public interface HomeSubjectSpuDao extends BaseMapper<HomeSubjectSpuEntity> {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
package com.xjs.mall.coupon.dao;
|
||||
|
||||
import com.xjs.mall.coupon.entity.MemberPriceEntity;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 商品会员价格
|
||||
*
|
||||
* @author xiejs
|
||||
* @email 1294405880@qq.com
|
||||
* @date 2022-03-15 10:25:21
|
||||
*/
|
||||
public interface MemberPriceDao extends BaseMapper<MemberPriceEntity> {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
package com.xjs.mall.coupon.dao;
|
||||
|
||||
import com.xjs.mall.coupon.entity.SeckillPromotionEntity;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 秒杀活动
|
||||
*
|
||||
* @author xiejs
|
||||
* @email 1294405880@qq.com
|
||||
* @date 2022-03-15 10:25:21
|
||||
*/
|
||||
public interface SeckillPromotionDao extends BaseMapper<SeckillPromotionEntity> {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
package com.xjs.mall.coupon.dao;
|
||||
|
||||
import com.xjs.mall.coupon.entity.SeckillSessionEntity;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 秒杀活动场次
|
||||
*
|
||||
* @author xiejs
|
||||
* @email 1294405880@qq.com
|
||||
* @date 2022-03-15 10:25:21
|
||||
*/
|
||||
public interface SeckillSessionDao extends BaseMapper<SeckillSessionEntity> {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
package com.xjs.mall.coupon.dao;
|
||||
|
||||
import com.xjs.mall.coupon.entity.SeckillSkuNoticeEntity;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 秒杀商品通知订阅
|
||||
*
|
||||
* @author xiejs
|
||||
* @email 1294405880@qq.com
|
||||
* @date 2022-03-15 10:25:21
|
||||
*/
|
||||
public interface SeckillSkuNoticeDao extends BaseMapper<SeckillSkuNoticeEntity> {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
package com.xjs.mall.coupon.dao;
|
||||
|
||||
import com.xjs.mall.coupon.entity.SeckillSkuRelationEntity;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 秒杀活动商品关联
|
||||
*
|
||||
* @author xiejs
|
||||
* @email 1294405880@qq.com
|
||||
* @date 2022-03-15 10:25:21
|
||||
*/
|
||||
public interface SeckillSkuRelationDao extends BaseMapper<SeckillSkuRelationEntity> {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
package com.xjs.mall.coupon.dao;
|
||||
|
||||
import com.xjs.mall.coupon.entity.SkuFullReductionEntity;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 商品满减信息
|
||||
*
|
||||
* @author xiejs
|
||||
* @email 1294405880@qq.com
|
||||
* @date 2022-03-15 10:25:21
|
||||
*/
|
||||
public interface SkuFullReductionDao extends BaseMapper<SkuFullReductionEntity> {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
package com.xjs.mall.coupon.dao;
|
||||
|
||||
import com.xjs.mall.coupon.entity.SkuLadderEntity;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 商品阶梯价格
|
||||
*
|
||||
* @author xiejs
|
||||
* @email 1294405880@qq.com
|
||||
* @date 2022-03-15 10:25:21
|
||||
*/
|
||||
public interface SkuLadderDao extends BaseMapper<SkuLadderEntity> {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
package com.xjs.mall.coupon.dao;
|
||||
|
||||
import com.xjs.mall.coupon.entity.SpuBoundsEntity;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 商品spu积分设置
|
||||
*
|
||||
* @author xiejs
|
||||
* @email 1294405880@qq.com
|
||||
* @date 2022-03-15 10:25:21
|
||||
*/
|
||||
public interface SpuBoundsDao extends BaseMapper<SpuBoundsEntity> {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,105 @@
|
|||
package com.xjs.mall.coupon.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 优惠券信息
|
||||
*
|
||||
* @author xiejs
|
||||
* @email 1294405880@qq.com
|
||||
* @date 2022-03-15 10:25:21
|
||||
*/
|
||||
@Data
|
||||
@TableName("sms_coupon")
|
||||
public class CouponEntity implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
@TableId
|
||||
private Long id;
|
||||
/**
|
||||
* 优惠卷类型[0->全场赠券;1->会员赠券;2->购物赠券;3->注册赠券]
|
||||
*/
|
||||
private Integer couponType;
|
||||
/**
|
||||
* 优惠券图片
|
||||
*/
|
||||
private String couponImg;
|
||||
/**
|
||||
* 优惠卷名字
|
||||
*/
|
||||
private String couponName;
|
||||
/**
|
||||
* 数量
|
||||
*/
|
||||
private Integer num;
|
||||
/**
|
||||
* 金额
|
||||
*/
|
||||
private BigDecimal amount;
|
||||
/**
|
||||
* 每人限领张数
|
||||
*/
|
||||
private Integer perLimit;
|
||||
/**
|
||||
* 使用门槛
|
||||
*/
|
||||
private BigDecimal minPoint;
|
||||
/**
|
||||
* 开始时间
|
||||
*/
|
||||
private Date startTime;
|
||||
/**
|
||||
* 结束时间
|
||||
*/
|
||||
private Date endTime;
|
||||
/**
|
||||
* 使用类型[0->全场通用;1->指定分类;2->指定商品]
|
||||
*/
|
||||
private Integer useType;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String note;
|
||||
/**
|
||||
* 发行数量
|
||||
*/
|
||||
private Integer publishCount;
|
||||
/**
|
||||
* 已使用数量
|
||||
*/
|
||||
private Integer useCount;
|
||||
/**
|
||||
* 领取数量
|
||||
*/
|
||||
private Integer receiveCount;
|
||||
/**
|
||||
* 可以领取的开始日期
|
||||
*/
|
||||
private Date enableStartTime;
|
||||
/**
|
||||
* 可以领取的结束日期
|
||||
*/
|
||||
private Date enableEndTime;
|
||||
/**
|
||||
* 优惠码
|
||||
*/
|
||||
private String code;
|
||||
/**
|
||||
* 可以领取的会员等级[0->不限等级,其他-对应等级]
|
||||
*/
|
||||
private Integer memberLevel;
|
||||
/**
|
||||
* 发布状态[0-未发布,1-已发布]
|
||||
*/
|
||||
private Integer publish;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,64 @@
|
|||
package com.xjs.mall.coupon.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 优惠券领取历史记录
|
||||
*
|
||||
* @author xiejs
|
||||
* @email 1294405880@qq.com
|
||||
* @date 2022-03-15 10:25:21
|
||||
*/
|
||||
@Data
|
||||
@TableName("sms_coupon_history")
|
||||
public class CouponHistoryEntity implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
@TableId
|
||||
private Long id;
|
||||
/**
|
||||
* 优惠券id
|
||||
*/
|
||||
private Long couponId;
|
||||
/**
|
||||
* 会员id
|
||||
*/
|
||||
private Long memberId;
|
||||
/**
|
||||
* 会员名字
|
||||
*/
|
||||
private String memberNickName;
|
||||
/**
|
||||
* 获取方式[0->后台赠送;1->主动领取]
|
||||
*/
|
||||
private Integer getType;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private Date createTime;
|
||||
/**
|
||||
* 使用状态[0->未使用;1->已使用;2->已过期]
|
||||
*/
|
||||
private Integer useType;
|
||||
/**
|
||||
* 使用时间
|
||||
*/
|
||||
private Date useTime;
|
||||
/**
|
||||
* 订单id
|
||||
*/
|
||||
private Long orderId;
|
||||
/**
|
||||
* 订单号
|
||||
*/
|
||||
private Long orderSn;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,40 @@
|
|||
package com.xjs.mall.coupon.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 优惠券分类关联
|
||||
*
|
||||
* @author xiejs
|
||||
* @email 1294405880@qq.com
|
||||
* @date 2022-03-15 10:25:21
|
||||
*/
|
||||
@Data
|
||||
@TableName("sms_coupon_spu_category_relation")
|
||||
public class CouponSpuCategoryRelationEntity implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
@TableId
|
||||
private Long id;
|
||||
/**
|
||||
* 优惠券id
|
||||
*/
|
||||
private Long couponId;
|
||||
/**
|
||||
* 产品分类id
|
||||
*/
|
||||
private Long categoryId;
|
||||
/**
|
||||
* 产品分类名称
|
||||
*/
|
||||
private String categoryName;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,40 @@
|
|||
package com.xjs.mall.coupon.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 优惠券与产品关联
|
||||
*
|
||||
* @author xiejs
|
||||
* @email 1294405880@qq.com
|
||||
* @date 2022-03-15 10:25:21
|
||||
*/
|
||||
@Data
|
||||
@TableName("sms_coupon_spu_relation")
|
||||
public class CouponSpuRelationEntity implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
@TableId
|
||||
private Long id;
|
||||
/**
|
||||
* 优惠券id
|
||||
*/
|
||||
private Long couponId;
|
||||
/**
|
||||
* spu_id
|
||||
*/
|
||||
private Long spuId;
|
||||
/**
|
||||
* spu_name
|
||||
*/
|
||||
private String spuName;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,72 @@
|
|||
package com.xjs.mall.coupon.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 首页轮播广告
|
||||
*
|
||||
* @author xiejs
|
||||
* @email 1294405880@qq.com
|
||||
* @date 2022-03-15 10:25:21
|
||||
*/
|
||||
@Data
|
||||
@TableName("sms_home_adv")
|
||||
public class HomeAdvEntity implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
@TableId
|
||||
private Long id;
|
||||
/**
|
||||
* 名字
|
||||
*/
|
||||
private String name;
|
||||
/**
|
||||
* 图片地址
|
||||
*/
|
||||
private String pic;
|
||||
/**
|
||||
* 开始时间
|
||||
*/
|
||||
private Date startTime;
|
||||
/**
|
||||
* 结束时间
|
||||
*/
|
||||
private Date endTime;
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
private Integer status;
|
||||
/**
|
||||
* 点击数
|
||||
*/
|
||||
private Integer clickCount;
|
||||
/**
|
||||
* 广告详情连接地址
|
||||
*/
|
||||
private String url;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String note;
|
||||
/**
|
||||
* 排序
|
||||
*/
|
||||
private Integer sort;
|
||||
/**
|
||||
* 发布者
|
||||
*/
|
||||
private Long publisherId;
|
||||
/**
|
||||
* 审核者
|
||||
*/
|
||||
private Long authId;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,56 @@
|
|||
package com.xjs.mall.coupon.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 首页专题表【jd首页下面很多专题,每个专题链接新的页面,展示专题商品信息】
|
||||
*
|
||||
* @author xiejs
|
||||
* @email 1294405880@qq.com
|
||||
* @date 2022-03-15 10:25:21
|
||||
*/
|
||||
@Data
|
||||
@TableName("sms_home_subject")
|
||||
public class HomeSubjectEntity implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
@TableId
|
||||
private Long id;
|
||||
/**
|
||||
* 专题名字
|
||||
*/
|
||||
private String name;
|
||||
/**
|
||||
* 专题标题
|
||||
*/
|
||||
private String title;
|
||||
/**
|
||||
* 专题副标题
|
||||
*/
|
||||
private String subTitle;
|
||||
/**
|
||||
* 显示状态
|
||||
*/
|
||||
private Integer status;
|
||||
/**
|
||||
* 详情连接
|
||||
*/
|
||||
private String url;
|
||||
/**
|
||||
* 排序
|
||||
*/
|
||||
private Integer sort;
|
||||
/**
|
||||
* 专题图片地址
|
||||
*/
|
||||
private String img;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,44 @@
|
|||
package com.xjs.mall.coupon.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 专题商品
|
||||
*
|
||||
* @author xiejs
|
||||
* @email 1294405880@qq.com
|
||||
* @date 2022-03-15 10:25:21
|
||||
*/
|
||||
@Data
|
||||
@TableName("sms_home_subject_spu")
|
||||
public class HomeSubjectSpuEntity implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
@TableId
|
||||
private Long id;
|
||||
/**
|
||||
* 专题名字
|
||||
*/
|
||||
private String name;
|
||||
/**
|
||||
* 专题id
|
||||
*/
|
||||
private Long subjectId;
|
||||
/**
|
||||
* spu_id
|
||||
*/
|
||||
private Long spuId;
|
||||
/**
|
||||
* 排序
|
||||
*/
|
||||
private Integer sort;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,49 @@
|
|||
package com.xjs.mall.coupon.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 商品会员价格
|
||||
*
|
||||
* @author xiejs
|
||||
* @email 1294405880@qq.com
|
||||
* @date 2022-03-15 10:25:21
|
||||
*/
|
||||
@Data
|
||||
@TableName("sms_member_price")
|
||||
public class MemberPriceEntity implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
@TableId
|
||||
private Long id;
|
||||
/**
|
||||
* sku_id
|
||||
*/
|
||||
private Long skuId;
|
||||
/**
|
||||
* 会员等级id
|
||||
*/
|
||||
private Long memberLevelId;
|
||||
/**
|
||||
* 会员等级名
|
||||
*/
|
||||
private String memberLevelName;
|
||||
/**
|
||||
* 会员对应价格
|
||||
*/
|
||||
private BigDecimal memberPrice;
|
||||
/**
|
||||
* 可否叠加其他优惠[0-不可叠加优惠,1-可叠加]
|
||||
*/
|
||||
private Integer addOther;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,52 @@
|
|||
package com.xjs.mall.coupon.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 秒杀活动
|
||||
*
|
||||
* @author xiejs
|
||||
* @email 1294405880@qq.com
|
||||
* @date 2022-03-15 10:25:21
|
||||
*/
|
||||
@Data
|
||||
@TableName("sms_seckill_promotion")
|
||||
public class SeckillPromotionEntity implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
@TableId
|
||||
private Long id;
|
||||
/**
|
||||
* 活动标题
|
||||
*/
|
||||
private String title;
|
||||
/**
|
||||
* 开始日期
|
||||
*/
|
||||
private Date startTime;
|
||||
/**
|
||||
* 结束日期
|
||||
*/
|
||||
private Date endTime;
|
||||
/**
|
||||
* 上下线状态
|
||||
*/
|
||||
private Integer status;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private Date createTime;
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
private Long userId;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,48 @@
|
|||
package com.xjs.mall.coupon.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 秒杀活动场次
|
||||
*
|
||||
* @author xiejs
|
||||
* @email 1294405880@qq.com
|
||||
* @date 2022-03-15 10:25:21
|
||||
*/
|
||||
@Data
|
||||
@TableName("sms_seckill_session")
|
||||
public class SeckillSessionEntity implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
@TableId
|
||||
private Long id;
|
||||
/**
|
||||
* 场次名称
|
||||
*/
|
||||
private String name;
|
||||
/**
|
||||
* 每日开始时间
|
||||
*/
|
||||
private Date startTime;
|
||||
/**
|
||||
* 每日结束时间
|
||||
*/
|
||||
private Date endTime;
|
||||
/**
|
||||
* 启用状态
|
||||
*/
|
||||
private Integer status;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private Date createTime;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,52 @@
|
|||
package com.xjs.mall.coupon.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 秒杀商品通知订阅
|
||||
*
|
||||
* @author xiejs
|
||||
* @email 1294405880@qq.com
|
||||
* @date 2022-03-15 10:25:21
|
||||
*/
|
||||
@Data
|
||||
@TableName("sms_seckill_sku_notice")
|
||||
public class SeckillSkuNoticeEntity implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
@TableId
|
||||
private Long id;
|
||||
/**
|
||||
* member_id
|
||||
*/
|
||||
private Long memberId;
|
||||
/**
|
||||
* sku_id
|
||||
*/
|
||||
private Long skuId;
|
||||
/**
|
||||
* 活动场次id
|
||||
*/
|
||||
private Long sessionId;
|
||||
/**
|
||||
* 订阅时间
|
||||
*/
|
||||
private Date subcribeTime;
|
||||
/**
|
||||
* 发送时间
|
||||
*/
|
||||
private Date sendTime;
|
||||
/**
|
||||
* 通知方式[0-短信,1-邮件]
|
||||
*/
|
||||
private Integer noticeType;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,57 @@
|
|||
package com.xjs.mall.coupon.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 秒杀活动商品关联
|
||||
*
|
||||
* @author xiejs
|
||||
* @email 1294405880@qq.com
|
||||
* @date 2022-03-15 10:25:21
|
||||
*/
|
||||
@Data
|
||||
@TableName("sms_seckill_sku_relation")
|
||||
public class SeckillSkuRelationEntity implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
@TableId
|
||||
private Long id;
|
||||
/**
|
||||
* 活动id
|
||||
*/
|
||||
private Long promotionId;
|
||||
/**
|
||||
* 活动场次id
|
||||
*/
|
||||
private Long promotionSessionId;
|
||||
/**
|
||||
* 商品id
|
||||
*/
|
||||
private Long skuId;
|
||||
/**
|
||||
* 秒杀价格
|
||||
*/
|
||||
private BigDecimal seckillPrice;
|
||||
/**
|
||||
* 秒杀总量
|
||||
*/
|
||||
private BigDecimal seckillCount;
|
||||
/**
|
||||
* 每人限购数量
|
||||
*/
|
||||
private BigDecimal seckillLimit;
|
||||
/**
|
||||
* 排序
|
||||
*/
|
||||
private Integer seckillSort;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,45 @@
|
|||
package com.xjs.mall.coupon.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 商品满减信息
|
||||
*
|
||||
* @author xiejs
|
||||
* @email 1294405880@qq.com
|
||||
* @date 2022-03-15 10:25:21
|
||||
*/
|
||||
@Data
|
||||
@TableName("sms_sku_full_reduction")
|
||||
public class SkuFullReductionEntity implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
@TableId
|
||||
private Long id;
|
||||
/**
|
||||
* spu_id
|
||||
*/
|
||||
private Long skuId;
|
||||
/**
|
||||
* 满多少
|
||||
*/
|
||||
private BigDecimal fullPrice;
|
||||
/**
|
||||
* 减多少
|
||||
*/
|
||||
private BigDecimal reducePrice;
|
||||
/**
|
||||
* 是否参与其他优惠
|
||||
*/
|
||||
private Integer addOther;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,49 @@
|
|||
package com.xjs.mall.coupon.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 商品阶梯价格
|
||||
*
|
||||
* @author xiejs
|
||||
* @email 1294405880@qq.com
|
||||
* @date 2022-03-15 10:25:21
|
||||
*/
|
||||
@Data
|
||||
@TableName("sms_sku_ladder")
|
||||
public class SkuLadderEntity implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
@TableId
|
||||
private Long id;
|
||||
/**
|
||||
* spu_id
|
||||
*/
|
||||
private Long skuId;
|
||||
/**
|
||||
* 满几件
|
||||
*/
|
||||
private Integer fullCount;
|
||||
/**
|
||||
* 打几折
|
||||
*/
|
||||
private BigDecimal discount;
|
||||
/**
|
||||
* 折后价
|
||||
*/
|
||||
private BigDecimal price;
|
||||
/**
|
||||
* 是否叠加其他优惠[0-不可叠加,1-可叠加]
|
||||
*/
|
||||
private Integer addOther;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,45 @@
|
|||
package com.xjs.mall.coupon.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 商品spu积分设置
|
||||
*
|
||||
* @author xiejs
|
||||
* @email 1294405880@qq.com
|
||||
* @date 2022-03-15 10:25:21
|
||||
*/
|
||||
@Data
|
||||
@TableName("sms_spu_bounds")
|
||||
public class SpuBoundsEntity implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
@TableId
|
||||
private Long id;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private Long spuId;
|
||||
/**
|
||||
* 成长积分
|
||||
*/
|
||||
private BigDecimal growBounds;
|
||||
/**
|
||||
* 购物积分
|
||||
*/
|
||||
private BigDecimal buyBounds;
|
||||
/**
|
||||
* 优惠生效情况[1111(四个状态位,从右到左);0 - 无优惠,成长积分是否赠送;1 - 无优惠,购物积分是否赠送;2 - 有优惠,成长积分是否赠送;3 - 有优惠,购物积分是否赠送【状态位0:不赠送,1:赠送】]
|
||||
*/
|
||||
private Integer work;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
package com.xjs.mall.coupon.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.xjs.utils.PageUtils;
|
||||
import com.xjs.mall.coupon.entity.CouponHistoryEntity;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 优惠券领取历史记录
|
||||
*
|
||||
* @author xiejs
|
||||
* @email 1294405880@qq.com
|
||||
* @date 2022-03-15 10:25:21
|
||||
*/
|
||||
public interface CouponHistoryService extends IService<CouponHistoryEntity> {
|
||||
|
||||
PageUtils queryPage(Map<String, Object> params);
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
package com.xjs.mall.coupon.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.xjs.utils.PageUtils;
|
||||
import com.xjs.mall.coupon.entity.CouponEntity;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 优惠券信息
|
||||
*
|
||||
* @author xiejs
|
||||
* @email 1294405880@qq.com
|
||||
* @date 2022-03-15 10:25:21
|
||||
*/
|
||||
public interface CouponService extends IService<CouponEntity> {
|
||||
|
||||
PageUtils queryPage(Map<String, Object> params);
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
package com.xjs.mall.coupon.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.xjs.utils.PageUtils;
|
||||
import com.xjs.mall.coupon.entity.CouponSpuCategoryRelationEntity;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 优惠券分类关联
|
||||
*
|
||||
* @author xiejs
|
||||
* @email 1294405880@qq.com
|
||||
* @date 2022-03-15 10:25:21
|
||||
*/
|
||||
public interface CouponSpuCategoryRelationService extends IService<CouponSpuCategoryRelationEntity> {
|
||||
|
||||
PageUtils queryPage(Map<String, Object> params);
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
package com.xjs.mall.coupon.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.xjs.utils.PageUtils;
|
||||
import com.xjs.mall.coupon.entity.CouponSpuRelationEntity;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 优惠券与产品关联
|
||||
*
|
||||
* @author xiejs
|
||||
* @email 1294405880@qq.com
|
||||
* @date 2022-03-15 10:25:21
|
||||
*/
|
||||
public interface CouponSpuRelationService extends IService<CouponSpuRelationEntity> {
|
||||
|
||||
PageUtils queryPage(Map<String, Object> params);
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
package com.xjs.mall.coupon.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.xjs.utils.PageUtils;
|
||||
import com.xjs.mall.coupon.entity.HomeAdvEntity;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 首页轮播广告
|
||||
*
|
||||
* @author xiejs
|
||||
* @email 1294405880@qq.com
|
||||
* @date 2022-03-15 10:25:21
|
||||
*/
|
||||
public interface HomeAdvService extends IService<HomeAdvEntity> {
|
||||
|
||||
PageUtils queryPage(Map<String, Object> params);
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
package com.xjs.mall.coupon.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.xjs.utils.PageUtils;
|
||||
import com.xjs.mall.coupon.entity.HomeSubjectEntity;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 首页专题表【jd首页下面很多专题,每个专题链接新的页面,展示专题商品信息】
|
||||
*
|
||||
* @author xiejs
|
||||
* @email 1294405880@qq.com
|
||||
* @date 2022-03-15 10:25:21
|
||||
*/
|
||||
public interface HomeSubjectService extends IService<HomeSubjectEntity> {
|
||||
|
||||
PageUtils queryPage(Map<String, Object> params);
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
package com.xjs.mall.coupon.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.xjs.utils.PageUtils;
|
||||
import com.xjs.mall.coupon.entity.HomeSubjectSpuEntity;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 专题商品
|
||||
*
|
||||
* @author xiejs
|
||||
* @email 1294405880@qq.com
|
||||
* @date 2022-03-15 10:25:21
|
||||
*/
|
||||
public interface HomeSubjectSpuService extends IService<HomeSubjectSpuEntity> {
|
||||
|
||||
PageUtils queryPage(Map<String, Object> params);
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
package com.xjs.mall.coupon.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.xjs.utils.PageUtils;
|
||||
import com.xjs.mall.coupon.entity.MemberPriceEntity;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 商品会员价格
|
||||
*
|
||||
* @author xiejs
|
||||
* @email 1294405880@qq.com
|
||||
* @date 2022-03-15 10:25:21
|
||||
*/
|
||||
public interface MemberPriceService extends IService<MemberPriceEntity> {
|
||||
|
||||
PageUtils queryPage(Map<String, Object> params);
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
package com.xjs.mall.coupon.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.xjs.utils.PageUtils;
|
||||
import com.xjs.mall.coupon.entity.SeckillPromotionEntity;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 秒杀活动
|
||||
*
|
||||
* @author xiejs
|
||||
* @email 1294405880@qq.com
|
||||
* @date 2022-03-15 10:25:21
|
||||
*/
|
||||
public interface SeckillPromotionService extends IService<SeckillPromotionEntity> {
|
||||
|
||||
PageUtils queryPage(Map<String, Object> params);
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
package com.xjs.mall.coupon.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.xjs.utils.PageUtils;
|
||||
import com.xjs.mall.coupon.entity.SeckillSessionEntity;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 秒杀活动场次
|
||||
*
|
||||
* @author xiejs
|
||||
* @email 1294405880@qq.com
|
||||
* @date 2022-03-15 10:25:21
|
||||
*/
|
||||
public interface SeckillSessionService extends IService<SeckillSessionEntity> {
|
||||
|
||||
PageUtils queryPage(Map<String, Object> params);
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
package com.xjs.mall.coupon.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.xjs.utils.PageUtils;
|
||||
import com.xjs.mall.coupon.entity.SeckillSkuNoticeEntity;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 秒杀商品通知订阅
|
||||
*
|
||||
* @author xiejs
|
||||
* @email 1294405880@qq.com
|
||||
* @date 2022-03-15 10:25:21
|
||||
*/
|
||||
public interface SeckillSkuNoticeService extends IService<SeckillSkuNoticeEntity> {
|
||||
|
||||
PageUtils queryPage(Map<String, Object> params);
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
package com.xjs.mall.coupon.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.xjs.utils.PageUtils;
|
||||
import com.xjs.mall.coupon.entity.SeckillSkuRelationEntity;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 秒杀活动商品关联
|
||||
*
|
||||
* @author xiejs
|
||||
* @email 1294405880@qq.com
|
||||
* @date 2022-03-15 10:25:21
|
||||
*/
|
||||
public interface SeckillSkuRelationService extends IService<SeckillSkuRelationEntity> {
|
||||
|
||||
PageUtils queryPage(Map<String, Object> params);
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
package com.xjs.mall.coupon.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.xjs.utils.PageUtils;
|
||||
import com.xjs.mall.coupon.entity.SkuFullReductionEntity;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 商品满减信息
|
||||
*
|
||||
* @author xiejs
|
||||
* @email 1294405880@qq.com
|
||||
* @date 2022-03-15 10:25:21
|
||||
*/
|
||||
public interface SkuFullReductionService extends IService<SkuFullReductionEntity> {
|
||||
|
||||
PageUtils queryPage(Map<String, Object> params);
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
package com.xjs.mall.coupon.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.xjs.utils.PageUtils;
|
||||
import com.xjs.mall.coupon.entity.SkuLadderEntity;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 商品阶梯价格
|
||||
*
|
||||
* @author xiejs
|
||||
* @email 1294405880@qq.com
|
||||
* @date 2022-03-15 10:25:21
|
||||
*/
|
||||
public interface SkuLadderService extends IService<SkuLadderEntity> {
|
||||
|
||||
PageUtils queryPage(Map<String, Object> params);
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
package com.xjs.mall.coupon.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.xjs.utils.PageUtils;
|
||||
import com.xjs.mall.coupon.entity.SpuBoundsEntity;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 商品spu积分设置
|
||||
*
|
||||
* @author xiejs
|
||||
* @email 1294405880@qq.com
|
||||
* @date 2022-03-15 10:25:21
|
||||
*/
|
||||
public interface SpuBoundsService extends IService<SpuBoundsEntity> {
|
||||
|
||||
PageUtils queryPage(Map<String, Object> params);
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
package com.xjs.mall.coupon.service.impl;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
import java.util.Map;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.xjs.utils.PageUtils;
|
||||
import com.xjs.utils.Query;
|
||||
|
||||
import com.xjs.mall.coupon.dao.CouponHistoryDao;
|
||||
import com.xjs.mall.coupon.entity.CouponHistoryEntity;
|
||||
import com.xjs.mall.coupon.service.CouponHistoryService;
|
||||
|
||||
|
||||
@Service("couponHistoryService")
|
||||
public class CouponHistoryServiceImpl extends ServiceImpl<CouponHistoryDao, CouponHistoryEntity> implements CouponHistoryService {
|
||||
|
||||
@Override
|
||||
public PageUtils queryPage(Map<String, Object> params) {
|
||||
IPage<CouponHistoryEntity> page = this.page(
|
||||
new Query<CouponHistoryEntity>().getPage(params),
|
||||
new QueryWrapper<CouponHistoryEntity>()
|
||||
);
|
||||
|
||||
return new PageUtils(page);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
package com.xjs.mall.coupon.service.impl;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
import java.util.Map;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.xjs.utils.PageUtils;
|
||||
import com.xjs.utils.Query;
|
||||
|
||||
import com.xjs.mall.coupon.dao.CouponDao;
|
||||
import com.xjs.mall.coupon.entity.CouponEntity;
|
||||
import com.xjs.mall.coupon.service.CouponService;
|
||||
|
||||
|
||||
@Service("couponService")
|
||||
public class CouponServiceImpl extends ServiceImpl<CouponDao, CouponEntity> implements CouponService {
|
||||
|
||||
@Override
|
||||
public PageUtils queryPage(Map<String, Object> params) {
|
||||
IPage<CouponEntity> page = this.page(
|
||||
new Query<CouponEntity>().getPage(params),
|
||||
new QueryWrapper<CouponEntity>()
|
||||
);
|
||||
|
||||
return new PageUtils(page);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
package com.xjs.mall.coupon.service.impl;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
import java.util.Map;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.xjs.utils.PageUtils;
|
||||
import com.xjs.utils.Query;
|
||||
|
||||
import com.xjs.mall.coupon.dao.CouponSpuCategoryRelationDao;
|
||||
import com.xjs.mall.coupon.entity.CouponSpuCategoryRelationEntity;
|
||||
import com.xjs.mall.coupon.service.CouponSpuCategoryRelationService;
|
||||
|
||||
|
||||
@Service("couponSpuCategoryRelationService")
|
||||
public class CouponSpuCategoryRelationServiceImpl extends ServiceImpl<CouponSpuCategoryRelationDao, CouponSpuCategoryRelationEntity> implements CouponSpuCategoryRelationService {
|
||||
|
||||
@Override
|
||||
public PageUtils queryPage(Map<String, Object> params) {
|
||||
IPage<CouponSpuCategoryRelationEntity> page = this.page(
|
||||
new Query<CouponSpuCategoryRelationEntity>().getPage(params),
|
||||
new QueryWrapper<CouponSpuCategoryRelationEntity>()
|
||||
);
|
||||
|
||||
return new PageUtils(page);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
package com.xjs.mall.coupon.service.impl;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
import java.util.Map;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.xjs.utils.PageUtils;
|
||||
import com.xjs.utils.Query;
|
||||
|
||||
import com.xjs.mall.coupon.dao.CouponSpuRelationDao;
|
||||
import com.xjs.mall.coupon.entity.CouponSpuRelationEntity;
|
||||
import com.xjs.mall.coupon.service.CouponSpuRelationService;
|
||||
|
||||
|
||||
@Service("couponSpuRelationService")
|
||||
public class CouponSpuRelationServiceImpl extends ServiceImpl<CouponSpuRelationDao, CouponSpuRelationEntity> implements CouponSpuRelationService {
|
||||
|
||||
@Override
|
||||
public PageUtils queryPage(Map<String, Object> params) {
|
||||
IPage<CouponSpuRelationEntity> page = this.page(
|
||||
new Query<CouponSpuRelationEntity>().getPage(params),
|
||||
new QueryWrapper<CouponSpuRelationEntity>()
|
||||
);
|
||||
|
||||
return new PageUtils(page);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
package com.xjs.mall.coupon.service.impl;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
import java.util.Map;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.xjs.utils.PageUtils;
|
||||
import com.xjs.utils.Query;
|
||||
|
||||
import com.xjs.mall.coupon.dao.HomeAdvDao;
|
||||
import com.xjs.mall.coupon.entity.HomeAdvEntity;
|
||||
import com.xjs.mall.coupon.service.HomeAdvService;
|
||||
|
||||
|
||||
@Service("homeAdvService")
|
||||
public class HomeAdvServiceImpl extends ServiceImpl<HomeAdvDao, HomeAdvEntity> implements HomeAdvService {
|
||||
|
||||
@Override
|
||||
public PageUtils queryPage(Map<String, Object> params) {
|
||||
IPage<HomeAdvEntity> page = this.page(
|
||||
new Query<HomeAdvEntity>().getPage(params),
|
||||
new QueryWrapper<HomeAdvEntity>()
|
||||
);
|
||||
|
||||
return new PageUtils(page);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
package com.xjs.mall.coupon.service.impl;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
import java.util.Map;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.xjs.utils.PageUtils;
|
||||
import com.xjs.utils.Query;
|
||||
|
||||
import com.xjs.mall.coupon.dao.HomeSubjectDao;
|
||||
import com.xjs.mall.coupon.entity.HomeSubjectEntity;
|
||||
import com.xjs.mall.coupon.service.HomeSubjectService;
|
||||
|
||||
|
||||
@Service("homeSubjectService")
|
||||
public class HomeSubjectServiceImpl extends ServiceImpl<HomeSubjectDao, HomeSubjectEntity> implements HomeSubjectService {
|
||||
|
||||
@Override
|
||||
public PageUtils queryPage(Map<String, Object> params) {
|
||||
IPage<HomeSubjectEntity> page = this.page(
|
||||
new Query<HomeSubjectEntity>().getPage(params),
|
||||
new QueryWrapper<HomeSubjectEntity>()
|
||||
);
|
||||
|
||||
return new PageUtils(page);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
package com.xjs.mall.coupon.service.impl;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
import java.util.Map;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.xjs.utils.PageUtils;
|
||||
import com.xjs.utils.Query;
|
||||
|
||||
import com.xjs.mall.coupon.dao.HomeSubjectSpuDao;
|
||||
import com.xjs.mall.coupon.entity.HomeSubjectSpuEntity;
|
||||
import com.xjs.mall.coupon.service.HomeSubjectSpuService;
|
||||
|
||||
|
||||
@Service("homeSubjectSpuService")
|
||||
public class HomeSubjectSpuServiceImpl extends ServiceImpl<HomeSubjectSpuDao, HomeSubjectSpuEntity> implements HomeSubjectSpuService {
|
||||
|
||||
@Override
|
||||
public PageUtils queryPage(Map<String, Object> params) {
|
||||
IPage<HomeSubjectSpuEntity> page = this.page(
|
||||
new Query<HomeSubjectSpuEntity>().getPage(params),
|
||||
new QueryWrapper<HomeSubjectSpuEntity>()
|
||||
);
|
||||
|
||||
return new PageUtils(page);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
package com.xjs.mall.coupon.service.impl;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
import java.util.Map;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.xjs.utils.PageUtils;
|
||||
import com.xjs.utils.Query;
|
||||
|
||||
import com.xjs.mall.coupon.dao.MemberPriceDao;
|
||||
import com.xjs.mall.coupon.entity.MemberPriceEntity;
|
||||
import com.xjs.mall.coupon.service.MemberPriceService;
|
||||
|
||||
|
||||
@Service("memberPriceService")
|
||||
public class MemberPriceServiceImpl extends ServiceImpl<MemberPriceDao, MemberPriceEntity> implements MemberPriceService {
|
||||
|
||||
@Override
|
||||
public PageUtils queryPage(Map<String, Object> params) {
|
||||
IPage<MemberPriceEntity> page = this.page(
|
||||
new Query<MemberPriceEntity>().getPage(params),
|
||||
new QueryWrapper<MemberPriceEntity>()
|
||||
);
|
||||
|
||||
return new PageUtils(page);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
package com.xjs.mall.coupon.service.impl;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
import java.util.Map;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.xjs.utils.PageUtils;
|
||||
import com.xjs.utils.Query;
|
||||
|
||||
import com.xjs.mall.coupon.dao.SeckillPromotionDao;
|
||||
import com.xjs.mall.coupon.entity.SeckillPromotionEntity;
|
||||
import com.xjs.mall.coupon.service.SeckillPromotionService;
|
||||
|
||||
|
||||
@Service("seckillPromotionService")
|
||||
public class SeckillPromotionServiceImpl extends ServiceImpl<SeckillPromotionDao, SeckillPromotionEntity> implements SeckillPromotionService {
|
||||
|
||||
@Override
|
||||
public PageUtils queryPage(Map<String, Object> params) {
|
||||
IPage<SeckillPromotionEntity> page = this.page(
|
||||
new Query<SeckillPromotionEntity>().getPage(params),
|
||||
new QueryWrapper<SeckillPromotionEntity>()
|
||||
);
|
||||
|
||||
return new PageUtils(page);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
package com.xjs.mall.coupon.service.impl;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
import java.util.Map;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.xjs.utils.PageUtils;
|
||||
import com.xjs.utils.Query;
|
||||
|
||||
import com.xjs.mall.coupon.dao.SeckillSessionDao;
|
||||
import com.xjs.mall.coupon.entity.SeckillSessionEntity;
|
||||
import com.xjs.mall.coupon.service.SeckillSessionService;
|
||||
|
||||
|
||||
@Service("seckillSessionService")
|
||||
public class SeckillSessionServiceImpl extends ServiceImpl<SeckillSessionDao, SeckillSessionEntity> implements SeckillSessionService {
|
||||
|
||||
@Override
|
||||
public PageUtils queryPage(Map<String, Object> params) {
|
||||
IPage<SeckillSessionEntity> page = this.page(
|
||||
new Query<SeckillSessionEntity>().getPage(params),
|
||||
new QueryWrapper<SeckillSessionEntity>()
|
||||
);
|
||||
|
||||
return new PageUtils(page);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
package com.xjs.mall.coupon.service.impl;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
import java.util.Map;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.xjs.utils.PageUtils;
|
||||
import com.xjs.utils.Query;
|
||||
|
||||
import com.xjs.mall.coupon.dao.SeckillSkuNoticeDao;
|
||||
import com.xjs.mall.coupon.entity.SeckillSkuNoticeEntity;
|
||||
import com.xjs.mall.coupon.service.SeckillSkuNoticeService;
|
||||
|
||||
|
||||
@Service("seckillSkuNoticeService")
|
||||
public class SeckillSkuNoticeServiceImpl extends ServiceImpl<SeckillSkuNoticeDao, SeckillSkuNoticeEntity> implements SeckillSkuNoticeService {
|
||||
|
||||
@Override
|
||||
public PageUtils queryPage(Map<String, Object> params) {
|
||||
IPage<SeckillSkuNoticeEntity> page = this.page(
|
||||
new Query<SeckillSkuNoticeEntity>().getPage(params),
|
||||
new QueryWrapper<SeckillSkuNoticeEntity>()
|
||||
);
|
||||
|
||||
return new PageUtils(page);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
package com.xjs.mall.coupon.service.impl;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
import java.util.Map;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.xjs.utils.PageUtils;
|
||||
import com.xjs.utils.Query;
|
||||
|
||||
import com.xjs.mall.coupon.dao.SeckillSkuRelationDao;
|
||||
import com.xjs.mall.coupon.entity.SeckillSkuRelationEntity;
|
||||
import com.xjs.mall.coupon.service.SeckillSkuRelationService;
|
||||
|
||||
|
||||
@Service("seckillSkuRelationService")
|
||||
public class SeckillSkuRelationServiceImpl extends ServiceImpl<SeckillSkuRelationDao, SeckillSkuRelationEntity> implements SeckillSkuRelationService {
|
||||
|
||||
@Override
|
||||
public PageUtils queryPage(Map<String, Object> params) {
|
||||
IPage<SeckillSkuRelationEntity> page = this.page(
|
||||
new Query<SeckillSkuRelationEntity>().getPage(params),
|
||||
new QueryWrapper<SeckillSkuRelationEntity>()
|
||||
);
|
||||
|
||||
return new PageUtils(page);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
package com.xjs.mall.coupon.service.impl;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
import java.util.Map;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.xjs.utils.PageUtils;
|
||||
import com.xjs.utils.Query;
|
||||
|
||||
import com.xjs.mall.coupon.dao.SkuFullReductionDao;
|
||||
import com.xjs.mall.coupon.entity.SkuFullReductionEntity;
|
||||
import com.xjs.mall.coupon.service.SkuFullReductionService;
|
||||
|
||||
|
||||
@Service("skuFullReductionService")
|
||||
public class SkuFullReductionServiceImpl extends ServiceImpl<SkuFullReductionDao, SkuFullReductionEntity> implements SkuFullReductionService {
|
||||
|
||||
@Override
|
||||
public PageUtils queryPage(Map<String, Object> params) {
|
||||
IPage<SkuFullReductionEntity> page = this.page(
|
||||
new Query<SkuFullReductionEntity>().getPage(params),
|
||||
new QueryWrapper<SkuFullReductionEntity>()
|
||||
);
|
||||
|
||||
return new PageUtils(page);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
package com.xjs.mall.coupon.service.impl;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
import java.util.Map;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.xjs.utils.PageUtils;
|
||||
import com.xjs.utils.Query;
|
||||
|
||||
import com.xjs.mall.coupon.dao.SkuLadderDao;
|
||||
import com.xjs.mall.coupon.entity.SkuLadderEntity;
|
||||
import com.xjs.mall.coupon.service.SkuLadderService;
|
||||
|
||||
|
||||
@Service("skuLadderService")
|
||||
public class SkuLadderServiceImpl extends ServiceImpl<SkuLadderDao, SkuLadderEntity> implements SkuLadderService {
|
||||
|
||||
@Override
|
||||
public PageUtils queryPage(Map<String, Object> params) {
|
||||
IPage<SkuLadderEntity> page = this.page(
|
||||
new Query<SkuLadderEntity>().getPage(params),
|
||||
new QueryWrapper<SkuLadderEntity>()
|
||||
);
|
||||
|
||||
return new PageUtils(page);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
package com.xjs.mall.coupon.service.impl;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
import java.util.Map;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.xjs.utils.PageUtils;
|
||||
import com.xjs.utils.Query;
|
||||
|
||||
import com.xjs.mall.coupon.dao.SpuBoundsDao;
|
||||
import com.xjs.mall.coupon.entity.SpuBoundsEntity;
|
||||
import com.xjs.mall.coupon.service.SpuBoundsService;
|
||||
|
||||
|
||||
@Service("spuBoundsService")
|
||||
public class SpuBoundsServiceImpl extends ServiceImpl<SpuBoundsDao, SpuBoundsEntity> implements SpuBoundsService {
|
||||
|
||||
@Override
|
||||
public PageUtils queryPage(Map<String, Object> params) {
|
||||
IPage<SpuBoundsEntity> page = this.page(
|
||||
new Query<SpuBoundsEntity>().getPage(params),
|
||||
new QueryWrapper<SpuBoundsEntity>()
|
||||
);
|
||||
|
||||
return new PageUtils(page);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
# Tomcat
|
||||
server:
|
||||
port: 9982
|
||||
|
||||
# Spring
|
||||
spring:
|
||||
application:
|
||||
# 应用名称
|
||||
name: xjs-mall-coupon
|
||||
profiles:
|
||||
# 环境配置
|
||||
active: dev
|
||||
cloud:
|
||||
nacos:
|
||||
discovery:
|
||||
# 服务注册地址
|
||||
server-addr: 127.0.0.1:8848
|
||||
config:
|
||||
# 配置中心地址
|
||||
server-addr: 127.0.0.1:8848
|
||||
# 配置文件格式
|
||||
file-extension: yml
|
||||
# 共享配置
|
||||
shared-configs:
|
||||
- application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
|
||||
#配置组
|
||||
group: xjs
|
||||
#命名空间
|
||||
namespace: xjs-666
|
||||
|
|
@ -0,0 +1,81 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<configuration scan="true" scanPeriod="60 seconds" debug="false">
|
||||
<!-- 日志存放路径 -->
|
||||
<property name="log.path" value="logs/xjs-mall/coupon"/>
|
||||
<!-- 日志输出格式 -->
|
||||
<property name="log.pattern" value="%d{HH:mm:ss.SSS} [%thread] %-5level %logger{20} - [%method,%line] - %msg%n" />
|
||||
|
||||
<!-- 控制台输出 -->
|
||||
<appender name="console" class="ch.qos.logback.core.ConsoleAppender">
|
||||
<encoder>
|
||||
<pattern>${log.pattern}</pattern>
|
||||
</encoder>
|
||||
</appender>
|
||||
|
||||
<!-- 系统日志输出 -->
|
||||
<appender name="file_info" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<file>${log.path}/info.log</file>
|
||||
<!-- 循环政策:基于时间创建日志文件 -->
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||
<!-- 日志文件名格式 -->
|
||||
<fileNamePattern>${log.path}/info.%d{yyyy-MM-dd}.log</fileNamePattern>
|
||||
<!-- 日志最大的历史 60天 -->
|
||||
<maxHistory>60</maxHistory>
|
||||
</rollingPolicy>
|
||||
<encoder>
|
||||
<pattern>${log.pattern}</pattern>
|
||||
</encoder>
|
||||
<filter class="ch.qos.logback.classic.filter.LevelFilter">
|
||||
<!-- 过滤的级别 -->
|
||||
<level>INFO</level>
|
||||
<!-- 匹配时的操作:接收(记录) -->
|
||||
<onMatch>ACCEPT</onMatch>
|
||||
<!-- 不匹配时的操作:拒绝(不记录) -->
|
||||
<onMismatch>DENY</onMismatch>
|
||||
</filter>
|
||||
</appender>
|
||||
|
||||
<appender name="file_error" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<file>${log.path}/error.log</file>
|
||||
<!-- 循环政策:基于时间创建日志文件 -->
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||
<!-- 日志文件名格式 -->
|
||||
<fileNamePattern>${log.path}/error.%d{yyyy-MM-dd}.log</fileNamePattern>
|
||||
<!-- 日志最大的历史 60天 -->
|
||||
<maxHistory>60</maxHistory>
|
||||
</rollingPolicy>
|
||||
<encoder>
|
||||
<pattern>${log.pattern}</pattern>
|
||||
</encoder>
|
||||
<filter class="ch.qos.logback.classic.filter.LevelFilter">
|
||||
<!-- 过滤的级别 -->
|
||||
<level>ERROR</level>
|
||||
<!-- 匹配时的操作:接收(记录) -->
|
||||
<onMatch>ACCEPT</onMatch>
|
||||
<!-- 不匹配时的操作:拒绝(不记录) -->
|
||||
<onMismatch>DENY</onMismatch>
|
||||
</filter>
|
||||
</appender>
|
||||
|
||||
<!-- 系统模块日志级别控制 -->
|
||||
<logger name="com.xjs" level="info" />
|
||||
<!--打印feign DEBUG日志-->
|
||||
<logger name="com.xjs.common.client" level="debug"/>
|
||||
<!-- Spring日志级别控制 -->
|
||||
<logger name="org.springframework" level="warn" />
|
||||
|
||||
<!-- 打开 Bean Searcher 的 SQL 日志 -->
|
||||
<logger name="com.ejlchina.searcher.implement.DefaultSqlExecutor" level="DEBUG" additivity="false">
|
||||
<appender-ref ref="console" />
|
||||
</logger>
|
||||
|
||||
<root level="info">
|
||||
<appender-ref ref="console" />
|
||||
</root>
|
||||
|
||||
<!--系统操作日志-->
|
||||
<root level="info">
|
||||
<appender-ref ref="file_info" />
|
||||
<appender-ref ref="file_error" />
|
||||
</root>
|
||||
</configuration>
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
|
||||
<mapper namespace="com.xjs.mall.coupon.dao.CouponDao">
|
||||
|
||||
<!-- 可根据自己的需求,是否要使用 -->
|
||||
<resultMap type="com.xjs.mall.coupon.entity.CouponEntity" id="couponMap">
|
||||
<result property="id" column="id"/>
|
||||
<result property="couponType" column="coupon_type"/>
|
||||
<result property="couponImg" column="coupon_img"/>
|
||||
<result property="couponName" column="coupon_name"/>
|
||||
<result property="num" column="num"/>
|
||||
<result property="amount" column="amount"/>
|
||||
<result property="perLimit" column="per_limit"/>
|
||||
<result property="minPoint" column="min_point"/>
|
||||
<result property="startTime" column="start_time"/>
|
||||
<result property="endTime" column="end_time"/>
|
||||
<result property="useType" column="use_type"/>
|
||||
<result property="note" column="note"/>
|
||||
<result property="publishCount" column="publish_count"/>
|
||||
<result property="useCount" column="use_count"/>
|
||||
<result property="receiveCount" column="receive_count"/>
|
||||
<result property="enableStartTime" column="enable_start_time"/>
|
||||
<result property="enableEndTime" column="enable_end_time"/>
|
||||
<result property="code" column="code"/>
|
||||
<result property="memberLevel" column="member_level"/>
|
||||
<result property="publish" column="publish"/>
|
||||
</resultMap>
|
||||
|
||||
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
|
||||
<mapper namespace="com.xjs.mall.coupon.dao.CouponHistoryDao">
|
||||
|
||||
<!-- 可根据自己的需求,是否要使用 -->
|
||||
<resultMap type="com.xjs.mall.coupon.entity.CouponHistoryEntity" id="couponHistoryMap">
|
||||
<result property="id" column="id"/>
|
||||
<result property="couponId" column="coupon_id"/>
|
||||
<result property="memberId" column="member_id"/>
|
||||
<result property="memberNickName" column="member_nick_name"/>
|
||||
<result property="getType" column="get_type"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="useType" column="use_type"/>
|
||||
<result property="useTime" column="use_time"/>
|
||||
<result property="orderId" column="order_id"/>
|
||||
<result property="orderSn" column="order_sn"/>
|
||||
</resultMap>
|
||||
|
||||
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
|
||||
<mapper namespace="com.xjs.mall.coupon.dao.CouponSpuCategoryRelationDao">
|
||||
|
||||
<!-- 可根据自己的需求,是否要使用 -->
|
||||
<resultMap type="com.xjs.mall.coupon.entity.CouponSpuCategoryRelationEntity" id="couponSpuCategoryRelationMap">
|
||||
<result property="id" column="id"/>
|
||||
<result property="couponId" column="coupon_id"/>
|
||||
<result property="categoryId" column="category_id"/>
|
||||
<result property="categoryName" column="category_name"/>
|
||||
</resultMap>
|
||||
|
||||
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
|
||||
<mapper namespace="com.xjs.mall.coupon.dao.CouponSpuRelationDao">
|
||||
|
||||
<!-- 可根据自己的需求,是否要使用 -->
|
||||
<resultMap type="com.xjs.mall.coupon.entity.CouponSpuRelationEntity" id="couponSpuRelationMap">
|
||||
<result property="id" column="id"/>
|
||||
<result property="couponId" column="coupon_id"/>
|
||||
<result property="spuId" column="spu_id"/>
|
||||
<result property="spuName" column="spu_name"/>
|
||||
</resultMap>
|
||||
|
||||
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
|
||||
<mapper namespace="com.xjs.mall.coupon.dao.HomeAdvDao">
|
||||
|
||||
<!-- 可根据自己的需求,是否要使用 -->
|
||||
<resultMap type="com.xjs.mall.coupon.entity.HomeAdvEntity" id="homeAdvMap">
|
||||
<result property="id" column="id"/>
|
||||
<result property="name" column="name"/>
|
||||
<result property="pic" column="pic"/>
|
||||
<result property="startTime" column="start_time"/>
|
||||
<result property="endTime" column="end_time"/>
|
||||
<result property="status" column="status"/>
|
||||
<result property="clickCount" column="click_count"/>
|
||||
<result property="url" column="url"/>
|
||||
<result property="note" column="note"/>
|
||||
<result property="sort" column="sort"/>
|
||||
<result property="publisherId" column="publisher_id"/>
|
||||
<result property="authId" column="auth_id"/>
|
||||
</resultMap>
|
||||
|
||||
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
|
||||
<mapper namespace="com.xjs.mall.coupon.dao.HomeSubjectDao">
|
||||
|
||||
<!-- 可根据自己的需求,是否要使用 -->
|
||||
<resultMap type="com.xjs.mall.coupon.entity.HomeSubjectEntity" id="homeSubjectMap">
|
||||
<result property="id" column="id"/>
|
||||
<result property="name" column="name"/>
|
||||
<result property="title" column="title"/>
|
||||
<result property="subTitle" column="sub_title"/>
|
||||
<result property="status" column="status"/>
|
||||
<result property="url" column="url"/>
|
||||
<result property="sort" column="sort"/>
|
||||
<result property="img" column="img"/>
|
||||
</resultMap>
|
||||
|
||||
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
|
||||
<mapper namespace="com.xjs.mall.coupon.dao.HomeSubjectSpuDao">
|
||||
|
||||
<!-- 可根据自己的需求,是否要使用 -->
|
||||
<resultMap type="com.xjs.mall.coupon.entity.HomeSubjectSpuEntity" id="homeSubjectSpuMap">
|
||||
<result property="id" column="id"/>
|
||||
<result property="name" column="name"/>
|
||||
<result property="subjectId" column="subject_id"/>
|
||||
<result property="spuId" column="spu_id"/>
|
||||
<result property="sort" column="sort"/>
|
||||
</resultMap>
|
||||
|
||||
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
|
||||
<mapper namespace="com.xjs.mall.coupon.dao.MemberPriceDao">
|
||||
|
||||
<!-- 可根据自己的需求,是否要使用 -->
|
||||
<resultMap type="com.xjs.mall.coupon.entity.MemberPriceEntity" id="memberPriceMap">
|
||||
<result property="id" column="id"/>
|
||||
<result property="skuId" column="sku_id"/>
|
||||
<result property="memberLevelId" column="member_level_id"/>
|
||||
<result property="memberLevelName" column="member_level_name"/>
|
||||
<result property="memberPrice" column="member_price"/>
|
||||
<result property="addOther" column="add_other"/>
|
||||
</resultMap>
|
||||
|
||||
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
|
||||
<mapper namespace="com.xjs.mall.coupon.dao.SeckillPromotionDao">
|
||||
|
||||
<!-- 可根据自己的需求,是否要使用 -->
|
||||
<resultMap type="com.xjs.mall.coupon.entity.SeckillPromotionEntity" id="seckillPromotionMap">
|
||||
<result property="id" column="id"/>
|
||||
<result property="title" column="title"/>
|
||||
<result property="startTime" column="start_time"/>
|
||||
<result property="endTime" column="end_time"/>
|
||||
<result property="status" column="status"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="userId" column="user_id"/>
|
||||
</resultMap>
|
||||
|
||||
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
|
||||
<mapper namespace="com.xjs.mall.coupon.dao.SeckillSessionDao">
|
||||
|
||||
<!-- 可根据自己的需求,是否要使用 -->
|
||||
<resultMap type="com.xjs.mall.coupon.entity.SeckillSessionEntity" id="seckillSessionMap">
|
||||
<result property="id" column="id"/>
|
||||
<result property="name" column="name"/>
|
||||
<result property="startTime" column="start_time"/>
|
||||
<result property="endTime" column="end_time"/>
|
||||
<result property="status" column="status"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
</resultMap>
|
||||
|
||||
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
|
||||
<mapper namespace="com.xjs.mall.coupon.dao.SeckillSkuNoticeDao">
|
||||
|
||||
<!-- 可根据自己的需求,是否要使用 -->
|
||||
<resultMap type="com.xjs.mall.coupon.entity.SeckillSkuNoticeEntity" id="seckillSkuNoticeMap">
|
||||
<result property="id" column="id"/>
|
||||
<result property="memberId" column="member_id"/>
|
||||
<result property="skuId" column="sku_id"/>
|
||||
<result property="sessionId" column="session_id"/>
|
||||
<result property="subcribeTime" column="subcribe_time"/>
|
||||
<result property="sendTime" column="send_time"/>
|
||||
<result property="noticeType" column="notice_type"/>
|
||||
</resultMap>
|
||||
|
||||
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
|
||||
<mapper namespace="com.xjs.mall.coupon.dao.SeckillSkuRelationDao">
|
||||
|
||||
<!-- 可根据自己的需求,是否要使用 -->
|
||||
<resultMap type="com.xjs.mall.coupon.entity.SeckillSkuRelationEntity" id="seckillSkuRelationMap">
|
||||
<result property="id" column="id"/>
|
||||
<result property="promotionId" column="promotion_id"/>
|
||||
<result property="promotionSessionId" column="promotion_session_id"/>
|
||||
<result property="skuId" column="sku_id"/>
|
||||
<result property="seckillPrice" column="seckill_price"/>
|
||||
<result property="seckillCount" column="seckill_count"/>
|
||||
<result property="seckillLimit" column="seckill_limit"/>
|
||||
<result property="seckillSort" column="seckill_sort"/>
|
||||
</resultMap>
|
||||
|
||||
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
|
||||
<mapper namespace="com.xjs.mall.coupon.dao.SkuFullReductionDao">
|
||||
|
||||
<!-- 可根据自己的需求,是否要使用 -->
|
||||
<resultMap type="com.xjs.mall.coupon.entity.SkuFullReductionEntity" id="skuFullReductionMap">
|
||||
<result property="id" column="id"/>
|
||||
<result property="skuId" column="sku_id"/>
|
||||
<result property="fullPrice" column="full_price"/>
|
||||
<result property="reducePrice" column="reduce_price"/>
|
||||
<result property="addOther" column="add_other"/>
|
||||
</resultMap>
|
||||
|
||||
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
|
||||
<mapper namespace="com.xjs.mall.coupon.dao.SkuLadderDao">
|
||||
|
||||
<!-- 可根据自己的需求,是否要使用 -->
|
||||
<resultMap type="com.xjs.mall.coupon.entity.SkuLadderEntity" id="skuLadderMap">
|
||||
<result property="id" column="id"/>
|
||||
<result property="skuId" column="sku_id"/>
|
||||
<result property="fullCount" column="full_count"/>
|
||||
<result property="discount" column="discount"/>
|
||||
<result property="price" column="price"/>
|
||||
<result property="addOther" column="add_other"/>
|
||||
</resultMap>
|
||||
|
||||
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
|
||||
<mapper namespace="com.xjs.mall.coupon.dao.SpuBoundsDao">
|
||||
|
||||
<!-- 可根据自己的需求,是否要使用 -->
|
||||
<resultMap type="com.xjs.mall.coupon.entity.SpuBoundsEntity" id="spuBoundsMap">
|
||||
<result property="id" column="id"/>
|
||||
<result property="spuId" column="spu_id"/>
|
||||
<result property="growBounds" column="grow_bounds"/>
|
||||
<result property="buyBounds" column="buy_bounds"/>
|
||||
<result property="work" column="work"/>
|
||||
</resultMap>
|
||||
|
||||
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!--
|
||||
This is the JRebel configuration file. It maps the running application to your IDE workspace, enabling JRebel reloading for this project.
|
||||
Refer to https://manuals.jrebel.com/jrebel/standalone/config.html for more information.
|
||||
-->
|
||||
<application generated-by="intellij" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.zeroturnaround.com" xsi:schemaLocation="http://www.zeroturnaround.com http://update.zeroturnaround.com/jrebel/rebel-2_3.xsd">
|
||||
|
||||
<id>mall-coupon</id>
|
||||
|
||||
<classpath>
|
||||
<dir name="D:/Dev/IdeaPerject/GitHub/Cloud/xjs-business/xjs-project-mall/mall-coupon/target/classes">
|
||||
</dir>
|
||||
</classpath>
|
||||
|
||||
</application>
|
||||
|
|
@ -0,0 +1,246 @@
|
|||
<template>
|
||||
<el-dialog
|
||||
:title="!dataForm.id ? '新增' : '修改'"
|
||||
:close-on-click-modal="false"
|
||||
:visible.sync="visible">
|
||||
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()" label-width="80px">
|
||||
<el-form-item label="优惠卷类型[0->全场赠券;1->会员赠券;2->购物赠券;3->注册赠券]" prop="couponType">
|
||||
<el-input v-model="dataForm.couponType" placeholder="优惠卷类型[0->全场赠券;1->会员赠券;2->购物赠券;3->注册赠券]"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="优惠券图片" prop="couponImg">
|
||||
<el-input v-model="dataForm.couponImg" placeholder="优惠券图片"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="优惠卷名字" prop="couponName">
|
||||
<el-input v-model="dataForm.couponName" placeholder="优惠卷名字"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="数量" prop="num">
|
||||
<el-input v-model="dataForm.num" placeholder="数量"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="金额" prop="amount">
|
||||
<el-input v-model="dataForm.amount" placeholder="金额"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="每人限领张数" prop="perLimit">
|
||||
<el-input v-model="dataForm.perLimit" placeholder="每人限领张数"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="使用门槛" prop="minPoint">
|
||||
<el-input v-model="dataForm.minPoint" placeholder="使用门槛"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="开始时间" prop="startTime">
|
||||
<el-input v-model="dataForm.startTime" placeholder="开始时间"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="结束时间" prop="endTime">
|
||||
<el-input v-model="dataForm.endTime" placeholder="结束时间"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="使用类型[0->全场通用;1->指定分类;2->指定商品]" prop="useType">
|
||||
<el-input v-model="dataForm.useType" placeholder="使用类型[0->全场通用;1->指定分类;2->指定商品]"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="note">
|
||||
<el-input v-model="dataForm.note" placeholder="备注"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="发行数量" prop="publishCount">
|
||||
<el-input v-model="dataForm.publishCount" placeholder="发行数量"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="已使用数量" prop="useCount">
|
||||
<el-input v-model="dataForm.useCount" placeholder="已使用数量"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="领取数量" prop="receiveCount">
|
||||
<el-input v-model="dataForm.receiveCount" placeholder="领取数量"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="可以领取的开始日期" prop="enableStartTime">
|
||||
<el-input v-model="dataForm.enableStartTime" placeholder="可以领取的开始日期"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="可以领取的结束日期" prop="enableEndTime">
|
||||
<el-input v-model="dataForm.enableEndTime" placeholder="可以领取的结束日期"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="优惠码" prop="code">
|
||||
<el-input v-model="dataForm.code" placeholder="优惠码"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="可以领取的会员等级[0->不限等级,其他-对应等级]" prop="memberLevel">
|
||||
<el-input v-model="dataForm.memberLevel" placeholder="可以领取的会员等级[0->不限等级,其他-对应等级]"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="发布状态[0-未发布,1-已发布]" prop="publish">
|
||||
<el-input v-model="dataForm.publish" placeholder="发布状态[0-未发布,1-已发布]"></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="visible = false">取消</el-button>
|
||||
<el-button type="primary" @click="dataFormSubmit()">确定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data () {
|
||||
return {
|
||||
visible: false,
|
||||
dataForm: {
|
||||
id: 0,
|
||||
couponType: '',
|
||||
couponImg: '',
|
||||
couponName: '',
|
||||
num: '',
|
||||
amount: '',
|
||||
perLimit: '',
|
||||
minPoint: '',
|
||||
startTime: '',
|
||||
endTime: '',
|
||||
useType: '',
|
||||
note: '',
|
||||
publishCount: '',
|
||||
useCount: '',
|
||||
receiveCount: '',
|
||||
enableStartTime: '',
|
||||
enableEndTime: '',
|
||||
code: '',
|
||||
memberLevel: '',
|
||||
publish: ''
|
||||
},
|
||||
dataRule: {
|
||||
couponType: [
|
||||
{ required: true, message: '优惠卷类型[0->全场赠券;1->会员赠券;2->购物赠券;3->注册赠券]不能为空', trigger: 'blur' }
|
||||
],
|
||||
couponImg: [
|
||||
{ required: true, message: '优惠券图片不能为空', trigger: 'blur' }
|
||||
],
|
||||
couponName: [
|
||||
{ required: true, message: '优惠卷名字不能为空', trigger: 'blur' }
|
||||
],
|
||||
num: [
|
||||
{ required: true, message: '数量不能为空', trigger: 'blur' }
|
||||
],
|
||||
amount: [
|
||||
{ required: true, message: '金额不能为空', trigger: 'blur' }
|
||||
],
|
||||
perLimit: [
|
||||
{ required: true, message: '每人限领张数不能为空', trigger: 'blur' }
|
||||
],
|
||||
minPoint: [
|
||||
{ required: true, message: '使用门槛不能为空', trigger: 'blur' }
|
||||
],
|
||||
startTime: [
|
||||
{ required: true, message: '开始时间不能为空', trigger: 'blur' }
|
||||
],
|
||||
endTime: [
|
||||
{ required: true, message: '结束时间不能为空', trigger: 'blur' }
|
||||
],
|
||||
useType: [
|
||||
{ required: true, message: '使用类型[0->全场通用;1->指定分类;2->指定商品]不能为空', trigger: 'blur' }
|
||||
],
|
||||
note: [
|
||||
{ required: true, message: '备注不能为空', trigger: 'blur' }
|
||||
],
|
||||
publishCount: [
|
||||
{ required: true, message: '发行数量不能为空', trigger: 'blur' }
|
||||
],
|
||||
useCount: [
|
||||
{ required: true, message: '已使用数量不能为空', trigger: 'blur' }
|
||||
],
|
||||
receiveCount: [
|
||||
{ required: true, message: '领取数量不能为空', trigger: 'blur' }
|
||||
],
|
||||
enableStartTime: [
|
||||
{ required: true, message: '可以领取的开始日期不能为空', trigger: 'blur' }
|
||||
],
|
||||
enableEndTime: [
|
||||
{ required: true, message: '可以领取的结束日期不能为空', trigger: 'blur' }
|
||||
],
|
||||
code: [
|
||||
{ required: true, message: '优惠码不能为空', trigger: 'blur' }
|
||||
],
|
||||
memberLevel: [
|
||||
{ required: true, message: '可以领取的会员等级[0->不限等级,其他-对应等级]不能为空', trigger: 'blur' }
|
||||
],
|
||||
publish: [
|
||||
{ required: true, message: '发布状态[0-未发布,1-已发布]不能为空', trigger: 'blur' }
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
init (id) {
|
||||
this.dataForm.id = id || 0
|
||||
this.visible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs['dataForm'].resetFields()
|
||||
if (this.dataForm.id) {
|
||||
this.$http({
|
||||
url: this.$http.adornUrl(`/coupon/coupon/info/${this.dataForm.id}`),
|
||||
method: 'get',
|
||||
params: this.$http.adornParams()
|
||||
}).then(({data}) => {
|
||||
if (data && data.code === 0) {
|
||||
this.dataForm.couponType = data.coupon.couponType
|
||||
this.dataForm.couponImg = data.coupon.couponImg
|
||||
this.dataForm.couponName = data.coupon.couponName
|
||||
this.dataForm.num = data.coupon.num
|
||||
this.dataForm.amount = data.coupon.amount
|
||||
this.dataForm.perLimit = data.coupon.perLimit
|
||||
this.dataForm.minPoint = data.coupon.minPoint
|
||||
this.dataForm.startTime = data.coupon.startTime
|
||||
this.dataForm.endTime = data.coupon.endTime
|
||||
this.dataForm.useType = data.coupon.useType
|
||||
this.dataForm.note = data.coupon.note
|
||||
this.dataForm.publishCount = data.coupon.publishCount
|
||||
this.dataForm.useCount = data.coupon.useCount
|
||||
this.dataForm.receiveCount = data.coupon.receiveCount
|
||||
this.dataForm.enableStartTime = data.coupon.enableStartTime
|
||||
this.dataForm.enableEndTime = data.coupon.enableEndTime
|
||||
this.dataForm.code = data.coupon.code
|
||||
this.dataForm.memberLevel = data.coupon.memberLevel
|
||||
this.dataForm.publish = data.coupon.publish
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
// 表单提交
|
||||
dataFormSubmit () {
|
||||
this.$refs['dataForm'].validate((valid) => {
|
||||
if (valid) {
|
||||
this.$http({
|
||||
url: this.$http.adornUrl(`/coupon/coupon/${!this.dataForm.id ? 'save' : 'update'}`),
|
||||
method: 'post',
|
||||
data: this.$http.adornData({
|
||||
'id': this.dataForm.id || undefined,
|
||||
'couponType': this.dataForm.couponType,
|
||||
'couponImg': this.dataForm.couponImg,
|
||||
'couponName': this.dataForm.couponName,
|
||||
'num': this.dataForm.num,
|
||||
'amount': this.dataForm.amount,
|
||||
'perLimit': this.dataForm.perLimit,
|
||||
'minPoint': this.dataForm.minPoint,
|
||||
'startTime': this.dataForm.startTime,
|
||||
'endTime': this.dataForm.endTime,
|
||||
'useType': this.dataForm.useType,
|
||||
'note': this.dataForm.note,
|
||||
'publishCount': this.dataForm.publishCount,
|
||||
'useCount': this.dataForm.useCount,
|
||||
'receiveCount': this.dataForm.receiveCount,
|
||||
'enableStartTime': this.dataForm.enableStartTime,
|
||||
'enableEndTime': this.dataForm.enableEndTime,
|
||||
'code': this.dataForm.code,
|
||||
'memberLevel': this.dataForm.memberLevel,
|
||||
'publish': this.dataForm.publish
|
||||
})
|
||||
}).then(({data}) => {
|
||||
if (data && data.code === 0) {
|
||||
this.$message({
|
||||
message: '操作成功',
|
||||
type: 'success',
|
||||
duration: 1500,
|
||||
onClose: () => {
|
||||
this.visible = false
|
||||
this.$emit('refreshDataList')
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.$message.error(data.msg)
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
@ -0,0 +1,271 @@
|
|||
<template>
|
||||
<div class="mod-config">
|
||||
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()">
|
||||
<el-form-item>
|
||||
<el-input v-model="dataForm.key" placeholder="参数名" clearable></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button @click="getDataList()">查询</el-button>
|
||||
<el-button v-if="isAuth('coupon:coupon:save')" type="primary" @click="addOrUpdateHandle()">新增</el-button>
|
||||
<el-button v-if="isAuth('coupon:coupon:delete')" type="danger" @click="deleteHandle()" :disabled="dataListSelections.length <= 0">批量删除</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-table
|
||||
:data="dataList"
|
||||
border
|
||||
v-loading="dataListLoading"
|
||||
@selection-change="selectionChangeHandle"
|
||||
style="width: 100%;">
|
||||
<el-table-column
|
||||
type="selection"
|
||||
header-align="center"
|
||||
align="center"
|
||||
width="50">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="id"
|
||||
header-align="center"
|
||||
align="center"
|
||||
label="id">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="couponType"
|
||||
header-align="center"
|
||||
align="center"
|
||||
label="优惠卷类型[0->全场赠券;1->会员赠券;2->购物赠券;3->注册赠券]">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="couponImg"
|
||||
header-align="center"
|
||||
align="center"
|
||||
label="优惠券图片">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="couponName"
|
||||
header-align="center"
|
||||
align="center"
|
||||
label="优惠卷名字">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="num"
|
||||
header-align="center"
|
||||
align="center"
|
||||
label="数量">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="amount"
|
||||
header-align="center"
|
||||
align="center"
|
||||
label="金额">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="perLimit"
|
||||
header-align="center"
|
||||
align="center"
|
||||
label="每人限领张数">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="minPoint"
|
||||
header-align="center"
|
||||
align="center"
|
||||
label="使用门槛">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="startTime"
|
||||
header-align="center"
|
||||
align="center"
|
||||
label="开始时间">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="endTime"
|
||||
header-align="center"
|
||||
align="center"
|
||||
label="结束时间">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="useType"
|
||||
header-align="center"
|
||||
align="center"
|
||||
label="使用类型[0->全场通用;1->指定分类;2->指定商品]">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="note"
|
||||
header-align="center"
|
||||
align="center"
|
||||
label="备注">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="publishCount"
|
||||
header-align="center"
|
||||
align="center"
|
||||
label="发行数量">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="useCount"
|
||||
header-align="center"
|
||||
align="center"
|
||||
label="已使用数量">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="receiveCount"
|
||||
header-align="center"
|
||||
align="center"
|
||||
label="领取数量">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="enableStartTime"
|
||||
header-align="center"
|
||||
align="center"
|
||||
label="可以领取的开始日期">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="enableEndTime"
|
||||
header-align="center"
|
||||
align="center"
|
||||
label="可以领取的结束日期">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="code"
|
||||
header-align="center"
|
||||
align="center"
|
||||
label="优惠码">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="memberLevel"
|
||||
header-align="center"
|
||||
align="center"
|
||||
label="可以领取的会员等级[0->不限等级,其他-对应等级]">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="publish"
|
||||
header-align="center"
|
||||
align="center"
|
||||
label="发布状态[0-未发布,1-已发布]">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
fixed="right"
|
||||
header-align="center"
|
||||
align="center"
|
||||
width="150"
|
||||
label="操作">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="text" size="small" @click="addOrUpdateHandle(scope.row.id)">修改</el-button>
|
||||
<el-button type="text" size="small" @click="deleteHandle(scope.row.id)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-pagination
|
||||
@size-change="sizeChangeHandle"
|
||||
@current-change="currentChangeHandle"
|
||||
:current-page="pageIndex"
|
||||
:page-sizes="[10, 20, 50, 100]"
|
||||
:page-size="pageSize"
|
||||
:total="totalPage"
|
||||
layout="total, sizes, prev, pager, next, jumper">
|
||||
</el-pagination>
|
||||
<!-- 弹窗, 新增 / 修改 -->
|
||||
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import AddOrUpdate from './coupon-add-or-update'
|
||||
export default {
|
||||
data () {
|
||||
return {
|
||||
dataForm: {
|
||||
key: ''
|
||||
},
|
||||
dataList: [],
|
||||
pageIndex: 1,
|
||||
pageSize: 10,
|
||||
totalPage: 0,
|
||||
dataListLoading: false,
|
||||
dataListSelections: [],
|
||||
addOrUpdateVisible: false
|
||||
}
|
||||
},
|
||||
components: {
|
||||
AddOrUpdate
|
||||
},
|
||||
activated () {
|
||||
this.getDataList()
|
||||
},
|
||||
methods: {
|
||||
// 获取数据列表
|
||||
getDataList () {
|
||||
this.dataListLoading = true
|
||||
this.$http({
|
||||
url: this.$http.adornUrl('/coupon/coupon/list'),
|
||||
method: 'get',
|
||||
params: this.$http.adornParams({
|
||||
'page': this.pageIndex,
|
||||
'limit': this.pageSize,
|
||||
'key': this.dataForm.key
|
||||
})
|
||||
}).then(({data}) => {
|
||||
if (data && data.code === 0) {
|
||||
this.dataList = data.page.list
|
||||
this.totalPage = data.page.totalCount
|
||||
} else {
|
||||
this.dataList = []
|
||||
this.totalPage = 0
|
||||
}
|
||||
this.dataListLoading = false
|
||||
})
|
||||
},
|
||||
// 每页数
|
||||
sizeChangeHandle (val) {
|
||||
this.pageSize = val
|
||||
this.pageIndex = 1
|
||||
this.getDataList()
|
||||
},
|
||||
// 当前页
|
||||
currentChangeHandle (val) {
|
||||
this.pageIndex = val
|
||||
this.getDataList()
|
||||
},
|
||||
// 多选
|
||||
selectionChangeHandle (val) {
|
||||
this.dataListSelections = val
|
||||
},
|
||||
// 新增 / 修改
|
||||
addOrUpdateHandle (id) {
|
||||
this.addOrUpdateVisible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.addOrUpdate.init(id)
|
||||
})
|
||||
},
|
||||
// 删除
|
||||
deleteHandle (id) {
|
||||
var ids = id ? [id] : this.dataListSelections.map(item => {
|
||||
return item.id
|
||||
})
|
||||
this.$confirm(`确定对[id=${ids.join(',')}]进行[${id ? '删除' : '批量删除'}]操作?`, '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.$http({
|
||||
url: this.$http.adornUrl('/coupon/coupon/delete'),
|
||||
method: 'post',
|
||||
data: this.$http.adornData(ids, false)
|
||||
}).then(({data}) => {
|
||||
if (data && data.code === 0) {
|
||||
this.$message({
|
||||
message: '操作成功',
|
||||
type: 'success',
|
||||
duration: 1500,
|
||||
onClose: () => {
|
||||
this.getDataList()
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.$message.error(data.msg)
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
@ -0,0 +1,156 @@
|
|||
<template>
|
||||
<el-dialog
|
||||
:title="!dataForm.id ? '新增' : '修改'"
|
||||
:close-on-click-modal="false"
|
||||
:visible.sync="visible">
|
||||
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()" label-width="80px">
|
||||
<el-form-item label="优惠券id" prop="couponId">
|
||||
<el-input v-model="dataForm.couponId" placeholder="优惠券id"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="会员id" prop="memberId">
|
||||
<el-input v-model="dataForm.memberId" placeholder="会员id"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="会员名字" prop="memberNickName">
|
||||
<el-input v-model="dataForm.memberNickName" placeholder="会员名字"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="获取方式[0->后台赠送;1->主动领取]" prop="getType">
|
||||
<el-input v-model="dataForm.getType" placeholder="获取方式[0->后台赠送;1->主动领取]"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="创建时间" prop="createTime">
|
||||
<el-input v-model="dataForm.createTime" placeholder="创建时间"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="使用状态[0->未使用;1->已使用;2->已过期]" prop="useType">
|
||||
<el-input v-model="dataForm.useType" placeholder="使用状态[0->未使用;1->已使用;2->已过期]"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="使用时间" prop="useTime">
|
||||
<el-input v-model="dataForm.useTime" placeholder="使用时间"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="订单id" prop="orderId">
|
||||
<el-input v-model="dataForm.orderId" placeholder="订单id"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="订单号" prop="orderSn">
|
||||
<el-input v-model="dataForm.orderSn" placeholder="订单号"></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="visible = false">取消</el-button>
|
||||
<el-button type="primary" @click="dataFormSubmit()">确定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data () {
|
||||
return {
|
||||
visible: false,
|
||||
dataForm: {
|
||||
id: 0,
|
||||
couponId: '',
|
||||
memberId: '',
|
||||
memberNickName: '',
|
||||
getType: '',
|
||||
createTime: '',
|
||||
useType: '',
|
||||
useTime: '',
|
||||
orderId: '',
|
||||
orderSn: ''
|
||||
},
|
||||
dataRule: {
|
||||
couponId: [
|
||||
{ required: true, message: '优惠券id不能为空', trigger: 'blur' }
|
||||
],
|
||||
memberId: [
|
||||
{ required: true, message: '会员id不能为空', trigger: 'blur' }
|
||||
],
|
||||
memberNickName: [
|
||||
{ required: true, message: '会员名字不能为空', trigger: 'blur' }
|
||||
],
|
||||
getType: [
|
||||
{ required: true, message: '获取方式[0->后台赠送;1->主动领取]不能为空', trigger: 'blur' }
|
||||
],
|
||||
createTime: [
|
||||
{ required: true, message: '创建时间不能为空', trigger: 'blur' }
|
||||
],
|
||||
useType: [
|
||||
{ required: true, message: '使用状态[0->未使用;1->已使用;2->已过期]不能为空', trigger: 'blur' }
|
||||
],
|
||||
useTime: [
|
||||
{ required: true, message: '使用时间不能为空', trigger: 'blur' }
|
||||
],
|
||||
orderId: [
|
||||
{ required: true, message: '订单id不能为空', trigger: 'blur' }
|
||||
],
|
||||
orderSn: [
|
||||
{ required: true, message: '订单号不能为空', trigger: 'blur' }
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
init (id) {
|
||||
this.dataForm.id = id || 0
|
||||
this.visible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs['dataForm'].resetFields()
|
||||
if (this.dataForm.id) {
|
||||
this.$http({
|
||||
url: this.$http.adornUrl(`/coupon/couponhistory/info/${this.dataForm.id}`),
|
||||
method: 'get',
|
||||
params: this.$http.adornParams()
|
||||
}).then(({data}) => {
|
||||
if (data && data.code === 0) {
|
||||
this.dataForm.couponId = data.couponHistory.couponId
|
||||
this.dataForm.memberId = data.couponHistory.memberId
|
||||
this.dataForm.memberNickName = data.couponHistory.memberNickName
|
||||
this.dataForm.getType = data.couponHistory.getType
|
||||
this.dataForm.createTime = data.couponHistory.createTime
|
||||
this.dataForm.useType = data.couponHistory.useType
|
||||
this.dataForm.useTime = data.couponHistory.useTime
|
||||
this.dataForm.orderId = data.couponHistory.orderId
|
||||
this.dataForm.orderSn = data.couponHistory.orderSn
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
// 表单提交
|
||||
dataFormSubmit () {
|
||||
this.$refs['dataForm'].validate((valid) => {
|
||||
if (valid) {
|
||||
this.$http({
|
||||
url: this.$http.adornUrl(`/coupon/couponhistory/${!this.dataForm.id ? 'save' : 'update'}`),
|
||||
method: 'post',
|
||||
data: this.$http.adornData({
|
||||
'id': this.dataForm.id || undefined,
|
||||
'couponId': this.dataForm.couponId,
|
||||
'memberId': this.dataForm.memberId,
|
||||
'memberNickName': this.dataForm.memberNickName,
|
||||
'getType': this.dataForm.getType,
|
||||
'createTime': this.dataForm.createTime,
|
||||
'useType': this.dataForm.useType,
|
||||
'useTime': this.dataForm.useTime,
|
||||
'orderId': this.dataForm.orderId,
|
||||
'orderSn': this.dataForm.orderSn
|
||||
})
|
||||
}).then(({data}) => {
|
||||
if (data && data.code === 0) {
|
||||
this.$message({
|
||||
message: '操作成功',
|
||||
type: 'success',
|
||||
duration: 1500,
|
||||
onClose: () => {
|
||||
this.visible = false
|
||||
this.$emit('refreshDataList')
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.$message.error(data.msg)
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
@ -0,0 +1,211 @@
|
|||
<template>
|
||||
<div class="mod-config">
|
||||
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()">
|
||||
<el-form-item>
|
||||
<el-input v-model="dataForm.key" placeholder="参数名" clearable></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button @click="getDataList()">查询</el-button>
|
||||
<el-button v-if="isAuth('coupon:couponhistory:save')" type="primary" @click="addOrUpdateHandle()">新增</el-button>
|
||||
<el-button v-if="isAuth('coupon:couponhistory:delete')" type="danger" @click="deleteHandle()" :disabled="dataListSelections.length <= 0">批量删除</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-table
|
||||
:data="dataList"
|
||||
border
|
||||
v-loading="dataListLoading"
|
||||
@selection-change="selectionChangeHandle"
|
||||
style="width: 100%;">
|
||||
<el-table-column
|
||||
type="selection"
|
||||
header-align="center"
|
||||
align="center"
|
||||
width="50">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="id"
|
||||
header-align="center"
|
||||
align="center"
|
||||
label="id">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="couponId"
|
||||
header-align="center"
|
||||
align="center"
|
||||
label="优惠券id">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="memberId"
|
||||
header-align="center"
|
||||
align="center"
|
||||
label="会员id">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="memberNickName"
|
||||
header-align="center"
|
||||
align="center"
|
||||
label="会员名字">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="getType"
|
||||
header-align="center"
|
||||
align="center"
|
||||
label="获取方式[0->后台赠送;1->主动领取]">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="createTime"
|
||||
header-align="center"
|
||||
align="center"
|
||||
label="创建时间">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="useType"
|
||||
header-align="center"
|
||||
align="center"
|
||||
label="使用状态[0->未使用;1->已使用;2->已过期]">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="useTime"
|
||||
header-align="center"
|
||||
align="center"
|
||||
label="使用时间">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="orderId"
|
||||
header-align="center"
|
||||
align="center"
|
||||
label="订单id">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="orderSn"
|
||||
header-align="center"
|
||||
align="center"
|
||||
label="订单号">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
fixed="right"
|
||||
header-align="center"
|
||||
align="center"
|
||||
width="150"
|
||||
label="操作">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="text" size="small" @click="addOrUpdateHandle(scope.row.id)">修改</el-button>
|
||||
<el-button type="text" size="small" @click="deleteHandle(scope.row.id)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-pagination
|
||||
@size-change="sizeChangeHandle"
|
||||
@current-change="currentChangeHandle"
|
||||
:current-page="pageIndex"
|
||||
:page-sizes="[10, 20, 50, 100]"
|
||||
:page-size="pageSize"
|
||||
:total="totalPage"
|
||||
layout="total, sizes, prev, pager, next, jumper">
|
||||
</el-pagination>
|
||||
<!-- 弹窗, 新增 / 修改 -->
|
||||
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import AddOrUpdate from './couponhistory-add-or-update'
|
||||
export default {
|
||||
data () {
|
||||
return {
|
||||
dataForm: {
|
||||
key: ''
|
||||
},
|
||||
dataList: [],
|
||||
pageIndex: 1,
|
||||
pageSize: 10,
|
||||
totalPage: 0,
|
||||
dataListLoading: false,
|
||||
dataListSelections: [],
|
||||
addOrUpdateVisible: false
|
||||
}
|
||||
},
|
||||
components: {
|
||||
AddOrUpdate
|
||||
},
|
||||
activated () {
|
||||
this.getDataList()
|
||||
},
|
||||
methods: {
|
||||
// 获取数据列表
|
||||
getDataList () {
|
||||
this.dataListLoading = true
|
||||
this.$http({
|
||||
url: this.$http.adornUrl('/coupon/couponhistory/list'),
|
||||
method: 'get',
|
||||
params: this.$http.adornParams({
|
||||
'page': this.pageIndex,
|
||||
'limit': this.pageSize,
|
||||
'key': this.dataForm.key
|
||||
})
|
||||
}).then(({data}) => {
|
||||
if (data && data.code === 0) {
|
||||
this.dataList = data.page.list
|
||||
this.totalPage = data.page.totalCount
|
||||
} else {
|
||||
this.dataList = []
|
||||
this.totalPage = 0
|
||||
}
|
||||
this.dataListLoading = false
|
||||
})
|
||||
},
|
||||
// 每页数
|
||||
sizeChangeHandle (val) {
|
||||
this.pageSize = val
|
||||
this.pageIndex = 1
|
||||
this.getDataList()
|
||||
},
|
||||
// 当前页
|
||||
currentChangeHandle (val) {
|
||||
this.pageIndex = val
|
||||
this.getDataList()
|
||||
},
|
||||
// 多选
|
||||
selectionChangeHandle (val) {
|
||||
this.dataListSelections = val
|
||||
},
|
||||
// 新增 / 修改
|
||||
addOrUpdateHandle (id) {
|
||||
this.addOrUpdateVisible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.addOrUpdate.init(id)
|
||||
})
|
||||
},
|
||||
// 删除
|
||||
deleteHandle (id) {
|
||||
var ids = id ? [id] : this.dataListSelections.map(item => {
|
||||
return item.id
|
||||
})
|
||||
this.$confirm(`确定对[id=${ids.join(',')}]进行[${id ? '删除' : '批量删除'}]操作?`, '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.$http({
|
||||
url: this.$http.adornUrl('/coupon/couponhistory/delete'),
|
||||
method: 'post',
|
||||
data: this.$http.adornData(ids, false)
|
||||
}).then(({data}) => {
|
||||
if (data && data.code === 0) {
|
||||
this.$message({
|
||||
message: '操作成功',
|
||||
type: 'success',
|
||||
duration: 1500,
|
||||
onClose: () => {
|
||||
this.getDataList()
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.$message.error(data.msg)
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue