商城业务所有模块及tools模块完成mp改造
This commit is contained in:
@ -1,176 +1,205 @@
|
||||
package co.yixiang.modules.activity.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import lombok.Data;
|
||||
import com.baomidou.mybatisplus.annotation.FieldFill;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.bean.copier.CopyOptions;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.persistence.*;
|
||||
import javax.validation.constraints.Min;
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.io.Serializable;
|
||||
import javax.validation.constraints.*;
|
||||
import java.sql.Timestamp;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @author xuwenbo
|
||||
* @date 2019-12-22
|
||||
* @author hupeng
|
||||
* @date 2020-05-13
|
||||
*/
|
||||
@Entity
|
||||
@Data
|
||||
@Table(name="yx_store_bargain")
|
||||
public class YxStoreBargain implements Serializable {
|
||||
|
||||
// 砍价产品ID
|
||||
/** 砍价产品ID */
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
@Column(name = "id")
|
||||
private Integer id;
|
||||
|
||||
// 关联产品ID
|
||||
|
||||
/** 关联产品ID */
|
||||
@Column(name = "product_id",nullable = false)
|
||||
@NotNull
|
||||
private Integer productId;
|
||||
|
||||
// 砍价活动名称
|
||||
|
||||
/** 砍价活动名称 */
|
||||
@Column(name = "title",nullable = false)
|
||||
@NotBlank(message = "请输入砍价活动名称")
|
||||
@NotBlank
|
||||
private String title;
|
||||
|
||||
// 砍价活动图片
|
||||
|
||||
/** 砍价活动图片 */
|
||||
@Column(name = "image",nullable = false)
|
||||
@NotBlank(message = "请上传产品图片")
|
||||
@NotBlank
|
||||
private String image;
|
||||
|
||||
// 单位名称
|
||||
|
||||
/** 单位名称 */
|
||||
@Column(name = "unit_name")
|
||||
@NotBlank(message = "单位名不能为空")
|
||||
private String unitName;
|
||||
|
||||
// 库存
|
||||
|
||||
/** 库存 */
|
||||
@Column(name = "stock")
|
||||
@NotNull(message = "库存必填")
|
||||
private Integer stock;
|
||||
|
||||
// 销量
|
||||
|
||||
/** 销量 */
|
||||
@Column(name = "sales")
|
||||
@NotNull(message = "销量必填")
|
||||
private Integer sales;
|
||||
|
||||
// 砍价产品轮播图
|
||||
|
||||
/** 砍价产品轮播图 */
|
||||
@Column(name = "images",nullable = false)
|
||||
@NotBlank(message = "请上传产品轮播图")
|
||||
@NotBlank
|
||||
private String images;
|
||||
|
||||
// 砍价开启时间
|
||||
|
||||
/** 砍价开启时间 */
|
||||
@Column(name = "start_time",nullable = false)
|
||||
@NotNull
|
||||
private Integer startTime;
|
||||
|
||||
// 砍价结束时间
|
||||
|
||||
/** 砍价结束时间 */
|
||||
@Column(name = "stop_time",nullable = false)
|
||||
@NotNull
|
||||
private Integer stopTime;
|
||||
|
||||
@NotNull(message = "开始时间不能为空")
|
||||
private Date startTimeDate;
|
||||
|
||||
@NotNull(message = "结束时间不能为空")
|
||||
private Date endTimeDate;
|
||||
|
||||
// 砍价产品名称
|
||||
/** 砍价产品名称 */
|
||||
@Column(name = "store_name")
|
||||
private String storeName;
|
||||
|
||||
// 砍价金额
|
||||
|
||||
/** 砍价金额 */
|
||||
@Column(name = "price")
|
||||
@NotNull(message = "砍价金额必填")
|
||||
@Min(value = 0,message = "砍价金额必须大于等于0")
|
||||
private BigDecimal price;
|
||||
|
||||
// 砍价商品最低价
|
||||
|
||||
/** 砍价商品最低价 */
|
||||
@Column(name = "min_price")
|
||||
@NotNull(message = "砍价商品最低价必填")
|
||||
@Min(value = 0,message = "砍价商品最低价必须大于等于0")
|
||||
private BigDecimal minPrice;
|
||||
|
||||
// 每次购买的砍价产品数量
|
||||
|
||||
/** 每次购买的砍价产品数量 */
|
||||
@Column(name = "num")
|
||||
@NotNull(message = "购买的砍价产品数量必填")
|
||||
@Min(value = 0,message = "购买的砍价产品数量必须大于等于0")
|
||||
private Integer num;
|
||||
|
||||
// 用户每次砍价的最大金额
|
||||
|
||||
/** 用户每次砍价的最大金额 */
|
||||
@Column(name = "bargain_max_price")
|
||||
@NotNull(message = "砍价的最大金额必填")
|
||||
private BigDecimal bargainMaxPrice;
|
||||
|
||||
// 用户每次砍价的最小金额
|
||||
|
||||
/** 用户每次砍价的最小金额 */
|
||||
@Column(name = "bargain_min_price")
|
||||
@NotNull(message = "砍价的最小金额必填")
|
||||
private BigDecimal bargainMinPrice;
|
||||
|
||||
// 用户每次砍价的次数
|
||||
@Column(name = "bargain_num",insertable = false)
|
||||
|
||||
/** 用户每次砍价的次数 */
|
||||
@Column(name = "bargain_num",nullable = false)
|
||||
@NotNull
|
||||
private Integer bargainNum;
|
||||
|
||||
// 砍价状态 0(到砍价时间不自动开启) 1(到砍价时间自动开启时间)
|
||||
|
||||
/** 砍价状态 0(到砍价时间不自动开启) 1(到砍价时间自动开启时间) */
|
||||
@Column(name = "status",nullable = false)
|
||||
@NotNull(message = "请选择活动状态")
|
||||
@NotNull
|
||||
private Integer status;
|
||||
|
||||
// 砍价详情
|
||||
|
||||
/** 砍价详情 */
|
||||
@Column(name = "description")
|
||||
private String description;
|
||||
|
||||
// 反多少积分
|
||||
@Column(name = "give_integral",insertable = false)
|
||||
|
||||
/** 反多少积分 */
|
||||
@Column(name = "give_integral",nullable = false)
|
||||
@NotNull
|
||||
private BigDecimal giveIntegral;
|
||||
|
||||
// 砍价活动简介
|
||||
|
||||
/** 砍价活动简介 */
|
||||
@Column(name = "info")
|
||||
private String info;
|
||||
|
||||
// 成本价
|
||||
|
||||
/** 成本价 */
|
||||
@Column(name = "cost")
|
||||
@NotNull(message = "成本价必填")
|
||||
private BigDecimal cost;
|
||||
|
||||
// 排序
|
||||
|
||||
/** 排序 */
|
||||
@Column(name = "sort",nullable = false)
|
||||
@NotNull(message = "排序必填")
|
||||
@NotNull
|
||||
private Integer sort;
|
||||
|
||||
// 是否推荐0不推荐1推荐
|
||||
@Column(name = "is_hot",insertable = false)
|
||||
|
||||
/** 是否推荐0不推荐1推荐 */
|
||||
@Column(name = "is_hot",nullable = false)
|
||||
@NotNull
|
||||
private Integer isHot;
|
||||
|
||||
// 是否删除 0未删除 1删除
|
||||
@Column(name = "is_del",insertable = false)
|
||||
|
||||
/** 是否删除 0未删除 1删除 */
|
||||
@Column(name = "is_del",nullable = false)
|
||||
@NotNull
|
||||
private Integer isDel;
|
||||
|
||||
// 添加时间
|
||||
|
||||
/** 添加时间 */
|
||||
@Column(name = "add_time")
|
||||
private Integer addTime;
|
||||
|
||||
// 是否包邮 0不包邮 1包邮
|
||||
|
||||
/** 是否包邮 0不包邮 1包邮 */
|
||||
@Column(name = "is_postage",nullable = false)
|
||||
@NotNull(message = "请选择是否包邮")
|
||||
@NotNull
|
||||
private Integer isPostage;
|
||||
|
||||
// 邮费
|
||||
|
||||
/** 邮费 */
|
||||
@Column(name = "postage")
|
||||
private BigDecimal postage;
|
||||
|
||||
// 砍价规则
|
||||
|
||||
/** 砍价规则 */
|
||||
@Column(name = "rule")
|
||||
private String rule;
|
||||
|
||||
// 砍价产品浏览量
|
||||
@Column(name = "look",insertable = false)
|
||||
|
||||
/** 砍价产品浏览量 */
|
||||
@Column(name = "look")
|
||||
private Integer look;
|
||||
|
||||
// 砍价产品分享量
|
||||
@Column(name = "share",insertable = false)
|
||||
|
||||
/** 砍价产品分享量 */
|
||||
@Column(name = "share")
|
||||
private Integer share;
|
||||
|
||||
|
||||
@Column(name = "end_time_date",nullable = false)
|
||||
@NotNull
|
||||
private Timestamp endTimeDate;
|
||||
|
||||
|
||||
@Column(name = "start_time_date",nullable = false)
|
||||
@NotNull
|
||||
private Timestamp startTimeDate;
|
||||
|
||||
|
||||
public void copy(YxStoreBargain source){
|
||||
BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true));
|
||||
}
|
||||
|
@ -1,20 +1,19 @@
|
||||
package co.yixiang.modules.activity.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import lombok.Data;
|
||||
import com.baomidou.mybatisplus.annotation.FieldFill;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.bean.copier.CopyOptions;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.persistence.*;
|
||||
import javax.validation.constraints.Min;
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.io.Serializable;
|
||||
import javax.validation.constraints.*;
|
||||
import java.sql.Timestamp;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @author hupeng
|
||||
* @date 2019-11-18
|
||||
* @date 2020-05-13
|
||||
*/
|
||||
@Entity
|
||||
@Data
|
||||
@ -26,134 +25,173 @@ public class YxStoreCombination implements Serializable {
|
||||
@Column(name = "id")
|
||||
private Integer id;
|
||||
|
||||
// 商品id
|
||||
|
||||
/** 商品id */
|
||||
@Column(name = "product_id",nullable = false)
|
||||
@NotNull
|
||||
private Integer productId;
|
||||
|
||||
// 商户id
|
||||
@Column(name = "mer_id",insertable = false)
|
||||
|
||||
/** 商户id */
|
||||
@Column(name = "mer_id")
|
||||
private Integer merId;
|
||||
|
||||
// 推荐图
|
||||
|
||||
/** 推荐图 */
|
||||
@Column(name = "image",nullable = false)
|
||||
@NotBlank(message = "请上传产品图片")
|
||||
@NotBlank
|
||||
private String image;
|
||||
|
||||
// 轮播图
|
||||
|
||||
/** 轮播图 */
|
||||
@Column(name = "images",nullable = false)
|
||||
@NotBlank(message = "请上传产品轮播图")
|
||||
@NotBlank
|
||||
private String images;
|
||||
|
||||
// 活动标题
|
||||
|
||||
/** 活动标题 */
|
||||
@Column(name = "title",nullable = false)
|
||||
@NotBlank(message = "请输入拼团名称")
|
||||
@NotBlank
|
||||
private String title;
|
||||
|
||||
// 活动属性
|
||||
|
||||
/** 活动属性 */
|
||||
@Column(name = "attr")
|
||||
private String attr;
|
||||
|
||||
// 参团人数
|
||||
|
||||
/** 参团人数 */
|
||||
@Column(name = "people",nullable = false)
|
||||
@NotNull(message = "拼团人数必填")
|
||||
@Min(value = 2,message = "拼团人数必须大于1")
|
||||
@NotNull
|
||||
private Integer people;
|
||||
|
||||
// 简介
|
||||
|
||||
/** 简介 */
|
||||
@Column(name = "info",nullable = false)
|
||||
@NotBlank(message = "请输入拼团简介")
|
||||
@NotBlank
|
||||
private String info;
|
||||
|
||||
// 价格
|
||||
|
||||
/** 价格 */
|
||||
@Column(name = "price",nullable = false)
|
||||
@NotNull(message = "拼团价必填")
|
||||
@Min(value = 0,message = "拼团价必须大于0")
|
||||
@NotNull
|
||||
private BigDecimal price;
|
||||
|
||||
// 排序
|
||||
|
||||
/** 排序 */
|
||||
@Column(name = "sort",nullable = false)
|
||||
@NotNull(message = "排序必填")
|
||||
@NotNull
|
||||
private Integer sort;
|
||||
|
||||
// 销量
|
||||
|
||||
/** 销量 */
|
||||
@Column(name = "sales",nullable = false)
|
||||
@NotNull(message = "销量必填")
|
||||
@NotNull
|
||||
private Integer sales;
|
||||
|
||||
// 库存
|
||||
|
||||
/** 库存 */
|
||||
@Column(name = "stock",nullable = false)
|
||||
@NotNull(message = "库存必填")
|
||||
@NotNull
|
||||
private Integer stock;
|
||||
|
||||
// 添加时间
|
||||
|
||||
/** 添加时间 */
|
||||
@Column(name = "add_time",nullable = false)
|
||||
@NotBlank
|
||||
private String addTime;
|
||||
|
||||
// 推荐
|
||||
|
||||
/** 推荐 */
|
||||
@Column(name = "is_host",nullable = false)
|
||||
@NotNull(message = "推荐必须选择")
|
||||
@NotNull
|
||||
private Integer isHost;
|
||||
|
||||
// 产品状态
|
||||
|
||||
/** 产品状态 */
|
||||
@Column(name = "is_show",nullable = false)
|
||||
@NotNull(message = "状态必须选择")
|
||||
@NotNull
|
||||
private Integer isShow;
|
||||
|
||||
@Column(name = "is_del",nullable = false,insertable = false)
|
||||
|
||||
@Column(name = "is_del",nullable = false)
|
||||
@NotNull
|
||||
private Integer isDel;
|
||||
|
||||
@Column(name = "combination",nullable = false,insertable = false)
|
||||
|
||||
@Column(name = "combination",nullable = false)
|
||||
@NotNull
|
||||
private Integer combination;
|
||||
|
||||
// 商户是否可用1可用0不可用
|
||||
|
||||
/** 商户是否可用1可用0不可用 */
|
||||
@Column(name = "mer_use")
|
||||
private Integer merUse;
|
||||
|
||||
// 是否包邮1是0否
|
||||
|
||||
/** 是否包邮1是0否 */
|
||||
@Column(name = "is_postage",nullable = false)
|
||||
@NotNull(message = "包邮状态必须选择")
|
||||
@NotNull
|
||||
private Integer isPostage;
|
||||
|
||||
// 邮费
|
||||
|
||||
/** 邮费 */
|
||||
@Column(name = "postage",nullable = false)
|
||||
@NotNull(message = "邮费必填")
|
||||
@NotNull
|
||||
private BigDecimal postage;
|
||||
|
||||
// 拼团内容
|
||||
|
||||
/** 拼团内容 */
|
||||
@Column(name = "description",nullable = false)
|
||||
@NotBlank(message = "拼团内容不能为空")
|
||||
@NotBlank
|
||||
private String description;
|
||||
|
||||
// 拼团开始时间
|
||||
|
||||
/** 拼团开始时间 */
|
||||
@Column(name = "start_time",nullable = false)
|
||||
@NotNull
|
||||
private Integer startTime;
|
||||
|
||||
// 拼团结束时间
|
||||
|
||||
/** 拼团结束时间 */
|
||||
@Column(name = "stop_time",nullable = false)
|
||||
@NotNull
|
||||
private Integer stopTime;
|
||||
|
||||
@NotNull(message = "开始时间不能为空")
|
||||
private Date startTimeDate;
|
||||
|
||||
@NotNull(message = "结束时间不能为空")
|
||||
private Date endTimeDate;
|
||||
|
||||
// 拼团订单有效时间
|
||||
/** 拼团订单有效时间 */
|
||||
@Column(name = "effective_time",nullable = false)
|
||||
@NotNull
|
||||
private Integer effectiveTime;
|
||||
|
||||
// 拼图产品成本
|
||||
|
||||
/** 拼图产品成本 */
|
||||
@Column(name = "cost",nullable = false)
|
||||
@NotNull
|
||||
private Integer cost;
|
||||
|
||||
// 浏览量
|
||||
|
||||
/** 浏览量 */
|
||||
@Column(name = "browse")
|
||||
private Integer browse;
|
||||
|
||||
// 单位名
|
||||
|
||||
/** 单位名 */
|
||||
@Column(name = "unit_name",nullable = false)
|
||||
@NotBlank
|
||||
private String unitName;
|
||||
|
||||
|
||||
@Column(name = "end_time_date",nullable = false)
|
||||
@NotNull
|
||||
private Timestamp endTimeDate;
|
||||
|
||||
|
||||
@Column(name = "start_time_date",nullable = false)
|
||||
@NotNull
|
||||
private Timestamp startTimeDate;
|
||||
|
||||
|
||||
public void copy(YxStoreCombination source){
|
||||
BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true));
|
||||
}
|
||||
|
@ -1,69 +1,85 @@
|
||||
package co.yixiang.modules.activity.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import lombok.Data;
|
||||
import com.baomidou.mybatisplus.annotation.FieldFill;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.bean.copier.CopyOptions;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.persistence.*;
|
||||
import javax.validation.constraints.Min;
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import java.io.Serializable;
|
||||
import javax.validation.constraints.*;
|
||||
import java.math.BigDecimal;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @author hupeng
|
||||
* @date 2019-11-09
|
||||
* @author xuwenbo
|
||||
* @date 2020-05-13
|
||||
*/
|
||||
@Entity
|
||||
@Data
|
||||
@Table(name="yx_store_coupon")
|
||||
public class YxStoreCoupon implements Serializable {
|
||||
|
||||
// 优惠券表ID
|
||||
/** 优惠券表ID */
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
@Column(name = "id")
|
||||
private Integer id;
|
||||
|
||||
// 优惠券名称
|
||||
|
||||
/** 优惠券名称 */
|
||||
@Column(name = "title",nullable = false)
|
||||
@NotBlank(message = "名称必填")
|
||||
@NotBlank
|
||||
private String title;
|
||||
|
||||
// 兑换消耗积分值
|
||||
|
||||
/** 兑换消耗积分值 */
|
||||
@Column(name = "integral",nullable = false)
|
||||
@NotNull
|
||||
private Integer integral;
|
||||
|
||||
// 兑换的优惠券面值
|
||||
|
||||
/** 兑换的优惠券面值 */
|
||||
@Column(name = "coupon_price",nullable = false)
|
||||
@Min(value = 1,message = "面值必须大于1")
|
||||
@NotNull
|
||||
private BigDecimal couponPrice;
|
||||
|
||||
// 最低消费多少金额可用优惠券
|
||||
|
||||
/** 最低消费多少金额可用优惠券 */
|
||||
@Column(name = "use_min_price",nullable = false)
|
||||
@Min(value = 1,message = "最低消费必须大于1")
|
||||
@NotNull
|
||||
private BigDecimal useMinPrice;
|
||||
|
||||
// 优惠券有效期限(单位:天)
|
||||
|
||||
/** 优惠券有效期限(单位:天) */
|
||||
@Column(name = "coupon_time",nullable = false)
|
||||
@NotNull
|
||||
private Integer couponTime;
|
||||
|
||||
// 排序
|
||||
|
||||
/** 排序 */
|
||||
@Column(name = "sort",nullable = false)
|
||||
@NotNull
|
||||
private Integer sort;
|
||||
|
||||
// 状态(0:关闭,1:开启)
|
||||
|
||||
/** 状态(0:关闭,1:开启) */
|
||||
@Column(name = "status",nullable = false)
|
||||
@NotNull
|
||||
private Integer status;
|
||||
|
||||
// 兑换项目添加时间
|
||||
|
||||
/** 兑换项目添加时间 */
|
||||
@Column(name = "add_time",nullable = false)
|
||||
@NotNull
|
||||
private Integer addTime;
|
||||
|
||||
// 是否删除
|
||||
@Column(name = "is_del",nullable = false,insertable = false)
|
||||
|
||||
/** 是否删除 */
|
||||
@Column(name = "is_del",nullable = false)
|
||||
@NotNull
|
||||
private Integer isDel;
|
||||
|
||||
|
||||
public void copy(YxStoreCoupon source){
|
||||
BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true));
|
||||
}
|
||||
|
@ -1,17 +1,18 @@
|
||||
package co.yixiang.modules.activity.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import lombok.Data;
|
||||
import com.baomidou.mybatisplus.annotation.FieldFill;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.bean.copier.CopyOptions;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.persistence.*;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import javax.validation.constraints.*;
|
||||
import java.sql.Timestamp;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @author hupeng
|
||||
* @date 2019-11-09
|
||||
* @date 2020-05-13
|
||||
*/
|
||||
@Entity
|
||||
@Data
|
||||
@ -23,50 +24,68 @@ public class YxStoreCouponIssue implements Serializable {
|
||||
@Column(name = "id")
|
||||
private Integer id;
|
||||
|
||||
// 优惠券ID
|
||||
@Column(name = "cid")
|
||||
private Integer cid;
|
||||
|
||||
@Column(name = "cname")
|
||||
private String cname;
|
||||
|
||||
// 优惠券领取开启时间
|
||||
|
||||
/** 优惠券ID */
|
||||
@Column(name = "cid")
|
||||
private Integer cid;
|
||||
|
||||
|
||||
/** 优惠券领取开启时间 */
|
||||
@Column(name = "start_time")
|
||||
private Integer startTime;
|
||||
|
||||
@NotNull(message = "领取时间不能为空")
|
||||
private Date startTimeDate;
|
||||
|
||||
@NotNull(message = "结束时间不能为空")
|
||||
private Date endTimeDate;
|
||||
|
||||
// 优惠券领取结束时间
|
||||
/** 优惠券领取结束时间 */
|
||||
@Column(name = "end_time")
|
||||
private Integer endTime;
|
||||
|
||||
// 优惠券领取数量
|
||||
|
||||
/** 优惠券领取数量 */
|
||||
@Column(name = "total_count")
|
||||
private Integer totalCount;
|
||||
|
||||
// 优惠券剩余领取数量
|
||||
|
||||
/** 优惠券剩余领取数量 */
|
||||
@Column(name = "remain_count")
|
||||
private Integer remainCount;
|
||||
|
||||
// 是否无限张数
|
||||
|
||||
/** 是否无限张数 */
|
||||
@Column(name = "is_permanent",nullable = false)
|
||||
@NotNull
|
||||
private Integer isPermanent;
|
||||
|
||||
// 1 正常 0 未开启 -1 已无效
|
||||
|
||||
/** 1 正常 0 未开启 -1 已无效 */
|
||||
@Column(name = "status",nullable = false)
|
||||
@NotNull
|
||||
private Integer status;
|
||||
|
||||
|
||||
@Column(name = "is_del",nullable = false)
|
||||
@NotNull
|
||||
private Integer isDel;
|
||||
|
||||
// 优惠券添加时间
|
||||
|
||||
/** 优惠券添加时间 */
|
||||
@Column(name = "add_time")
|
||||
private Integer addTime;
|
||||
|
||||
|
||||
@Column(name = "end_time_date",nullable = false)
|
||||
@NotNull
|
||||
private Timestamp endTimeDate;
|
||||
|
||||
|
||||
@Column(name = "start_time_date",nullable = false)
|
||||
@NotNull
|
||||
private Timestamp startTimeDate;
|
||||
|
||||
|
||||
public void copy(YxStoreCouponIssue source){
|
||||
BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true));
|
||||
}
|
||||
|
@ -1,15 +1,17 @@
|
||||
package co.yixiang.modules.activity.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import lombok.Data;
|
||||
import com.baomidou.mybatisplus.annotation.FieldFill;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.bean.copier.CopyOptions;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.persistence.*;
|
||||
import javax.validation.constraints.*;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @author hupeng
|
||||
* @date 2019-11-09
|
||||
* @date 2020-05-13
|
||||
*/
|
||||
@Entity
|
||||
@Data
|
||||
@ -21,18 +23,22 @@ public class YxStoreCouponIssueUser implements Serializable {
|
||||
@Column(name = "id")
|
||||
private Integer id;
|
||||
|
||||
// 领取优惠券用户ID
|
||||
|
||||
/** 领取优惠券用户ID */
|
||||
@Column(name = "uid")
|
||||
private Integer uid;
|
||||
|
||||
// 优惠券前台领取ID
|
||||
|
||||
/** 优惠券前台领取ID */
|
||||
@Column(name = "issue_coupon_id")
|
||||
private Integer issueCouponId;
|
||||
|
||||
// 领取时间
|
||||
|
||||
/** 领取时间 */
|
||||
@Column(name = "add_time")
|
||||
private Integer addTime;
|
||||
|
||||
|
||||
public void copy(YxStoreCouponIssueUser source){
|
||||
BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true));
|
||||
}
|
||||
|
@ -1,72 +1,97 @@
|
||||
package co.yixiang.modules.activity.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import lombok.Data;
|
||||
import com.baomidou.mybatisplus.annotation.FieldFill;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.bean.copier.CopyOptions;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.persistence.*;
|
||||
import java.io.Serializable;
|
||||
import javax.validation.constraints.*;
|
||||
import java.math.BigDecimal;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @author hupeng
|
||||
* @date 2019-11-10
|
||||
* @date 2020-05-13
|
||||
*/
|
||||
@Entity
|
||||
@Data
|
||||
@Table(name="yx_store_coupon_user")
|
||||
public class YxStoreCouponUser implements Serializable {
|
||||
|
||||
// 优惠券发放记录id
|
||||
/** 优惠券发放记录id */
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
@Column(name = "id")
|
||||
private Integer id;
|
||||
|
||||
// 兑换的项目id
|
||||
|
||||
/** 兑换的项目id */
|
||||
@Column(name = "cid",nullable = false)
|
||||
@NotNull
|
||||
private Integer cid;
|
||||
|
||||
// 优惠券所属用户
|
||||
|
||||
/** 优惠券所属用户 */
|
||||
@Column(name = "uid",nullable = false)
|
||||
@NotNull
|
||||
private Integer uid;
|
||||
|
||||
// 优惠券名称
|
||||
|
||||
/** 优惠券名称 */
|
||||
@Column(name = "coupon_title",nullable = false)
|
||||
@NotBlank
|
||||
private String couponTitle;
|
||||
|
||||
// 优惠券的面值
|
||||
|
||||
/** 优惠券的面值 */
|
||||
@Column(name = "coupon_price",nullable = false)
|
||||
@NotNull
|
||||
private BigDecimal couponPrice;
|
||||
|
||||
// 最低消费多少金额可用优惠券
|
||||
|
||||
/** 最低消费多少金额可用优惠券 */
|
||||
@Column(name = "use_min_price",nullable = false)
|
||||
@NotNull
|
||||
private BigDecimal useMinPrice;
|
||||
|
||||
// 优惠券创建时间
|
||||
|
||||
/** 优惠券创建时间 */
|
||||
@Column(name = "add_time",nullable = false)
|
||||
@NotNull
|
||||
private Integer addTime;
|
||||
|
||||
// 优惠券结束时间
|
||||
|
||||
/** 优惠券结束时间 */
|
||||
@Column(name = "end_time",nullable = false)
|
||||
@NotNull
|
||||
private Integer endTime;
|
||||
|
||||
// 使用时间
|
||||
|
||||
/** 使用时间 */
|
||||
@Column(name = "use_time",nullable = false)
|
||||
@NotNull
|
||||
private Integer useTime;
|
||||
|
||||
// 获取方式
|
||||
|
||||
/** 获取方式 */
|
||||
@Column(name = "type",nullable = false)
|
||||
@NotBlank
|
||||
private String type;
|
||||
|
||||
// 状态(0:未使用,1:已使用, 2:已过期)
|
||||
|
||||
/** 状态(0:未使用,1:已使用, 2:已过期) */
|
||||
@Column(name = "status",nullable = false)
|
||||
@NotNull
|
||||
private Integer status;
|
||||
|
||||
// 是否有效
|
||||
|
||||
/** 是否有效 */
|
||||
@Column(name = "is_fail",nullable = false)
|
||||
@NotNull
|
||||
private Integer isFail;
|
||||
|
||||
|
||||
public void copy(YxStoreCouponUser source){
|
||||
BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true));
|
||||
}
|
||||
|
@ -1,156 +1,190 @@
|
||||
package co.yixiang.modules.activity.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import lombok.Data;
|
||||
import com.baomidou.mybatisplus.annotation.FieldFill;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.bean.copier.CopyOptions;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.persistence.*;
|
||||
import javax.validation.constraints.Min;
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.io.Serializable;
|
||||
import javax.validation.constraints.*;
|
||||
import java.sql.Timestamp;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @author xuwenbo
|
||||
* @date 2019-12-14
|
||||
* @author hupeng
|
||||
* @date 2020-05-13
|
||||
*/
|
||||
@Entity
|
||||
@Data
|
||||
@Table(name="yx_store_seckill")
|
||||
public class YxStoreSeckill implements Serializable {
|
||||
|
||||
// 商品秒杀产品表id
|
||||
/** 商品秒杀产品表id */
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
@Column(name = "id")
|
||||
private Integer id;
|
||||
|
||||
// 商品id
|
||||
|
||||
/** 商品id */
|
||||
@Column(name = "product_id",nullable = false)
|
||||
@NotNull
|
||||
private Integer productId;
|
||||
|
||||
// 推荐图
|
||||
|
||||
/** 推荐图 */
|
||||
@Column(name = "image",nullable = false)
|
||||
@NotBlank(message = "请上传产品图片")
|
||||
@NotBlank
|
||||
private String image;
|
||||
|
||||
// 轮播图
|
||||
|
||||
/** 轮播图 */
|
||||
@Column(name = "images",nullable = false)
|
||||
@NotBlank(message = "请上传产品轮播图")
|
||||
@NotBlank
|
||||
private String images;
|
||||
|
||||
// 活动标题
|
||||
|
||||
/** 活动标题 */
|
||||
@Column(name = "title",nullable = false)
|
||||
@NotBlank(message = "请输入产品标题")
|
||||
@NotBlank
|
||||
private String title;
|
||||
|
||||
// 简介
|
||||
|
||||
/** 简介 */
|
||||
@Column(name = "info",nullable = false)
|
||||
@NotBlank(message = "请输入秒杀简介")
|
||||
@NotBlank
|
||||
private String info;
|
||||
|
||||
// 价格
|
||||
|
||||
/** 价格 */
|
||||
@Column(name = "price",nullable = false)
|
||||
@NotNull(message = "秒杀价必填")
|
||||
@Min(value = 0,message = "秒杀价必须大于0")
|
||||
@NotNull
|
||||
private BigDecimal price;
|
||||
|
||||
// 成本
|
||||
|
||||
/** 成本 */
|
||||
@Column(name = "cost",nullable = false)
|
||||
@NotNull(message = "成本价必填")
|
||||
@Min(value = 0,message = "成本价必须大于0")
|
||||
@NotNull
|
||||
private BigDecimal cost;
|
||||
|
||||
// 原价
|
||||
|
||||
/** 原价 */
|
||||
@Column(name = "ot_price",nullable = false)
|
||||
@NotNull(message = "原价必填")
|
||||
@Min(value = 0,message = "原价必须大于0")
|
||||
@NotNull
|
||||
private BigDecimal otPrice;
|
||||
|
||||
// 返多少积分
|
||||
|
||||
/** 返多少积分 */
|
||||
@Column(name = "give_integral",nullable = false)
|
||||
@NotNull
|
||||
private BigDecimal giveIntegral;
|
||||
|
||||
// 排序
|
||||
|
||||
/** 排序 */
|
||||
@Column(name = "sort",nullable = false)
|
||||
@NotNull(message = "排序必填")
|
||||
@NotNull
|
||||
private Integer sort;
|
||||
|
||||
// 库存
|
||||
|
||||
/** 库存 */
|
||||
@Column(name = "stock",nullable = false)
|
||||
@NotNull(message = "库存必填")
|
||||
@NotNull
|
||||
private Integer stock;
|
||||
|
||||
// 销量
|
||||
|
||||
/** 销量 */
|
||||
@Column(name = "sales",nullable = false)
|
||||
@NotNull(message = "销量必填")
|
||||
@NotNull
|
||||
private Integer sales;
|
||||
|
||||
// 单位名
|
||||
|
||||
/** 单位名 */
|
||||
@Column(name = "unit_name",nullable = false)
|
||||
@NotBlank(message = "单位名不能为空")
|
||||
@NotBlank
|
||||
private String unitName;
|
||||
|
||||
// 邮费
|
||||
|
||||
/** 邮费 */
|
||||
@Column(name = "postage",nullable = false)
|
||||
@NotNull(message = "邮费必填")
|
||||
@NotNull
|
||||
private BigDecimal postage;
|
||||
|
||||
// 内容
|
||||
|
||||
/** 内容 */
|
||||
@Column(name = "description")
|
||||
private String description;
|
||||
|
||||
// 开始时间
|
||||
|
||||
/** 开始时间 */
|
||||
@Column(name = "start_time",nullable = false)
|
||||
@NotNull
|
||||
private Integer startTime;
|
||||
|
||||
// 结束时间
|
||||
|
||||
/** 结束时间 */
|
||||
@Column(name = "stop_time",nullable = false)
|
||||
@NotNull
|
||||
private Integer stopTime;
|
||||
|
||||
@NotNull(message = "开始时间不能为空")
|
||||
private Date startTimeDate;
|
||||
|
||||
@NotNull(message = "结束时间不能为空")
|
||||
private Date endTimeDate;
|
||||
|
||||
// 添加时间
|
||||
/** 添加时间 */
|
||||
@Column(name = "add_time",nullable = false)
|
||||
@NotBlank
|
||||
private String addTime;
|
||||
|
||||
// 产品状态
|
||||
|
||||
/** 产品状态 */
|
||||
@Column(name = "status",nullable = false)
|
||||
@NotNull(message = "活动状态必须选择")
|
||||
@NotNull
|
||||
private Integer status;
|
||||
|
||||
// 是否包邮
|
||||
|
||||
/** 是否包邮 */
|
||||
@Column(name = "is_postage",nullable = false)
|
||||
@NotNull(message = "包邮状态必须选择")
|
||||
@NotNull
|
||||
private Integer isPostage;
|
||||
|
||||
// 热门推荐
|
||||
@Column(name = "is_hot",insertable = false)
|
||||
|
||||
/** 热门推荐 */
|
||||
@Column(name = "is_hot",nullable = false)
|
||||
@NotNull
|
||||
private Integer isHot;
|
||||
|
||||
// 删除 0未删除1已删除
|
||||
@Column(name = "is_del",insertable = false)
|
||||
|
||||
/** 删除 0未删除1已删除 */
|
||||
@Column(name = "is_del",nullable = false)
|
||||
@NotNull
|
||||
private Integer isDel;
|
||||
|
||||
// 最多秒杀几个
|
||||
|
||||
/** 最多秒杀几个 */
|
||||
@Column(name = "num",nullable = false)
|
||||
@NotNull(message = "限购必填")
|
||||
@Min(value = 1,message = "限购必须大于0")
|
||||
@NotNull
|
||||
private Integer num;
|
||||
|
||||
// 显示
|
||||
|
||||
/** 显示 */
|
||||
@Column(name = "is_show",nullable = false)
|
||||
@NotNull
|
||||
private Integer isShow;
|
||||
|
||||
@NotNull(message = "请选择开始时间")
|
||||
|
||||
@Column(name = "end_time_date",nullable = false)
|
||||
@NotNull
|
||||
private Timestamp endTimeDate;
|
||||
|
||||
|
||||
@Column(name = "start_time_date",nullable = false)
|
||||
@NotNull
|
||||
private Timestamp startTimeDate;
|
||||
|
||||
|
||||
/** 时间段id */
|
||||
@Column(name = "time_id")
|
||||
private Integer timeId;
|
||||
|
||||
|
||||
public void copy(YxStoreSeckill source){
|
||||
BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true));
|
||||
}
|
||||
|
@ -1,15 +1,17 @@
|
||||
package co.yixiang.modules.activity.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import lombok.Data;
|
||||
import com.baomidou.mybatisplus.annotation.FieldFill;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.bean.copier.CopyOptions;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.persistence.*;
|
||||
import javax.validation.constraints.*;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @author hupeng
|
||||
* @date 2019-11-18
|
||||
* @date 2020-05-13
|
||||
*/
|
||||
@Entity
|
||||
@Data
|
||||
@ -21,38 +23,47 @@ public class YxStoreVisit implements Serializable {
|
||||
@Column(name = "id")
|
||||
private Integer id;
|
||||
|
||||
// 产品ID
|
||||
|
||||
/** 产品ID */
|
||||
@Column(name = "product_id")
|
||||
private Integer productId;
|
||||
|
||||
// 产品类型
|
||||
|
||||
/** 产品类型 */
|
||||
@Column(name = "product_type")
|
||||
private String productType;
|
||||
|
||||
// 产品分类ID
|
||||
|
||||
/** 产品分类ID */
|
||||
@Column(name = "cate_id")
|
||||
private Integer cateId;
|
||||
|
||||
// 产品类型
|
||||
|
||||
/** 产品类型 */
|
||||
@Column(name = "type")
|
||||
private String type;
|
||||
|
||||
// 用户ID
|
||||
|
||||
/** 用户ID */
|
||||
@Column(name = "uid")
|
||||
private Integer uid;
|
||||
|
||||
// 访问次数
|
||||
|
||||
/** 访问次数 */
|
||||
@Column(name = "count")
|
||||
private Integer count;
|
||||
|
||||
// 备注描述
|
||||
|
||||
/** 备注描述 */
|
||||
@Column(name = "content")
|
||||
private String content;
|
||||
|
||||
// 添加时间
|
||||
|
||||
/** 添加时间 */
|
||||
@Column(name = "add_time")
|
||||
private Integer addTime;
|
||||
|
||||
|
||||
public void copy(YxStoreVisit source){
|
||||
BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true));
|
||||
}
|
||||
|
@ -1,16 +1,18 @@
|
||||
package co.yixiang.modules.activity.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import lombok.Data;
|
||||
import com.baomidou.mybatisplus.annotation.FieldFill;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.bean.copier.CopyOptions;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.persistence.*;
|
||||
import java.io.Serializable;
|
||||
import javax.validation.constraints.*;
|
||||
import java.math.BigDecimal;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @author hupeng
|
||||
* @date 2019-11-14
|
||||
* @date 2020-05-13
|
||||
*/
|
||||
@Entity
|
||||
@Data
|
||||
@ -22,58 +24,73 @@ public class YxUserExtract implements Serializable {
|
||||
@Column(name = "id")
|
||||
private Integer id;
|
||||
|
||||
|
||||
@Column(name = "uid")
|
||||
private Integer uid;
|
||||
|
||||
// 名称
|
||||
|
||||
/** 名称 */
|
||||
@Column(name = "real_name")
|
||||
private String realName;
|
||||
|
||||
// bank = 银行卡 alipay = 支付宝wx=微信
|
||||
|
||||
/** bank = 银行卡 alipay = 支付宝wx=微信 */
|
||||
@Column(name = "extract_type")
|
||||
private String extractType;
|
||||
|
||||
// 银行卡
|
||||
|
||||
/** 银行卡 */
|
||||
@Column(name = "bank_code")
|
||||
private String bankCode;
|
||||
|
||||
// 开户地址
|
||||
|
||||
/** 开户地址 */
|
||||
@Column(name = "bank_address")
|
||||
private String bankAddress;
|
||||
|
||||
// 支付宝账号
|
||||
|
||||
/** 支付宝账号 */
|
||||
@Column(name = "alipay_code")
|
||||
private String alipayCode;
|
||||
|
||||
// 提现金额
|
||||
|
||||
/** 提现金额 */
|
||||
@Column(name = "extract_price")
|
||||
private BigDecimal extractPrice;
|
||||
|
||||
|
||||
@Column(name = "mark")
|
||||
private String mark;
|
||||
|
||||
|
||||
@Column(name = "balance")
|
||||
private BigDecimal balance;
|
||||
|
||||
// 无效原因
|
||||
|
||||
/** 无效原因 */
|
||||
@Column(name = "fail_msg")
|
||||
private String failMsg;
|
||||
|
||||
|
||||
@Column(name = "fail_time")
|
||||
private Integer failTime;
|
||||
|
||||
// 添加时间
|
||||
|
||||
/** 添加时间 */
|
||||
@Column(name = "add_time")
|
||||
private Integer addTime;
|
||||
|
||||
// -1 未通过 0 审核中 1 已提现
|
||||
|
||||
/** -1 未通过 0 审核中 1 已提现 */
|
||||
@Column(name = "status")
|
||||
private Integer status;
|
||||
|
||||
// 微信号
|
||||
|
||||
/** 微信号 */
|
||||
@Column(name = "wechat")
|
||||
private String wechat;
|
||||
|
||||
|
||||
public void copy(YxUserExtract source){
|
||||
BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true));
|
||||
}
|
||||
|
@ -1,12 +0,0 @@
|
||||
package co.yixiang.modules.activity.repository;
|
||||
|
||||
import co.yixiang.modules.activity.domain.YxStoreBargain;
|
||||
import org.springframework.data.jpa.repository.JpaRepository;
|
||||
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
|
||||
|
||||
/**
|
||||
* @author xuwenbo
|
||||
* @date 2019-12-22
|
||||
*/
|
||||
public interface YxStoreBargainRepository extends JpaRepository<YxStoreBargain, Integer>, JpaSpecificationExecutor {
|
||||
}
|
@ -1,9 +1,7 @@
|
||||
package co.yixiang.modules.activity.rest;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import co.yixiang.aop.log.Log;
|
||||
import co.yixiang.exception.BadRequestException;
|
||||
import co.yixiang.modules.activity.domain.YxStoreBargain;
|
||||
import co.yixiang.modules.activity.service.YxStoreBargainService;
|
||||
import co.yixiang.modules.activity.service.dto.YxStoreBargainQueryCriteria;
|
||||
@ -58,9 +56,9 @@ public class StoreBargainController {
|
||||
}
|
||||
if(ObjectUtil.isNull(resources.getId())){
|
||||
resources.setAddTime(OrderUtil.getSecondTimestampTwo());
|
||||
return new ResponseEntity(yxStoreBargainService.create(resources),HttpStatus.CREATED);
|
||||
return new ResponseEntity(yxStoreBargainService.save(resources),HttpStatus.CREATED);
|
||||
}else{
|
||||
yxStoreBargainService.update(resources);
|
||||
yxStoreBargainService.saveOrUpdate(resources);
|
||||
return new ResponseEntity(HttpStatus.NO_CONTENT);
|
||||
}
|
||||
}
|
||||
@ -71,7 +69,7 @@ public class StoreBargainController {
|
||||
@PreAuthorize("@el.check('admin','YXSTOREBARGAIN_ALL','YXSTOREBARGAIN_DELETE')")
|
||||
public ResponseEntity delete(@PathVariable Integer id){
|
||||
//if(StrUtil.isNotEmpty("22")) throw new BadRequestException("演示环境禁止操作");
|
||||
yxStoreBargainService.delete(id);
|
||||
yxStoreBargainService.removeById(id);
|
||||
return new ResponseEntity(HttpStatus.OK);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -59,9 +59,9 @@ public class StoreCombinationController {
|
||||
}
|
||||
if(ObjectUtil.isNull(resources.getId())){
|
||||
resources.setAddTime(String.valueOf(OrderUtil.getSecondTimestampTwo()));
|
||||
return new ResponseEntity(yxStoreCombinationService.create(resources),HttpStatus.CREATED);
|
||||
return new ResponseEntity(yxStoreCombinationService.save(resources),HttpStatus.CREATED);
|
||||
}else{
|
||||
yxStoreCombinationService.update(resources);
|
||||
yxStoreCombinationService.saveOrUpdate(resources);
|
||||
return new ResponseEntity(HttpStatus.NO_CONTENT);
|
||||
}
|
||||
|
||||
@ -87,7 +87,7 @@ public class StoreCombinationController {
|
||||
YxStoreCombination combination = new YxStoreCombination();
|
||||
combination.setIsDel(1);
|
||||
combination.setId(id);
|
||||
yxStoreCombinationService.update(combination);
|
||||
yxStoreCombinationService.saveOrUpdate(combination);
|
||||
return new ResponseEntity(HttpStatus.OK);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -45,7 +45,7 @@ public class StoreCouponController {
|
||||
@PreAuthorize("@el.check('admin','YXSTORECOUPON_ALL','YXSTORECOUPON_CREATE')")
|
||||
public ResponseEntity create(@Validated @RequestBody YxStoreCoupon resources){
|
||||
resources.setAddTime(OrderUtil.getSecondTimestampTwo());
|
||||
return new ResponseEntity(yxStoreCouponService.create(resources),HttpStatus.CREATED);
|
||||
return new ResponseEntity(yxStoreCouponService.save(resources),HttpStatus.CREATED);
|
||||
}
|
||||
|
||||
@Log("修改")
|
||||
@ -53,7 +53,7 @@ public class StoreCouponController {
|
||||
@PutMapping(value = "/yxStoreCoupon")
|
||||
@PreAuthorize("@el.check('admin','YXSTORECOUPON_ALL','YXSTORECOUPON_EDIT')")
|
||||
public ResponseEntity update(@Validated @RequestBody YxStoreCoupon resources){
|
||||
yxStoreCouponService.update(resources);
|
||||
yxStoreCouponService.saveOrUpdate(resources);
|
||||
return new ResponseEntity(HttpStatus.NO_CONTENT);
|
||||
}
|
||||
|
||||
@ -66,7 +66,7 @@ public class StoreCouponController {
|
||||
YxStoreCoupon resources = new YxStoreCoupon();
|
||||
resources.setId(id);
|
||||
resources.setIsDel(1);
|
||||
yxStoreCouponService.update(resources);
|
||||
yxStoreCouponService.saveOrUpdate(resources);
|
||||
return new ResponseEntity(HttpStatus.OK);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -58,7 +58,7 @@ public class StoreCouponIssueController {
|
||||
resources.setRemainCount(resources.getTotalCount());
|
||||
}
|
||||
resources.setAddTime(OrderUtil.getSecondTimestampTwo());
|
||||
return new ResponseEntity(yxStoreCouponIssueService.create(resources),HttpStatus.CREATED);
|
||||
return new ResponseEntity(yxStoreCouponIssueService.save(resources),HttpStatus.CREATED);
|
||||
}
|
||||
|
||||
@Log("修改状态")
|
||||
@ -66,7 +66,7 @@ public class StoreCouponIssueController {
|
||||
@PutMapping(value = "/yxStoreCouponIssue")
|
||||
@PreAuthorize("@el.check('admin','YXSTORECOUPONISSUE_ALL','YXSTORECOUPONISSUE_EDIT')")
|
||||
public ResponseEntity update(@Validated @RequestBody YxStoreCouponIssue resources){
|
||||
yxStoreCouponIssueService.update(resources);
|
||||
yxStoreCouponIssueService.saveOrUpdate(resources);
|
||||
return new ResponseEntity(HttpStatus.NO_CONTENT);
|
||||
}
|
||||
|
||||
@ -79,7 +79,7 @@ public class StoreCouponIssueController {
|
||||
YxStoreCouponIssue resources = new YxStoreCouponIssue();
|
||||
resources.setId(id);
|
||||
resources.setIsDel(1);
|
||||
yxStoreCouponIssueService.update(resources);
|
||||
yxStoreCouponIssueService.saveOrUpdate(resources);
|
||||
return new ResponseEntity(HttpStatus.OK);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -43,7 +43,7 @@ public class StoreCouponIssueUserController {
|
||||
@PostMapping(value = "/yxStoreCouponIssueUser")
|
||||
@PreAuthorize("@el.check('admin','YXSTORECOUPONISSUEUSER_ALL','YXSTORECOUPONISSUEUSER_CREATE')")
|
||||
public ResponseEntity create(@Validated @RequestBody YxStoreCouponIssueUser resources){
|
||||
return new ResponseEntity(yxStoreCouponIssueUserService.create(resources),HttpStatus.CREATED);
|
||||
return new ResponseEntity(yxStoreCouponIssueUserService.save(resources),HttpStatus.CREATED);
|
||||
}
|
||||
|
||||
@Log("修改")
|
||||
@ -51,7 +51,7 @@ public class StoreCouponIssueUserController {
|
||||
@PutMapping(value = "/yxStoreCouponIssueUser")
|
||||
@PreAuthorize("@el.check('admin','YXSTORECOUPONISSUEUSER_ALL','YXSTORECOUPONISSUEUSER_EDIT')")
|
||||
public ResponseEntity update(@Validated @RequestBody YxStoreCouponIssueUser resources){
|
||||
yxStoreCouponIssueUserService.update(resources);
|
||||
yxStoreCouponIssueUserService.saveOrUpdate(resources);
|
||||
return new ResponseEntity(HttpStatus.NO_CONTENT);
|
||||
}
|
||||
|
||||
@ -61,7 +61,7 @@ public class StoreCouponIssueUserController {
|
||||
@PreAuthorize("@el.check('admin','YXSTORECOUPONISSUEUSER_ALL','YXSTORECOUPONISSUEUSER_DELETE')")
|
||||
public ResponseEntity delete(@PathVariable Integer id){
|
||||
//if(StrUtil.isNotEmpty("22")) throw new BadRequestException("演示环境禁止操作");
|
||||
yxStoreCouponIssueUserService.delete(id);
|
||||
yxStoreCouponIssueUserService.removeById(id);
|
||||
return new ResponseEntity(HttpStatus.OK);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -57,9 +57,9 @@ public class StoreSeckillController {
|
||||
}
|
||||
if(ObjectUtil.isNull(resources.getId())){
|
||||
resources.setAddTime(String.valueOf(OrderUtil.getSecondTimestampTwo()));
|
||||
return new ResponseEntity(yxStoreSeckillService.create(resources),HttpStatus.CREATED);
|
||||
return new ResponseEntity(yxStoreSeckillService.save(resources),HttpStatus.CREATED);
|
||||
}else{
|
||||
yxStoreSeckillService.update(resources);
|
||||
yxStoreSeckillService.saveOrUpdate(resources);
|
||||
return new ResponseEntity(HttpStatus.NO_CONTENT);
|
||||
}
|
||||
}
|
||||
@ -70,7 +70,7 @@ public class StoreSeckillController {
|
||||
@PreAuthorize("@el.check('admin','YXSTORESECKILL_ALL','YXSTORESECKILL_DELETE')")
|
||||
public ResponseEntity delete(@PathVariable Integer id){
|
||||
//if(StrUtil.isNotEmpty("22")) throw new BadRequestException("演示环境禁止操作");
|
||||
yxStoreSeckillService.delete(id);
|
||||
yxStoreSeckillService.removeById(id);
|
||||
return new ResponseEntity(HttpStatus.OK);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -126,7 +126,7 @@ public class UserExtractController {
|
||||
}
|
||||
|
||||
}
|
||||
yxUserExtractService.update(resources);
|
||||
yxUserExtractService.saveOrUpdate(resources);
|
||||
return new ResponseEntity(HttpStatus.NO_CONTENT);
|
||||
}
|
||||
|
||||
|
@ -1,64 +1,40 @@
|
||||
package co.yixiang.modules.activity.service;
|
||||
|
||||
import co.yixiang.common.service.BaseService;
|
||||
import co.yixiang.modules.activity.domain.YxStoreBargain;
|
||||
import co.yixiang.modules.activity.service.dto.YxStoreBargainDTO;
|
||||
import co.yixiang.modules.activity.service.dto.YxStoreBargainDto;
|
||||
import co.yixiang.modules.activity.service.dto.YxStoreBargainQueryCriteria;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.List;
|
||||
import java.io.IOException;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
/**
|
||||
* @author xuwenbo
|
||||
* @date 2019-12-22
|
||||
* @author hupeng
|
||||
* @date 2020-05-13
|
||||
*/
|
||||
//@CacheConfig(cacheNames = "yxStoreBargain")
|
||||
public interface YxStoreBargainService {
|
||||
public interface YxStoreBargainService extends BaseService<YxStoreBargain>{
|
||||
|
||||
/**
|
||||
/**
|
||||
* 查询数据分页
|
||||
* @param criteria
|
||||
* @param pageable
|
||||
* @return
|
||||
* @param criteria 条件
|
||||
* @param pageable 分页参数
|
||||
* @return Map<String,Object>
|
||||
*/
|
||||
//@Cacheable
|
||||
Map<String,Object> queryAll(YxStoreBargainQueryCriteria criteria, Pageable pageable);
|
||||
|
||||
/**
|
||||
* 查询所有数据不分页
|
||||
* @param criteria
|
||||
* @return
|
||||
* @param criteria 条件参数
|
||||
* @return List<YxStoreBargainDto>
|
||||
*/
|
||||
//@Cacheable
|
||||
List<YxStoreBargainDTO> queryAll(YxStoreBargainQueryCriteria criteria);
|
||||
List<YxStoreBargain> queryAll(YxStoreBargainQueryCriteria criteria);
|
||||
|
||||
/**
|
||||
* 根据ID查询
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
//@Cacheable(key = "#p0")
|
||||
YxStoreBargainDTO findById(Integer id);
|
||||
|
||||
/**
|
||||
* 创建
|
||||
* @param resources
|
||||
* @return
|
||||
*/
|
||||
//@CacheEvict(allEntries = true)
|
||||
YxStoreBargainDTO create(YxStoreBargain resources);
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
* @param resources
|
||||
*/
|
||||
//@CacheEvict(allEntries = true)
|
||||
void update(YxStoreBargain resources);
|
||||
|
||||
/**
|
||||
* 删除
|
||||
* @param id
|
||||
*/
|
||||
//@CacheEvict(allEntries = true)
|
||||
void delete(Integer id);
|
||||
* 导出数据
|
||||
* @param all 待导出的数据
|
||||
* @param response /
|
||||
* @throws IOException /
|
||||
*/
|
||||
void download(List<YxStoreBargainDto> all, HttpServletResponse response) throws IOException;
|
||||
}
|
@ -1,66 +1,42 @@
|
||||
package co.yixiang.modules.activity.service;
|
||||
|
||||
import co.yixiang.common.service.BaseService;
|
||||
import co.yixiang.modules.activity.domain.YxStoreCombination;
|
||||
import co.yixiang.modules.activity.service.dto.YxStoreCombinationDTO;
|
||||
import co.yixiang.modules.activity.service.dto.YxStoreCombinationDto;
|
||||
import co.yixiang.modules.activity.service.dto.YxStoreCombinationQueryCriteria;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.List;
|
||||
import java.io.IOException;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
/**
|
||||
* @author hupeng
|
||||
* @date 2019-11-18
|
||||
* @date 2020-05-13
|
||||
*/
|
||||
//@CacheConfig(cacheNames = "yxStoreCombination")
|
||||
public interface YxStoreCombinationService {
|
||||
public interface YxStoreCombinationService extends BaseService<YxStoreCombination>{
|
||||
|
||||
void onSale(Integer id, Integer status);
|
||||
|
||||
/**
|
||||
/**
|
||||
* 查询数据分页
|
||||
* @param criteria
|
||||
* @param pageable
|
||||
* @return
|
||||
* @param criteria 条件
|
||||
* @param pageable 分页参数
|
||||
* @return Map<String,Object>
|
||||
*/
|
||||
//@Cacheable
|
||||
Map<String,Object> queryAll(YxStoreCombinationQueryCriteria criteria, Pageable pageable);
|
||||
|
||||
/**
|
||||
* 查询所有数据不分页
|
||||
* @param criteria
|
||||
* @return
|
||||
* @param criteria 条件参数
|
||||
* @return List<YxStoreCombinationDto>
|
||||
*/
|
||||
//@Cacheable
|
||||
List<YxStoreCombinationDTO> queryAll(YxStoreCombinationQueryCriteria criteria);
|
||||
List<YxStoreCombination> queryAll(YxStoreCombinationQueryCriteria criteria);
|
||||
|
||||
/**
|
||||
* 根据ID查询
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
//@Cacheable(key = "#p0")
|
||||
YxStoreCombinationDTO findById(Integer id);
|
||||
* 导出数据
|
||||
* @param all 待导出的数据
|
||||
* @param response /
|
||||
* @throws IOException /
|
||||
*/
|
||||
void download(List<YxStoreCombinationDto> all, HttpServletResponse response) throws IOException;
|
||||
|
||||
/**
|
||||
* 创建
|
||||
* @param resources
|
||||
* @return
|
||||
*/
|
||||
//@CacheEvict(allEntries = true)
|
||||
YxStoreCombinationDTO create(YxStoreCombination resources);
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
* @param resources
|
||||
*/
|
||||
//@CacheEvict(allEntries = true)
|
||||
void update(YxStoreCombination resources);
|
||||
|
||||
/**
|
||||
* 删除
|
||||
* @param id
|
||||
*/
|
||||
//@CacheEvict(allEntries = true)
|
||||
void delete(Integer id);
|
||||
}
|
||||
void onSale(Integer id, int status);
|
||||
}
|
||||
|
@ -1,64 +1,40 @@
|
||||
package co.yixiang.modules.activity.service;
|
||||
|
||||
import co.yixiang.common.service.BaseService;
|
||||
import co.yixiang.modules.activity.domain.YxStoreCouponIssue;
|
||||
import co.yixiang.modules.activity.service.dto.YxStoreCouponIssueDTO;
|
||||
import co.yixiang.modules.activity.service.dto.YxStoreCouponIssueDto;
|
||||
import co.yixiang.modules.activity.service.dto.YxStoreCouponIssueQueryCriteria;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.List;
|
||||
import java.io.IOException;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
/**
|
||||
* @author hupeng
|
||||
* @date 2019-11-09
|
||||
* @date 2020-05-13
|
||||
*/
|
||||
//@CacheConfig(cacheNames = "yxStoreCouponIssue")
|
||||
public interface YxStoreCouponIssueService {
|
||||
public interface YxStoreCouponIssueService extends BaseService<YxStoreCouponIssue>{
|
||||
|
||||
/**
|
||||
/**
|
||||
* 查询数据分页
|
||||
* @param criteria
|
||||
* @param pageable
|
||||
* @return
|
||||
* @param criteria 条件
|
||||
* @param pageable 分页参数
|
||||
* @return Map<String,Object>
|
||||
*/
|
||||
//@Cacheable
|
||||
Map<String,Object> queryAll(YxStoreCouponIssueQueryCriteria criteria, Pageable pageable);
|
||||
|
||||
/**
|
||||
* 查询所有数据不分页
|
||||
* @param criteria
|
||||
* @return
|
||||
* @param criteria 条件参数
|
||||
* @return List<YxStoreCouponIssueDto>
|
||||
*/
|
||||
//@Cacheable
|
||||
List<YxStoreCouponIssueDTO> queryAll(YxStoreCouponIssueQueryCriteria criteria);
|
||||
List<YxStoreCouponIssue> queryAll(YxStoreCouponIssueQueryCriteria criteria);
|
||||
|
||||
/**
|
||||
* 根据ID查询
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
//@Cacheable(key = "#p0")
|
||||
YxStoreCouponIssueDTO findById(Integer id);
|
||||
|
||||
/**
|
||||
* 创建
|
||||
* @param resources
|
||||
* @return
|
||||
*/
|
||||
//@CacheEvict(allEntries = true)
|
||||
YxStoreCouponIssueDTO create(YxStoreCouponIssue resources);
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
* @param resources
|
||||
*/
|
||||
//@CacheEvict(allEntries = true)
|
||||
void update(YxStoreCouponIssue resources);
|
||||
|
||||
/**
|
||||
* 删除
|
||||
* @param id
|
||||
*/
|
||||
//@CacheEvict(allEntries = true)
|
||||
void delete(Integer id);
|
||||
* 导出数据
|
||||
* @param all 待导出的数据
|
||||
* @param response /
|
||||
* @throws IOException /
|
||||
*/
|
||||
void download(List<YxStoreCouponIssueDto> all, HttpServletResponse response) throws IOException;
|
||||
}
|
@ -1,64 +1,40 @@
|
||||
package co.yixiang.modules.activity.service;
|
||||
|
||||
import co.yixiang.common.service.BaseService;
|
||||
import co.yixiang.modules.activity.domain.YxStoreCouponIssueUser;
|
||||
import co.yixiang.modules.activity.service.dto.YxStoreCouponIssueUserDTO;
|
||||
import co.yixiang.modules.activity.service.dto.YxStoreCouponIssueUserDto;
|
||||
import co.yixiang.modules.activity.service.dto.YxStoreCouponIssueUserQueryCriteria;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.List;
|
||||
import java.io.IOException;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
/**
|
||||
* @author hupeng
|
||||
* @date 2019-11-09
|
||||
* @date 2020-05-13
|
||||
*/
|
||||
//@CacheConfig(cacheNames = "yxStoreCouponIssueUser")
|
||||
public interface YxStoreCouponIssueUserService {
|
||||
public interface YxStoreCouponIssueUserService extends BaseService<YxStoreCouponIssueUser>{
|
||||
|
||||
/**
|
||||
/**
|
||||
* 查询数据分页
|
||||
* @param criteria
|
||||
* @param pageable
|
||||
* @return
|
||||
* @param criteria 条件
|
||||
* @param pageable 分页参数
|
||||
* @return Map<String,Object>
|
||||
*/
|
||||
//@Cacheable
|
||||
Map<String,Object> queryAll(YxStoreCouponIssueUserQueryCriteria criteria, Pageable pageable);
|
||||
|
||||
/**
|
||||
* 查询所有数据不分页
|
||||
* @param criteria
|
||||
* @return
|
||||
* @param criteria 条件参数
|
||||
* @return List<YxStoreCouponIssueUserDto>
|
||||
*/
|
||||
//@Cacheable
|
||||
List<YxStoreCouponIssueUserDTO> queryAll(YxStoreCouponIssueUserQueryCriteria criteria);
|
||||
List<YxStoreCouponIssueUser> queryAll(YxStoreCouponIssueUserQueryCriteria criteria);
|
||||
|
||||
/**
|
||||
* 根据ID查询
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
//@Cacheable(key = "#p0")
|
||||
YxStoreCouponIssueUserDTO findById(Integer id);
|
||||
|
||||
/**
|
||||
* 创建
|
||||
* @param resources
|
||||
* @return
|
||||
*/
|
||||
//@CacheEvict(allEntries = true)
|
||||
YxStoreCouponIssueUserDTO create(YxStoreCouponIssueUser resources);
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
* @param resources
|
||||
*/
|
||||
//@CacheEvict(allEntries = true)
|
||||
void update(YxStoreCouponIssueUser resources);
|
||||
|
||||
/**
|
||||
* 删除
|
||||
* @param id
|
||||
*/
|
||||
//@CacheEvict(allEntries = true)
|
||||
void delete(Integer id);
|
||||
* 导出数据
|
||||
* @param all 待导出的数据
|
||||
* @param response /
|
||||
* @throws IOException /
|
||||
*/
|
||||
void download(List<YxStoreCouponIssueUserDto> all, HttpServletResponse response) throws IOException;
|
||||
}
|
@ -1,64 +1,40 @@
|
||||
package co.yixiang.modules.activity.service;
|
||||
|
||||
import co.yixiang.common.service.BaseService;
|
||||
import co.yixiang.modules.activity.domain.YxStoreCoupon;
|
||||
import co.yixiang.modules.activity.service.dto.YxStoreCouponDTO;
|
||||
import co.yixiang.modules.activity.service.dto.YxStoreCouponDto;
|
||||
import co.yixiang.modules.activity.service.dto.YxStoreCouponQueryCriteria;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.List;
|
||||
import java.io.IOException;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
/**
|
||||
* @author hupeng
|
||||
* @date 2019-11-09
|
||||
* @author xuwenbo
|
||||
* @date 2020-05-13
|
||||
*/
|
||||
//@CacheConfig(cacheNames = "yxStoreCoupon")
|
||||
public interface YxStoreCouponService {
|
||||
public interface YxStoreCouponService extends BaseService<YxStoreCoupon>{
|
||||
|
||||
/**
|
||||
/**
|
||||
* 查询数据分页
|
||||
* @param criteria
|
||||
* @param pageable
|
||||
* @return
|
||||
* @param criteria 条件
|
||||
* @param pageable 分页参数
|
||||
* @return Map<String,Object>
|
||||
*/
|
||||
//@Cacheable
|
||||
Map<String,Object> queryAll(YxStoreCouponQueryCriteria criteria, Pageable pageable);
|
||||
|
||||
/**
|
||||
* 查询所有数据不分页
|
||||
* @param criteria
|
||||
* @return
|
||||
* @param criteria 条件参数
|
||||
* @return List<YxStoreCouponDto>
|
||||
*/
|
||||
//@Cacheable
|
||||
List<YxStoreCouponDTO> queryAll(YxStoreCouponQueryCriteria criteria);
|
||||
List<YxStoreCoupon> queryAll(YxStoreCouponQueryCriteria criteria);
|
||||
|
||||
/**
|
||||
* 根据ID查询
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
//@Cacheable(key = "#p0")
|
||||
YxStoreCouponDTO findById(Integer id);
|
||||
|
||||
/**
|
||||
* 创建
|
||||
* @param resources
|
||||
* @return
|
||||
*/
|
||||
//@CacheEvict(allEntries = true)
|
||||
YxStoreCouponDTO create(YxStoreCoupon resources);
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
* @param resources
|
||||
*/
|
||||
//@CacheEvict(allEntries = true)
|
||||
void update(YxStoreCoupon resources);
|
||||
|
||||
/**
|
||||
* 删除
|
||||
* @param id
|
||||
*/
|
||||
//@CacheEvict(allEntries = true)
|
||||
void delete(Integer id);
|
||||
* 导出数据
|
||||
* @param all 待导出的数据
|
||||
* @param response /
|
||||
* @throws IOException /
|
||||
*/
|
||||
void download(List<YxStoreCouponDto> all, HttpServletResponse response) throws IOException;
|
||||
}
|
@ -1,64 +1,40 @@
|
||||
package co.yixiang.modules.activity.service;
|
||||
|
||||
import co.yixiang.common.service.BaseService;
|
||||
import co.yixiang.modules.activity.domain.YxStoreCouponUser;
|
||||
import co.yixiang.modules.activity.service.dto.YxStoreCouponUserDTO;
|
||||
import co.yixiang.modules.activity.service.dto.YxStoreCouponUserDto;
|
||||
import co.yixiang.modules.activity.service.dto.YxStoreCouponUserQueryCriteria;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.List;
|
||||
import java.io.IOException;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
/**
|
||||
* @author hupeng
|
||||
* @date 2019-11-10
|
||||
* @date 2020-05-13
|
||||
*/
|
||||
//@CacheConfig(cacheNames = "yxStoreCouponUser")
|
||||
public interface YxStoreCouponUserService {
|
||||
public interface YxStoreCouponUserService extends BaseService<YxStoreCouponUser>{
|
||||
|
||||
/**
|
||||
/**
|
||||
* 查询数据分页
|
||||
* @param criteria
|
||||
* @param pageable
|
||||
* @return
|
||||
* @param criteria 条件
|
||||
* @param pageable 分页参数
|
||||
* @return Map<String,Object>
|
||||
*/
|
||||
//@Cacheable
|
||||
Map<String,Object> queryAll(YxStoreCouponUserQueryCriteria criteria, Pageable pageable);
|
||||
|
||||
/**
|
||||
* 查询所有数据不分页
|
||||
* @param criteria
|
||||
* @return
|
||||
* @param criteria 条件参数
|
||||
* @return List<YxStoreCouponUserDto>
|
||||
*/
|
||||
//@Cacheable
|
||||
List<YxStoreCouponUserDTO> queryAll(YxStoreCouponUserQueryCriteria criteria);
|
||||
List<YxStoreCouponUser> queryAll(YxStoreCouponUserQueryCriteria criteria);
|
||||
|
||||
/**
|
||||
* 根据ID查询
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
//@Cacheable(key = "#p0")
|
||||
YxStoreCouponUserDTO findById(Integer id);
|
||||
|
||||
/**
|
||||
* 创建
|
||||
* @param resources
|
||||
* @return
|
||||
*/
|
||||
//@CacheEvict(allEntries = true)
|
||||
YxStoreCouponUserDTO create(YxStoreCouponUser resources);
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
* @param resources
|
||||
*/
|
||||
//@CacheEvict(allEntries = true)
|
||||
void update(YxStoreCouponUser resources);
|
||||
|
||||
/**
|
||||
* 删除
|
||||
* @param id
|
||||
*/
|
||||
//@CacheEvict(allEntries = true)
|
||||
void delete(Integer id);
|
||||
* 导出数据
|
||||
* @param all 待导出的数据
|
||||
* @param response /
|
||||
* @throws IOException /
|
||||
*/
|
||||
void download(List<YxStoreCouponUserDto> all, HttpServletResponse response) throws IOException;
|
||||
}
|
@ -1,64 +1,40 @@
|
||||
package co.yixiang.modules.activity.service;
|
||||
|
||||
import co.yixiang.common.service.BaseService;
|
||||
import co.yixiang.modules.activity.domain.YxStoreSeckill;
|
||||
import co.yixiang.modules.activity.service.dto.YxStoreSeckillDTO;
|
||||
import co.yixiang.modules.activity.service.dto.YxStoreSeckillDto;
|
||||
import co.yixiang.modules.activity.service.dto.YxStoreSeckillQueryCriteria;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.List;
|
||||
import java.io.IOException;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
/**
|
||||
* @author xuwenbo
|
||||
* @date 2019-12-14
|
||||
* @author hupeng
|
||||
* @date 2020-05-13
|
||||
*/
|
||||
//@CacheConfig(cacheNames = "yxStoreSeckill")
|
||||
public interface YxStoreSeckillService {
|
||||
public interface YxStoreSeckillService extends BaseService<YxStoreSeckill>{
|
||||
|
||||
/**
|
||||
/**
|
||||
* 查询数据分页
|
||||
* @param criteria
|
||||
* @param pageable
|
||||
* @return
|
||||
* @param criteria 条件
|
||||
* @param pageable 分页参数
|
||||
* @return Map<String,Object>
|
||||
*/
|
||||
//@Cacheable
|
||||
Map<String,Object> queryAll(YxStoreSeckillQueryCriteria criteria, Pageable pageable);
|
||||
|
||||
/**
|
||||
* 查询所有数据不分页
|
||||
* @param criteria
|
||||
* @return
|
||||
* @param criteria 条件参数
|
||||
* @return List<YxStoreSeckillDto>
|
||||
*/
|
||||
//@Cacheable
|
||||
List<YxStoreSeckillDTO> queryAll(YxStoreSeckillQueryCriteria criteria);
|
||||
List<YxStoreSeckill> queryAll(YxStoreSeckillQueryCriteria criteria);
|
||||
|
||||
/**
|
||||
* 根据ID查询
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
//@Cacheable(key = "#p0")
|
||||
YxStoreSeckillDTO findById(Integer id);
|
||||
|
||||
/**
|
||||
* 创建
|
||||
* @param resources
|
||||
* @return
|
||||
*/
|
||||
//@CacheEvict(allEntries = true)
|
||||
YxStoreSeckillDTO create(YxStoreSeckill resources);
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
* @param resources
|
||||
*/
|
||||
//@CacheEvict(allEntries = true)
|
||||
void update(YxStoreSeckill resources);
|
||||
|
||||
/**
|
||||
* 删除
|
||||
* @param id
|
||||
*/
|
||||
//@CacheEvict(allEntries = true)
|
||||
void delete(Integer id);
|
||||
* 导出数据
|
||||
* @param all 待导出的数据
|
||||
* @param response /
|
||||
* @throws IOException /
|
||||
*/
|
||||
void download(List<YxStoreSeckillDto> all, HttpServletResponse response) throws IOException;
|
||||
}
|
@ -1,64 +1,40 @@
|
||||
package co.yixiang.modules.activity.service;
|
||||
|
||||
import co.yixiang.common.service.BaseService;
|
||||
import co.yixiang.modules.activity.domain.YxStoreVisit;
|
||||
import co.yixiang.modules.activity.service.dto.YxStoreVisitDTO;
|
||||
import co.yixiang.modules.activity.service.dto.YxStoreVisitDto;
|
||||
import co.yixiang.modules.activity.service.dto.YxStoreVisitQueryCriteria;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.List;
|
||||
import java.io.IOException;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
/**
|
||||
* @author hupeng
|
||||
* @date 2019-11-18
|
||||
* @date 2020-05-13
|
||||
*/
|
||||
//@CacheConfig(cacheNames = "yxStoreVisit")
|
||||
public interface YxStoreVisitService {
|
||||
public interface YxStoreVisitService extends BaseService<YxStoreVisit>{
|
||||
|
||||
/**
|
||||
/**
|
||||
* 查询数据分页
|
||||
* @param criteria
|
||||
* @param pageable
|
||||
* @return
|
||||
* @param criteria 条件
|
||||
* @param pageable 分页参数
|
||||
* @return Map<String,Object>
|
||||
*/
|
||||
//@Cacheable
|
||||
Map<String,Object> queryAll(YxStoreVisitQueryCriteria criteria, Pageable pageable);
|
||||
|
||||
/**
|
||||
* 查询所有数据不分页
|
||||
* @param criteria
|
||||
* @return
|
||||
* @param criteria 条件参数
|
||||
* @return List<YxStoreVisitDto>
|
||||
*/
|
||||
//@Cacheable
|
||||
List<YxStoreVisitDTO> queryAll(YxStoreVisitQueryCriteria criteria);
|
||||
List<YxStoreVisit> queryAll(YxStoreVisitQueryCriteria criteria);
|
||||
|
||||
/**
|
||||
* 根据ID查询
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
//@Cacheable(key = "#p0")
|
||||
YxStoreVisitDTO findById(Integer id);
|
||||
|
||||
/**
|
||||
* 创建
|
||||
* @param resources
|
||||
* @return
|
||||
*/
|
||||
//@CacheEvict(allEntries = true)
|
||||
YxStoreVisitDTO create(YxStoreVisit resources);
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
* @param resources
|
||||
*/
|
||||
//@CacheEvict(allEntries = true)
|
||||
void update(YxStoreVisit resources);
|
||||
|
||||
/**
|
||||
* 删除
|
||||
* @param id
|
||||
*/
|
||||
//@CacheEvict(allEntries = true)
|
||||
void delete(Integer id);
|
||||
* 导出数据
|
||||
* @param all 待导出的数据
|
||||
* @param response /
|
||||
* @throws IOException /
|
||||
*/
|
||||
void download(List<YxStoreVisitDto> all, HttpServletResponse response) throws IOException;
|
||||
}
|
@ -1,64 +1,40 @@
|
||||
package co.yixiang.modules.activity.service;
|
||||
|
||||
import co.yixiang.common.service.BaseService;
|
||||
import co.yixiang.modules.activity.domain.YxUserExtract;
|
||||
import co.yixiang.modules.activity.service.dto.YxUserExtractDTO;
|
||||
import co.yixiang.modules.activity.service.dto.YxUserExtractDto;
|
||||
import co.yixiang.modules.activity.service.dto.YxUserExtractQueryCriteria;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.List;
|
||||
import java.io.IOException;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
/**
|
||||
* @author hupeng
|
||||
* @date 2019-11-14
|
||||
* @date 2020-05-13
|
||||
*/
|
||||
//@CacheConfig(cacheNames = "yxUserExtract")
|
||||
public interface YxUserExtractService {
|
||||
public interface YxUserExtractService extends BaseService<YxUserExtract>{
|
||||
|
||||
/**
|
||||
/**
|
||||
* 查询数据分页
|
||||
* @param criteria
|
||||
* @param pageable
|
||||
* @return
|
||||
* @param criteria 条件
|
||||
* @param pageable 分页参数
|
||||
* @return Map<String,Object>
|
||||
*/
|
||||
//@Cacheable
|
||||
Map<String,Object> queryAll(YxUserExtractQueryCriteria criteria, Pageable pageable);
|
||||
|
||||
/**
|
||||
* 查询所有数据不分页
|
||||
* @param criteria
|
||||
* @return
|
||||
* @param criteria 条件参数
|
||||
* @return List<YxUserExtractDto>
|
||||
*/
|
||||
//@Cacheable
|
||||
List<YxUserExtractDTO> queryAll(YxUserExtractQueryCriteria criteria);
|
||||
List<YxUserExtract> queryAll(YxUserExtractQueryCriteria criteria);
|
||||
|
||||
/**
|
||||
* 根据ID查询
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
//@Cacheable(key = "#p0")
|
||||
YxUserExtractDTO findById(Integer id);
|
||||
|
||||
/**
|
||||
* 创建
|
||||
* @param resources
|
||||
* @return
|
||||
*/
|
||||
//@CacheEvict(allEntries = true)
|
||||
YxUserExtractDTO create(YxUserExtract resources);
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
* @param resources
|
||||
*/
|
||||
//@CacheEvict(allEntries = true)
|
||||
void update(YxUserExtract resources);
|
||||
|
||||
/**
|
||||
* 删除
|
||||
* @param id
|
||||
*/
|
||||
//@CacheEvict(allEntries = true)
|
||||
void delete(Integer id);
|
||||
* 导出数据
|
||||
* @param all 待导出的数据
|
||||
* @param response /
|
||||
* @throws IOException /
|
||||
*/
|
||||
void download(List<YxUserExtractDto> all, HttpServletResponse response) throws IOException;
|
||||
}
|
@ -1,113 +0,0 @@
|
||||
package co.yixiang.modules.activity.service.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
/**
|
||||
* @author xuwenbo
|
||||
* @date 2019-12-22
|
||||
*/
|
||||
@Data
|
||||
public class YxStoreBargainDTO implements Serializable {
|
||||
|
||||
// 砍价产品ID
|
||||
private Integer id;
|
||||
|
||||
// 关联产品ID
|
||||
private Integer productId;
|
||||
|
||||
// 砍价活动名称
|
||||
private String title;
|
||||
|
||||
// 砍价活动图片
|
||||
private String image;
|
||||
|
||||
// 单位名称
|
||||
private String unitName;
|
||||
|
||||
// 库存
|
||||
private Integer stock;
|
||||
|
||||
// 销量
|
||||
private Integer sales;
|
||||
|
||||
// 砍价产品轮播图
|
||||
private String images;
|
||||
|
||||
// 砍价开启时间
|
||||
private Integer startTime;
|
||||
|
||||
// 砍价结束时间
|
||||
private Integer stopTime;
|
||||
|
||||
// 砍价产品名称
|
||||
private String storeName;
|
||||
|
||||
// 砍价金额
|
||||
private BigDecimal price;
|
||||
|
||||
// 砍价商品最低价
|
||||
private BigDecimal minPrice;
|
||||
|
||||
// 每次购买的砍价产品数量
|
||||
private Integer num;
|
||||
|
||||
// 用户每次砍价的最大金额
|
||||
private BigDecimal bargainMaxPrice;
|
||||
|
||||
// 用户每次砍价的最小金额
|
||||
private BigDecimal bargainMinPrice;
|
||||
|
||||
// 用户每次砍价的次数
|
||||
private Integer bargainNum;
|
||||
|
||||
// 砍价状态 0(到砍价时间不自动开启) 1(到砍价时间自动开启时间)
|
||||
private Integer status;
|
||||
|
||||
// 砍价详情
|
||||
private String description;
|
||||
|
||||
// 反多少积分
|
||||
private BigDecimal giveIntegral;
|
||||
|
||||
// 砍价活动简介
|
||||
private String info;
|
||||
|
||||
// 成本价
|
||||
private BigDecimal cost;
|
||||
|
||||
// 排序
|
||||
private Integer sort;
|
||||
|
||||
// 是否推荐0不推荐1推荐
|
||||
private Integer isHot;
|
||||
|
||||
// 是否删除 0未删除 1删除
|
||||
private Integer isDel;
|
||||
|
||||
// 添加时间
|
||||
private Integer addTime;
|
||||
|
||||
// 是否包邮 0不包邮 1包邮
|
||||
private Integer isPostage;
|
||||
|
||||
// 邮费
|
||||
private BigDecimal postage;
|
||||
|
||||
// 砍价规则
|
||||
private String rule;
|
||||
|
||||
// 砍价产品浏览量
|
||||
private Integer look;
|
||||
|
||||
// 砍价产品分享量
|
||||
private Integer share;
|
||||
|
||||
private Date startTimeDate;
|
||||
|
||||
private Date endTimeDate;
|
||||
}
|
@ -0,0 +1,111 @@
|
||||
package co.yixiang.modules.activity.service.dto;
|
||||
|
||||
import lombok.Data;
|
||||
import java.sql.Timestamp;
|
||||
import java.math.BigDecimal;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @author hupeng
|
||||
* @date 2020-05-13
|
||||
*/
|
||||
@Data
|
||||
public class YxStoreBargainDto implements Serializable {
|
||||
|
||||
/** 砍价产品ID */
|
||||
private Integer id;
|
||||
|
||||
/** 关联产品ID */
|
||||
private Integer productId;
|
||||
|
||||
/** 砍价活动名称 */
|
||||
private String title;
|
||||
|
||||
/** 砍价活动图片 */
|
||||
private String image;
|
||||
|
||||
/** 单位名称 */
|
||||
private String unitName;
|
||||
|
||||
/** 库存 */
|
||||
private Integer stock;
|
||||
|
||||
/** 销量 */
|
||||
private Integer sales;
|
||||
|
||||
/** 砍价产品轮播图 */
|
||||
private String images;
|
||||
|
||||
/** 砍价开启时间 */
|
||||
private Integer startTime;
|
||||
|
||||
/** 砍价结束时间 */
|
||||
private Integer stopTime;
|
||||
|
||||
/** 砍价产品名称 */
|
||||
private String storeName;
|
||||
|
||||
/** 砍价金额 */
|
||||
private BigDecimal price;
|
||||
|
||||
/** 砍价商品最低价 */
|
||||
private BigDecimal minPrice;
|
||||
|
||||
/** 每次购买的砍价产品数量 */
|
||||
private Integer num;
|
||||
|
||||
/** 用户每次砍价的最大金额 */
|
||||
private BigDecimal bargainMaxPrice;
|
||||
|
||||
/** 用户每次砍价的最小金额 */
|
||||
private BigDecimal bargainMinPrice;
|
||||
|
||||
/** 用户每次砍价的次数 */
|
||||
private Integer bargainNum;
|
||||
|
||||
/** 砍价状态 0(到砍价时间不自动开启) 1(到砍价时间自动开启时间) */
|
||||
private Integer status;
|
||||
|
||||
/** 砍价详情 */
|
||||
private String description;
|
||||
|
||||
/** 反多少积分 */
|
||||
private BigDecimal giveIntegral;
|
||||
|
||||
/** 砍价活动简介 */
|
||||
private String info;
|
||||
|
||||
/** 成本价 */
|
||||
private BigDecimal cost;
|
||||
|
||||
/** 排序 */
|
||||
private Integer sort;
|
||||
|
||||
/** 是否推荐0不推荐1推荐 */
|
||||
private Integer isHot;
|
||||
|
||||
/** 是否删除 0未删除 1删除 */
|
||||
private Integer isDel;
|
||||
|
||||
/** 添加时间 */
|
||||
private Integer addTime;
|
||||
|
||||
/** 是否包邮 0不包邮 1包邮 */
|
||||
private Integer isPostage;
|
||||
|
||||
/** 邮费 */
|
||||
private BigDecimal postage;
|
||||
|
||||
/** 砍价规则 */
|
||||
private String rule;
|
||||
|
||||
/** 砍价产品浏览量 */
|
||||
private Integer look;
|
||||
|
||||
/** 砍价产品分享量 */
|
||||
private Integer share;
|
||||
|
||||
private Timestamp endTimeDate;
|
||||
|
||||
private Timestamp startTimeDate;
|
||||
}
|
@ -1,10 +1,12 @@
|
||||
package co.yixiang.modules.activity.service.dto;
|
||||
|
||||
import lombok.Data;
|
||||
import java.util.List;
|
||||
import co.yixiang.annotation.Query;
|
||||
|
||||
/**
|
||||
* @author xuwenbo
|
||||
* @date 2019-12-22
|
||||
* @author hupeng
|
||||
* @date 2020-05-13
|
||||
*/
|
||||
@Data
|
||||
public class YxStoreBargainQueryCriteria{
|
||||
|
@ -1,18 +1,17 @@
|
||||
package co.yixiang.modules.activity.service.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.sql.Timestamp;
|
||||
import java.math.BigDecimal;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
/**
|
||||
* @author hupeng
|
||||
* @date 2019-11-18
|
||||
* @date 2020-05-13
|
||||
*/
|
||||
@Data
|
||||
public class YxStoreCombinationDTO implements Serializable {
|
||||
public class YxStoreCombinationDto implements Serializable {
|
||||
|
||||
private Integer id;
|
||||
|
||||
@ -107,4 +106,5 @@ public class YxStoreCombinationDTO implements Serializable {
|
||||
|
||||
// 单位名
|
||||
private String unitName;
|
||||
}
|
||||
|
||||
}
|
@ -1,11 +1,12 @@
|
||||
package co.yixiang.modules.activity.service.dto;
|
||||
|
||||
import co.yixiang.annotation.Query;
|
||||
import lombok.Data;
|
||||
import java.util.List;
|
||||
import co.yixiang.annotation.Query;
|
||||
|
||||
/**
|
||||
* @author hupeng
|
||||
* @date 2019-11-18
|
||||
* @date 2020-05-13
|
||||
*/
|
||||
@Data
|
||||
public class YxStoreCombinationQueryCriteria{
|
||||
@ -16,4 +17,4 @@ public class YxStoreCombinationQueryCriteria{
|
||||
|
||||
@Query
|
||||
private Integer isDel;
|
||||
}
|
||||
}
|
||||
|
@ -1,17 +1,15 @@
|
||||
package co.yixiang.modules.activity.service.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @author hupeng
|
||||
* @date 2019-11-09
|
||||
* @author xuwenbo
|
||||
* @date 2020-05-13
|
||||
*/
|
||||
@Data
|
||||
public class YxStoreCouponDTO implements Serializable {
|
||||
public class YxStoreCouponDto implements Serializable {
|
||||
|
||||
// 优惠券表ID
|
||||
private Integer id;
|
||||
@ -42,4 +40,4 @@ public class YxStoreCouponDTO implements Serializable {
|
||||
|
||||
// 是否删除
|
||||
private Integer isDel;
|
||||
}
|
||||
}
|
@ -1,49 +0,0 @@
|
||||
package co.yixiang.modules.activity.service.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
/**
|
||||
* @author hupeng
|
||||
* @date 2019-11-09
|
||||
*/
|
||||
@Data
|
||||
public class YxStoreCouponIssueDTO implements Serializable {
|
||||
|
||||
private Integer id;
|
||||
|
||||
// 优惠券ID
|
||||
private Integer cid;
|
||||
|
||||
private String cname;
|
||||
|
||||
// 优惠券领取开启时间
|
||||
private Integer startTime;
|
||||
|
||||
// 优惠券领取结束时间
|
||||
private Integer endTime;
|
||||
|
||||
private Date startTimeDate;
|
||||
|
||||
private Date endTimeDate;
|
||||
|
||||
// 优惠券领取数量
|
||||
private Integer totalCount;
|
||||
|
||||
// 优惠券剩余领取数量
|
||||
private Integer remainCount;
|
||||
|
||||
// 是否无限张数
|
||||
private Integer isPermanent;
|
||||
|
||||
// 1 正常 0 未开启 -1 已无效
|
||||
private Integer status;
|
||||
|
||||
private Integer isDel;
|
||||
|
||||
// 优惠券添加时间
|
||||
private Integer addTime;
|
||||
}
|
@ -0,0 +1,47 @@
|
||||
package co.yixiang.modules.activity.service.dto;
|
||||
|
||||
import lombok.Data;
|
||||
import java.sql.Timestamp;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @author hupeng
|
||||
* @date 2020-05-13
|
||||
*/
|
||||
@Data
|
||||
public class YxStoreCouponIssueDto implements Serializable {
|
||||
|
||||
private Integer id;
|
||||
|
||||
private String cname;
|
||||
|
||||
/** 优惠券ID */
|
||||
private Integer cid;
|
||||
|
||||
/** 优惠券领取开启时间 */
|
||||
private Integer startTime;
|
||||
|
||||
/** 优惠券领取结束时间 */
|
||||
private Integer endTime;
|
||||
|
||||
/** 优惠券领取数量 */
|
||||
private Integer totalCount;
|
||||
|
||||
/** 优惠券剩余领取数量 */
|
||||
private Integer remainCount;
|
||||
|
||||
/** 是否无限张数 */
|
||||
private Integer isPermanent;
|
||||
|
||||
/** 1 正常 0 未开启 -1 已无效 */
|
||||
private Integer status;
|
||||
|
||||
private Integer isDel;
|
||||
|
||||
/** 优惠券添加时间 */
|
||||
private Integer addTime;
|
||||
|
||||
private Timestamp endTimeDate;
|
||||
|
||||
private Timestamp startTimeDate;
|
||||
}
|
@ -1,14 +1,16 @@
|
||||
package co.yixiang.modules.activity.service.dto;
|
||||
|
||||
import co.yixiang.annotation.Query;
|
||||
import lombok.Data;
|
||||
import java.util.List;
|
||||
import co.yixiang.annotation.Query;
|
||||
|
||||
/**
|
||||
* @author hupeng
|
||||
* @date 2019-11-09
|
||||
* @date 2020-05-13
|
||||
*/
|
||||
@Data
|
||||
public class YxStoreCouponIssueQueryCriteria{
|
||||
@Query
|
||||
|
||||
private Integer isDel;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,25 +1,23 @@
|
||||
package co.yixiang.modules.activity.service.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
|
||||
/**
|
||||
* @author hupeng
|
||||
* @date 2019-11-09
|
||||
* @date 2020-05-13
|
||||
*/
|
||||
@Data
|
||||
public class YxStoreCouponIssueUserDTO implements Serializable {
|
||||
public class YxStoreCouponIssueUserDto implements Serializable {
|
||||
|
||||
private Integer id;
|
||||
|
||||
// 领取优惠券用户ID
|
||||
/** 领取优惠券用户ID */
|
||||
private Integer uid;
|
||||
|
||||
// 优惠券前台领取ID
|
||||
/** 优惠券前台领取ID */
|
||||
private Integer issueCouponId;
|
||||
|
||||
// 领取时间
|
||||
/** 领取时间 */
|
||||
private Integer addTime;
|
||||
}
|
@ -1,10 +1,12 @@
|
||||
package co.yixiang.modules.activity.service.dto;
|
||||
|
||||
import lombok.Data;
|
||||
import java.util.List;
|
||||
import co.yixiang.annotation.Query;
|
||||
|
||||
/**
|
||||
* @author hupeng
|
||||
* @date 2019-11-09
|
||||
* @date 2020-05-13
|
||||
*/
|
||||
@Data
|
||||
public class YxStoreCouponIssueUserQueryCriteria{
|
||||
|
@ -1,14 +1,16 @@
|
||||
package co.yixiang.modules.activity.service.dto;
|
||||
|
||||
import co.yixiang.annotation.Query;
|
||||
import lombok.Data;
|
||||
import java.util.List;
|
||||
import co.yixiang.annotation.Query;
|
||||
|
||||
/**
|
||||
* @author hupeng
|
||||
* @date 2019-11-09
|
||||
* @author xuwenbo
|
||||
* @date 2020-05-13
|
||||
*/
|
||||
@Data
|
||||
public class YxStoreCouponQueryCriteria{
|
||||
|
||||
@Query
|
||||
private Integer isDel;
|
||||
}
|
||||
}
|
||||
|
@ -1,17 +1,15 @@
|
||||
package co.yixiang.modules.activity.service.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @author hupeng
|
||||
* @date 2019-11-10
|
||||
* @date 2020-05-13
|
||||
*/
|
||||
@Data
|
||||
public class YxStoreCouponUserDTO implements Serializable {
|
||||
public class YxStoreCouponUserDto implements Serializable {
|
||||
|
||||
// 优惠券发放记录id
|
||||
private Integer id;
|
||||
@ -50,4 +48,5 @@ public class YxStoreCouponUserDTO implements Serializable {
|
||||
|
||||
// 是否有效
|
||||
private Integer isFail;
|
||||
}
|
||||
|
||||
}
|
@ -1,12 +1,13 @@
|
||||
package co.yixiang.modules.activity.service.dto;
|
||||
|
||||
import co.yixiang.annotation.Query;
|
||||
import lombok.Data;
|
||||
import java.util.List;
|
||||
import co.yixiang.annotation.Query;
|
||||
|
||||
/**
|
||||
* @author hupeng
|
||||
* @date 2019-11-10
|
||||
*/
|
||||
* @author hupeng
|
||||
* @date 2020-05-13
|
||||
*/
|
||||
@Data
|
||||
public class YxStoreCouponUserQueryCriteria{
|
||||
|
||||
|
@ -10,4 +10,6 @@ import co.yixiang.annotation.Query;
|
||||
*/
|
||||
@Data
|
||||
public class YxStorePinkQueryCriteria{
|
||||
}
|
||||
@Query
|
||||
private Integer kId;
|
||||
}
|
||||
|
@ -1,18 +1,18 @@
|
||||
package co.yixiang.modules.activity.service.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.sql.Timestamp;
|
||||
import java.math.BigDecimal;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
/**
|
||||
* @author xuwenbo
|
||||
* @date 2019-12-14
|
||||
* @author hupeng
|
||||
* @date 2020-05-13
|
||||
*/
|
||||
@Data
|
||||
public class YxStoreSeckillDTO implements Serializable {
|
||||
public class YxStoreSeckillDto implements Serializable {
|
||||
|
||||
|
||||
// 商品秒杀产品表id
|
||||
private Integer id;
|
||||
@ -96,4 +96,4 @@ public class YxStoreSeckillDTO implements Serializable {
|
||||
private String statusStr;
|
||||
|
||||
private Integer timeId;
|
||||
}
|
||||
}
|
@ -1,16 +1,18 @@
|
||||
package co.yixiang.modules.activity.service.dto;
|
||||
|
||||
import co.yixiang.annotation.Query;
|
||||
import lombok.Data;
|
||||
import java.util.List;
|
||||
import co.yixiang.annotation.Query;
|
||||
|
||||
/**
|
||||
* @author xuwenbo
|
||||
* @date 2019-12-14
|
||||
* @author hupeng
|
||||
* @date 2020-05-13
|
||||
*/
|
||||
@Data
|
||||
public class YxStoreSeckillQueryCriteria{
|
||||
|
||||
|
||||
// 模糊
|
||||
@Query(type = Query.Type.INNER_LIKE)
|
||||
private String title;
|
||||
}
|
||||
}
|
||||
|
@ -1,40 +1,38 @@
|
||||
package co.yixiang.modules.activity.service.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
|
||||
/**
|
||||
* @author hupeng
|
||||
* @date 2019-11-18
|
||||
* @date 2020-05-13
|
||||
*/
|
||||
@Data
|
||||
public class YxStoreVisitDTO implements Serializable {
|
||||
public class YxStoreVisitDto implements Serializable {
|
||||
|
||||
private Integer id;
|
||||
|
||||
// 产品ID
|
||||
/** 产品ID */
|
||||
private Integer productId;
|
||||
|
||||
// 产品类型
|
||||
/** 产品类型 */
|
||||
private String productType;
|
||||
|
||||
// 产品分类ID
|
||||
/** 产品分类ID */
|
||||
private Integer cateId;
|
||||
|
||||
// 产品类型
|
||||
/** 产品类型 */
|
||||
private String type;
|
||||
|
||||
// 用户ID
|
||||
/** 用户ID */
|
||||
private Integer uid;
|
||||
|
||||
// 访问次数
|
||||
/** 访问次数 */
|
||||
private Integer count;
|
||||
|
||||
// 备注描述
|
||||
/** 备注描述 */
|
||||
private String content;
|
||||
|
||||
// 添加时间
|
||||
/** 添加时间 */
|
||||
private Integer addTime;
|
||||
}
|
@ -1,10 +1,12 @@
|
||||
package co.yixiang.modules.activity.service.dto;
|
||||
|
||||
import lombok.Data;
|
||||
import java.util.List;
|
||||
import co.yixiang.annotation.Query;
|
||||
|
||||
/**
|
||||
* @author hupeng
|
||||
* @date 2019-11-18
|
||||
* @date 2020-05-13
|
||||
*/
|
||||
@Data
|
||||
public class YxStoreVisitQueryCriteria{
|
||||
|
@ -1,17 +1,16 @@
|
||||
package co.yixiang.modules.activity.service.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @author hupeng
|
||||
* @date 2019-11-14
|
||||
* @date 2020-05-13
|
||||
*/
|
||||
@Data
|
||||
public class YxUserExtractDTO implements Serializable {
|
||||
public class YxUserExtractDto implements Serializable {
|
||||
|
||||
|
||||
private Integer id;
|
||||
|
||||
@ -52,4 +51,4 @@ public class YxUserExtractDTO implements Serializable {
|
||||
|
||||
// 微信号
|
||||
private String wechat;
|
||||
}
|
||||
}
|
@ -1,16 +1,18 @@
|
||||
package co.yixiang.modules.activity.service.dto;
|
||||
|
||||
import co.yixiang.annotation.Query;
|
||||
import lombok.Data;
|
||||
import java.util.List;
|
||||
import co.yixiang.annotation.Query;
|
||||
|
||||
/**
|
||||
* @author hupeng
|
||||
* @date 2019-11-14
|
||||
* @date 2020-05-13
|
||||
*/
|
||||
@Data
|
||||
public class YxUserExtractQueryCriteria{
|
||||
|
||||
|
||||
// 模糊
|
||||
@Query(type = Query.Type.INNER_LIKE)
|
||||
private String realName;
|
||||
}
|
||||
}
|
||||
|
@ -1,78 +1,106 @@
|
||||
package co.yixiang.modules.activity.service.impl;
|
||||
|
||||
import co.yixiang.modules.activity.domain.YxStoreBargain;
|
||||
import co.yixiang.modules.activity.repository.YxStoreBargainRepository;
|
||||
import co.yixiang.common.service.impl.BaseServiceImpl;
|
||||
import lombok.AllArgsConstructor;
|
||||
import co.yixiang.dozer.service.IGenerator;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import co.yixiang.common.utils.QueryHelpPlus;
|
||||
import co.yixiang.utils.ValidationUtil;
|
||||
import co.yixiang.utils.FileUtil;
|
||||
import co.yixiang.modules.activity.service.YxStoreBargainService;
|
||||
import co.yixiang.modules.activity.service.dto.YxStoreBargainDTO;
|
||||
import co.yixiang.modules.activity.service.dto.YxStoreBargainDto;
|
||||
import co.yixiang.modules.activity.service.dto.YxStoreBargainQueryCriteria;
|
||||
import co.yixiang.modules.activity.service.mapper.YxStoreBargainMapper;
|
||||
import co.yixiang.utils.PageUtil;
|
||||
import co.yixiang.utils.QueryHelp;
|
||||
import co.yixiang.utils.ValidationUtil;
|
||||
import org.springframework.data.domain.Page;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Propagation;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
// 默认不使用缓存
|
||||
//import org.springframework.cache.annotation.CacheConfig;
|
||||
//import org.springframework.cache.annotation.CacheEvict;
|
||||
//import org.springframework.cache.annotation.Cacheable;
|
||||
import org.springframework.data.domain.Page;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import co.yixiang.utils.PageUtil;
|
||||
import co.yixiang.utils.QueryHelp;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
import java.io.IOException;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.ArrayList;
|
||||
import java.util.LinkedHashMap;
|
||||
|
||||
/**
|
||||
* @author xuwenbo
|
||||
* @date 2019-12-22
|
||||
* @author hupeng
|
||||
* @date 2020-05-13
|
||||
*/
|
||||
@Service
|
||||
@AllArgsConstructor
|
||||
//@CacheConfig(cacheNames = "yxStoreBargain")
|
||||
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class)
|
||||
public class YxStoreBargainServiceImpl implements YxStoreBargainService {
|
||||
public class YxStoreBargainServiceImpl extends BaseServiceImpl<YxStoreBargainMapper, YxStoreBargain> implements YxStoreBargainService {
|
||||
|
||||
private final YxStoreBargainRepository yxStoreBargainRepository;
|
||||
|
||||
private final YxStoreBargainMapper yxStoreBargainMapper;
|
||||
|
||||
public YxStoreBargainServiceImpl(YxStoreBargainRepository yxStoreBargainRepository, YxStoreBargainMapper yxStoreBargainMapper) {
|
||||
this.yxStoreBargainRepository = yxStoreBargainRepository;
|
||||
this.yxStoreBargainMapper = yxStoreBargainMapper;
|
||||
}
|
||||
private final IGenerator generator;
|
||||
|
||||
@Override
|
||||
public Map<String,Object> queryAll(YxStoreBargainQueryCriteria criteria, Pageable pageable){
|
||||
Page<YxStoreBargain> page = yxStoreBargainRepository.findAll((root, criteriaQuery, criteriaBuilder) -> QueryHelp.getPredicate(root,criteria,criteriaBuilder),pageable);
|
||||
return PageUtil.toPage(page.map(yxStoreBargainMapper::toDto));
|
||||
//@Cacheable
|
||||
public Map<String, Object> queryAll(YxStoreBargainQueryCriteria criteria, Pageable pageable) {
|
||||
getPage(pageable);
|
||||
PageInfo<YxStoreBargain> page = new PageInfo<>(queryAll(criteria));
|
||||
Map<String, Object> map = new LinkedHashMap<>(2);
|
||||
map.put("content", generator.convert(page.getList(), YxStoreBargainDto.class));
|
||||
map.put("totalElements", page.getTotal());
|
||||
return map;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<YxStoreBargainDTO> queryAll(YxStoreBargainQueryCriteria criteria){
|
||||
return yxStoreBargainMapper.toDto(yxStoreBargainRepository.findAll((root, criteriaQuery, criteriaBuilder) -> QueryHelp.getPredicate(root,criteria,criteriaBuilder)));
|
||||
}
|
||||
|
||||
@Override
|
||||
public YxStoreBargainDTO findById(Integer id) {
|
||||
Optional<YxStoreBargain> yxStoreBargain = yxStoreBargainRepository.findById(id);
|
||||
ValidationUtil.isNull(yxStoreBargain,"YxStoreBargain","id",id);
|
||||
return yxStoreBargainMapper.toDto(yxStoreBargain.get());
|
||||
//@Cacheable
|
||||
public List<YxStoreBargain> queryAll(YxStoreBargainQueryCriteria criteria){
|
||||
return baseMapper.selectList(QueryHelpPlus.getPredicate(YxStoreBargain.class, criteria));
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public YxStoreBargainDTO create(YxStoreBargain resources) {
|
||||
return yxStoreBargainMapper.toDto(yxStoreBargainRepository.save(resources));
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void update(YxStoreBargain resources) {
|
||||
Optional<YxStoreBargain> optionalYxStoreBargain = yxStoreBargainRepository.findById(resources.getId());
|
||||
ValidationUtil.isNull( optionalYxStoreBargain,"YxStoreBargain","id",resources.getId());
|
||||
YxStoreBargain yxStoreBargain = optionalYxStoreBargain.get();
|
||||
yxStoreBargain.copy(resources);
|
||||
yxStoreBargainRepository.save(yxStoreBargain);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void delete(Integer id) {
|
||||
yxStoreBargainRepository.deleteById(id);
|
||||
public void download(List<YxStoreBargainDto> all, HttpServletResponse response) throws IOException {
|
||||
List<Map<String, Object>> list = new ArrayList<>();
|
||||
for (YxStoreBargainDto yxStoreBargain : all) {
|
||||
Map<String,Object> map = new LinkedHashMap<>();
|
||||
map.put("关联产品ID", yxStoreBargain.getProductId());
|
||||
map.put("砍价活动名称", yxStoreBargain.getTitle());
|
||||
map.put("砍价活动图片", yxStoreBargain.getImage());
|
||||
map.put("单位名称", yxStoreBargain.getUnitName());
|
||||
map.put("库存", yxStoreBargain.getStock());
|
||||
map.put("销量", yxStoreBargain.getSales());
|
||||
map.put("砍价产品轮播图", yxStoreBargain.getImages());
|
||||
map.put("砍价开启时间", yxStoreBargain.getStartTime());
|
||||
map.put("砍价结束时间", yxStoreBargain.getStopTime());
|
||||
map.put("砍价产品名称", yxStoreBargain.getStoreName());
|
||||
map.put("砍价金额", yxStoreBargain.getPrice());
|
||||
map.put("砍价商品最低价", yxStoreBargain.getMinPrice());
|
||||
map.put("每次购买的砍价产品数量", yxStoreBargain.getNum());
|
||||
map.put("用户每次砍价的最大金额", yxStoreBargain.getBargainMaxPrice());
|
||||
map.put("用户每次砍价的最小金额", yxStoreBargain.getBargainMinPrice());
|
||||
map.put("用户每次砍价的次数", yxStoreBargain.getBargainNum());
|
||||
map.put("砍价状态 0(到砍价时间不自动开启) 1(到砍价时间自动开启时间)", yxStoreBargain.getStatus());
|
||||
map.put("砍价详情", yxStoreBargain.getDescription());
|
||||
map.put("反多少积分", yxStoreBargain.getGiveIntegral());
|
||||
map.put("砍价活动简介", yxStoreBargain.getInfo());
|
||||
map.put("成本价", yxStoreBargain.getCost());
|
||||
map.put("排序", yxStoreBargain.getSort());
|
||||
map.put("是否推荐0不推荐1推荐", yxStoreBargain.getIsHot());
|
||||
map.put("是否删除 0未删除 1删除", yxStoreBargain.getIsDel());
|
||||
map.put("添加时间", yxStoreBargain.getAddTime());
|
||||
map.put("是否包邮 0不包邮 1包邮", yxStoreBargain.getIsPostage());
|
||||
map.put("邮费", yxStoreBargain.getPostage());
|
||||
map.put("砍价规则", yxStoreBargain.getRule());
|
||||
map.put("砍价产品浏览量", yxStoreBargain.getLook());
|
||||
map.put("砍价产品分享量", yxStoreBargain.getShare());
|
||||
map.put(" endTimeDate", yxStoreBargain.getEndTimeDate());
|
||||
map.put(" startTimeDate", yxStoreBargain.getStartTimeDate());
|
||||
list.add(map);
|
||||
}
|
||||
FileUtil.downloadExcel(list, response);
|
||||
}
|
||||
}
|
@ -1,121 +1,132 @@
|
||||
package co.yixiang.modules.activity.service.impl;
|
||||
|
||||
import co.yixiang.modules.activity.domain.YxStoreCombination;
|
||||
import co.yixiang.modules.activity.repository.YxStoreCombinationRepository;
|
||||
import co.yixiang.modules.activity.repository.YxStorePinkRepository;
|
||||
import co.yixiang.modules.activity.repository.YxStoreVisitRepository;
|
||||
import co.yixiang.common.service.impl.BaseServiceImpl;
|
||||
import co.yixiang.modules.activity.domain.YxStorePink;
|
||||
import co.yixiang.modules.activity.domain.YxStoreVisit;
|
||||
import co.yixiang.modules.activity.service.mapper.YxStorePinkMapper;
|
||||
import co.yixiang.modules.activity.service.mapper.YxStoreVisitMapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import lombok.AllArgsConstructor;
|
||||
import co.yixiang.dozer.service.IGenerator;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import co.yixiang.common.utils.QueryHelpPlus;
|
||||
import co.yixiang.utils.ValidationUtil;
|
||||
import co.yixiang.utils.FileUtil;
|
||||
import co.yixiang.modules.activity.service.YxStoreCombinationService;
|
||||
import co.yixiang.modules.activity.service.dto.YxStoreCombinationDTO;
|
||||
import co.yixiang.modules.activity.service.dto.YxStoreCombinationDto;
|
||||
import co.yixiang.modules.activity.service.dto.YxStoreCombinationQueryCriteria;
|
||||
import co.yixiang.modules.activity.service.mapper.YxStoreCombinationMapper;
|
||||
import co.yixiang.utils.QueryHelp;
|
||||
import co.yixiang.utils.ValidationUtil;
|
||||
import org.springframework.data.domain.Page;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Propagation;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.LinkedHashMap;
|
||||
// 默认不使用缓存
|
||||
//import org.springframework.cache.annotation.CacheConfig;
|
||||
//import org.springframework.cache.annotation.CacheEvict;
|
||||
//import org.springframework.cache.annotation.Cacheable;
|
||||
import org.springframework.data.domain.Page;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import co.yixiang.utils.PageUtil;
|
||||
import co.yixiang.utils.QueryHelp;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
import java.io.IOException;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.ArrayList;
|
||||
import java.util.LinkedHashMap;
|
||||
|
||||
/**
|
||||
* @author hupeng
|
||||
* @date 2019-11-18
|
||||
* @date 2020-05-13
|
||||
*/
|
||||
@Service
|
||||
@AllArgsConstructor
|
||||
//@CacheConfig(cacheNames = "yxStoreCombination")
|
||||
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class)
|
||||
public class YxStoreCombinationServiceImpl implements YxStoreCombinationService {
|
||||
|
||||
private final YxStoreCombinationRepository yxStoreCombinationRepository;
|
||||
private final YxStorePinkRepository storePinkRepository;
|
||||
private final YxStoreVisitRepository storeVisitRepository;
|
||||
|
||||
private final YxStoreCombinationMapper yxStoreCombinationMapper;
|
||||
|
||||
public YxStoreCombinationServiceImpl(YxStoreCombinationRepository yxStoreCombinationRepository, YxStorePinkRepository storePinkRepository,
|
||||
YxStoreVisitRepository storeVisitRepository, YxStoreCombinationMapper yxStoreCombinationMapper) {
|
||||
this.yxStoreCombinationRepository = yxStoreCombinationRepository;
|
||||
this.storePinkRepository = storePinkRepository;
|
||||
this.storeVisitRepository = storeVisitRepository;
|
||||
this.yxStoreCombinationMapper = yxStoreCombinationMapper;
|
||||
}
|
||||
public class YxStoreCombinationServiceImpl extends BaseServiceImpl<YxStoreCombinationMapper, YxStoreCombination> implements YxStoreCombinationService {
|
||||
|
||||
private final IGenerator generator;
|
||||
private final YxStorePinkMapper yxStorePinkMapper;
|
||||
private final YxStoreVisitMapper yxStoreVisitMapper;
|
||||
@Override
|
||||
public Map<String,Object> queryAll(YxStoreCombinationQueryCriteria criteria, Pageable pageable){
|
||||
criteria.setIsDel(0);
|
||||
Page<YxStoreCombination> page = yxStoreCombinationRepository
|
||||
.findAll((root, criteriaQuery, criteriaBuilder)
|
||||
-> QueryHelp.getPredicate(root,criteria,criteriaBuilder),pageable);
|
||||
List<YxStoreCombinationDTO> combinationDTOS = yxStoreCombinationMapper
|
||||
.toDto(page.getContent());
|
||||
for (YxStoreCombinationDTO combinationDTO : combinationDTOS) {
|
||||
//@Cacheable
|
||||
public Map<String, Object> queryAll(YxStoreCombinationQueryCriteria criteria, Pageable pageable) {
|
||||
getPage(pageable);
|
||||
PageInfo<YxStoreCombination> page = new PageInfo<>(queryAll(criteria));
|
||||
|
||||
List<YxStoreCombinationDto> combinationDTOS = generator.convert(page.getList(),YxStoreCombinationDto.class);
|
||||
for (YxStoreCombinationDto combinationDTO : combinationDTOS) {
|
||||
//参与人数
|
||||
combinationDTO.setCountPeopleAll(storePinkRepository
|
||||
.countByCid(combinationDTO.getId()));
|
||||
combinationDTO.setCountPeopleAll(yxStorePinkMapper.selectCount(new QueryWrapper<YxStorePink>().eq("cid",combinationDTO.getId())));
|
||||
|
||||
//成团人数
|
||||
combinationDTO.setCountPeoplePink(storePinkRepository.countByCidAndKId(combinationDTO.getId(),
|
||||
0));
|
||||
combinationDTO.setCountPeoplePink(yxStorePinkMapper.selectCount(new QueryWrapper<YxStorePink>().eq("cid",combinationDTO.getId()).eq("k_id",0)));
|
||||
//获取查看拼团产品人数
|
||||
combinationDTO.setCountPeopleBrowse(storeVisitRepository
|
||||
.countByProductIdAndProductType(combinationDTO.getId(),"combination"));
|
||||
|
||||
//System.out.println(combinationDTO);
|
||||
|
||||
combinationDTO.setCountPeopleBrowse(yxStoreVisitMapper.selectCount(new QueryWrapper<YxStoreVisit>().eq("product_id",combinationDTO.getId())
|
||||
.eq("product_type","combination")));
|
||||
}
|
||||
Map<String,Object> map = new LinkedHashMap<>(2);
|
||||
Map<String, Object> map = new LinkedHashMap<>(2);
|
||||
map.put("content",combinationDTOS);
|
||||
map.put("totalElements",page.getTotalElements());
|
||||
|
||||
map.put("totalElements", page.getTotal());
|
||||
return map;
|
||||
//return PageUtil.toPage(page.map(yxStoreCombinationMapper::toDto));
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
//@Cacheable
|
||||
public List<YxStoreCombination> queryAll(YxStoreCombinationQueryCriteria criteria){
|
||||
return baseMapper.selectList(QueryHelpPlus.getPredicate(YxStoreCombination.class, criteria));
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void download(List<YxStoreCombinationDto> all, HttpServletResponse response) throws IOException {
|
||||
List<Map<String, Object>> list = new ArrayList<>();
|
||||
for (YxStoreCombinationDto yxStoreCombination : all) {
|
||||
Map<String,Object> map = new LinkedHashMap<>();
|
||||
map.put("商品id", yxStoreCombination.getProductId());
|
||||
map.put("商户id", yxStoreCombination.getMerId());
|
||||
map.put("推荐图", yxStoreCombination.getImage());
|
||||
map.put("轮播图", yxStoreCombination.getImages());
|
||||
map.put("活动标题", yxStoreCombination.getTitle());
|
||||
map.put("活动属性", yxStoreCombination.getAttr());
|
||||
map.put("参团人数", yxStoreCombination.getPeople());
|
||||
map.put("简介", yxStoreCombination.getInfo());
|
||||
map.put("价格", yxStoreCombination.getPrice());
|
||||
map.put("排序", yxStoreCombination.getSort());
|
||||
map.put("销量", yxStoreCombination.getSales());
|
||||
map.put("库存", yxStoreCombination.getStock());
|
||||
map.put("添加时间", yxStoreCombination.getAddTime());
|
||||
map.put("推荐", yxStoreCombination.getIsHost());
|
||||
map.put("产品状态", yxStoreCombination.getIsShow());
|
||||
map.put(" isDel", yxStoreCombination.getIsDel());
|
||||
map.put(" combination", yxStoreCombination.getCombination());
|
||||
map.put("商户是否可用1可用0不可用", yxStoreCombination.getMerUse());
|
||||
map.put("是否包邮1是0否", yxStoreCombination.getIsPostage());
|
||||
map.put("邮费", yxStoreCombination.getPostage());
|
||||
map.put("拼团内容", yxStoreCombination.getDescription());
|
||||
map.put("拼团开始时间", yxStoreCombination.getStartTime());
|
||||
map.put("拼团结束时间", yxStoreCombination.getStopTime());
|
||||
map.put("拼团订单有效时间", yxStoreCombination.getEffectiveTime());
|
||||
map.put("拼图产品成本", yxStoreCombination.getCost());
|
||||
map.put("浏览量", yxStoreCombination.getBrowse());
|
||||
map.put("单位名", yxStoreCombination.getUnitName());
|
||||
list.add(map);
|
||||
}
|
||||
FileUtil.downloadExcel(list, response);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void onSale(Integer id, Integer status) {
|
||||
public void onSale(Integer id, int status) {
|
||||
if(status == 1){
|
||||
status = 0;
|
||||
}else{
|
||||
status = 1;
|
||||
}
|
||||
yxStoreCombinationRepository.updateOnsale(status,id);
|
||||
YxStoreCombination yxStoreCombination = new YxStoreCombination();
|
||||
yxStoreCombination.setIsShow(status);
|
||||
yxStoreCombination.setId(id);
|
||||
this.saveOrUpdate(yxStoreCombination);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<YxStoreCombinationDTO> queryAll(YxStoreCombinationQueryCriteria criteria){
|
||||
return yxStoreCombinationMapper.toDto(yxStoreCombinationRepository.findAll((root, criteriaQuery, criteriaBuilder) -> QueryHelp.getPredicate(root,criteria,criteriaBuilder)));
|
||||
}
|
||||
|
||||
@Override
|
||||
public YxStoreCombinationDTO findById(Integer id) {
|
||||
Optional<YxStoreCombination> yxStoreCombination = yxStoreCombinationRepository.findById(id);
|
||||
ValidationUtil.isNull(yxStoreCombination,"YxStoreCombination","id",id);
|
||||
return yxStoreCombinationMapper.toDto(yxStoreCombination.get());
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public YxStoreCombinationDTO create(YxStoreCombination resources) {
|
||||
return yxStoreCombinationMapper.toDto(yxStoreCombinationRepository.save(resources));
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void update(YxStoreCombination resources) {
|
||||
Optional<YxStoreCombination> optionalYxStoreCombination = yxStoreCombinationRepository.findById(resources.getId());
|
||||
ValidationUtil.isNull( optionalYxStoreCombination,"YxStoreCombination","id",resources.getId());
|
||||
YxStoreCombination yxStoreCombination = optionalYxStoreCombination.get();
|
||||
yxStoreCombination.copy(resources);
|
||||
yxStoreCombinationRepository.save(yxStoreCombination);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void delete(Integer id) {
|
||||
yxStoreCombinationRepository.deleteById(id);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,78 +1,86 @@
|
||||
package co.yixiang.modules.activity.service.impl;
|
||||
|
||||
import co.yixiang.modules.activity.domain.YxStoreCouponIssue;
|
||||
import co.yixiang.modules.activity.repository.YxStoreCouponIssueRepository;
|
||||
import co.yixiang.common.service.impl.BaseServiceImpl;
|
||||
import lombok.AllArgsConstructor;
|
||||
import co.yixiang.dozer.service.IGenerator;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import co.yixiang.common.utils.QueryHelpPlus;
|
||||
import co.yixiang.utils.ValidationUtil;
|
||||
import co.yixiang.utils.FileUtil;
|
||||
import co.yixiang.modules.activity.service.YxStoreCouponIssueService;
|
||||
import co.yixiang.modules.activity.service.dto.YxStoreCouponIssueDTO;
|
||||
import co.yixiang.modules.activity.service.dto.YxStoreCouponIssueDto;
|
||||
import co.yixiang.modules.activity.service.dto.YxStoreCouponIssueQueryCriteria;
|
||||
import co.yixiang.modules.activity.service.mapper.YxStoreCouponIssueMapper;
|
||||
import co.yixiang.utils.PageUtil;
|
||||
import co.yixiang.utils.QueryHelp;
|
||||
import co.yixiang.utils.ValidationUtil;
|
||||
import org.springframework.data.domain.Page;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Propagation;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
// 默认不使用缓存
|
||||
//import org.springframework.cache.annotation.CacheConfig;
|
||||
//import org.springframework.cache.annotation.CacheEvict;
|
||||
//import org.springframework.cache.annotation.Cacheable;
|
||||
import org.springframework.data.domain.Page;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import co.yixiang.utils.PageUtil;
|
||||
import co.yixiang.utils.QueryHelp;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
import java.io.IOException;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.ArrayList;
|
||||
import java.util.LinkedHashMap;
|
||||
|
||||
/**
|
||||
* @author hupeng
|
||||
* @date 2019-11-09
|
||||
* @date 2020-05-13
|
||||
*/
|
||||
@Service
|
||||
@AllArgsConstructor
|
||||
//@CacheConfig(cacheNames = "yxStoreCouponIssue")
|
||||
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class)
|
||||
public class YxStoreCouponIssueServiceImpl implements YxStoreCouponIssueService {
|
||||
public class YxStoreCouponIssueServiceImpl extends BaseServiceImpl<YxStoreCouponIssueMapper, YxStoreCouponIssue> implements YxStoreCouponIssueService {
|
||||
|
||||
private final YxStoreCouponIssueRepository yxStoreCouponIssueRepository;
|
||||
|
||||
private final YxStoreCouponIssueMapper yxStoreCouponIssueMapper;
|
||||
|
||||
public YxStoreCouponIssueServiceImpl(YxStoreCouponIssueRepository yxStoreCouponIssueRepository, YxStoreCouponIssueMapper yxStoreCouponIssueMapper) {
|
||||
this.yxStoreCouponIssueRepository = yxStoreCouponIssueRepository;
|
||||
this.yxStoreCouponIssueMapper = yxStoreCouponIssueMapper;
|
||||
}
|
||||
private final IGenerator generator;
|
||||
|
||||
@Override
|
||||
public Map<String,Object> queryAll(YxStoreCouponIssueQueryCriteria criteria, Pageable pageable){
|
||||
Page<YxStoreCouponIssue> page = yxStoreCouponIssueRepository.findAll((root, criteriaQuery, criteriaBuilder) -> QueryHelp.getPredicate(root,criteria,criteriaBuilder),pageable);
|
||||
return PageUtil.toPage(page.map(yxStoreCouponIssueMapper::toDto));
|
||||
//@Cacheable
|
||||
public Map<String, Object> queryAll(YxStoreCouponIssueQueryCriteria criteria, Pageable pageable) {
|
||||
getPage(pageable);
|
||||
PageInfo<YxStoreCouponIssue> page = new PageInfo<>(queryAll(criteria));
|
||||
Map<String, Object> map = new LinkedHashMap<>(2);
|
||||
map.put("content", generator.convert(page.getList(), YxStoreCouponIssueDto.class));
|
||||
map.put("totalElements", page.getTotal());
|
||||
return map;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<YxStoreCouponIssueDTO> queryAll(YxStoreCouponIssueQueryCriteria criteria){
|
||||
return yxStoreCouponIssueMapper.toDto(yxStoreCouponIssueRepository.findAll((root, criteriaQuery, criteriaBuilder) -> QueryHelp.getPredicate(root,criteria,criteriaBuilder)));
|
||||
}
|
||||
|
||||
@Override
|
||||
public YxStoreCouponIssueDTO findById(Integer id) {
|
||||
Optional<YxStoreCouponIssue> yxStoreCouponIssue = yxStoreCouponIssueRepository.findById(id);
|
||||
ValidationUtil.isNull(yxStoreCouponIssue,"YxStoreCouponIssue","id",id);
|
||||
return yxStoreCouponIssueMapper.toDto(yxStoreCouponIssue.get());
|
||||
//@Cacheable
|
||||
public List<YxStoreCouponIssue> queryAll(YxStoreCouponIssueQueryCriteria criteria){
|
||||
return baseMapper.selectList(QueryHelpPlus.getPredicate(YxStoreCouponIssue.class, criteria));
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public YxStoreCouponIssueDTO create(YxStoreCouponIssue resources) {
|
||||
return yxStoreCouponIssueMapper.toDto(yxStoreCouponIssueRepository.save(resources));
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void update(YxStoreCouponIssue resources) {
|
||||
Optional<YxStoreCouponIssue> optionalYxStoreCouponIssue = yxStoreCouponIssueRepository.findById(resources.getId());
|
||||
ValidationUtil.isNull( optionalYxStoreCouponIssue,"YxStoreCouponIssue","id",resources.getId());
|
||||
YxStoreCouponIssue yxStoreCouponIssue = optionalYxStoreCouponIssue.get();
|
||||
yxStoreCouponIssue.copy(resources);
|
||||
yxStoreCouponIssueRepository.save(yxStoreCouponIssue);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void delete(Integer id) {
|
||||
yxStoreCouponIssueRepository.deleteById(id);
|
||||
public void download(List<YxStoreCouponIssueDto> all, HttpServletResponse response) throws IOException {
|
||||
List<Map<String, Object>> list = new ArrayList<>();
|
||||
for (YxStoreCouponIssueDto yxStoreCouponIssue : all) {
|
||||
Map<String,Object> map = new LinkedHashMap<>();
|
||||
map.put(" cname", yxStoreCouponIssue.getCname());
|
||||
map.put("优惠券ID", yxStoreCouponIssue.getCid());
|
||||
map.put("优惠券领取开启时间", yxStoreCouponIssue.getStartTime());
|
||||
map.put("优惠券领取结束时间", yxStoreCouponIssue.getEndTime());
|
||||
map.put("优惠券领取数量", yxStoreCouponIssue.getTotalCount());
|
||||
map.put("优惠券剩余领取数量", yxStoreCouponIssue.getRemainCount());
|
||||
map.put("是否无限张数", yxStoreCouponIssue.getIsPermanent());
|
||||
map.put("1 正常 0 未开启 -1 已无效", yxStoreCouponIssue.getStatus());
|
||||
map.put(" isDel", yxStoreCouponIssue.getIsDel());
|
||||
map.put("优惠券添加时间", yxStoreCouponIssue.getAddTime());
|
||||
map.put(" endTimeDate", yxStoreCouponIssue.getEndTimeDate());
|
||||
map.put(" startTimeDate", yxStoreCouponIssue.getStartTimeDate());
|
||||
list.add(map);
|
||||
}
|
||||
FileUtil.downloadExcel(list, response);
|
||||
}
|
||||
}
|
@ -1,78 +1,77 @@
|
||||
package co.yixiang.modules.activity.service.impl;
|
||||
|
||||
import co.yixiang.modules.activity.domain.YxStoreCouponIssueUser;
|
||||
import co.yixiang.modules.activity.repository.YxStoreCouponIssueUserRepository;
|
||||
import co.yixiang.common.service.impl.BaseServiceImpl;
|
||||
import lombok.AllArgsConstructor;
|
||||
import co.yixiang.dozer.service.IGenerator;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import co.yixiang.common.utils.QueryHelpPlus;
|
||||
import co.yixiang.utils.ValidationUtil;
|
||||
import co.yixiang.utils.FileUtil;
|
||||
import co.yixiang.modules.activity.service.YxStoreCouponIssueUserService;
|
||||
import co.yixiang.modules.activity.service.dto.YxStoreCouponIssueUserDTO;
|
||||
import co.yixiang.modules.activity.service.dto.YxStoreCouponIssueUserDto;
|
||||
import co.yixiang.modules.activity.service.dto.YxStoreCouponIssueUserQueryCriteria;
|
||||
import co.yixiang.modules.activity.service.mapper.YxStoreCouponIssueUserMapper;
|
||||
import co.yixiang.utils.PageUtil;
|
||||
import co.yixiang.utils.QueryHelp;
|
||||
import co.yixiang.utils.ValidationUtil;
|
||||
import org.springframework.data.domain.Page;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Propagation;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
// 默认不使用缓存
|
||||
//import org.springframework.cache.annotation.CacheConfig;
|
||||
//import org.springframework.cache.annotation.CacheEvict;
|
||||
//import org.springframework.cache.annotation.Cacheable;
|
||||
import org.springframework.data.domain.Page;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import co.yixiang.utils.PageUtil;
|
||||
import co.yixiang.utils.QueryHelp;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
import java.io.IOException;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.ArrayList;
|
||||
import java.util.LinkedHashMap;
|
||||
|
||||
/**
|
||||
* @author hupeng
|
||||
* @date 2019-11-09
|
||||
* @date 2020-05-13
|
||||
*/
|
||||
@Service
|
||||
@AllArgsConstructor
|
||||
//@CacheConfig(cacheNames = "yxStoreCouponIssueUser")
|
||||
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class)
|
||||
public class YxStoreCouponIssueUserServiceImpl implements YxStoreCouponIssueUserService {
|
||||
public class YxStoreCouponIssueUserServiceImpl extends BaseServiceImpl<YxStoreCouponIssueUserMapper, YxStoreCouponIssueUser> implements YxStoreCouponIssueUserService {
|
||||
|
||||
private final YxStoreCouponIssueUserRepository yxStoreCouponIssueUserRepository;
|
||||
|
||||
private final YxStoreCouponIssueUserMapper yxStoreCouponIssueUserMapper;
|
||||
|
||||
public YxStoreCouponIssueUserServiceImpl(YxStoreCouponIssueUserRepository yxStoreCouponIssueUserRepository, YxStoreCouponIssueUserMapper yxStoreCouponIssueUserMapper) {
|
||||
this.yxStoreCouponIssueUserRepository = yxStoreCouponIssueUserRepository;
|
||||
this.yxStoreCouponIssueUserMapper = yxStoreCouponIssueUserMapper;
|
||||
}
|
||||
private final IGenerator generator;
|
||||
|
||||
@Override
|
||||
public Map<String,Object> queryAll(YxStoreCouponIssueUserQueryCriteria criteria, Pageable pageable){
|
||||
Page<YxStoreCouponIssueUser> page = yxStoreCouponIssueUserRepository.findAll((root, criteriaQuery, criteriaBuilder) -> QueryHelp.getPredicate(root,criteria,criteriaBuilder),pageable);
|
||||
return PageUtil.toPage(page.map(yxStoreCouponIssueUserMapper::toDto));
|
||||
//@Cacheable
|
||||
public Map<String, Object> queryAll(YxStoreCouponIssueUserQueryCriteria criteria, Pageable pageable) {
|
||||
getPage(pageable);
|
||||
PageInfo<YxStoreCouponIssueUser> page = new PageInfo<>(queryAll(criteria));
|
||||
Map<String, Object> map = new LinkedHashMap<>(2);
|
||||
map.put("content", generator.convert(page.getList(), YxStoreCouponIssueUserDto.class));
|
||||
map.put("totalElements", page.getTotal());
|
||||
return map;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<YxStoreCouponIssueUserDTO> queryAll(YxStoreCouponIssueUserQueryCriteria criteria){
|
||||
return yxStoreCouponIssueUserMapper.toDto(yxStoreCouponIssueUserRepository.findAll((root, criteriaQuery, criteriaBuilder) -> QueryHelp.getPredicate(root,criteria,criteriaBuilder)));
|
||||
}
|
||||
|
||||
@Override
|
||||
public YxStoreCouponIssueUserDTO findById(Integer id) {
|
||||
Optional<YxStoreCouponIssueUser> yxStoreCouponIssueUser = yxStoreCouponIssueUserRepository.findById(id);
|
||||
ValidationUtil.isNull(yxStoreCouponIssueUser,"YxStoreCouponIssueUser","id",id);
|
||||
return yxStoreCouponIssueUserMapper.toDto(yxStoreCouponIssueUser.get());
|
||||
//@Cacheable
|
||||
public List<YxStoreCouponIssueUser> queryAll(YxStoreCouponIssueUserQueryCriteria criteria){
|
||||
return baseMapper.selectList(QueryHelpPlus.getPredicate(YxStoreCouponIssueUser.class, criteria));
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public YxStoreCouponIssueUserDTO create(YxStoreCouponIssueUser resources) {
|
||||
return yxStoreCouponIssueUserMapper.toDto(yxStoreCouponIssueUserRepository.save(resources));
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void update(YxStoreCouponIssueUser resources) {
|
||||
Optional<YxStoreCouponIssueUser> optionalYxStoreCouponIssueUser = yxStoreCouponIssueUserRepository.findById(resources.getId());
|
||||
ValidationUtil.isNull( optionalYxStoreCouponIssueUser,"YxStoreCouponIssueUser","id",resources.getId());
|
||||
YxStoreCouponIssueUser yxStoreCouponIssueUser = optionalYxStoreCouponIssueUser.get();
|
||||
yxStoreCouponIssueUser.copy(resources);
|
||||
yxStoreCouponIssueUserRepository.save(yxStoreCouponIssueUser);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void delete(Integer id) {
|
||||
yxStoreCouponIssueUserRepository.deleteById(id);
|
||||
public void download(List<YxStoreCouponIssueUserDto> all, HttpServletResponse response) throws IOException {
|
||||
List<Map<String, Object>> list = new ArrayList<>();
|
||||
for (YxStoreCouponIssueUserDto yxStoreCouponIssueUser : all) {
|
||||
Map<String,Object> map = new LinkedHashMap<>();
|
||||
map.put("领取优惠券用户ID", yxStoreCouponIssueUser.getUid());
|
||||
map.put("优惠券前台领取ID", yxStoreCouponIssueUser.getIssueCouponId());
|
||||
map.put("领取时间", yxStoreCouponIssueUser.getAddTime());
|
||||
list.add(map);
|
||||
}
|
||||
FileUtil.downloadExcel(list, response);
|
||||
}
|
||||
}
|
@ -1,78 +1,83 @@
|
||||
package co.yixiang.modules.activity.service.impl;
|
||||
|
||||
import co.yixiang.modules.activity.domain.YxStoreCoupon;
|
||||
import co.yixiang.modules.activity.repository.YxStoreCouponRepository;
|
||||
import co.yixiang.common.service.impl.BaseServiceImpl;
|
||||
import lombok.AllArgsConstructor;
|
||||
import co.yixiang.dozer.service.IGenerator;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import co.yixiang.common.utils.QueryHelpPlus;
|
||||
import co.yixiang.utils.ValidationUtil;
|
||||
import co.yixiang.utils.FileUtil;
|
||||
import co.yixiang.modules.activity.service.YxStoreCouponService;
|
||||
import co.yixiang.modules.activity.service.dto.YxStoreCouponDTO;
|
||||
import co.yixiang.modules.activity.service.dto.YxStoreCouponDto;
|
||||
import co.yixiang.modules.activity.service.dto.YxStoreCouponQueryCriteria;
|
||||
import co.yixiang.modules.activity.service.mapper.YxStoreCouponMapper;
|
||||
import co.yixiang.utils.PageUtil;
|
||||
import co.yixiang.utils.QueryHelp;
|
||||
import co.yixiang.utils.ValidationUtil;
|
||||
import org.springframework.data.domain.Page;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Propagation;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
// 默认不使用缓存
|
||||
//import org.springframework.cache.annotation.CacheConfig;
|
||||
//import org.springframework.cache.annotation.CacheEvict;
|
||||
//import org.springframework.cache.annotation.Cacheable;
|
||||
import org.springframework.data.domain.Page;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import co.yixiang.utils.PageUtil;
|
||||
import co.yixiang.utils.QueryHelp;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
import java.io.IOException;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.ArrayList;
|
||||
import java.util.LinkedHashMap;
|
||||
|
||||
/**
|
||||
* @author hupeng
|
||||
* @date 2019-11-09
|
||||
* @author xuwenbo
|
||||
* @date 2020-05-13
|
||||
*/
|
||||
@Service
|
||||
@AllArgsConstructor
|
||||
//@CacheConfig(cacheNames = "yxStoreCoupon")
|
||||
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class)
|
||||
public class YxStoreCouponServiceImpl implements YxStoreCouponService {
|
||||
public class YxStoreCouponServiceImpl extends BaseServiceImpl<YxStoreCouponMapper, YxStoreCoupon> implements YxStoreCouponService {
|
||||
|
||||
private final YxStoreCouponRepository yxStoreCouponRepository;
|
||||
|
||||
private final YxStoreCouponMapper yxStoreCouponMapper;
|
||||
|
||||
public YxStoreCouponServiceImpl(YxStoreCouponRepository yxStoreCouponRepository, YxStoreCouponMapper yxStoreCouponMapper) {
|
||||
this.yxStoreCouponRepository = yxStoreCouponRepository;
|
||||
this.yxStoreCouponMapper = yxStoreCouponMapper;
|
||||
}
|
||||
private final IGenerator generator;
|
||||
|
||||
@Override
|
||||
public Map<String,Object> queryAll(YxStoreCouponQueryCriteria criteria, Pageable pageable){
|
||||
Page<YxStoreCoupon> page = yxStoreCouponRepository.findAll((root, criteriaQuery, criteriaBuilder) -> QueryHelp.getPredicate(root,criteria,criteriaBuilder),pageable);
|
||||
return PageUtil.toPage(page.map(yxStoreCouponMapper::toDto));
|
||||
//@Cacheable
|
||||
public Map<String, Object> queryAll(YxStoreCouponQueryCriteria criteria, Pageable pageable) {
|
||||
getPage(pageable);
|
||||
PageInfo<YxStoreCoupon> page = new PageInfo<>(queryAll(criteria));
|
||||
Map<String, Object> map = new LinkedHashMap<>(2);
|
||||
map.put("content", generator.convert(page.getList(), YxStoreCouponDto.class));
|
||||
map.put("totalElements", page.getTotal());
|
||||
return map;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<YxStoreCouponDTO> queryAll(YxStoreCouponQueryCriteria criteria){
|
||||
return yxStoreCouponMapper.toDto(yxStoreCouponRepository.findAll((root, criteriaQuery, criteriaBuilder) -> QueryHelp.getPredicate(root,criteria,criteriaBuilder)));
|
||||
}
|
||||
|
||||
@Override
|
||||
public YxStoreCouponDTO findById(Integer id) {
|
||||
Optional<YxStoreCoupon> yxStoreCoupon = yxStoreCouponRepository.findById(id);
|
||||
ValidationUtil.isNull(yxStoreCoupon,"YxStoreCoupon","id",id);
|
||||
return yxStoreCouponMapper.toDto(yxStoreCoupon.get());
|
||||
//@Cacheable
|
||||
public List<YxStoreCoupon> queryAll(YxStoreCouponQueryCriteria criteria){
|
||||
return baseMapper.selectList(QueryHelpPlus.getPredicate(YxStoreCoupon.class, criteria));
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public YxStoreCouponDTO create(YxStoreCoupon resources) {
|
||||
return yxStoreCouponMapper.toDto(yxStoreCouponRepository.save(resources));
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void update(YxStoreCoupon resources) {
|
||||
Optional<YxStoreCoupon> optionalYxStoreCoupon = yxStoreCouponRepository.findById(resources.getId());
|
||||
ValidationUtil.isNull( optionalYxStoreCoupon,"YxStoreCoupon","id",resources.getId());
|
||||
YxStoreCoupon yxStoreCoupon = optionalYxStoreCoupon.get();
|
||||
yxStoreCoupon.copy(resources);
|
||||
yxStoreCouponRepository.save(yxStoreCoupon);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void delete(Integer id) {
|
||||
yxStoreCouponRepository.deleteById(id);
|
||||
public void download(List<YxStoreCouponDto> all, HttpServletResponse response) throws IOException {
|
||||
List<Map<String, Object>> list = new ArrayList<>();
|
||||
for (YxStoreCouponDto yxStoreCoupon : all) {
|
||||
Map<String,Object> map = new LinkedHashMap<>();
|
||||
map.put("优惠券名称", yxStoreCoupon.getTitle());
|
||||
map.put("兑换消耗积分值", yxStoreCoupon.getIntegral());
|
||||
map.put("兑换的优惠券面值", yxStoreCoupon.getCouponPrice());
|
||||
map.put("最低消费多少金额可用优惠券", yxStoreCoupon.getUseMinPrice());
|
||||
map.put("优惠券有效期限(单位:天)", yxStoreCoupon.getCouponTime());
|
||||
map.put("排序", yxStoreCoupon.getSort());
|
||||
map.put("状态(0:关闭,1:开启)", yxStoreCoupon.getStatus());
|
||||
map.put("兑换项目添加时间", yxStoreCoupon.getAddTime());
|
||||
map.put("是否删除", yxStoreCoupon.getIsDel());
|
||||
list.add(map);
|
||||
}
|
||||
FileUtil.downloadExcel(list, response);
|
||||
}
|
||||
}
|
@ -1,97 +1,90 @@
|
||||
package co.yixiang.modules.activity.service.impl;
|
||||
|
||||
import co.yixiang.modules.activity.domain.YxStoreCouponUser;
|
||||
import co.yixiang.modules.activity.repository.YxStoreCouponUserRepository;
|
||||
import co.yixiang.modules.activity.service.YxStoreCouponUserService;
|
||||
import co.yixiang.modules.activity.service.dto.YxStoreCouponUserDTO;
|
||||
import co.yixiang.modules.activity.service.dto.YxStoreCouponUserQueryCriteria;
|
||||
import co.yixiang.modules.activity.service.mapper.YxStoreCouponUserMapper;
|
||||
import co.yixiang.common.service.impl.BaseServiceImpl;
|
||||
import co.yixiang.modules.shop.domain.YxUser;
|
||||
import co.yixiang.modules.shop.service.YxUserService;
|
||||
import co.yixiang.utils.QueryHelp;
|
||||
import co.yixiang.utils.ValidationUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import org.springframework.data.domain.Page;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import lombok.AllArgsConstructor;
|
||||
import co.yixiang.dozer.service.IGenerator;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import co.yixiang.common.utils.QueryHelpPlus;
|
||||
import co.yixiang.utils.ValidationUtil;
|
||||
import co.yixiang.utils.FileUtil;
|
||||
import co.yixiang.modules.activity.service.YxStoreCouponUserService;
|
||||
import co.yixiang.modules.activity.service.dto.YxStoreCouponUserDto;
|
||||
import co.yixiang.modules.activity.service.dto.YxStoreCouponUserQueryCriteria;
|
||||
import co.yixiang.modules.activity.service.mapper.YxStoreCouponUserMapper;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Propagation;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.LinkedHashMap;
|
||||
// 默认不使用缓存
|
||||
//import org.springframework.cache.annotation.CacheConfig;
|
||||
//import org.springframework.cache.annotation.CacheEvict;
|
||||
//import org.springframework.cache.annotation.Cacheable;
|
||||
import org.springframework.data.domain.Page;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import co.yixiang.utils.PageUtil;
|
||||
import co.yixiang.utils.QueryHelp;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
import java.io.IOException;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.ArrayList;
|
||||
import java.util.LinkedHashMap;
|
||||
|
||||
/**
|
||||
* @author hupeng
|
||||
* @date 2019-11-10
|
||||
* @date 2020-05-13
|
||||
*/
|
||||
@Service
|
||||
@AllArgsConstructor
|
||||
//@CacheConfig(cacheNames = "yxStoreCouponUser")
|
||||
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class)
|
||||
public class YxStoreCouponUserServiceImpl implements YxStoreCouponUserService {
|
||||
|
||||
private final YxStoreCouponUserRepository yxStoreCouponUserRepository;
|
||||
|
||||
private final YxStoreCouponUserMapper yxStoreCouponUserMapper;
|
||||
public class YxStoreCouponUserServiceImpl extends BaseServiceImpl<YxStoreCouponUserMapper, YxStoreCouponUser> implements YxStoreCouponUserService {
|
||||
|
||||
private final IGenerator generator;
|
||||
private final YxUserService userService;
|
||||
|
||||
public YxStoreCouponUserServiceImpl(YxStoreCouponUserRepository yxStoreCouponUserRepository, YxStoreCouponUserMapper yxStoreCouponUserMapper, YxUserService userService) {
|
||||
this.yxStoreCouponUserRepository = yxStoreCouponUserRepository;
|
||||
this.yxStoreCouponUserMapper = yxStoreCouponUserMapper;
|
||||
this.userService = userService;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String,Object> queryAll(YxStoreCouponUserQueryCriteria criteria, Pageable pageable){
|
||||
Page<YxStoreCouponUser> page = yxStoreCouponUserRepository.
|
||||
findAll((root, criteriaQuery, criteriaBuilder)
|
||||
-> QueryHelp.getPredicate(root,criteria,criteriaBuilder),pageable);
|
||||
//List<YxStoreCouponUserDTO> storeOrderDTOS = new ArrayList<>();
|
||||
List<YxStoreCouponUserDTO> storeOrderDTOS = yxStoreCouponUserMapper
|
||||
.toDto(page.getContent());
|
||||
for (YxStoreCouponUserDTO couponUserDTO : storeOrderDTOS) {
|
||||
//@Cacheable
|
||||
public Map<String, Object> queryAll(YxStoreCouponUserQueryCriteria criteria, Pageable pageable) {
|
||||
getPage(pageable);
|
||||
PageInfo<YxStoreCouponUser> page = new PageInfo<>(queryAll(criteria));
|
||||
List<YxStoreCouponUserDto> storeOrderDTOS = generator.convert(page.getList(),YxStoreCouponUserDto.class);
|
||||
for (YxStoreCouponUserDto couponUserDTO : storeOrderDTOS) {
|
||||
couponUserDTO.setNickname(userService.getOne(new QueryWrapper<YxUser>().eq("uid",couponUserDTO.getUid())).getNickname());
|
||||
}
|
||||
Map<String,Object> map = new LinkedHashMap<>(2);
|
||||
map.put("content",storeOrderDTOS);
|
||||
map.put("totalElements",page.getTotalElements());
|
||||
|
||||
map.put("totalElements", page.getTotal());
|
||||
return map;
|
||||
//return PageUtil.toPage(page.map(yxStoreCouponUserMapper::toDto));
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<YxStoreCouponUserDTO> queryAll(YxStoreCouponUserQueryCriteria criteria){
|
||||
return yxStoreCouponUserMapper.toDto(yxStoreCouponUserRepository.findAll((root, criteriaQuery, criteriaBuilder) -> QueryHelp.getPredicate(root,criteria,criteriaBuilder)));
|
||||
}
|
||||
|
||||
@Override
|
||||
public YxStoreCouponUserDTO findById(Integer id) {
|
||||
Optional<YxStoreCouponUser> yxStoreCouponUser = yxStoreCouponUserRepository.findById(id);
|
||||
ValidationUtil.isNull(yxStoreCouponUser,"YxStoreCouponUser","id",id);
|
||||
return yxStoreCouponUserMapper.toDto(yxStoreCouponUser.get());
|
||||
//@Cacheable
|
||||
public List<YxStoreCouponUser> queryAll(YxStoreCouponUserQueryCriteria criteria){
|
||||
return baseMapper.selectList(QueryHelpPlus.getPredicate(YxStoreCouponUser.class, criteria));
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public YxStoreCouponUserDTO create(YxStoreCouponUser resources) {
|
||||
return yxStoreCouponUserMapper.toDto(yxStoreCouponUserRepository.save(resources));
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void update(YxStoreCouponUser resources) {
|
||||
Optional<YxStoreCouponUser> optionalYxStoreCouponUser = yxStoreCouponUserRepository.findById(resources.getId());
|
||||
ValidationUtil.isNull( optionalYxStoreCouponUser,"YxStoreCouponUser","id",resources.getId());
|
||||
YxStoreCouponUser yxStoreCouponUser = optionalYxStoreCouponUser.get();
|
||||
yxStoreCouponUser.copy(resources);
|
||||
yxStoreCouponUserRepository.save(yxStoreCouponUser);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void delete(Integer id) {
|
||||
yxStoreCouponUserRepository.deleteById(id);
|
||||
public void download(List<YxStoreCouponUserDto> all, HttpServletResponse response) throws IOException {
|
||||
List<Map<String, Object>> list = new ArrayList<>();
|
||||
for (YxStoreCouponUserDto yxStoreCouponUser : all) {
|
||||
Map<String,Object> map = new LinkedHashMap<>();
|
||||
map.put("兑换的项目id", yxStoreCouponUser.getCid());
|
||||
map.put("优惠券所属用户", yxStoreCouponUser.getUid());
|
||||
map.put("优惠券名称", yxStoreCouponUser.getCouponTitle());
|
||||
map.put("优惠券的面值", yxStoreCouponUser.getCouponPrice());
|
||||
map.put("最低消费多少金额可用优惠券", yxStoreCouponUser.getUseMinPrice());
|
||||
map.put("优惠券创建时间", yxStoreCouponUser.getAddTime());
|
||||
map.put("优惠券结束时间", yxStoreCouponUser.getEndTime());
|
||||
map.put("使用时间", yxStoreCouponUser.getUseTime());
|
||||
map.put("获取方式", yxStoreCouponUser.getType());
|
||||
map.put("状态(0:未使用,1:已使用, 2:已过期)", yxStoreCouponUser.getStatus());
|
||||
map.put("是否有效", yxStoreCouponUser.getIsFail());
|
||||
list.add(map);
|
||||
}
|
||||
FileUtil.downloadExcel(list, response);
|
||||
}
|
||||
}
|
||||
|
@ -1,50 +1,54 @@
|
||||
package co.yixiang.modules.activity.service.impl;
|
||||
|
||||
import co.yixiang.modules.activity.domain.YxStoreSeckill;
|
||||
import co.yixiang.modules.activity.repository.YxStoreSeckillRepository;
|
||||
import co.yixiang.common.service.impl.BaseServiceImpl;
|
||||
import co.yixiang.utils.*;
|
||||
import lombok.AllArgsConstructor;
|
||||
import co.yixiang.dozer.service.IGenerator;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import co.yixiang.common.utils.QueryHelpPlus;
|
||||
import co.yixiang.modules.activity.service.YxStoreSeckillService;
|
||||
import co.yixiang.modules.activity.service.dto.YxStoreSeckillDTO;
|
||||
import co.yixiang.modules.activity.service.dto.YxStoreSeckillDto;
|
||||
import co.yixiang.modules.activity.service.dto.YxStoreSeckillQueryCriteria;
|
||||
import co.yixiang.modules.activity.service.mapper.YxStoreSeckillMapper;
|
||||
import co.yixiang.utils.OrderUtil;
|
||||
import co.yixiang.utils.QueryHelp;
|
||||
import co.yixiang.utils.ValidationUtil;
|
||||
import org.springframework.data.domain.Page;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Propagation;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
// 默认不使用缓存
|
||||
//import org.springframework.cache.annotation.CacheConfig;
|
||||
//import org.springframework.cache.annotation.CacheEvict;
|
||||
//import org.springframework.cache.annotation.Cacheable;
|
||||
import org.springframework.data.domain.Page;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
import java.io.IOException;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.ArrayList;
|
||||
import java.util.LinkedHashMap;
|
||||
|
||||
/**
|
||||
* @author xuwenbo
|
||||
* @date 2019-12-14
|
||||
* @author hupeng
|
||||
* @date 2020-05-13
|
||||
*/
|
||||
@Service
|
||||
@AllArgsConstructor
|
||||
//@CacheConfig(cacheNames = "yxStoreSeckill")
|
||||
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class)
|
||||
public class YxStoreSeckillServiceImpl implements YxStoreSeckillService {
|
||||
public class YxStoreSeckillServiceImpl extends BaseServiceImpl<YxStoreSeckillMapper, YxStoreSeckill> implements YxStoreSeckillService {
|
||||
|
||||
private final YxStoreSeckillRepository yxStoreSeckillRepository;
|
||||
|
||||
private final YxStoreSeckillMapper yxStoreSeckillMapper;
|
||||
|
||||
public YxStoreSeckillServiceImpl(YxStoreSeckillRepository yxStoreSeckillRepository, YxStoreSeckillMapper yxStoreSeckillMapper) {
|
||||
this.yxStoreSeckillRepository = yxStoreSeckillRepository;
|
||||
this.yxStoreSeckillMapper = yxStoreSeckillMapper;
|
||||
}
|
||||
private final IGenerator generator;
|
||||
|
||||
@Override
|
||||
public Map<String,Object> queryAll(YxStoreSeckillQueryCriteria criteria, Pageable pageable){
|
||||
Page<YxStoreSeckill> page = yxStoreSeckillRepository.findAll((root, criteriaQuery, criteriaBuilder) ->
|
||||
QueryHelp.getPredicate(root,criteria,criteriaBuilder),pageable);
|
||||
List<YxStoreSeckillDTO> storeSeckillDTOS = yxStoreSeckillMapper
|
||||
.toDto(page.getContent());
|
||||
//@Cacheable
|
||||
public Map<String, Object> queryAll(YxStoreSeckillQueryCriteria criteria, Pageable pageable) {
|
||||
getPage(pageable);
|
||||
PageInfo<YxStoreSeckill> page = new PageInfo<>(queryAll(criteria));
|
||||
List<YxStoreSeckillDto> storeSeckillDTOS = generator.convert(page.getList(),YxStoreSeckillDto.class);
|
||||
int nowTime = OrderUtil.getSecondTimestampTwo();
|
||||
for (YxStoreSeckillDTO storeSeckillDTO : storeSeckillDTOS){
|
||||
for (YxStoreSeckillDto storeSeckillDTO : storeSeckillDTOS){
|
||||
if(storeSeckillDTO.getStatus() > 0){
|
||||
if(storeSeckillDTO.getStartTime() > nowTime){
|
||||
storeSeckillDTO.setStatusStr("活动未开始");
|
||||
@ -60,42 +64,52 @@ public class YxStoreSeckillServiceImpl implements YxStoreSeckillService {
|
||||
}
|
||||
Map<String,Object> map = new LinkedHashMap<>(2);
|
||||
map.put("content",storeSeckillDTOS);
|
||||
map.put("totalElements",page.getTotalElements());
|
||||
|
||||
map.put("totalElements", page.getTotal());
|
||||
return map;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<YxStoreSeckillDTO> queryAll(YxStoreSeckillQueryCriteria criteria){
|
||||
return yxStoreSeckillMapper.toDto(yxStoreSeckillRepository.findAll((root, criteriaQuery, criteriaBuilder) -> QueryHelp.getPredicate(root,criteria,criteriaBuilder)));
|
||||
}
|
||||
|
||||
@Override
|
||||
public YxStoreSeckillDTO findById(Integer id) {
|
||||
Optional<YxStoreSeckill> yxStoreSeckill = yxStoreSeckillRepository.findById(id);
|
||||
ValidationUtil.isNull(yxStoreSeckill,"YxStoreSeckill","id",id);
|
||||
return yxStoreSeckillMapper.toDto(yxStoreSeckill.get());
|
||||
//@Cacheable
|
||||
public List<YxStoreSeckill> queryAll(YxStoreSeckillQueryCriteria criteria){
|
||||
return baseMapper.selectList(QueryHelpPlus.getPredicate(YxStoreSeckill.class, criteria));
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public YxStoreSeckillDTO create(YxStoreSeckill resources) {
|
||||
return yxStoreSeckillMapper.toDto(yxStoreSeckillRepository.save(resources));
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void update(YxStoreSeckill resources) {
|
||||
Optional<YxStoreSeckill> optionalYxStoreSeckill = yxStoreSeckillRepository.findById(resources.getId());
|
||||
ValidationUtil.isNull( optionalYxStoreSeckill,"YxStoreSeckill","id",resources.getId());
|
||||
YxStoreSeckill yxStoreSeckill = optionalYxStoreSeckill.get();
|
||||
yxStoreSeckill.copy(resources);
|
||||
yxStoreSeckillRepository.save(yxStoreSeckill);
|
||||
public void download(List<YxStoreSeckillDto> all, HttpServletResponse response) throws IOException {
|
||||
List<Map<String, Object>> list = new ArrayList<>();
|
||||
for (YxStoreSeckillDto yxStoreSeckill : all) {
|
||||
Map<String,Object> map = new LinkedHashMap<>();
|
||||
map.put("商品id", yxStoreSeckill.getProductId());
|
||||
map.put("推荐图", yxStoreSeckill.getImage());
|
||||
map.put("轮播图", yxStoreSeckill.getImages());
|
||||
map.put("活动标题", yxStoreSeckill.getTitle());
|
||||
map.put("简介", yxStoreSeckill.getInfo());
|
||||
map.put("价格", yxStoreSeckill.getPrice());
|
||||
map.put("成本", yxStoreSeckill.getCost());
|
||||
map.put("原价", yxStoreSeckill.getOtPrice());
|
||||
map.put("返多少积分", yxStoreSeckill.getGiveIntegral());
|
||||
map.put("排序", yxStoreSeckill.getSort());
|
||||
map.put("库存", yxStoreSeckill.getStock());
|
||||
map.put("销量", yxStoreSeckill.getSales());
|
||||
map.put("单位名", yxStoreSeckill.getUnitName());
|
||||
map.put("邮费", yxStoreSeckill.getPostage());
|
||||
map.put("内容", yxStoreSeckill.getDescription());
|
||||
map.put("开始时间", yxStoreSeckill.getStartTime());
|
||||
map.put("结束时间", yxStoreSeckill.getStopTime());
|
||||
map.put("添加时间", yxStoreSeckill.getAddTime());
|
||||
map.put("产品状态", yxStoreSeckill.getStatus());
|
||||
map.put("是否包邮", yxStoreSeckill.getIsPostage());
|
||||
map.put("热门推荐", yxStoreSeckill.getIsHot());
|
||||
map.put("删除 0未删除1已删除", yxStoreSeckill.getIsDel());
|
||||
map.put("最多秒杀几个", yxStoreSeckill.getNum());
|
||||
map.put("显示", yxStoreSeckill.getIsShow());
|
||||
map.put(" endTimeDate", yxStoreSeckill.getEndTimeDate());
|
||||
map.put(" startTimeDate", yxStoreSeckill.getStartTimeDate());
|
||||
map.put("时间段id", yxStoreSeckill.getTimeId());
|
||||
list.add(map);
|
||||
}
|
||||
FileUtil.downloadExcel(list, response);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void delete(Integer id) {
|
||||
yxStoreSeckillRepository.deleteById(id);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,78 +1,82 @@
|
||||
package co.yixiang.modules.activity.service.impl;
|
||||
|
||||
import co.yixiang.modules.activity.domain.YxStoreVisit;
|
||||
import co.yixiang.modules.activity.repository.YxStoreVisitRepository;
|
||||
import co.yixiang.common.service.impl.BaseServiceImpl;
|
||||
import lombok.AllArgsConstructor;
|
||||
import co.yixiang.dozer.service.IGenerator;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import co.yixiang.common.utils.QueryHelpPlus;
|
||||
import co.yixiang.utils.ValidationUtil;
|
||||
import co.yixiang.utils.FileUtil;
|
||||
import co.yixiang.modules.activity.service.YxStoreVisitService;
|
||||
import co.yixiang.modules.activity.service.dto.YxStoreVisitDTO;
|
||||
import co.yixiang.modules.activity.service.dto.YxStoreVisitDto;
|
||||
import co.yixiang.modules.activity.service.dto.YxStoreVisitQueryCriteria;
|
||||
import co.yixiang.modules.activity.service.mapper.YxStoreVisitMapper;
|
||||
import co.yixiang.utils.PageUtil;
|
||||
import co.yixiang.utils.QueryHelp;
|
||||
import co.yixiang.utils.ValidationUtil;
|
||||
import org.springframework.data.domain.Page;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Propagation;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
// 默认不使用缓存
|
||||
//import org.springframework.cache.annotation.CacheConfig;
|
||||
//import org.springframework.cache.annotation.CacheEvict;
|
||||
//import org.springframework.cache.annotation.Cacheable;
|
||||
import org.springframework.data.domain.Page;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import co.yixiang.utils.PageUtil;
|
||||
import co.yixiang.utils.QueryHelp;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
import java.io.IOException;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.ArrayList;
|
||||
import java.util.LinkedHashMap;
|
||||
|
||||
/**
|
||||
* @author hupeng
|
||||
* @date 2019-11-18
|
||||
* @date 2020-05-13
|
||||
*/
|
||||
@Service
|
||||
@AllArgsConstructor
|
||||
//@CacheConfig(cacheNames = "yxStoreVisit")
|
||||
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class)
|
||||
public class YxStoreVisitServiceImpl implements YxStoreVisitService {
|
||||
public class YxStoreVisitServiceImpl extends BaseServiceImpl<YxStoreVisitMapper, YxStoreVisit> implements YxStoreVisitService {
|
||||
|
||||
private final YxStoreVisitRepository yxStoreVisitRepository;
|
||||
|
||||
private final YxStoreVisitMapper yxStoreVisitMapper;
|
||||
|
||||
public YxStoreVisitServiceImpl(YxStoreVisitRepository yxStoreVisitRepository, YxStoreVisitMapper yxStoreVisitMapper) {
|
||||
this.yxStoreVisitRepository = yxStoreVisitRepository;
|
||||
this.yxStoreVisitMapper = yxStoreVisitMapper;
|
||||
}
|
||||
private final IGenerator generator;
|
||||
|
||||
@Override
|
||||
public Map<String,Object> queryAll(YxStoreVisitQueryCriteria criteria, Pageable pageable){
|
||||
Page<YxStoreVisit> page = yxStoreVisitRepository.findAll((root, criteriaQuery, criteriaBuilder) -> QueryHelp.getPredicate(root,criteria,criteriaBuilder),pageable);
|
||||
return PageUtil.toPage(page.map(yxStoreVisitMapper::toDto));
|
||||
//@Cacheable
|
||||
public Map<String, Object> queryAll(YxStoreVisitQueryCriteria criteria, Pageable pageable) {
|
||||
getPage(pageable);
|
||||
PageInfo<YxStoreVisit> page = new PageInfo<>(queryAll(criteria));
|
||||
Map<String, Object> map = new LinkedHashMap<>(2);
|
||||
map.put("content", generator.convert(page.getList(), YxStoreVisitDto.class));
|
||||
map.put("totalElements", page.getTotal());
|
||||
return map;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<YxStoreVisitDTO> queryAll(YxStoreVisitQueryCriteria criteria){
|
||||
return yxStoreVisitMapper.toDto(yxStoreVisitRepository.findAll((root, criteriaQuery, criteriaBuilder) -> QueryHelp.getPredicate(root,criteria,criteriaBuilder)));
|
||||
}
|
||||
|
||||
@Override
|
||||
public YxStoreVisitDTO findById(Integer id) {
|
||||
Optional<YxStoreVisit> yxStoreVisit = yxStoreVisitRepository.findById(id);
|
||||
ValidationUtil.isNull(yxStoreVisit,"YxStoreVisit","id",id);
|
||||
return yxStoreVisitMapper.toDto(yxStoreVisit.get());
|
||||
//@Cacheable
|
||||
public List<YxStoreVisit> queryAll(YxStoreVisitQueryCriteria criteria){
|
||||
return baseMapper.selectList(QueryHelpPlus.getPredicate(YxStoreVisit.class, criteria));
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public YxStoreVisitDTO create(YxStoreVisit resources) {
|
||||
return yxStoreVisitMapper.toDto(yxStoreVisitRepository.save(resources));
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void update(YxStoreVisit resources) {
|
||||
Optional<YxStoreVisit> optionalYxStoreVisit = yxStoreVisitRepository.findById(resources.getId());
|
||||
ValidationUtil.isNull( optionalYxStoreVisit,"YxStoreVisit","id",resources.getId());
|
||||
YxStoreVisit yxStoreVisit = optionalYxStoreVisit.get();
|
||||
yxStoreVisit.copy(resources);
|
||||
yxStoreVisitRepository.save(yxStoreVisit);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void delete(Integer id) {
|
||||
yxStoreVisitRepository.deleteById(id);
|
||||
public void download(List<YxStoreVisitDto> all, HttpServletResponse response) throws IOException {
|
||||
List<Map<String, Object>> list = new ArrayList<>();
|
||||
for (YxStoreVisitDto yxStoreVisit : all) {
|
||||
Map<String,Object> map = new LinkedHashMap<>();
|
||||
map.put("产品ID", yxStoreVisit.getProductId());
|
||||
map.put("产品类型", yxStoreVisit.getProductType());
|
||||
map.put("产品分类ID", yxStoreVisit.getCateId());
|
||||
map.put("产品类型", yxStoreVisit.getType());
|
||||
map.put("用户ID", yxStoreVisit.getUid());
|
||||
map.put("访问次数", yxStoreVisit.getCount());
|
||||
map.put("备注描述", yxStoreVisit.getContent());
|
||||
map.put("添加时间", yxStoreVisit.getAddTime());
|
||||
list.add(map);
|
||||
}
|
||||
FileUtil.downloadExcel(list, response);
|
||||
}
|
||||
}
|
@ -1,78 +1,88 @@
|
||||
package co.yixiang.modules.activity.service.impl;
|
||||
|
||||
import co.yixiang.modules.activity.domain.YxUserExtract;
|
||||
import co.yixiang.modules.activity.repository.YxUserExtractRepository;
|
||||
import co.yixiang.common.service.impl.BaseServiceImpl;
|
||||
import lombok.AllArgsConstructor;
|
||||
import co.yixiang.dozer.service.IGenerator;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import co.yixiang.common.utils.QueryHelpPlus;
|
||||
import co.yixiang.utils.ValidationUtil;
|
||||
import co.yixiang.utils.FileUtil;
|
||||
import co.yixiang.modules.activity.service.YxUserExtractService;
|
||||
import co.yixiang.modules.activity.service.dto.YxUserExtractDTO;
|
||||
import co.yixiang.modules.activity.service.dto.YxUserExtractDto;
|
||||
import co.yixiang.modules.activity.service.dto.YxUserExtractQueryCriteria;
|
||||
import co.yixiang.modules.activity.service.mapper.YxUserExtractMapper;
|
||||
import co.yixiang.utils.PageUtil;
|
||||
import co.yixiang.utils.QueryHelp;
|
||||
import co.yixiang.utils.ValidationUtil;
|
||||
import org.springframework.data.domain.Page;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Propagation;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
// 默认不使用缓存
|
||||
//import org.springframework.cache.annotation.CacheConfig;
|
||||
//import org.springframework.cache.annotation.CacheEvict;
|
||||
//import org.springframework.cache.annotation.Cacheable;
|
||||
import org.springframework.data.domain.Page;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import co.yixiang.utils.PageUtil;
|
||||
import co.yixiang.utils.QueryHelp;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
import java.io.IOException;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.ArrayList;
|
||||
import java.util.LinkedHashMap;
|
||||
|
||||
/**
|
||||
* @author hupeng
|
||||
* @date 2019-11-14
|
||||
* @date 2020-05-13
|
||||
*/
|
||||
@Service
|
||||
@AllArgsConstructor
|
||||
//@CacheConfig(cacheNames = "yxUserExtract")
|
||||
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class)
|
||||
public class YxUserExtractServiceImpl implements YxUserExtractService {
|
||||
public class YxUserExtractServiceImpl extends BaseServiceImpl<YxUserExtractMapper, YxUserExtract> implements YxUserExtractService {
|
||||
|
||||
private final YxUserExtractRepository yxUserExtractRepository;
|
||||
|
||||
private final YxUserExtractMapper yxUserExtractMapper;
|
||||
|
||||
public YxUserExtractServiceImpl(YxUserExtractRepository yxUserExtractRepository, YxUserExtractMapper yxUserExtractMapper) {
|
||||
this.yxUserExtractRepository = yxUserExtractRepository;
|
||||
this.yxUserExtractMapper = yxUserExtractMapper;
|
||||
}
|
||||
private final IGenerator generator;
|
||||
|
||||
@Override
|
||||
public Map<String,Object> queryAll(YxUserExtractQueryCriteria criteria, Pageable pageable){
|
||||
Page<YxUserExtract> page = yxUserExtractRepository.findAll((root, criteriaQuery, criteriaBuilder) -> QueryHelp.getPredicate(root,criteria,criteriaBuilder),pageable);
|
||||
return PageUtil.toPage(page.map(yxUserExtractMapper::toDto));
|
||||
//@Cacheable
|
||||
public Map<String, Object> queryAll(YxUserExtractQueryCriteria criteria, Pageable pageable) {
|
||||
getPage(pageable);
|
||||
PageInfo<YxUserExtract> page = new PageInfo<>(queryAll(criteria));
|
||||
Map<String, Object> map = new LinkedHashMap<>(2);
|
||||
map.put("content", generator.convert(page.getList(), YxUserExtractDto.class));
|
||||
map.put("totalElements", page.getTotal());
|
||||
return map;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<YxUserExtractDTO> queryAll(YxUserExtractQueryCriteria criteria){
|
||||
return yxUserExtractMapper.toDto(yxUserExtractRepository.findAll((root, criteriaQuery, criteriaBuilder) -> QueryHelp.getPredicate(root,criteria,criteriaBuilder)));
|
||||
}
|
||||
|
||||
@Override
|
||||
public YxUserExtractDTO findById(Integer id) {
|
||||
Optional<YxUserExtract> yxUserExtract = yxUserExtractRepository.findById(id);
|
||||
ValidationUtil.isNull(yxUserExtract,"YxUserExtract","id",id);
|
||||
return yxUserExtractMapper.toDto(yxUserExtract.get());
|
||||
//@Cacheable
|
||||
public List<YxUserExtract> queryAll(YxUserExtractQueryCriteria criteria){
|
||||
return baseMapper.selectList(QueryHelpPlus.getPredicate(YxUserExtract.class, criteria));
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public YxUserExtractDTO create(YxUserExtract resources) {
|
||||
return yxUserExtractMapper.toDto(yxUserExtractRepository.save(resources));
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void update(YxUserExtract resources) {
|
||||
Optional<YxUserExtract> optionalYxUserExtract = yxUserExtractRepository.findById(resources.getId());
|
||||
ValidationUtil.isNull( optionalYxUserExtract,"YxUserExtract","id",resources.getId());
|
||||
YxUserExtract yxUserExtract = optionalYxUserExtract.get();
|
||||
yxUserExtract.copy(resources);
|
||||
yxUserExtractRepository.save(yxUserExtract);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void delete(Integer id) {
|
||||
yxUserExtractRepository.deleteById(id);
|
||||
public void download(List<YxUserExtractDto> all, HttpServletResponse response) throws IOException {
|
||||
List<Map<String, Object>> list = new ArrayList<>();
|
||||
for (YxUserExtractDto yxUserExtract : all) {
|
||||
Map<String,Object> map = new LinkedHashMap<>();
|
||||
map.put(" uid", yxUserExtract.getUid());
|
||||
map.put("名称", yxUserExtract.getRealName());
|
||||
map.put("bank = 银行卡 alipay = 支付宝wx=微信", yxUserExtract.getExtractType());
|
||||
map.put("银行卡", yxUserExtract.getBankCode());
|
||||
map.put("开户地址", yxUserExtract.getBankAddress());
|
||||
map.put("支付宝账号", yxUserExtract.getAlipayCode());
|
||||
map.put("提现金额", yxUserExtract.getExtractPrice());
|
||||
map.put(" mark", yxUserExtract.getMark());
|
||||
map.put(" balance", yxUserExtract.getBalance());
|
||||
map.put("无效原因", yxUserExtract.getFailMsg());
|
||||
map.put(" failTime", yxUserExtract.getFailTime());
|
||||
map.put("添加时间", yxUserExtract.getAddTime());
|
||||
map.put("-1 未通过 0 审核中 1 已提现", yxUserExtract.getStatus());
|
||||
map.put("微信号", yxUserExtract.getWechat());
|
||||
list.add(map);
|
||||
}
|
||||
FileUtil.downloadExcel(list, response);
|
||||
}
|
||||
}
|
@ -1,16 +1,16 @@
|
||||
package co.yixiang.modules.activity.service.mapper;
|
||||
|
||||
import co.yixiang.mapper.EntityMapper;
|
||||
import co.yixiang.common.mapper.CoreMapper;
|
||||
import co.yixiang.modules.activity.domain.YxStoreBargain;
|
||||
import co.yixiang.modules.activity.service.dto.YxStoreBargainDTO;
|
||||
import org.mapstruct.Mapper;
|
||||
import org.mapstruct.ReportingPolicy;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
/**
|
||||
* @author xuwenbo
|
||||
* @date 2019-12-22
|
||||
* @author hupeng
|
||||
* @date 2020-05-13
|
||||
*/
|
||||
@Mapper(componentModel = "spring",uses = {},unmappedTargetPolicy = ReportingPolicy.IGNORE)
|
||||
public interface YxStoreBargainMapper extends EntityMapper<YxStoreBargainDTO, YxStoreBargain> {
|
||||
@Repository
|
||||
@Mapper
|
||||
public interface YxStoreBargainMapper extends CoreMapper<YxStoreBargain> {
|
||||
|
||||
}
|
@ -1,16 +1,16 @@
|
||||
package co.yixiang.modules.activity.service.mapper;
|
||||
|
||||
import co.yixiang.mapper.EntityMapper;
|
||||
import co.yixiang.common.mapper.CoreMapper;
|
||||
import co.yixiang.modules.activity.domain.YxStoreCombination;
|
||||
import co.yixiang.modules.activity.service.dto.YxStoreCombinationDTO;
|
||||
import org.mapstruct.Mapper;
|
||||
import org.mapstruct.ReportingPolicy;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
/**
|
||||
* @author hupeng
|
||||
* @date 2019-11-18
|
||||
* @date 2020-05-13
|
||||
*/
|
||||
@Mapper(componentModel = "spring",uses = {},unmappedTargetPolicy = ReportingPolicy.IGNORE)
|
||||
public interface YxStoreCombinationMapper extends EntityMapper<YxStoreCombinationDTO, YxStoreCombination> {
|
||||
@Repository
|
||||
@Mapper
|
||||
public interface YxStoreCombinationMapper extends CoreMapper<YxStoreCombination> {
|
||||
|
||||
}
|
@ -1,16 +1,16 @@
|
||||
package co.yixiang.modules.activity.service.mapper;
|
||||
|
||||
import co.yixiang.mapper.EntityMapper;
|
||||
import co.yixiang.common.mapper.CoreMapper;
|
||||
import co.yixiang.modules.activity.domain.YxStoreCouponIssue;
|
||||
import co.yixiang.modules.activity.service.dto.YxStoreCouponIssueDTO;
|
||||
import org.mapstruct.Mapper;
|
||||
import org.mapstruct.ReportingPolicy;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
/**
|
||||
* @author hupeng
|
||||
* @date 2019-11-09
|
||||
* @date 2020-05-13
|
||||
*/
|
||||
@Mapper(componentModel = "spring",uses = {},unmappedTargetPolicy = ReportingPolicy.IGNORE)
|
||||
public interface YxStoreCouponIssueMapper extends EntityMapper<YxStoreCouponIssueDTO, YxStoreCouponIssue> {
|
||||
@Repository
|
||||
@Mapper
|
||||
public interface YxStoreCouponIssueMapper extends CoreMapper<YxStoreCouponIssue> {
|
||||
|
||||
}
|
@ -1,16 +1,16 @@
|
||||
package co.yixiang.modules.activity.service.mapper;
|
||||
|
||||
import co.yixiang.mapper.EntityMapper;
|
||||
import co.yixiang.common.mapper.CoreMapper;
|
||||
import co.yixiang.modules.activity.domain.YxStoreCouponIssueUser;
|
||||
import co.yixiang.modules.activity.service.dto.YxStoreCouponIssueUserDTO;
|
||||
import org.mapstruct.Mapper;
|
||||
import org.mapstruct.ReportingPolicy;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
/**
|
||||
* @author hupeng
|
||||
* @date 2019-11-09
|
||||
* @date 2020-05-13
|
||||
*/
|
||||
@Mapper(componentModel = "spring",uses = {},unmappedTargetPolicy = ReportingPolicy.IGNORE)
|
||||
public interface YxStoreCouponIssueUserMapper extends EntityMapper<YxStoreCouponIssueUserDTO, YxStoreCouponIssueUser> {
|
||||
@Repository
|
||||
@Mapper
|
||||
public interface YxStoreCouponIssueUserMapper extends CoreMapper<YxStoreCouponIssueUser> {
|
||||
|
||||
}
|
@ -1,16 +1,16 @@
|
||||
package co.yixiang.modules.activity.service.mapper;
|
||||
|
||||
import co.yixiang.mapper.EntityMapper;
|
||||
import co.yixiang.common.mapper.CoreMapper;
|
||||
import co.yixiang.modules.activity.domain.YxStoreCoupon;
|
||||
import co.yixiang.modules.activity.service.dto.YxStoreCouponDTO;
|
||||
import org.mapstruct.Mapper;
|
||||
import org.mapstruct.ReportingPolicy;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
/**
|
||||
* @author hupeng
|
||||
* @date 2019-11-09
|
||||
* @author xuwenbo
|
||||
* @date 2020-05-13
|
||||
*/
|
||||
@Mapper(componentModel = "spring",uses = {},unmappedTargetPolicy = ReportingPolicy.IGNORE)
|
||||
public interface YxStoreCouponMapper extends EntityMapper<YxStoreCouponDTO, YxStoreCoupon> {
|
||||
@Repository
|
||||
@Mapper
|
||||
public interface YxStoreCouponMapper extends CoreMapper<YxStoreCoupon> {
|
||||
|
||||
}
|
@ -1,16 +1,16 @@
|
||||
package co.yixiang.modules.activity.service.mapper;
|
||||
|
||||
import co.yixiang.mapper.EntityMapper;
|
||||
import co.yixiang.common.mapper.CoreMapper;
|
||||
import co.yixiang.modules.activity.domain.YxStoreCouponUser;
|
||||
import co.yixiang.modules.activity.service.dto.YxStoreCouponUserDTO;
|
||||
import org.mapstruct.Mapper;
|
||||
import org.mapstruct.ReportingPolicy;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
/**
|
||||
* @author hupeng
|
||||
* @date 2019-11-10
|
||||
* @date 2020-05-13
|
||||
*/
|
||||
@Mapper(componentModel = "spring",uses = {},unmappedTargetPolicy = ReportingPolicy.IGNORE)
|
||||
public interface YxStoreCouponUserMapper extends EntityMapper<YxStoreCouponUserDTO, YxStoreCouponUser> {
|
||||
@Repository
|
||||
@Mapper
|
||||
public interface YxStoreCouponUserMapper extends CoreMapper<YxStoreCouponUser> {
|
||||
|
||||
}
|
@ -1,16 +1,16 @@
|
||||
package co.yixiang.modules.activity.service.mapper;
|
||||
|
||||
import co.yixiang.mapper.EntityMapper;
|
||||
import co.yixiang.common.mapper.CoreMapper;
|
||||
import co.yixiang.modules.activity.domain.YxStoreSeckill;
|
||||
import co.yixiang.modules.activity.service.dto.YxStoreSeckillDTO;
|
||||
import org.mapstruct.Mapper;
|
||||
import org.mapstruct.ReportingPolicy;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
/**
|
||||
* @author xuwenbo
|
||||
* @date 2019-12-14
|
||||
* @author hupeng
|
||||
* @date 2020-05-13
|
||||
*/
|
||||
@Mapper(componentModel = "spring",uses = {},unmappedTargetPolicy = ReportingPolicy.IGNORE)
|
||||
public interface YxStoreSeckillMapper extends EntityMapper<YxStoreSeckillDTO, YxStoreSeckill> {
|
||||
@Repository
|
||||
@Mapper
|
||||
public interface YxStoreSeckillMapper extends CoreMapper<YxStoreSeckill> {
|
||||
|
||||
}
|
@ -1,16 +1,16 @@
|
||||
package co.yixiang.modules.activity.service.mapper;
|
||||
|
||||
import co.yixiang.mapper.EntityMapper;
|
||||
import co.yixiang.common.mapper.CoreMapper;
|
||||
import co.yixiang.modules.activity.domain.YxStoreVisit;
|
||||
import co.yixiang.modules.activity.service.dto.YxStoreVisitDTO;
|
||||
import org.mapstruct.Mapper;
|
||||
import org.mapstruct.ReportingPolicy;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
/**
|
||||
* @author hupeng
|
||||
* @date 2019-11-18
|
||||
* @date 2020-05-13
|
||||
*/
|
||||
@Mapper(componentModel = "spring",uses = {},unmappedTargetPolicy = ReportingPolicy.IGNORE)
|
||||
public interface YxStoreVisitMapper extends EntityMapper<YxStoreVisitDTO, YxStoreVisit> {
|
||||
@Repository
|
||||
@Mapper
|
||||
public interface YxStoreVisitMapper extends CoreMapper<YxStoreVisit> {
|
||||
|
||||
}
|
@ -1,16 +1,16 @@
|
||||
package co.yixiang.modules.activity.service.mapper;
|
||||
|
||||
import co.yixiang.mapper.EntityMapper;
|
||||
import co.yixiang.common.mapper.CoreMapper;
|
||||
import co.yixiang.modules.activity.domain.YxUserExtract;
|
||||
import co.yixiang.modules.activity.service.dto.YxUserExtractDTO;
|
||||
import org.mapstruct.Mapper;
|
||||
import org.mapstruct.ReportingPolicy;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
/**
|
||||
* @author hupeng
|
||||
* @date 2019-11-14
|
||||
* @date 2020-05-13
|
||||
*/
|
||||
@Mapper(componentModel = "spring",uses = {},unmappedTargetPolicy = ReportingPolicy.IGNORE)
|
||||
public interface YxUserExtractMapper extends EntityMapper<YxUserExtractDTO, YxUserExtract> {
|
||||
@Repository
|
||||
@Mapper
|
||||
public interface YxUserExtractMapper extends CoreMapper<YxUserExtract> {
|
||||
|
||||
}
|
@ -49,13 +49,13 @@ public class YxStoreOrderQueryCriteria{
|
||||
@Query
|
||||
private Integer bargainId;
|
||||
|
||||
@Query(propName="combination_id",type = Query.Type.NOT_EQUAL)
|
||||
@Query(propName="combinationId",type = Query.Type.NOT_EQUAL)
|
||||
private Integer newCombinationId;
|
||||
|
||||
@Query(propName="seckill_id",type = Query.Type.NOT_EQUAL)
|
||||
@Query(propName="seckillId",type = Query.Type.NOT_EQUAL)
|
||||
private Integer newSeckillId;
|
||||
|
||||
@Query(propName="bargain_id",type = Query.Type.NOT_EQUAL)
|
||||
@Query(propName="bargainId",type = Query.Type.NOT_EQUAL)
|
||||
private Integer newBargainId;
|
||||
|
||||
@Query
|
||||
|
Reference in New Issue
Block a user