yshop1.7发布,后台升級eladmin2.4(前端,后台权限,代码生成器等重构),修复商品分类等一些问题
This commit is contained in:
@ -1,14 +1,15 @@
|
||||
package co.yixiang.modules.activity.domain;
|
||||
|
||||
import lombok.Data;
|
||||
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.math.BigDecimal;
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
|
@ -1,14 +1,15 @@
|
||||
package co.yixiang.modules.activity.domain;
|
||||
|
||||
import lombok.Data;
|
||||
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.math.BigDecimal;
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
|
@ -1,13 +1,14 @@
|
||||
package co.yixiang.modules.activity.domain;
|
||||
|
||||
import lombok.Data;
|
||||
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.math.BigDecimal;
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* @author hupeng
|
||||
|
@ -1,9 +1,8 @@
|
||||
package co.yixiang.modules.activity.domain;
|
||||
|
||||
import lombok.Data;
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.bean.copier.CopyOptions;
|
||||
import lombok.NonNull;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.persistence.*;
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
@ -1,8 +1,9 @@
|
||||
package co.yixiang.modules.activity.domain;
|
||||
|
||||
import lombok.Data;
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.bean.copier.CopyOptions;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.persistence.*;
|
||||
import java.io.Serializable;
|
||||
|
||||
|
@ -1,11 +1,12 @@
|
||||
package co.yixiang.modules.activity.domain;
|
||||
|
||||
import lombok.Data;
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.bean.copier.CopyOptions;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.persistence.*;
|
||||
import java.math.BigDecimal;
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* @author hupeng
|
||||
|
@ -1,11 +1,12 @@
|
||||
package co.yixiang.modules.activity.domain;
|
||||
|
||||
import lombok.Data;
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.bean.copier.CopyOptions;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.persistence.*;
|
||||
import java.math.BigDecimal;
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* @author hupeng
|
||||
|
@ -1,153 +1,154 @@
|
||||
package co.yixiang.modules.activity.domain;
|
||||
|
||||
import lombok.Data;
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.bean.copier.CopyOptions;
|
||||
import javax.persistence.*;
|
||||
import javax.validation.constraints.Min;
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.math.BigDecimal;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @author xuwenbo
|
||||
* @date 2019-12-14
|
||||
*/
|
||||
@Entity
|
||||
@Data
|
||||
@Table(name="yx_store_seckill")
|
||||
public class YxStoreSeckill implements Serializable {
|
||||
|
||||
// 商品秒杀产品表id
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
@Column(name = "id")
|
||||
private Integer id;
|
||||
|
||||
// 商品id
|
||||
@Column(name = "product_id",nullable = false)
|
||||
private Integer productId;
|
||||
|
||||
// 推荐图
|
||||
@Column(name = "image",nullable = false)
|
||||
@NotBlank(message = "请上传产品图片")
|
||||
private String image;
|
||||
|
||||
// 轮播图
|
||||
@Column(name = "images",nullable = false)
|
||||
@NotBlank(message = "请上传产品轮播图")
|
||||
private String images;
|
||||
|
||||
// 活动标题
|
||||
@Column(name = "title",nullable = false)
|
||||
@NotBlank(message = "请输入产品标题")
|
||||
private String title;
|
||||
|
||||
// 简介
|
||||
@Column(name = "info",nullable = false)
|
||||
@NotBlank(message = "请输入秒杀简介")
|
||||
private String info;
|
||||
|
||||
// 价格
|
||||
@Column(name = "price",nullable = false)
|
||||
@NotNull(message = "秒杀价必填")
|
||||
@Min(value = 0,message = "秒杀价必须大于0")
|
||||
private BigDecimal price;
|
||||
|
||||
// 成本
|
||||
@Column(name = "cost",nullable = false)
|
||||
@NotNull(message = "成本价必填")
|
||||
@Min(value = 0,message = "成本价必须大于0")
|
||||
private BigDecimal cost;
|
||||
|
||||
// 原价
|
||||
@Column(name = "ot_price",nullable = false)
|
||||
@NotNull(message = "原价必填")
|
||||
@Min(value = 0,message = "原价必须大于0")
|
||||
private BigDecimal otPrice;
|
||||
|
||||
// 返多少积分
|
||||
@Column(name = "give_integral",nullable = false)
|
||||
private BigDecimal giveIntegral;
|
||||
|
||||
// 排序
|
||||
@Column(name = "sort",nullable = false)
|
||||
@NotNull(message = "排序必填")
|
||||
private Integer sort;
|
||||
|
||||
// 库存
|
||||
@Column(name = "stock",nullable = false)
|
||||
@NotNull(message = "库存必填")
|
||||
private Integer stock;
|
||||
|
||||
// 销量
|
||||
@Column(name = "sales",nullable = false)
|
||||
@NotNull(message = "销量必填")
|
||||
private Integer sales;
|
||||
|
||||
// 单位名
|
||||
@Column(name = "unit_name",nullable = false)
|
||||
@NotBlank(message = "单位名不能为空")
|
||||
private String unitName;
|
||||
|
||||
// 邮费
|
||||
@Column(name = "postage",nullable = false)
|
||||
@NotNull(message = "邮费必填")
|
||||
private BigDecimal postage;
|
||||
|
||||
// 内容
|
||||
@Column(name = "description")
|
||||
private String description;
|
||||
|
||||
// 开始时间
|
||||
@Column(name = "start_time",nullable = false)
|
||||
private Integer startTime;
|
||||
|
||||
// 结束时间
|
||||
@Column(name = "stop_time",nullable = false)
|
||||
private Integer stopTime;
|
||||
|
||||
@NotNull(message = "开始时间不能为空")
|
||||
private Date startTimeDate;
|
||||
|
||||
@NotNull(message = "结束时间不能为空")
|
||||
private Date endTimeDate;
|
||||
|
||||
// 添加时间
|
||||
@Column(name = "add_time",nullable = false)
|
||||
private String addTime;
|
||||
|
||||
// 产品状态
|
||||
@Column(name = "status",nullable = false)
|
||||
@NotNull(message = "活动状态必须选择")
|
||||
private Integer status;
|
||||
|
||||
// 是否包邮
|
||||
@Column(name = "is_postage",nullable = false)
|
||||
@NotNull(message = "包邮状态必须选择")
|
||||
private Integer isPostage;
|
||||
|
||||
// 热门推荐
|
||||
@Column(name = "is_hot",insertable = false)
|
||||
private Integer isHot;
|
||||
|
||||
// 删除 0未删除1已删除
|
||||
@Column(name = "is_del",insertable = false)
|
||||
private Integer isDel;
|
||||
|
||||
// 最多秒杀几个
|
||||
@Column(name = "num",nullable = false)
|
||||
@NotNull(message = "限购必填")
|
||||
@Min(value = 1,message = "限购必须大于0")
|
||||
private Integer num;
|
||||
|
||||
// 显示
|
||||
@Column(name = "is_show",nullable = false)
|
||||
private Integer isShow;
|
||||
|
||||
public void copy(YxStoreSeckill source){
|
||||
BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true));
|
||||
}
|
||||
package co.yixiang.modules.activity.domain;
|
||||
|
||||
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 java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @author xuwenbo
|
||||
* @date 2019-12-14
|
||||
*/
|
||||
@Entity
|
||||
@Data
|
||||
@Table(name="yx_store_seckill")
|
||||
public class YxStoreSeckill implements Serializable {
|
||||
|
||||
// 商品秒杀产品表id
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
@Column(name = "id")
|
||||
private Integer id;
|
||||
|
||||
// 商品id
|
||||
@Column(name = "product_id",nullable = false)
|
||||
private Integer productId;
|
||||
|
||||
// 推荐图
|
||||
@Column(name = "image",nullable = false)
|
||||
@NotBlank(message = "请上传产品图片")
|
||||
private String image;
|
||||
|
||||
// 轮播图
|
||||
@Column(name = "images",nullable = false)
|
||||
@NotBlank(message = "请上传产品轮播图")
|
||||
private String images;
|
||||
|
||||
// 活动标题
|
||||
@Column(name = "title",nullable = false)
|
||||
@NotBlank(message = "请输入产品标题")
|
||||
private String title;
|
||||
|
||||
// 简介
|
||||
@Column(name = "info",nullable = false)
|
||||
@NotBlank(message = "请输入秒杀简介")
|
||||
private String info;
|
||||
|
||||
// 价格
|
||||
@Column(name = "price",nullable = false)
|
||||
@NotNull(message = "秒杀价必填")
|
||||
@Min(value = 0,message = "秒杀价必须大于0")
|
||||
private BigDecimal price;
|
||||
|
||||
// 成本
|
||||
@Column(name = "cost",nullable = false)
|
||||
@NotNull(message = "成本价必填")
|
||||
@Min(value = 0,message = "成本价必须大于0")
|
||||
private BigDecimal cost;
|
||||
|
||||
// 原价
|
||||
@Column(name = "ot_price",nullable = false)
|
||||
@NotNull(message = "原价必填")
|
||||
@Min(value = 0,message = "原价必须大于0")
|
||||
private BigDecimal otPrice;
|
||||
|
||||
// 返多少积分
|
||||
@Column(name = "give_integral",nullable = false)
|
||||
private BigDecimal giveIntegral;
|
||||
|
||||
// 排序
|
||||
@Column(name = "sort",nullable = false)
|
||||
@NotNull(message = "排序必填")
|
||||
private Integer sort;
|
||||
|
||||
// 库存
|
||||
@Column(name = "stock",nullable = false)
|
||||
@NotNull(message = "库存必填")
|
||||
private Integer stock;
|
||||
|
||||
// 销量
|
||||
@Column(name = "sales",nullable = false)
|
||||
@NotNull(message = "销量必填")
|
||||
private Integer sales;
|
||||
|
||||
// 单位名
|
||||
@Column(name = "unit_name",nullable = false)
|
||||
@NotBlank(message = "单位名不能为空")
|
||||
private String unitName;
|
||||
|
||||
// 邮费
|
||||
@Column(name = "postage",nullable = false)
|
||||
@NotNull(message = "邮费必填")
|
||||
private BigDecimal postage;
|
||||
|
||||
// 内容
|
||||
@Column(name = "description")
|
||||
private String description;
|
||||
|
||||
// 开始时间
|
||||
@Column(name = "start_time",nullable = false)
|
||||
private Integer startTime;
|
||||
|
||||
// 结束时间
|
||||
@Column(name = "stop_time",nullable = false)
|
||||
private Integer stopTime;
|
||||
|
||||
@NotNull(message = "开始时间不能为空")
|
||||
private Date startTimeDate;
|
||||
|
||||
@NotNull(message = "结束时间不能为空")
|
||||
private Date endTimeDate;
|
||||
|
||||
// 添加时间
|
||||
@Column(name = "add_time",nullable = false)
|
||||
private String addTime;
|
||||
|
||||
// 产品状态
|
||||
@Column(name = "status",nullable = false)
|
||||
@NotNull(message = "活动状态必须选择")
|
||||
private Integer status;
|
||||
|
||||
// 是否包邮
|
||||
@Column(name = "is_postage",nullable = false)
|
||||
@NotNull(message = "包邮状态必须选择")
|
||||
private Integer isPostage;
|
||||
|
||||
// 热门推荐
|
||||
@Column(name = "is_hot",insertable = false)
|
||||
private Integer isHot;
|
||||
|
||||
// 删除 0未删除1已删除
|
||||
@Column(name = "is_del",insertable = false)
|
||||
private Integer isDel;
|
||||
|
||||
// 最多秒杀几个
|
||||
@Column(name = "num",nullable = false)
|
||||
@NotNull(message = "限购必填")
|
||||
@Min(value = 1,message = "限购必须大于0")
|
||||
private Integer num;
|
||||
|
||||
// 显示
|
||||
@Column(name = "is_show",nullable = false)
|
||||
private Integer isShow;
|
||||
|
||||
public void copy(YxStoreSeckill source){
|
||||
BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true));
|
||||
}
|
||||
}
|
@ -1,8 +1,9 @@
|
||||
package co.yixiang.modules.activity.domain;
|
||||
|
||||
import lombok.Data;
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.bean.copier.CopyOptions;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.persistence.*;
|
||||
import java.io.Serializable;
|
||||
|
||||
|
@ -1,11 +1,12 @@
|
||||
package co.yixiang.modules.activity.domain;
|
||||
|
||||
import lombok.Data;
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.bean.copier.CopyOptions;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.persistence.*;
|
||||
import java.math.BigDecimal;
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* @author hupeng
|
||||
|
@ -13,6 +13,6 @@ import org.springframework.data.jpa.repository.Query;
|
||||
public interface YxStoreCombinationRepository extends JpaRepository<YxStoreCombination, Integer>, JpaSpecificationExecutor {
|
||||
@Modifying
|
||||
@Query(value = "update yx_store_combination set is_show = ?1 where id = ?2",nativeQuery = true)
|
||||
void updateOnsale(int status,int id);
|
||||
void updateOnsale(int status, int id);
|
||||
|
||||
}
|
@ -11,7 +11,7 @@ import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
|
||||
public interface YxStorePinkRepository extends JpaRepository<YxStorePink, Integer>, JpaSpecificationExecutor {
|
||||
int countByCid(int cid);
|
||||
|
||||
int countByCidAndKId(int cid,int kid);
|
||||
int countByCidAndKId(int cid, int kid);
|
||||
|
||||
int countByKId(int kid);
|
||||
|
||||
|
@ -1,12 +1,12 @@
|
||||
package co.yixiang.modules.activity.repository;
|
||||
|
||||
import co.yixiang.modules.activity.domain.YxStoreSeckill;
|
||||
import org.springframework.data.jpa.repository.JpaRepository;
|
||||
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
|
||||
|
||||
/**
|
||||
* @author xuwenbo
|
||||
* @date 2019-12-14
|
||||
*/
|
||||
public interface YxStoreSeckillRepository extends JpaRepository<YxStoreSeckill, Integer>, JpaSpecificationExecutor {
|
||||
package co.yixiang.modules.activity.repository;
|
||||
|
||||
import co.yixiang.modules.activity.domain.YxStoreSeckill;
|
||||
import org.springframework.data.jpa.repository.JpaRepository;
|
||||
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
|
||||
|
||||
/**
|
||||
* @author xuwenbo
|
||||
* @date 2019-12-14
|
||||
*/
|
||||
public interface YxStoreSeckillRepository extends JpaRepository<YxStoreSeckill, Integer>, JpaSpecificationExecutor {
|
||||
}
|
@ -9,5 +9,5 @@ import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
|
||||
* @date 2019-11-18
|
||||
*/
|
||||
public interface YxStoreVisitRepository extends JpaRepository<YxStoreVisit, Integer>, JpaSpecificationExecutor {
|
||||
int countByProductIdAndProductType(int productId,String productType);
|
||||
int countByProductIdAndProductType(int productId, String productType);
|
||||
}
|
@ -33,7 +33,7 @@ public class YxStoreBargainController {
|
||||
@Log("查询砍价")
|
||||
@ApiOperation(value = "查询砍价")
|
||||
@GetMapping(value = "/yxStoreBargain")
|
||||
@PreAuthorize("hasAnyRole('ADMIN','YXSTOREBARGAIN_ALL','YXSTOREBARGAIN_SELECT')")
|
||||
@PreAuthorize("@el.check('admin','YXSTOREBARGAIN_ALL','YXSTOREBARGAIN_SELECT')")
|
||||
public ResponseEntity getYxStoreBargains(YxStoreBargainQueryCriteria criteria, Pageable pageable){
|
||||
return new ResponseEntity(yxStoreBargainService.queryAll(criteria,pageable),HttpStatus.OK);
|
||||
}
|
||||
@ -43,7 +43,7 @@ public class YxStoreBargainController {
|
||||
@Log("修改砍价")
|
||||
@ApiOperation(value = "修改砍价")
|
||||
@PutMapping(value = "/yxStoreBargain")
|
||||
@PreAuthorize("hasAnyRole('ADMIN','YXSTOREBARGAIN_ALL','YXSTOREBARGAIN_EDIT')")
|
||||
@PreAuthorize("@el.check('admin','YXSTOREBARGAIN_ALL','YXSTOREBARGAIN_EDIT')")
|
||||
public ResponseEntity update(@Validated @RequestBody YxStoreBargain resources){
|
||||
|
||||
if(ObjectUtil.isNotNull(resources.getStartTimeDate())){
|
||||
@ -66,7 +66,7 @@ public class YxStoreBargainController {
|
||||
@Log("删除砍价")
|
||||
@ApiOperation(value = "删除砍价")
|
||||
@DeleteMapping(value = "/yxStoreBargain/{id}")
|
||||
@PreAuthorize("hasAnyRole('ADMIN','YXSTOREBARGAIN_ALL','YXSTOREBARGAIN_DELETE')")
|
||||
@PreAuthorize("@el.check('admin','YXSTOREBARGAIN_ALL','YXSTOREBARGAIN_DELETE')")
|
||||
public ResponseEntity delete(@PathVariable Integer id){
|
||||
//if(StrUtil.isNotEmpty("22")) throw new BadRequestException("演示环境禁止操作");
|
||||
yxStoreBargainService.delete(id);
|
||||
|
@ -35,7 +35,7 @@ public class YxStoreCombinationController {
|
||||
@Log("查询拼团")
|
||||
@ApiOperation(value = "查询拼团")
|
||||
@GetMapping(value = "/yxStoreCombination")
|
||||
@PreAuthorize("hasAnyRole('ADMIN','YXSTORECOMBINATION_ALL','YXSTORECOMBINATION_SELECT')")
|
||||
@PreAuthorize("@el.check('admin','YXSTORECOMBINATION_ALL','YXSTORECOMBINATION_SELECT')")
|
||||
public ResponseEntity getYxStoreCombinations(YxStoreCombinationQueryCriteria criteria, Pageable pageable){
|
||||
return new ResponseEntity(yxStoreCombinationService.queryAll(criteria,pageable),HttpStatus.OK);
|
||||
}
|
||||
@ -45,7 +45,7 @@ public class YxStoreCombinationController {
|
||||
@Log("修改拼团")
|
||||
@ApiOperation(value = "新增/修改拼团")
|
||||
@PutMapping(value = "/yxStoreCombination")
|
||||
@PreAuthorize("hasAnyRole('ADMIN','YXSTORECOMBINATION_ALL','YXSTORECOMBINATION_EDIT')")
|
||||
@PreAuthorize("@el.check('admin','YXSTORECOMBINATION_ALL','YXSTORECOMBINATION_EDIT')")
|
||||
public ResponseEntity update(@Validated @RequestBody YxStoreCombination resources){
|
||||
if(ObjectUtil.isNotNull(resources.getStartTimeDate())){
|
||||
resources.setStartTime(OrderUtil.
|
||||
@ -79,7 +79,7 @@ public class YxStoreCombinationController {
|
||||
@Log("删除拼团")
|
||||
@ApiOperation(value = "删除拼团")
|
||||
@DeleteMapping(value = "/yxStoreCombination/{id}")
|
||||
@PreAuthorize("hasAnyRole('ADMIN','YXSTORECOMBINATION_ALL','YXSTORECOMBINATION_DELETE')")
|
||||
@PreAuthorize("@el.check('admin','YXSTORECOMBINATION_ALL','YXSTORECOMBINATION_DELETE')")
|
||||
public ResponseEntity delete(@PathVariable Integer id){
|
||||
//if(StrUtil.isNotEmpty("22")) throw new BadRequestException("演示环境禁止操作");
|
||||
YxStoreCombination combination = new YxStoreCombination();
|
||||
|
@ -1,10 +1,14 @@
|
||||
package co.yixiang.modules.activity.rest;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import co.yixiang.aop.log.Log;
|
||||
import co.yixiang.exception.BadRequestException;
|
||||
import co.yixiang.modules.activity.domain.YxStoreCoupon;
|
||||
import co.yixiang.modules.activity.service.YxStoreCouponService;
|
||||
import co.yixiang.modules.activity.service.dto.YxStoreCouponQueryCriteria;
|
||||
import co.yixiang.utils.OrderUtil;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import org.springframework.http.HttpStatus;
|
||||
@ -12,7 +16,6 @@ import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import io.swagger.annotations.*;
|
||||
|
||||
/**
|
||||
* @author hupeng
|
||||
@ -29,7 +32,7 @@ public class YxStoreCouponController {
|
||||
@Log("查询")
|
||||
@ApiOperation(value = "查询")
|
||||
@GetMapping(value = "/yxStoreCoupon")
|
||||
@PreAuthorize("hasAnyRole('ADMIN','YXSTORECOUPON_ALL','YXSTORECOUPON_SELECT')")
|
||||
@PreAuthorize("@el.check('admin','YXSTORECOUPON_ALL','YXSTORECOUPON_SELECT')")
|
||||
public ResponseEntity getYxStoreCoupons(YxStoreCouponQueryCriteria criteria, Pageable pageable){
|
||||
return new ResponseEntity(yxStoreCouponService.queryAll(criteria,pageable),HttpStatus.OK);
|
||||
}
|
||||
@ -37,7 +40,7 @@ public class YxStoreCouponController {
|
||||
@Log("新增")
|
||||
@ApiOperation(value = "新增")
|
||||
@PostMapping(value = "/yxStoreCoupon")
|
||||
@PreAuthorize("hasAnyRole('ADMIN','YXSTORECOUPON_ALL','YXSTORECOUPON_CREATE')")
|
||||
@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);
|
||||
@ -46,7 +49,7 @@ public class YxStoreCouponController {
|
||||
@Log("修改")
|
||||
@ApiOperation(value = "修改")
|
||||
@PutMapping(value = "/yxStoreCoupon")
|
||||
@PreAuthorize("hasAnyRole('ADMIN','YXSTORECOUPON_ALL','YXSTORECOUPON_EDIT')")
|
||||
@PreAuthorize("@el.check('admin','YXSTORECOUPON_ALL','YXSTORECOUPON_EDIT')")
|
||||
public ResponseEntity update(@Validated @RequestBody YxStoreCoupon resources){
|
||||
yxStoreCouponService.update(resources);
|
||||
return new ResponseEntity(HttpStatus.NO_CONTENT);
|
||||
@ -55,8 +58,9 @@ public class YxStoreCouponController {
|
||||
@Log("删除")
|
||||
@ApiOperation(value = "删除")
|
||||
@DeleteMapping(value = "/yxStoreCoupon/{id}")
|
||||
@PreAuthorize("hasAnyRole('ADMIN','YXSTORECOUPON_ALL','YXSTORECOUPON_DELETE')")
|
||||
@PreAuthorize("@el.check('admin','YXSTORECOUPON_ALL','YXSTORECOUPON_DELETE')")
|
||||
public ResponseEntity delete(@PathVariable Integer id){
|
||||
//if(StrUtil.isNotEmpty("22")) throw new BadRequestException("演示环境禁止操作");
|
||||
YxStoreCoupon resources = new YxStoreCoupon();
|
||||
resources.setId(id);
|
||||
resources.setIsDel(1);
|
||||
|
@ -1,11 +1,15 @@
|
||||
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.YxStoreCouponIssue;
|
||||
import co.yixiang.modules.activity.service.YxStoreCouponIssueService;
|
||||
import co.yixiang.modules.activity.service.dto.YxStoreCouponIssueQueryCriteria;
|
||||
import co.yixiang.utils.OrderUtil;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import org.springframework.http.HttpStatus;
|
||||
@ -13,7 +17,6 @@ import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import io.swagger.annotations.*;
|
||||
|
||||
/**
|
||||
* @author hupeng
|
||||
@ -30,7 +33,7 @@ public class YxStoreCouponIssueController {
|
||||
@Log("查询已发布")
|
||||
@ApiOperation(value = "查询已发布")
|
||||
@GetMapping(value = "/yxStoreCouponIssue")
|
||||
@PreAuthorize("hasAnyRole('ADMIN','YXSTORECOUPONISSUE_ALL','YXSTORECOUPONISSUE_SELECT')")
|
||||
@PreAuthorize("@el.check('admin','YXSTORECOUPONISSUE_ALL','YXSTORECOUPONISSUE_SELECT')")
|
||||
public ResponseEntity getYxStoreCouponIssues(YxStoreCouponIssueQueryCriteria criteria, Pageable pageable){
|
||||
criteria.setIsDel(0);
|
||||
return new ResponseEntity(yxStoreCouponIssueService.queryAll(criteria,pageable),HttpStatus.OK);
|
||||
@ -39,7 +42,7 @@ public class YxStoreCouponIssueController {
|
||||
@Log("发布")
|
||||
@ApiOperation(value = "发布")
|
||||
@PostMapping(value = "/yxStoreCouponIssue")
|
||||
@PreAuthorize("hasAnyRole('ADMIN','YXSTORECOUPONISSUE_ALL','YXSTORECOUPONISSUE_CREATE')")
|
||||
@PreAuthorize("@el.check('admin','YXSTORECOUPONISSUE_ALL','YXSTORECOUPONISSUE_CREATE')")
|
||||
public ResponseEntity create(@Validated @RequestBody YxStoreCouponIssue resources){
|
||||
if(ObjectUtil.isNotNull(resources.getStartTimeDate())){
|
||||
resources.setStartTime(OrderUtil.
|
||||
@ -59,7 +62,7 @@ public class YxStoreCouponIssueController {
|
||||
@Log("修改状态")
|
||||
@ApiOperation(value = "修改状态")
|
||||
@PutMapping(value = "/yxStoreCouponIssue")
|
||||
@PreAuthorize("hasAnyRole('ADMIN','YXSTORECOUPONISSUE_ALL','YXSTORECOUPONISSUE_EDIT')")
|
||||
@PreAuthorize("@el.check('admin','YXSTORECOUPONISSUE_ALL','YXSTORECOUPONISSUE_EDIT')")
|
||||
public ResponseEntity update(@Validated @RequestBody YxStoreCouponIssue resources){
|
||||
yxStoreCouponIssueService.update(resources);
|
||||
return new ResponseEntity(HttpStatus.NO_CONTENT);
|
||||
@ -68,8 +71,9 @@ public class YxStoreCouponIssueController {
|
||||
@Log("删除")
|
||||
@ApiOperation(value = "删除")
|
||||
@DeleteMapping(value = "/yxStoreCouponIssue/{id}")
|
||||
@PreAuthorize("hasAnyRole('ADMIN','YXSTORECOUPONISSUE_ALL','YXSTORECOUPONISSUE_DELETE')")
|
||||
@PreAuthorize("@el.check('admin','YXSTORECOUPONISSUE_ALL','YXSTORECOUPONISSUE_DELETE')")
|
||||
public ResponseEntity delete(@PathVariable Integer id){
|
||||
//if(StrUtil.isNotEmpty("22")) throw new BadRequestException("演示环境禁止操作");
|
||||
YxStoreCouponIssue resources = new YxStoreCouponIssue();
|
||||
resources.setId(id);
|
||||
resources.setIsDel(1);
|
||||
|
@ -1,9 +1,13 @@
|
||||
package co.yixiang.modules.activity.rest;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import co.yixiang.aop.log.Log;
|
||||
import co.yixiang.exception.BadRequestException;
|
||||
import co.yixiang.modules.activity.domain.YxStoreCouponIssueUser;
|
||||
import co.yixiang.modules.activity.service.YxStoreCouponIssueUserService;
|
||||
import co.yixiang.modules.activity.service.dto.YxStoreCouponIssueUserQueryCriteria;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import org.springframework.http.HttpStatus;
|
||||
@ -11,7 +15,6 @@ import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import io.swagger.annotations.*;
|
||||
|
||||
/**
|
||||
* @author hupeng
|
||||
@ -28,7 +31,7 @@ public class YxStoreCouponIssueUserController {
|
||||
@Log("查询")
|
||||
@ApiOperation(value = "查询")
|
||||
@GetMapping(value = "/yxStoreCouponIssueUser")
|
||||
@PreAuthorize("hasAnyRole('ADMIN','YXSTORECOUPONISSUEUSER_ALL','YXSTORECOUPONISSUEUSER_SELECT')")
|
||||
@PreAuthorize("@el.check('admin','YXSTORECOUPONISSUEUSER_ALL','YXSTORECOUPONISSUEUSER_SELECT')")
|
||||
public ResponseEntity getYxStoreCouponIssueUsers(YxStoreCouponIssueUserQueryCriteria criteria, Pageable pageable){
|
||||
return new ResponseEntity(yxStoreCouponIssueUserService.queryAll(criteria,pageable),HttpStatus.OK);
|
||||
}
|
||||
@ -36,7 +39,7 @@ public class YxStoreCouponIssueUserController {
|
||||
@Log("新增")
|
||||
@ApiOperation(value = "新增")
|
||||
@PostMapping(value = "/yxStoreCouponIssueUser")
|
||||
@PreAuthorize("hasAnyRole('ADMIN','YXSTORECOUPONISSUEUSER_ALL','YXSTORECOUPONISSUEUSER_CREATE')")
|
||||
@PreAuthorize("@el.check('admin','YXSTORECOUPONISSUEUSER_ALL','YXSTORECOUPONISSUEUSER_CREATE')")
|
||||
public ResponseEntity create(@Validated @RequestBody YxStoreCouponIssueUser resources){
|
||||
return new ResponseEntity(yxStoreCouponIssueUserService.create(resources),HttpStatus.CREATED);
|
||||
}
|
||||
@ -44,7 +47,7 @@ public class YxStoreCouponIssueUserController {
|
||||
@Log("修改")
|
||||
@ApiOperation(value = "修改")
|
||||
@PutMapping(value = "/yxStoreCouponIssueUser")
|
||||
@PreAuthorize("hasAnyRole('ADMIN','YXSTORECOUPONISSUEUSER_ALL','YXSTORECOUPONISSUEUSER_EDIT')")
|
||||
@PreAuthorize("@el.check('admin','YXSTORECOUPONISSUEUSER_ALL','YXSTORECOUPONISSUEUSER_EDIT')")
|
||||
public ResponseEntity update(@Validated @RequestBody YxStoreCouponIssueUser resources){
|
||||
yxStoreCouponIssueUserService.update(resources);
|
||||
return new ResponseEntity(HttpStatus.NO_CONTENT);
|
||||
@ -53,8 +56,9 @@ public class YxStoreCouponIssueUserController {
|
||||
@Log("删除")
|
||||
@ApiOperation(value = "删除")
|
||||
@DeleteMapping(value = "/yxStoreCouponIssueUser/{id}")
|
||||
@PreAuthorize("hasAnyRole('ADMIN','YXSTORECOUPONISSUEUSER_ALL','YXSTORECOUPONISSUEUSER_DELETE')")
|
||||
@PreAuthorize("@el.check('admin','YXSTORECOUPONISSUEUSER_ALL','YXSTORECOUPONISSUEUSER_DELETE')")
|
||||
public ResponseEntity delete(@PathVariable Integer id){
|
||||
//if(StrUtil.isNotEmpty("22")) throw new BadRequestException("演示环境禁止操作");
|
||||
yxStoreCouponIssueUserService.delete(id);
|
||||
return new ResponseEntity(HttpStatus.OK);
|
||||
}
|
||||
|
@ -1,9 +1,13 @@
|
||||
package co.yixiang.modules.activity.rest;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import co.yixiang.aop.log.Log;
|
||||
import co.yixiang.exception.BadRequestException;
|
||||
import co.yixiang.modules.activity.domain.YxStoreCouponUser;
|
||||
import co.yixiang.modules.activity.service.YxStoreCouponUserService;
|
||||
import co.yixiang.modules.activity.service.dto.YxStoreCouponUserQueryCriteria;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import org.springframework.http.HttpStatus;
|
||||
@ -11,7 +15,6 @@ import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import io.swagger.annotations.*;
|
||||
|
||||
/**
|
||||
* @author hupeng
|
||||
@ -28,7 +31,7 @@ public class YxStoreCouponUserController {
|
||||
@Log("查询Y")
|
||||
@ApiOperation(value = "查询")
|
||||
@GetMapping(value = "/yxStoreCouponUser")
|
||||
@PreAuthorize("hasAnyRole('ADMIN','YXSTORECOUPONUSER_ALL','YXSTORECOUPONUSER_SELECT')")
|
||||
@PreAuthorize("@el.check('admin','YXSTORECOUPONUSER_ALL','YXSTORECOUPONUSER_SELECT')")
|
||||
public ResponseEntity getYxStoreCouponUsers(YxStoreCouponUserQueryCriteria criteria, Pageable pageable){
|
||||
return new ResponseEntity(yxStoreCouponUserService.queryAll(criteria,pageable),HttpStatus.OK);
|
||||
}
|
||||
@ -36,7 +39,7 @@ public class YxStoreCouponUserController {
|
||||
@Log("新增YxStoreCouponUser")
|
||||
@ApiOperation(value = "新增YxStoreCouponUser")
|
||||
@PostMapping(value = "/yxStoreCouponUser")
|
||||
@PreAuthorize("hasAnyRole('ADMIN','YXSTORECOUPONUSER_ALL','YXSTORECOUPONUSER_CREATE')")
|
||||
@PreAuthorize("@el.check('admin','YXSTORECOUPONUSER_ALL','YXSTORECOUPONUSER_CREATE')")
|
||||
public ResponseEntity create(@Validated @RequestBody YxStoreCouponUser resources){
|
||||
return new ResponseEntity(yxStoreCouponUserService.create(resources),HttpStatus.CREATED);
|
||||
}
|
||||
@ -44,7 +47,7 @@ public class YxStoreCouponUserController {
|
||||
@Log("修改YxStoreCouponUser")
|
||||
@ApiOperation(value = "修改YxStoreCouponUser")
|
||||
@PutMapping(value = "/yxStoreCouponUser")
|
||||
@PreAuthorize("hasAnyRole('ADMIN','YXSTORECOUPONUSER_ALL','YXSTORECOUPONUSER_EDIT')")
|
||||
@PreAuthorize("@el.check('admin','YXSTORECOUPONUSER_ALL','YXSTORECOUPONUSER_EDIT')")
|
||||
public ResponseEntity update(@Validated @RequestBody YxStoreCouponUser resources){
|
||||
yxStoreCouponUserService.update(resources);
|
||||
return new ResponseEntity(HttpStatus.NO_CONTENT);
|
||||
@ -53,8 +56,9 @@ public class YxStoreCouponUserController {
|
||||
@Log("删除YxStoreCouponUser")
|
||||
@ApiOperation(value = "删除YxStoreCouponUser")
|
||||
@DeleteMapping(value = "/yxStoreCouponUser/{id}")
|
||||
@PreAuthorize("hasAnyRole('ADMIN','YXSTORECOUPONUSER_ALL','YXSTORECOUPONUSER_DELETE')")
|
||||
@PreAuthorize("@el.check('admin','YXSTORECOUPONUSER_ALL','YXSTORECOUPONUSER_DELETE')")
|
||||
public ResponseEntity delete(@PathVariable Integer id){
|
||||
//if(StrUtil.isNotEmpty("22")) throw new BadRequestException("演示环境禁止操作");
|
||||
yxStoreCouponUserService.delete(id);
|
||||
return new ResponseEntity(HttpStatus.OK);
|
||||
}
|
||||
|
@ -1,9 +1,13 @@
|
||||
package co.yixiang.modules.activity.rest;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import co.yixiang.aop.log.Log;
|
||||
import co.yixiang.exception.BadRequestException;
|
||||
import co.yixiang.modules.activity.domain.YxStorePink;
|
||||
import co.yixiang.modules.activity.service.YxStorePinkService;
|
||||
import co.yixiang.modules.activity.service.dto.YxStorePinkQueryCriteria;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import org.springframework.http.HttpStatus;
|
||||
@ -11,7 +15,6 @@ import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import io.swagger.annotations.*;
|
||||
|
||||
/**
|
||||
* @author hupeng
|
||||
@ -28,7 +31,7 @@ public class YxStorePinkController {
|
||||
@Log("查询记录")
|
||||
@ApiOperation(value = "查询记录")
|
||||
@GetMapping(value = "/yxStorePink")
|
||||
@PreAuthorize("hasAnyRole('ADMIN','YXSTOREPINK_ALL','YXSTOREPINK_SELECT')")
|
||||
@PreAuthorize("@el.check('admin','YXSTOREPINK_ALL','YXSTOREPINK_SELECT')")
|
||||
public ResponseEntity getYxStorePinks(YxStorePinkQueryCriteria criteria, Pageable pageable){
|
||||
return new ResponseEntity(yxStorePinkService.queryAll(criteria,pageable),HttpStatus.OK);
|
||||
}
|
||||
@ -36,7 +39,7 @@ public class YxStorePinkController {
|
||||
@Log("新增YxStorePink")
|
||||
@ApiOperation(value = "新增YxStorePink")
|
||||
@PostMapping(value = "/yxStorePink")
|
||||
@PreAuthorize("hasAnyRole('ADMIN','YXSTOREPINK_ALL','YXSTOREPINK_CREATE')")
|
||||
@PreAuthorize("@el.check('admin','YXSTOREPINK_ALL','YXSTOREPINK_CREATE')")
|
||||
public ResponseEntity create(@Validated @RequestBody YxStorePink resources){
|
||||
return new ResponseEntity(yxStorePinkService.create(resources),HttpStatus.CREATED);
|
||||
}
|
||||
@ -44,7 +47,7 @@ public class YxStorePinkController {
|
||||
@Log("修改YxStorePink")
|
||||
@ApiOperation(value = "修改YxStorePink")
|
||||
@PutMapping(value = "/yxStorePink")
|
||||
@PreAuthorize("hasAnyRole('ADMIN','YXSTOREPINK_ALL','YXSTOREPINK_EDIT')")
|
||||
@PreAuthorize("@el.check('admin','YXSTOREPINK_ALL','YXSTOREPINK_EDIT')")
|
||||
public ResponseEntity update(@Validated @RequestBody YxStorePink resources){
|
||||
yxStorePinkService.update(resources);
|
||||
return new ResponseEntity(HttpStatus.NO_CONTENT);
|
||||
@ -53,8 +56,9 @@ public class YxStorePinkController {
|
||||
@Log("删除YxStorePink")
|
||||
@ApiOperation(value = "删除YxStorePink")
|
||||
@DeleteMapping(value = "/yxStorePink/{id}")
|
||||
@PreAuthorize("hasAnyRole('ADMIN','YXSTOREPINK_ALL','YXSTOREPINK_DELETE')")
|
||||
@PreAuthorize("@el.check('admin','YXSTOREPINK_ALL','YXSTOREPINK_DELETE')")
|
||||
public ResponseEntity delete(@PathVariable Integer id){
|
||||
//if(StrUtil.isNotEmpty("22")) throw new BadRequestException("演示环境禁止操作");
|
||||
yxStorePinkService.delete(id);
|
||||
return new ResponseEntity(HttpStatus.OK);
|
||||
}
|
||||
|
@ -1,74 +1,74 @@
|
||||
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.YxStoreSeckill;
|
||||
import co.yixiang.modules.activity.service.YxStoreSeckillService;
|
||||
import co.yixiang.modules.activity.service.dto.YxStoreSeckillQueryCriteria;
|
||||
import co.yixiang.utils.OrderUtil;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
/**
|
||||
* @author xuwenbo
|
||||
* @date 2019-12-14
|
||||
*/
|
||||
@Api(tags = "秒杀管理")
|
||||
@RestController
|
||||
@RequestMapping("api")
|
||||
public class YxStoreSeckillController {
|
||||
|
||||
@Autowired
|
||||
private YxStoreSeckillService yxStoreSeckillService;
|
||||
|
||||
@Log("查询YxStoreSeckill")
|
||||
@ApiOperation(value = "查询YxStoreSeckill")
|
||||
@GetMapping(value = "/yxStoreSeckill")
|
||||
@PreAuthorize("hasAnyRole('ADMIN','YXSTORESECKILL_ALL','YXSTORESECKILL_SELECT')")
|
||||
public ResponseEntity getYxStoreSeckills(YxStoreSeckillQueryCriteria criteria, Pageable pageable){
|
||||
return new ResponseEntity(yxStoreSeckillService.queryAll(criteria,pageable),HttpStatus.OK);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Log("修改YxStoreSeckill")
|
||||
@ApiOperation(value = "修改YxStoreSeckill")
|
||||
@PutMapping(value = "/yxStoreSeckill")
|
||||
@PreAuthorize("hasAnyRole('ADMIN','YXSTORESECKILL_ALL','YXSTORESECKILL_EDIT')")
|
||||
public ResponseEntity update(@Validated @RequestBody YxStoreSeckill resources){
|
||||
if(ObjectUtil.isNotNull(resources.getStartTimeDate())){
|
||||
resources.setStartTime(OrderUtil.
|
||||
dateToTimestamp(resources.getStartTimeDate()));
|
||||
}
|
||||
if(ObjectUtil.isNotNull(resources.getEndTimeDate())){
|
||||
resources.setStopTime(OrderUtil.
|
||||
dateToTimestamp(resources.getEndTimeDate()));
|
||||
}
|
||||
if(ObjectUtil.isNull(resources.getId())){
|
||||
resources.setAddTime(String.valueOf(OrderUtil.getSecondTimestampTwo()));
|
||||
return new ResponseEntity(yxStoreSeckillService.create(resources),HttpStatus.CREATED);
|
||||
}else{
|
||||
yxStoreSeckillService.update(resources);
|
||||
return new ResponseEntity(HttpStatus.NO_CONTENT);
|
||||
}
|
||||
}
|
||||
|
||||
@Log("删除YxStoreSeckill")
|
||||
@ApiOperation(value = "删除YxStoreSeckill")
|
||||
@DeleteMapping(value = "/yxStoreSeckill/{id}")
|
||||
@PreAuthorize("hasAnyRole('ADMIN','YXSTORESECKILL_ALL','YXSTORESECKILL_DELETE')")
|
||||
public ResponseEntity delete(@PathVariable Integer id){
|
||||
//if(StrUtil.isNotEmpty("22")) throw new BadRequestException("演示环境禁止操作");
|
||||
yxStoreSeckillService.delete(id);
|
||||
return new ResponseEntity(HttpStatus.OK);
|
||||
}
|
||||
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.YxStoreSeckill;
|
||||
import co.yixiang.modules.activity.service.YxStoreSeckillService;
|
||||
import co.yixiang.modules.activity.service.dto.YxStoreSeckillQueryCriteria;
|
||||
import co.yixiang.utils.OrderUtil;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
/**
|
||||
* @author xuwenbo
|
||||
* @date 2019-12-14
|
||||
*/
|
||||
@Api(tags = "秒杀管理")
|
||||
@RestController
|
||||
@RequestMapping("api")
|
||||
public class YxStoreSeckillController {
|
||||
|
||||
@Autowired
|
||||
private YxStoreSeckillService yxStoreSeckillService;
|
||||
|
||||
@Log("查询YxStoreSeckill")
|
||||
@ApiOperation(value = "查询YxStoreSeckill")
|
||||
@GetMapping(value = "/yxStoreSeckill")
|
||||
@PreAuthorize("@el.check('admin','YXSTORESECKILL_ALL','YXSTORESECKILL_SELECT')")
|
||||
public ResponseEntity getYxStoreSeckills(YxStoreSeckillQueryCriteria criteria, Pageable pageable){
|
||||
return new ResponseEntity(yxStoreSeckillService.queryAll(criteria,pageable),HttpStatus.OK);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Log("修改YxStoreSeckill")
|
||||
@ApiOperation(value = "修改YxStoreSeckill")
|
||||
@PutMapping(value = "/yxStoreSeckill")
|
||||
@PreAuthorize("@el.check('admin','YXSTORESECKILL_ALL','YXSTORESECKILL_EDIT')")
|
||||
public ResponseEntity update(@Validated @RequestBody YxStoreSeckill resources){
|
||||
if(ObjectUtil.isNotNull(resources.getStartTimeDate())){
|
||||
resources.setStartTime(OrderUtil.
|
||||
dateToTimestamp(resources.getStartTimeDate()));
|
||||
}
|
||||
if(ObjectUtil.isNotNull(resources.getEndTimeDate())){
|
||||
resources.setStopTime(OrderUtil.
|
||||
dateToTimestamp(resources.getEndTimeDate()));
|
||||
}
|
||||
if(ObjectUtil.isNull(resources.getId())){
|
||||
resources.setAddTime(String.valueOf(OrderUtil.getSecondTimestampTwo()));
|
||||
return new ResponseEntity(yxStoreSeckillService.create(resources),HttpStatus.CREATED);
|
||||
}else{
|
||||
yxStoreSeckillService.update(resources);
|
||||
return new ResponseEntity(HttpStatus.NO_CONTENT);
|
||||
}
|
||||
}
|
||||
|
||||
@Log("删除YxStoreSeckill")
|
||||
@ApiOperation(value = "删除YxStoreSeckill")
|
||||
@DeleteMapping(value = "/yxStoreSeckill/{id}")
|
||||
@PreAuthorize("@el.check('admin','YXSTORESECKILL_ALL','YXSTORESECKILL_DELETE')")
|
||||
public ResponseEntity delete(@PathVariable Integer id){
|
||||
//if(StrUtil.isNotEmpty("22")) throw new BadRequestException("演示环境禁止操作");
|
||||
yxStoreSeckillService.delete(id);
|
||||
return new ResponseEntity(HttpStatus.OK);
|
||||
}
|
||||
}
|
@ -1,61 +0,0 @@
|
||||
//package co.yixiang.modules.activity.rest;
|
||||
//
|
||||
//import co.yixiang.aop.log.Log;
|
||||
//import co.yixiang.modules.activity.domain.YxStoreVisit;
|
||||
//import co.yixiang.modules.activity.service.YxStoreVisitService;
|
||||
//import co.yixiang.modules.activity.service.dto.YxStoreVisitQueryCriteria;
|
||||
//import org.springframework.beans.factory.annotation.Autowired;
|
||||
//import org.springframework.data.domain.Pageable;
|
||||
//import org.springframework.http.HttpStatus;
|
||||
//import org.springframework.http.ResponseEntity;
|
||||
//import org.springframework.security.access.prepost.PreAuthorize;
|
||||
//import org.springframework.validation.annotation.Validated;
|
||||
//import org.springframework.web.bind.annotation.*;
|
||||
//import io.swagger.annotations.*;
|
||||
//
|
||||
///**
|
||||
//* @author hupeng
|
||||
//* @date 2019-11-18
|
||||
//*/
|
||||
//@Api(tags = "fang管理")
|
||||
//@RestController
|
||||
//@RequestMapping("api")
|
||||
//public class YxStoreVisitController {
|
||||
//
|
||||
// @Autowired
|
||||
// private YxStoreVisitService yxStoreVisitService;
|
||||
//
|
||||
// @Log("查询YxStoreVisit")
|
||||
// @ApiOperation(value = "查询YxStoreVisit")
|
||||
// @GetMapping(value = "/yxStoreVisit")
|
||||
// @PreAuthorize("hasAnyRole('ADMIN','YXSTOREVISIT_ALL','YXSTOREVISIT_SELECT')")
|
||||
// public ResponseEntity getYxStoreVisits(YxStoreVisitQueryCriteria criteria, Pageable pageable){
|
||||
// return new ResponseEntity(yxStoreVisitService.queryAll(criteria,pageable),HttpStatus.OK);
|
||||
// }
|
||||
//
|
||||
// @Log("新增YxStoreVisit")
|
||||
// @ApiOperation(value = "新增YxStoreVisit")
|
||||
// @PostMapping(value = "/yxStoreVisit")
|
||||
// @PreAuthorize("hasAnyRole('ADMIN','YXSTOREVISIT_ALL','YXSTOREVISIT_CREATE')")
|
||||
// public ResponseEntity create(@Validated @RequestBody YxStoreVisit resources){
|
||||
// return new ResponseEntity(yxStoreVisitService.create(resources),HttpStatus.CREATED);
|
||||
// }
|
||||
//
|
||||
// @Log("修改YxStoreVisit")
|
||||
// @ApiOperation(value = "修改YxStoreVisit")
|
||||
// @PutMapping(value = "/yxStoreVisit")
|
||||
// @PreAuthorize("hasAnyRole('ADMIN','YXSTOREVISIT_ALL','YXSTOREVISIT_EDIT')")
|
||||
// public ResponseEntity update(@Validated @RequestBody YxStoreVisit resources){
|
||||
// yxStoreVisitService.update(resources);
|
||||
// return new ResponseEntity(HttpStatus.NO_CONTENT);
|
||||
// }
|
||||
//
|
||||
// @Log("删除YxStoreVisit")
|
||||
// @ApiOperation(value = "删除YxStoreVisit")
|
||||
// @DeleteMapping(value = "/yxStoreVisit/{id}")
|
||||
// @PreAuthorize("hasAnyRole('ADMIN','YXSTOREVISIT_ALL','YXSTOREVISIT_DELETE')")
|
||||
// public ResponseEntity delete(@PathVariable Integer id){
|
||||
// yxStoreVisitService.delete(id);
|
||||
// return new ResponseEntity(HttpStatus.OK);
|
||||
// }
|
||||
//}
|
@ -1,7 +1,6 @@
|
||||
package co.yixiang.modules.activity.rest;
|
||||
|
||||
import cn.hutool.core.util.NumberUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import co.yixiang.aop.log.Log;
|
||||
import co.yixiang.exception.BadRequestException;
|
||||
@ -12,13 +11,7 @@ import co.yixiang.modules.shop.domain.YxUserBill;
|
||||
import co.yixiang.modules.shop.service.YxUserBillService;
|
||||
import co.yixiang.modules.shop.service.YxUserService;
|
||||
import co.yixiang.modules.shop.service.dto.YxUserDTO;
|
||||
import co.yixiang.modules.wechat.service.YxWechatUserService;
|
||||
import co.yixiang.modules.wechat.service.dto.YxWechatUserDTO;
|
||||
import co.yixiang.utils.OrderUtil;
|
||||
import co.yixiang.utils.RedisUtil;
|
||||
import com.github.binarywang.wxpay.bean.entpay.EntPayRequest;
|
||||
import com.github.binarywang.wxpay.exception.WxPayException;
|
||||
import com.github.binarywang.wxpay.service.WxPayService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@ -29,8 +22,6 @@ import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* @author hupeng
|
||||
* @date 2019-11-14
|
||||
@ -49,16 +40,10 @@ public class YxUserExtractController {
|
||||
@Autowired
|
||||
private YxUserBillService yxUserBillService;
|
||||
|
||||
@Autowired
|
||||
private WxPayService wxPayService;
|
||||
|
||||
@Autowired
|
||||
private YxWechatUserService wechatUserService;
|
||||
|
||||
@Log("查询")
|
||||
@ApiOperation(value = "查询")
|
||||
@GetMapping(value = "/yxUserExtract")
|
||||
@PreAuthorize("hasAnyRole('ADMIN','YXUSEREXTRACT_ALL','YXUSEREXTRACT_SELECT')")
|
||||
@PreAuthorize("@el.check('admin','YXUSEREXTRACT_ALL','YXUSEREXTRACT_SELECT')")
|
||||
public ResponseEntity getYxUserExtracts(YxUserExtractQueryCriteria criteria, Pageable pageable){
|
||||
return new ResponseEntity(yxUserExtractService.queryAll(criteria,pageable),HttpStatus.OK);
|
||||
}
|
||||
@ -68,7 +53,7 @@ public class YxUserExtractController {
|
||||
@Log("修改")
|
||||
@ApiOperation(value = "修改审核")
|
||||
@PutMapping(value = "/yxUserExtract")
|
||||
@PreAuthorize("hasAnyRole('ADMIN','YXUSEREXTRACT_ALL','YXUSEREXTRACT_EDIT')")
|
||||
@PreAuthorize("@el.check('admin','YXUSEREXTRACT_ALL','YXUSEREXTRACT_EDIT')")
|
||||
public ResponseEntity update(@Validated @RequestBody YxUserExtract resources){
|
||||
if(StrUtil.isEmpty(resources.getStatus().toString())){
|
||||
throw new BadRequestException("请选择审核状态");
|
||||
@ -104,40 +89,6 @@ public class YxUserExtractController {
|
||||
|
||||
resources.setFailTime(OrderUtil.getSecondTimestampTwo());
|
||||
|
||||
}
|
||||
//todo 此处为企业付款,没经过测试
|
||||
boolean isTest = true;
|
||||
if(!isTest){
|
||||
YxWechatUserDTO wechatUser = wechatUserService.findById(resources.getUid());
|
||||
if(ObjectUtil.isNotNull(wechatUser)){
|
||||
String apiUrl = RedisUtil.get("api_url");
|
||||
if(StrUtil.isBlank(apiUrl)) throw new BadRequestException("请配置api地址");
|
||||
//读取redis配置
|
||||
String appId = RedisUtil.get("wxpay_appId");
|
||||
String mchId = RedisUtil.get("wxpay_mchId");
|
||||
if(StrUtil.isBlank(appId) || StrUtil.isBlank(mchId)){
|
||||
throw new BadRequestException("请配置微信支付");
|
||||
}
|
||||
EntPayRequest entPayRequest = new EntPayRequest();
|
||||
try {
|
||||
entPayRequest.setAppid(appId);
|
||||
entPayRequest.setMchId(mchId);
|
||||
entPayRequest.setOpenid(wechatUser.getOpenid());
|
||||
entPayRequest.setPartnerTradeNo(resources.getId().toString());
|
||||
entPayRequest.setCheckName("FORCE_CHECK");
|
||||
entPayRequest.setReUserName(resources.getRealName());
|
||||
entPayRequest.setAmount(resources.getExtractPrice()
|
||||
.multiply(new BigDecimal(100)).intValue());
|
||||
entPayRequest.setDescription("佣金提现");
|
||||
entPayRequest.setSpbillCreateIp("127.0.0.1");
|
||||
wxPayService.getEntPayService().entPay(entPayRequest);
|
||||
} catch (WxPayException e) {
|
||||
throw new BadRequestException(e.getMessage());
|
||||
}
|
||||
}else{
|
||||
throw new BadRequestException("不是微信用户无法退款");
|
||||
}
|
||||
|
||||
}
|
||||
yxUserExtractService.update(resources);
|
||||
return new ResponseEntity(HttpStatus.NO_CONTENT);
|
||||
|
@ -3,12 +3,10 @@ package co.yixiang.modules.activity.service;
|
||||
import co.yixiang.modules.activity.domain.YxStoreBargain;
|
||||
import co.yixiang.modules.activity.service.dto.YxStoreBargainDTO;
|
||||
import co.yixiang.modules.activity.service.dto.YxStoreBargainQueryCriteria;
|
||||
import org.springframework.cache.annotation.CacheConfig;
|
||||
import org.springframework.cache.annotation.CacheEvict;
|
||||
import org.springframework.cache.annotation.Cacheable;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import java.util.Map;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author xuwenbo
|
||||
|
@ -3,12 +3,10 @@ package co.yixiang.modules.activity.service;
|
||||
import co.yixiang.modules.activity.domain.YxStoreCombination;
|
||||
import co.yixiang.modules.activity.service.dto.YxStoreCombinationDTO;
|
||||
import co.yixiang.modules.activity.service.dto.YxStoreCombinationQueryCriteria;
|
||||
import org.springframework.cache.annotation.CacheConfig;
|
||||
import org.springframework.cache.annotation.CacheEvict;
|
||||
import org.springframework.cache.annotation.Cacheable;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import java.util.Map;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author hupeng
|
||||
|
@ -3,12 +3,10 @@ package co.yixiang.modules.activity.service;
|
||||
import co.yixiang.modules.activity.domain.YxStoreCouponIssue;
|
||||
import co.yixiang.modules.activity.service.dto.YxStoreCouponIssueDTO;
|
||||
import co.yixiang.modules.activity.service.dto.YxStoreCouponIssueQueryCriteria;
|
||||
import org.springframework.cache.annotation.CacheConfig;
|
||||
import org.springframework.cache.annotation.CacheEvict;
|
||||
import org.springframework.cache.annotation.Cacheable;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import java.util.Map;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author hupeng
|
||||
|
@ -3,12 +3,10 @@ package co.yixiang.modules.activity.service;
|
||||
import co.yixiang.modules.activity.domain.YxStoreCouponIssueUser;
|
||||
import co.yixiang.modules.activity.service.dto.YxStoreCouponIssueUserDTO;
|
||||
import co.yixiang.modules.activity.service.dto.YxStoreCouponIssueUserQueryCriteria;
|
||||
import org.springframework.cache.annotation.CacheConfig;
|
||||
import org.springframework.cache.annotation.CacheEvict;
|
||||
import org.springframework.cache.annotation.Cacheable;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import java.util.Map;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author hupeng
|
||||
|
@ -3,12 +3,10 @@ package co.yixiang.modules.activity.service;
|
||||
import co.yixiang.modules.activity.domain.YxStoreCoupon;
|
||||
import co.yixiang.modules.activity.service.dto.YxStoreCouponDTO;
|
||||
import co.yixiang.modules.activity.service.dto.YxStoreCouponQueryCriteria;
|
||||
import org.springframework.cache.annotation.CacheConfig;
|
||||
import org.springframework.cache.annotation.CacheEvict;
|
||||
import org.springframework.cache.annotation.Cacheable;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import java.util.Map;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author hupeng
|
||||
|
@ -3,12 +3,10 @@ package co.yixiang.modules.activity.service;
|
||||
import co.yixiang.modules.activity.domain.YxStoreCouponUser;
|
||||
import co.yixiang.modules.activity.service.dto.YxStoreCouponUserDTO;
|
||||
import co.yixiang.modules.activity.service.dto.YxStoreCouponUserQueryCriteria;
|
||||
import org.springframework.cache.annotation.CacheConfig;
|
||||
import org.springframework.cache.annotation.CacheEvict;
|
||||
import org.springframework.cache.annotation.Cacheable;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import java.util.Map;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author hupeng
|
||||
|
@ -3,12 +3,10 @@ package co.yixiang.modules.activity.service;
|
||||
import co.yixiang.modules.activity.domain.YxStorePink;
|
||||
import co.yixiang.modules.activity.service.dto.YxStorePinkDTO;
|
||||
import co.yixiang.modules.activity.service.dto.YxStorePinkQueryCriteria;
|
||||
import org.springframework.cache.annotation.CacheConfig;
|
||||
import org.springframework.cache.annotation.CacheEvict;
|
||||
import org.springframework.cache.annotation.Cacheable;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import java.util.Map;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author hupeng
|
||||
|
@ -1,66 +1,64 @@
|
||||
package co.yixiang.modules.activity.service;
|
||||
|
||||
import co.yixiang.modules.activity.domain.YxStoreSeckill;
|
||||
import co.yixiang.modules.activity.service.dto.YxStoreSeckillDTO;
|
||||
import co.yixiang.modules.activity.service.dto.YxStoreSeckillQueryCriteria;
|
||||
import org.springframework.cache.annotation.CacheConfig;
|
||||
import org.springframework.cache.annotation.CacheEvict;
|
||||
import org.springframework.cache.annotation.Cacheable;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import java.util.Map;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author xuwenbo
|
||||
* @date 2019-12-14
|
||||
*/
|
||||
//@CacheConfig(cacheNames = "yxStoreSeckill")
|
||||
public interface YxStoreSeckillService {
|
||||
|
||||
/**
|
||||
* 查询数据分页
|
||||
* @param criteria
|
||||
* @param pageable
|
||||
* @return
|
||||
*/
|
||||
//@Cacheable
|
||||
Map<String,Object> queryAll(YxStoreSeckillQueryCriteria criteria, Pageable pageable);
|
||||
|
||||
/**
|
||||
* 查询所有数据不分页
|
||||
* @param criteria
|
||||
* @return
|
||||
*/
|
||||
//@Cacheable
|
||||
List<YxStoreSeckillDTO> 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);
|
||||
package co.yixiang.modules.activity.service;
|
||||
|
||||
import co.yixiang.modules.activity.domain.YxStoreSeckill;
|
||||
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;
|
||||
|
||||
/**
|
||||
* @author xuwenbo
|
||||
* @date 2019-12-14
|
||||
*/
|
||||
//@CacheConfig(cacheNames = "yxStoreSeckill")
|
||||
public interface YxStoreSeckillService {
|
||||
|
||||
/**
|
||||
* 查询数据分页
|
||||
* @param criteria
|
||||
* @param pageable
|
||||
* @return
|
||||
*/
|
||||
//@Cacheable
|
||||
Map<String,Object> queryAll(YxStoreSeckillQueryCriteria criteria, Pageable pageable);
|
||||
|
||||
/**
|
||||
* 查询所有数据不分页
|
||||
* @param criteria
|
||||
* @return
|
||||
*/
|
||||
//@Cacheable
|
||||
List<YxStoreSeckillDTO> 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);
|
||||
}
|
@ -3,12 +3,10 @@ package co.yixiang.modules.activity.service;
|
||||
import co.yixiang.modules.activity.domain.YxStoreVisit;
|
||||
import co.yixiang.modules.activity.service.dto.YxStoreVisitDTO;
|
||||
import co.yixiang.modules.activity.service.dto.YxStoreVisitQueryCriteria;
|
||||
import org.springframework.cache.annotation.CacheConfig;
|
||||
import org.springframework.cache.annotation.CacheEvict;
|
||||
import org.springframework.cache.annotation.Cacheable;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import java.util.Map;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author hupeng
|
||||
|
@ -3,12 +3,10 @@ package co.yixiang.modules.activity.service;
|
||||
import co.yixiang.modules.activity.domain.YxUserExtract;
|
||||
import co.yixiang.modules.activity.service.dto.YxUserExtractDTO;
|
||||
import co.yixiang.modules.activity.service.dto.YxUserExtractQueryCriteria;
|
||||
import org.springframework.cache.annotation.CacheConfig;
|
||||
import org.springframework.cache.annotation.CacheEvict;
|
||||
import org.springframework.cache.annotation.Cacheable;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import java.util.Map;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author hupeng
|
||||
|
@ -1,8 +1,9 @@
|
||||
package co.yixiang.modules.activity.service.dto;
|
||||
|
||||
import lombok.Data;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
|
||||
/**
|
||||
|
@ -1,8 +1,6 @@
|
||||
package co.yixiang.modules.activity.service.dto;
|
||||
|
||||
import lombok.Data;
|
||||
import java.math.BigDecimal;
|
||||
import co.yixiang.annotation.Query;
|
||||
|
||||
/**
|
||||
* @author xuwenbo
|
||||
|
@ -2,11 +2,8 @@ package co.yixiang.modules.activity.service.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import javax.persistence.Temporal;
|
||||
import javax.persistence.TemporalType;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.math.BigDecimal;
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
|
@ -1,8 +1,7 @@
|
||||
package co.yixiang.modules.activity.service.dto;
|
||||
|
||||
import lombok.Data;
|
||||
import java.math.BigDecimal;
|
||||
import co.yixiang.annotation.Query;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author hupeng
|
||||
|
@ -1,8 +1,9 @@
|
||||
package co.yixiang.modules.activity.service.dto;
|
||||
|
||||
import lombok.Data;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
|
||||
/**
|
||||
|
@ -1,6 +1,7 @@
|
||||
package co.yixiang.modules.activity.service.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
package co.yixiang.modules.activity.service.dto;
|
||||
|
||||
import lombok.Data;
|
||||
import co.yixiang.annotation.Query;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author hupeng
|
||||
|
@ -1,6 +1,7 @@
|
||||
package co.yixiang.modules.activity.service.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
|
||||
|
@ -1,7 +1,6 @@
|
||||
package co.yixiang.modules.activity.service.dto;
|
||||
|
||||
import lombok.Data;
|
||||
import co.yixiang.annotation.Query;
|
||||
|
||||
/**
|
||||
* @author hupeng
|
||||
|
@ -1,8 +1,7 @@
|
||||
package co.yixiang.modules.activity.service.dto;
|
||||
|
||||
import lombok.Data;
|
||||
import java.math.BigDecimal;
|
||||
import co.yixiang.annotation.Query;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author hupeng
|
||||
|
@ -1,8 +1,9 @@
|
||||
package co.yixiang.modules.activity.service.dto;
|
||||
|
||||
import lombok.Data;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
|
||||
/**
|
||||
|
@ -1,8 +1,7 @@
|
||||
package co.yixiang.modules.activity.service.dto;
|
||||
|
||||
import lombok.Data;
|
||||
import java.math.BigDecimal;
|
||||
import co.yixiang.annotation.Query;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author hupeng
|
||||
|
@ -1,8 +1,9 @@
|
||||
package co.yixiang.modules.activity.service.dto;
|
||||
|
||||
import lombok.Data;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
|
||||
/**
|
||||
|
@ -1,8 +1,7 @@
|
||||
package co.yixiang.modules.activity.service.dto;
|
||||
|
||||
import lombok.Data;
|
||||
import java.math.BigDecimal;
|
||||
import co.yixiang.annotation.Query;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author hupeng
|
||||
|
@ -1,98 +1,97 @@
|
||||
package co.yixiang.modules.activity.service.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.math.BigDecimal;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
/**
|
||||
* @author xuwenbo
|
||||
* @date 2019-12-14
|
||||
*/
|
||||
@Data
|
||||
public class YxStoreSeckillDTO implements Serializable {
|
||||
|
||||
// 商品秒杀产品表id
|
||||
private Integer id;
|
||||
|
||||
// 商品id
|
||||
private Integer productId;
|
||||
|
||||
// 推荐图
|
||||
private String image;
|
||||
|
||||
// 轮播图
|
||||
private String images;
|
||||
|
||||
// 活动标题
|
||||
private String title;
|
||||
|
||||
// 简介
|
||||
private String info;
|
||||
|
||||
// 价格
|
||||
private BigDecimal price;
|
||||
|
||||
// 成本
|
||||
private BigDecimal cost;
|
||||
|
||||
// 原价
|
||||
private BigDecimal otPrice;
|
||||
|
||||
// 返多少积分
|
||||
private BigDecimal giveIntegral;
|
||||
|
||||
// 排序
|
||||
private Integer sort;
|
||||
|
||||
// 库存
|
||||
private Integer stock;
|
||||
|
||||
// 销量
|
||||
private Integer sales;
|
||||
|
||||
// 单位名
|
||||
private String unitName;
|
||||
|
||||
// 邮费
|
||||
private BigDecimal postage;
|
||||
|
||||
// 内容
|
||||
private String description;
|
||||
|
||||
// 开始时间
|
||||
private Integer startTime;
|
||||
|
||||
// 结束时间
|
||||
private Integer stopTime;
|
||||
|
||||
// 添加时间
|
||||
private String addTime;
|
||||
|
||||
// 产品状态
|
||||
private Integer status;
|
||||
|
||||
// 是否包邮
|
||||
private Integer isPostage;
|
||||
|
||||
// 热门推荐
|
||||
private Integer isHot;
|
||||
|
||||
// 删除 0未删除1已删除
|
||||
private Integer isDel;
|
||||
|
||||
// 最多秒杀几个
|
||||
private Integer num;
|
||||
|
||||
// 显示
|
||||
private Integer isShow;
|
||||
|
||||
private Date startTimeDate;
|
||||
|
||||
private Date endTimeDate;
|
||||
|
||||
private String statusStr;
|
||||
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-14
|
||||
*/
|
||||
@Data
|
||||
public class YxStoreSeckillDTO implements Serializable {
|
||||
|
||||
// 商品秒杀产品表id
|
||||
private Integer id;
|
||||
|
||||
// 商品id
|
||||
private Integer productId;
|
||||
|
||||
// 推荐图
|
||||
private String image;
|
||||
|
||||
// 轮播图
|
||||
private String images;
|
||||
|
||||
// 活动标题
|
||||
private String title;
|
||||
|
||||
// 简介
|
||||
private String info;
|
||||
|
||||
// 价格
|
||||
private BigDecimal price;
|
||||
|
||||
// 成本
|
||||
private BigDecimal cost;
|
||||
|
||||
// 原价
|
||||
private BigDecimal otPrice;
|
||||
|
||||
// 返多少积分
|
||||
private BigDecimal giveIntegral;
|
||||
|
||||
// 排序
|
||||
private Integer sort;
|
||||
|
||||
// 库存
|
||||
private Integer stock;
|
||||
|
||||
// 销量
|
||||
private Integer sales;
|
||||
|
||||
// 单位名
|
||||
private String unitName;
|
||||
|
||||
// 邮费
|
||||
private BigDecimal postage;
|
||||
|
||||
// 内容
|
||||
private String description;
|
||||
|
||||
// 开始时间
|
||||
private Integer startTime;
|
||||
|
||||
// 结束时间
|
||||
private Integer stopTime;
|
||||
|
||||
// 添加时间
|
||||
private String addTime;
|
||||
|
||||
// 产品状态
|
||||
private Integer status;
|
||||
|
||||
// 是否包邮
|
||||
private Integer isPostage;
|
||||
|
||||
// 热门推荐
|
||||
private Integer isHot;
|
||||
|
||||
// 删除 0未删除1已删除
|
||||
private Integer isDel;
|
||||
|
||||
// 最多秒杀几个
|
||||
private Integer num;
|
||||
|
||||
// 显示
|
||||
private Integer isShow;
|
||||
|
||||
private Date startTimeDate;
|
||||
|
||||
private Date endTimeDate;
|
||||
|
||||
private String statusStr;
|
||||
}
|
@ -1,17 +1,16 @@
|
||||
package co.yixiang.modules.activity.service.dto;
|
||||
|
||||
import lombok.Data;
|
||||
import java.math.BigDecimal;
|
||||
import co.yixiang.annotation.Query;
|
||||
|
||||
/**
|
||||
* @author xuwenbo
|
||||
* @date 2019-12-14
|
||||
*/
|
||||
@Data
|
||||
public class YxStoreSeckillQueryCriteria{
|
||||
|
||||
// 模糊
|
||||
@Query(type = Query.Type.INNER_LIKE)
|
||||
private String title;
|
||||
package co.yixiang.modules.activity.service.dto;
|
||||
|
||||
import co.yixiang.annotation.Query;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author xuwenbo
|
||||
* @date 2019-12-14
|
||||
*/
|
||||
@Data
|
||||
public class YxStoreSeckillQueryCriteria{
|
||||
|
||||
// 模糊
|
||||
@Query(type = Query.Type.INNER_LIKE)
|
||||
private String title;
|
||||
}
|
@ -1,6 +1,7 @@
|
||||
package co.yixiang.modules.activity.service.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
|
||||
|
@ -1,7 +1,6 @@
|
||||
package co.yixiang.modules.activity.service.dto;
|
||||
|
||||
import lombok.Data;
|
||||
import co.yixiang.annotation.Query;
|
||||
|
||||
/**
|
||||
* @author hupeng
|
||||
|
@ -1,8 +1,9 @@
|
||||
package co.yixiang.modules.activity.service.dto;
|
||||
|
||||
import lombok.Data;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
|
||||
/**
|
||||
|
@ -1,8 +1,7 @@
|
||||
package co.yixiang.modules.activity.service.dto;
|
||||
|
||||
import lombok.Data;
|
||||
import java.math.BigDecimal;
|
||||
import co.yixiang.annotation.Query;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author hupeng
|
||||
|
@ -1,23 +1,24 @@
|
||||
package co.yixiang.modules.activity.service.impl;
|
||||
|
||||
import co.yixiang.modules.activity.domain.YxStoreBargain;
|
||||
import co.yixiang.utils.ValidationUtil;
|
||||
import co.yixiang.modules.activity.repository.YxStoreBargainRepository;
|
||||
import co.yixiang.modules.activity.service.YxStoreBargainService;
|
||||
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.beans.factory.annotation.Autowired;
|
||||
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.Optional;
|
||||
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;
|
||||
|
||||
/**
|
||||
* @author xuwenbo
|
||||
|
@ -1,23 +1,24 @@
|
||||
package co.yixiang.modules.activity.service.impl;
|
||||
|
||||
import co.yixiang.modules.activity.domain.YxStoreCouponIssue;
|
||||
import co.yixiang.utils.ValidationUtil;
|
||||
import co.yixiang.modules.activity.repository.YxStoreCouponIssueRepository;
|
||||
import co.yixiang.modules.activity.service.YxStoreCouponIssueService;
|
||||
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.beans.factory.annotation.Autowired;
|
||||
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.Optional;
|
||||
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;
|
||||
|
||||
/**
|
||||
* @author hupeng
|
||||
|
@ -1,23 +1,24 @@
|
||||
package co.yixiang.modules.activity.service.impl;
|
||||
|
||||
import co.yixiang.modules.activity.domain.YxStoreCouponIssueUser;
|
||||
import co.yixiang.utils.ValidationUtil;
|
||||
import co.yixiang.modules.activity.repository.YxStoreCouponIssueUserRepository;
|
||||
import co.yixiang.modules.activity.service.YxStoreCouponIssueUserService;
|
||||
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.beans.factory.annotation.Autowired;
|
||||
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.Optional;
|
||||
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;
|
||||
|
||||
/**
|
||||
* @author hupeng
|
||||
|
@ -1,23 +1,24 @@
|
||||
package co.yixiang.modules.activity.service.impl;
|
||||
|
||||
import co.yixiang.modules.activity.domain.YxStoreCoupon;
|
||||
import co.yixiang.utils.ValidationUtil;
|
||||
import co.yixiang.modules.activity.repository.YxStoreCouponRepository;
|
||||
import co.yixiang.modules.activity.service.YxStoreCouponService;
|
||||
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.beans.factory.annotation.Autowired;
|
||||
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.Optional;
|
||||
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;
|
||||
|
||||
/**
|
||||
* @author hupeng
|
||||
|
@ -1,99 +1,99 @@
|
||||
package co.yixiang.modules.activity.service.impl;
|
||||
|
||||
import co.yixiang.modules.activity.domain.YxStoreSeckill;
|
||||
import co.yixiang.modules.activity.repository.YxStoreSeckillRepository;
|
||||
import co.yixiang.modules.activity.service.YxStoreSeckillService;
|
||||
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.beans.factory.annotation.Autowired;
|
||||
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 java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
|
||||
/**
|
||||
* @author xuwenbo
|
||||
* @date 2019-12-14
|
||||
*/
|
||||
@Service
|
||||
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class)
|
||||
public class YxStoreSeckillServiceImpl implements YxStoreSeckillService {
|
||||
|
||||
@Autowired
|
||||
private YxStoreSeckillRepository yxStoreSeckillRepository;
|
||||
|
||||
@Autowired
|
||||
private YxStoreSeckillMapper yxStoreSeckillMapper;
|
||||
|
||||
@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());
|
||||
int nowTime = OrderUtil.getSecondTimestampTwo();
|
||||
for (YxStoreSeckillDTO storeSeckillDTO : storeSeckillDTOS){
|
||||
if(storeSeckillDTO.getStatus() > 0){
|
||||
if(storeSeckillDTO.getStartTime() > nowTime){
|
||||
storeSeckillDTO.setStatusStr("活动未开始");
|
||||
}else if(storeSeckillDTO.getStopTime() < nowTime){
|
||||
storeSeckillDTO.setStatusStr("活动已结束");
|
||||
}else if(storeSeckillDTO.getStopTime() > nowTime && storeSeckillDTO.getStartTime() < nowTime){
|
||||
storeSeckillDTO.setStatusStr("正在进行中");
|
||||
}
|
||||
}else {
|
||||
storeSeckillDTO.setStatusStr("关闭");
|
||||
}
|
||||
|
||||
}
|
||||
Map<String,Object> map = new LinkedHashMap<>(2);
|
||||
map.put("content",storeSeckillDTOS);
|
||||
map.put("totalElements",page.getTotalElements());
|
||||
|
||||
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());
|
||||
}
|
||||
|
||||
@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);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void delete(Integer id) {
|
||||
yxStoreSeckillRepository.deleteById(id);
|
||||
}
|
||||
package co.yixiang.modules.activity.service.impl;
|
||||
|
||||
import co.yixiang.modules.activity.domain.YxStoreSeckill;
|
||||
import co.yixiang.modules.activity.repository.YxStoreSeckillRepository;
|
||||
import co.yixiang.modules.activity.service.YxStoreSeckillService;
|
||||
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.beans.factory.annotation.Autowired;
|
||||
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 java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
|
||||
/**
|
||||
* @author xuwenbo
|
||||
* @date 2019-12-14
|
||||
*/
|
||||
@Service
|
||||
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class)
|
||||
public class YxStoreSeckillServiceImpl implements YxStoreSeckillService {
|
||||
|
||||
@Autowired
|
||||
private YxStoreSeckillRepository yxStoreSeckillRepository;
|
||||
|
||||
@Autowired
|
||||
private YxStoreSeckillMapper yxStoreSeckillMapper;
|
||||
|
||||
@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());
|
||||
int nowTime = OrderUtil.getSecondTimestampTwo();
|
||||
for (YxStoreSeckillDTO storeSeckillDTO : storeSeckillDTOS){
|
||||
if(storeSeckillDTO.getStatus() > 0){
|
||||
if(storeSeckillDTO.getStartTime() > nowTime){
|
||||
storeSeckillDTO.setStatusStr("活动未开始");
|
||||
}else if(storeSeckillDTO.getStopTime() < nowTime){
|
||||
storeSeckillDTO.setStatusStr("活动已结束");
|
||||
}else if(storeSeckillDTO.getStopTime() > nowTime && storeSeckillDTO.getStartTime() < nowTime){
|
||||
storeSeckillDTO.setStatusStr("正在进行中");
|
||||
}
|
||||
}else {
|
||||
storeSeckillDTO.setStatusStr("关闭");
|
||||
}
|
||||
|
||||
}
|
||||
Map<String,Object> map = new LinkedHashMap<>(2);
|
||||
map.put("content",storeSeckillDTOS);
|
||||
map.put("totalElements",page.getTotalElements());
|
||||
|
||||
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());
|
||||
}
|
||||
|
||||
@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);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void delete(Integer id) {
|
||||
yxStoreSeckillRepository.deleteById(id);
|
||||
}
|
||||
}
|
@ -1,23 +1,24 @@
|
||||
package co.yixiang.modules.activity.service.impl;
|
||||
|
||||
import co.yixiang.modules.activity.domain.YxStoreVisit;
|
||||
import co.yixiang.utils.ValidationUtil;
|
||||
import co.yixiang.modules.activity.repository.YxStoreVisitRepository;
|
||||
import co.yixiang.modules.activity.service.YxStoreVisitService;
|
||||
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.beans.factory.annotation.Autowired;
|
||||
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.Optional;
|
||||
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;
|
||||
|
||||
/**
|
||||
* @author hupeng
|
||||
|
@ -1,23 +1,24 @@
|
||||
package co.yixiang.modules.activity.service.impl;
|
||||
|
||||
import co.yixiang.modules.activity.domain.YxUserExtract;
|
||||
import co.yixiang.utils.ValidationUtil;
|
||||
import co.yixiang.modules.activity.repository.YxUserExtractRepository;
|
||||
import co.yixiang.modules.activity.service.YxUserExtractService;
|
||||
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.beans.factory.annotation.Autowired;
|
||||
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.Optional;
|
||||
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;
|
||||
|
||||
/**
|
||||
* @author hupeng
|
||||
|
@ -1,16 +1,16 @@
|
||||
package co.yixiang.modules.activity.service.mapper;
|
||||
|
||||
import co.yixiang.mapper.EntityMapper;
|
||||
import co.yixiang.modules.activity.domain.YxStoreSeckill;
|
||||
import co.yixiang.modules.activity.service.dto.YxStoreSeckillDTO;
|
||||
import org.mapstruct.Mapper;
|
||||
import org.mapstruct.ReportingPolicy;
|
||||
|
||||
/**
|
||||
* @author xuwenbo
|
||||
* @date 2019-12-14
|
||||
*/
|
||||
@Mapper(componentModel = "spring",uses = {},unmappedTargetPolicy = ReportingPolicy.IGNORE)
|
||||
public interface YxStoreSeckillMapper extends EntityMapper<YxStoreSeckillDTO, YxStoreSeckill> {
|
||||
|
||||
package co.yixiang.modules.activity.service.mapper;
|
||||
|
||||
import co.yixiang.mapper.EntityMapper;
|
||||
import co.yixiang.modules.activity.domain.YxStoreSeckill;
|
||||
import co.yixiang.modules.activity.service.dto.YxStoreSeckillDTO;
|
||||
import org.mapstruct.Mapper;
|
||||
import org.mapstruct.ReportingPolicy;
|
||||
|
||||
/**
|
||||
* @author xuwenbo
|
||||
* @date 2019-12-14
|
||||
*/
|
||||
@Mapper(componentModel = "spring",uses = {},unmappedTargetPolicy = ReportingPolicy.IGNORE)
|
||||
public interface YxStoreSeckillMapper extends EntityMapper<YxStoreSeckillDTO, YxStoreSeckill> {
|
||||
|
||||
}
|
@ -1,36 +1,36 @@
|
||||
package co.yixiang.modules.shop.domain;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import javax.persistence.*;
|
||||
|
||||
/**
|
||||
* @ClassName StoreOrderCartInfo
|
||||
* @Author hupeng <610796224@qq.com>
|
||||
* @Date 2019/10/14
|
||||
**/
|
||||
|
||||
@Entity
|
||||
@Data
|
||||
@Table(name="yx_store_order_cart_info")
|
||||
public class StoreOrderCartInfo {
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
@Column(name = "id")
|
||||
private Integer id;
|
||||
|
||||
@Column(name = "oid")
|
||||
private Integer oid;
|
||||
|
||||
@Column(name = "cart_id")
|
||||
private Integer cartId;
|
||||
|
||||
@Column(name = "cart_info")
|
||||
private String cartInfo;
|
||||
|
||||
@Column(name = "unique")
|
||||
private String unique;
|
||||
|
||||
|
||||
}
|
||||
package co.yixiang.modules.shop.domain;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import javax.persistence.*;
|
||||
|
||||
/**
|
||||
* @ClassName StoreOrderCartInfo
|
||||
* @Author hupeng <610796224@qq.com>
|
||||
* @Date 2019/10/14
|
||||
**/
|
||||
|
||||
@Entity
|
||||
@Data
|
||||
@Table(name="yx_store_order_cart_info")
|
||||
public class StoreOrderCartInfo {
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
@Column(name = "id")
|
||||
private Integer id;
|
||||
|
||||
@Column(name = "oid")
|
||||
private Integer oid;
|
||||
|
||||
@Column(name = "cart_id")
|
||||
private Integer cartId;
|
||||
|
||||
@Column(name = "cart_info")
|
||||
private String cartInfo;
|
||||
|
||||
@Column(name = "unique")
|
||||
private String unique;
|
||||
|
||||
|
||||
}
|
||||
|
@ -1,8 +1,9 @@
|
||||
package co.yixiang.modules.shop.domain;
|
||||
|
||||
import lombok.Data;
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.bean.copier.CopyOptions;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.persistence.*;
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
@ -1,8 +1,9 @@
|
||||
package co.yixiang.modules.shop.domain;
|
||||
|
||||
import lombok.Data;
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.bean.copier.CopyOptions;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.persistence.*;
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import java.io.Serializable;
|
||||
@ -37,7 +38,7 @@ public class YxStoreCategory implements Serializable {
|
||||
|
||||
// 图标
|
||||
@Column(name = "pic",nullable = false)
|
||||
@NotBlank(message = "请上传分类图片")
|
||||
//@NotBlank(message = "请上传分类图片")
|
||||
private String pic;
|
||||
|
||||
// 是否推荐
|
||||
|
@ -1,12 +1,12 @@
|
||||
package co.yixiang.modules.shop.domain;
|
||||
|
||||
import lombok.Data;
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.bean.copier.CopyOptions;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.persistence.*;
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import java.math.BigDecimal;
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* @author hupeng
|
||||
|
@ -1,8 +1,9 @@
|
||||
package co.yixiang.modules.shop.domain;
|
||||
|
||||
import lombok.Data;
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.bean.copier.CopyOptions;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.persistence.*;
|
||||
import java.io.Serializable;
|
||||
|
||||
|
@ -1,14 +1,15 @@
|
||||
package co.yixiang.modules.shop.domain;
|
||||
|
||||
import lombok.Data;
|
||||
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.math.BigDecimal;
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* @author hupeng
|
||||
|
@ -1,8 +1,9 @@
|
||||
package co.yixiang.modules.shop.domain;
|
||||
|
||||
import lombok.Data;
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.bean.copier.CopyOptions;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.persistence.*;
|
||||
import java.io.Serializable;
|
||||
|
||||
|
@ -1,8 +1,9 @@
|
||||
package co.yixiang.modules.shop.domain;
|
||||
|
||||
import lombok.Data;
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.bean.copier.CopyOptions;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.persistence.*;
|
||||
import java.io.Serializable;
|
||||
|
||||
|
@ -1,11 +1,12 @@
|
||||
package co.yixiang.modules.shop.domain;
|
||||
|
||||
import lombok.Data;
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.bean.copier.CopyOptions;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.persistence.*;
|
||||
import java.math.BigDecimal;
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* @author hupeng
|
||||
|
@ -1,8 +1,9 @@
|
||||
package co.yixiang.modules.shop.domain;
|
||||
|
||||
import lombok.Data;
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.bean.copier.CopyOptions;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.persistence.*;
|
||||
import java.io.Serializable;
|
||||
|
||||
|
@ -1,8 +1,9 @@
|
||||
package co.yixiang.modules.shop.domain;
|
||||
|
||||
import lombok.Data;
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.bean.copier.CopyOptions;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.persistence.*;
|
||||
import java.io.Serializable;
|
||||
|
||||
|
@ -1,13 +1,14 @@
|
||||
package co.yixiang.modules.shop.domain;
|
||||
|
||||
import lombok.Data;
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.bean.copier.CopyOptions;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.persistence.*;
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.math.BigDecimal;
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* @author hupeng
|
||||
|
@ -1,8 +1,9 @@
|
||||
package co.yixiang.modules.shop.domain;
|
||||
|
||||
import lombok.Data;
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.bean.copier.CopyOptions;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.persistence.*;
|
||||
import java.io.Serializable;
|
||||
|
||||
|
@ -1,11 +1,12 @@
|
||||
package co.yixiang.modules.shop.domain;
|
||||
|
||||
import lombok.Data;
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.bean.copier.CopyOptions;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.persistence.*;
|
||||
import java.math.BigDecimal;
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* @author hupeng
|
||||
|
@ -1,11 +1,12 @@
|
||||
package co.yixiang.modules.shop.domain;
|
||||
|
||||
import lombok.Data;
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.bean.copier.CopyOptions;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.persistence.*;
|
||||
import java.math.BigDecimal;
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* @author hupeng
|
||||
|
@ -19,7 +19,7 @@ public interface YxStoreOrderRepository extends JpaRepository<YxStoreOrder, Inte
|
||||
int countByPayTimeGreaterThanEqual(int time);
|
||||
|
||||
//昨天
|
||||
int countByPayTimeLessThanAndPayTimeGreaterThanEqual(int timeO,int timeT);
|
||||
int countByPayTimeLessThanAndPayTimeGreaterThanEqual(int timeO, int timeT);
|
||||
|
||||
@Query(value = "select IFNULL(sum(pay_price),0) from yx_store_order " +
|
||||
"where refund_status=0 and is_del=0 and paid=1 and pay_time >= ?1",nativeQuery = true)
|
||||
@ -27,7 +27,7 @@ public interface YxStoreOrderRepository extends JpaRepository<YxStoreOrder, Inte
|
||||
|
||||
@Query(value = "select IFNULL(sum(pay_price),0) from yx_store_order " +
|
||||
"where refund_status=0 and is_del=0 and paid=1 and pay_time >= ?1 and pay_time < ?2",nativeQuery = true)
|
||||
double sumTPrice(Integer timeO,Integer timeT);
|
||||
double sumTPrice(Integer timeO, Integer timeT);
|
||||
|
||||
@Query(value = "SELECT IFNULL(sum(pay_price),0) as num," +
|
||||
"FROM_UNIXTIME(add_time, '%m-%d') as time " +
|
||||
|
@ -13,9 +13,9 @@ import org.springframework.data.jpa.repository.Query;
|
||||
public interface YxStoreProductRepository extends JpaRepository<YxStoreProduct, Integer>, JpaSpecificationExecutor {
|
||||
@Modifying
|
||||
@Query(value = "update yx_store_product set is_show = ?1 where id = ?2",nativeQuery = true)
|
||||
void updateOnsale(int status,int id);
|
||||
void updateOnsale(int status, int id);
|
||||
|
||||
@Modifying
|
||||
@Query(value = "update yx_store_product set is_del = ?1 where id = ?2",nativeQuery = true)
|
||||
void updateDel(int status,int id);
|
||||
void updateDel(int status, int id);
|
||||
}
|
@ -1,7 +1,6 @@
|
||||
package co.yixiang.modules.shop.repository;
|
||||
|
||||
import co.yixiang.modules.shop.domain.YxUserBill;
|
||||
import co.yixiang.modules.shop.service.dto.UserBillDTO;
|
||||
import org.springframework.data.domain.Page;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import org.springframework.data.jpa.repository.JpaRepository;
|
||||
@ -24,6 +23,6 @@ public interface YxUserBillRepository extends JpaRepository<YxUserBill, Integer>
|
||||
" where if(?1 !='',b.category=?1,1=1) and if(?2 !='',b.type=?2,1=1) " +
|
||||
"and if(?3 !='',u.nickname LIKE CONCAT('%',?3,'%'),1=1)")
|
||||
Page<Map> findAllByPageable(String category, String type, String nickname,
|
||||
Pageable pageable);
|
||||
Pageable pageable);
|
||||
|
||||
}
|
@ -14,15 +14,15 @@ public interface YxUserRepository extends JpaRepository<YxUser, Integer>, JpaSpe
|
||||
|
||||
@Modifying
|
||||
@Query(value = "update yx_user set status = ?1 where uid = ?2",nativeQuery = true)
|
||||
void updateOnstatus(int status,int id);
|
||||
void updateOnstatus(int status, int id);
|
||||
|
||||
@Modifying
|
||||
@Query(value = "update yx_user set now_money = now_money + ?1 where uid = ?2",nativeQuery = true)
|
||||
void updateMoney(double money,int id);
|
||||
void updateMoney(double money, int id);
|
||||
|
||||
@Modifying
|
||||
@Query(value = "update yx_user set brokerage_price = brokerage_price+?1 where uid = ?2",nativeQuery = true)
|
||||
void incBrokeragePrice(double price,int id);
|
||||
void incBrokeragePrice(double price, int id);
|
||||
|
||||
|
||||
|
||||
|
@ -29,7 +29,7 @@ public class YxExpressController {
|
||||
@Log("查询快递")
|
||||
@ApiOperation(value = "查询快递")
|
||||
@GetMapping(value = "/yxExpress")
|
||||
@PreAuthorize("hasAnyRole('ADMIN','YXEXPRESS_ALL','YXEXPRESS_SELECT')")
|
||||
@PreAuthorize("@el.check('admin','YXEXPRESS_ALL','YXEXPRESS_SELECT')")
|
||||
public ResponseEntity getYxExpresss(YxExpressQueryCriteria criteria, Pageable pageable){
|
||||
return new ResponseEntity(yxExpressService.queryAll(criteria,pageable),HttpStatus.OK);
|
||||
}
|
||||
@ -37,7 +37,7 @@ public class YxExpressController {
|
||||
@Log("新增快递")
|
||||
@ApiOperation(value = "新增快递")
|
||||
@PostMapping(value = "/yxExpress")
|
||||
@PreAuthorize("hasAnyRole('ADMIN','YXEXPRESS_ALL','YXEXPRESS_CREATE')")
|
||||
@PreAuthorize("@el.check('admin','YXEXPRESS_ALL','YXEXPRESS_CREATE')")
|
||||
public ResponseEntity create(@Validated @RequestBody YxExpress resources){
|
||||
//if(StrUtil.isNotEmpty("22")) throw new BadRequestException("演示环境禁止操作");
|
||||
return new ResponseEntity(yxExpressService.create(resources),HttpStatus.CREATED);
|
||||
@ -46,7 +46,7 @@ public class YxExpressController {
|
||||
@Log("修改快递")
|
||||
@ApiOperation(value = "修改快递")
|
||||
@PutMapping(value = "/yxExpress")
|
||||
@PreAuthorize("hasAnyRole('ADMIN','YXEXPRESS_ALL','YXEXPRESS_EDIT')")
|
||||
@PreAuthorize("@el.check('admin','YXEXPRESS_ALL','YXEXPRESS_EDIT')")
|
||||
public ResponseEntity update(@Validated @RequestBody YxExpress resources){
|
||||
//if(StrUtil.isNotEmpty("22")) throw new BadRequestException("演示环境禁止操作");
|
||||
yxExpressService.update(resources);
|
||||
@ -56,7 +56,7 @@ public class YxExpressController {
|
||||
@Log("删除快递")
|
||||
@ApiOperation(value = "删除快递")
|
||||
@DeleteMapping(value = "/yxExpress/{id}")
|
||||
@PreAuthorize("hasAnyRole('ADMIN','YXEXPRESS_ALL','YXEXPRESS_DELETE')")
|
||||
@PreAuthorize("@el.check('admin','YXEXPRESS_ALL','YXEXPRESS_DELETE')")
|
||||
public ResponseEntity delete(@PathVariable Integer id){
|
||||
//if(StrUtil.isNotEmpty("22")) throw new BadRequestException("演示环境禁止操作");
|
||||
yxExpressService.delete(id);
|
||||
|
@ -18,6 +18,8 @@ import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@ -32,10 +34,22 @@ public class YxStoreCategoryController {
|
||||
@Autowired
|
||||
private YxStoreCategoryService yxStoreCategoryService;
|
||||
|
||||
|
||||
|
||||
|
||||
@Log("导出数据")
|
||||
@ApiOperation("导出数据")
|
||||
@GetMapping(value = "/yxStoreCategory/download")
|
||||
@PreAuthorize("@el.check('admin','cate:list')")
|
||||
public void download(HttpServletResponse response, YxStoreCategoryQueryCriteria criteria) throws IOException {
|
||||
yxStoreCategoryService.download(yxStoreCategoryService.queryAll(criteria), response);
|
||||
}
|
||||
|
||||
|
||||
@Log("查询商品分类")
|
||||
@ApiOperation(value = "查询商品分类")
|
||||
@GetMapping(value = "/yxStoreCategory")
|
||||
@PreAuthorize("hasAnyRole('ADMIN','YXSTORECATEGORY_ALL','YXSTORECATEGORY_SELECT')")
|
||||
@PreAuthorize("@el.check('admin','YXSTORECATEGORY_ALL','YXSTORECATEGORY_SELECT')")
|
||||
public ResponseEntity getYxStoreCategorys(YxStoreCategoryQueryCriteria criteria, Pageable pageable){
|
||||
|
||||
|
||||
@ -46,9 +60,12 @@ public class YxStoreCategoryController {
|
||||
@Log("新增商品分类")
|
||||
@ApiOperation(value = "新增商品分类")
|
||||
@PostMapping(value = "/yxStoreCategory")
|
||||
@PreAuthorize("hasAnyRole('ADMIN','YXSTORECATEGORY_ALL','YXSTORECATEGORY_CREATE')")
|
||||
@PreAuthorize("@el.check('admin','YXSTORECATEGORY_ALL','YXSTORECATEGORY_CREATE')")
|
||||
public ResponseEntity create(@Validated @RequestBody YxStoreCategory resources){
|
||||
//if(StrUtil.isNotEmpty("22")) throw new BadRequestException("演示环境禁止操作");
|
||||
if(resources.getPid() > 0 && StrUtil.isBlank(resources.getPic())) {
|
||||
throw new BadRequestException("子分类图片必传");
|
||||
}
|
||||
resources.setAddTime(OrderUtil.getSecondTimestampTwo());
|
||||
return new ResponseEntity(yxStoreCategoryService.create(resources),HttpStatus.CREATED);
|
||||
}
|
||||
@ -56,9 +73,12 @@ public class YxStoreCategoryController {
|
||||
@Log("修改商品分类")
|
||||
@ApiOperation(value = "修改商品分类")
|
||||
@PutMapping(value = "/yxStoreCategory")
|
||||
@PreAuthorize("hasAnyRole('ADMIN','YXSTORECATEGORY_ALL','YXSTORECATEGORY_EDIT')")
|
||||
@PreAuthorize("@el.check('admin','YXSTORECATEGORY_ALL','YXSTORECATEGORY_EDIT')")
|
||||
public ResponseEntity update(@Validated @RequestBody YxStoreCategory resources){
|
||||
//if(StrUtil.isNotEmpty("22")) throw new BadRequestException("演示环境禁止操作");
|
||||
if(resources.getPid() > 0 && StrUtil.isBlank(resources.getPic())) {
|
||||
throw new BadRequestException("子分类图片必传");
|
||||
}
|
||||
yxStoreCategoryService.update(resources);
|
||||
return new ResponseEntity(HttpStatus.NO_CONTENT);
|
||||
}
|
||||
@ -66,7 +86,7 @@ public class YxStoreCategoryController {
|
||||
@Log("删除商品分类")
|
||||
@ApiOperation(value = "删除商品分类")
|
||||
@DeleteMapping(value = "/yxStoreCategory/{id}")
|
||||
@PreAuthorize("hasAnyRole('ADMIN','YXSTORECATEGORY_ALL','YXSTORECATEGORY_DELETE')")
|
||||
@PreAuthorize("@el.check('admin','YXSTORECATEGORY_ALL','YXSTORECATEGORY_DELETE')")
|
||||
public ResponseEntity delete(@PathVariable Integer id){
|
||||
//if(StrUtil.isNotEmpty("22")) throw new BadRequestException("演示环境禁止操作");
|
||||
yxStoreCategoryService.delete(id);
|
||||
|
@ -2,12 +2,12 @@ package co.yixiang.modules.shop.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.shop.domain.YxStoreOrder;
|
||||
import co.yixiang.modules.shop.domain.YxStoreOrderStatus;
|
||||
import co.yixiang.modules.shop.service.YxExpressService;
|
||||
import co.yixiang.modules.shop.service.YxStoreOrderService;
|
||||
import co.yixiang.aop.log.Log;
|
||||
import co.yixiang.modules.shop.service.YxStoreOrderStatusService;
|
||||
import co.yixiang.modules.shop.service.dto.YxExpressDTO;
|
||||
import co.yixiang.modules.shop.service.dto.YxStoreOrderQueryCriteria;
|
||||
@ -18,6 +18,8 @@ import co.yixiang.mp.service.WxMpTemplateMessageService;
|
||||
import co.yixiang.mp.service.YxWechatTemplateService;
|
||||
import co.yixiang.utils.OrderUtil;
|
||||
import co.yixiang.utils.RedisUtil;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import org.springframework.http.HttpStatus;
|
||||
@ -25,7 +27,6 @@ import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import io.swagger.annotations.*;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
@ -59,13 +60,13 @@ public class YxStoreOrderController {
|
||||
|
||||
|
||||
@GetMapping(value = "/data/count")
|
||||
//@PreAuthorize("hasAnyRole('ADMIN','YXSTOREORDER_ALL','YXSTOREORDER_SELECT')")
|
||||
//@PreAuthorize("@el.check('admin','YXSTOREORDER_ALL','YXSTOREORDER_SELECT')")
|
||||
public ResponseEntity getCount(){
|
||||
return new ResponseEntity(yxStoreOrderService.getOrderTimeData(),HttpStatus.OK);
|
||||
}
|
||||
|
||||
@GetMapping(value = "/data/chart")
|
||||
//@PreAuthorize("hasAnyRole('ADMIN','YXSTOREORDER_ALL','YXSTOREORDER_SELECT')")
|
||||
//@PreAuthorize("@el.check('admin','YXSTOREORDER_ALL','YXSTOREORDER_SELECT')")
|
||||
public ResponseEntity getChart(){
|
||||
return new ResponseEntity(yxStoreOrderService.chartCount(),HttpStatus.OK);
|
||||
}
|
||||
@ -74,7 +75,7 @@ public class YxStoreOrderController {
|
||||
|
||||
@ApiOperation(value = "查询订单")
|
||||
@GetMapping(value = "/yxStoreOrder")
|
||||
@PreAuthorize("hasAnyRole('ADMIN','YXSTOREORDER_ALL','YXSTOREORDER_SELECT')")
|
||||
@PreAuthorize("@el.check('admin','YXSTOREORDER_ALL','YXSTOREORDER_SELECT')")
|
||||
public ResponseEntity getYxStoreOrders(YxStoreOrderQueryCriteria criteria,
|
||||
Pageable pageable,
|
||||
@RequestParam(name = "orderStatus") String orderStatus){
|
||||
@ -136,7 +137,7 @@ public class YxStoreOrderController {
|
||||
|
||||
@ApiOperation(value = "发货")
|
||||
@PutMapping(value = "/yxStoreOrder")
|
||||
@PreAuthorize("hasAnyRole('ADMIN','YXSTOREORDER_ALL','YXSTOREORDER_EDIT')")
|
||||
@PreAuthorize("@el.check('admin','YXSTOREORDER_ALL','YXSTOREORDER_EDIT')")
|
||||
public ResponseEntity update(@Validated @RequestBody YxStoreOrder resources){
|
||||
if(StrUtil.isBlank(resources.getDeliveryName())) throw new BadRequestException("请选择快递公司");
|
||||
if(StrUtil.isBlank(resources.getDeliveryId())) throw new BadRequestException("快递单号不能为空");
|
||||
@ -184,7 +185,7 @@ public class YxStoreOrderController {
|
||||
|
||||
@ApiOperation(value = "退款")
|
||||
@PostMapping(value = "/yxStoreOrder/refund")
|
||||
@PreAuthorize("hasAnyRole('ADMIN','YXSTOREORDER_ALL','YXSTOREORDER_EDIT')")
|
||||
@PreAuthorize("@el.check('admin','YXSTOREORDER_ALL','YXSTOREORDER_EDIT')")
|
||||
public ResponseEntity refund(@Validated @RequestBody YxStoreOrder resources){
|
||||
yxStoreOrderService.refund(resources);
|
||||
|
||||
@ -198,7 +199,7 @@ public class YxStoreOrderController {
|
||||
map.put("first","您在yshop的订单退款申请被通过,钱款将很快还至您的支付账户。");
|
||||
map.put("keyword1",resources.getOrderId());//订单号
|
||||
map.put("keyword2",resources.getPayPrice().toString());
|
||||
map.put("keyword3",OrderUtil.stampToDate(resources.getAddTime().toString()));
|
||||
map.put("keyword3", OrderUtil.stampToDate(resources.getAddTime().toString()));
|
||||
map.put("remark","yshop电商系统为你服务!");
|
||||
templateMessageService.sendWxMpTemplateMessage( wechatUser.getOpenid()
|
||||
,WechatTemplate.getTempid(),
|
||||
@ -212,41 +213,10 @@ public class YxStoreOrderController {
|
||||
@Log("删除")
|
||||
@ApiOperation(value = "删除")
|
||||
@DeleteMapping(value = "/yxStoreOrder/{id}")
|
||||
@PreAuthorize("hasAnyRole('ADMIN','YXSTOREORDER_ALL','YXSTOREORDER_DELETE')")
|
||||
@PreAuthorize("@el.check('admin','YXSTOREORDER_ALL','YXSTOREORDER_DELETE')")
|
||||
public ResponseEntity delete(@PathVariable Integer id){
|
||||
//if(StrUtil.isNotEmpty("22")) throw new BadRequestException("演示环境禁止操作");
|
||||
yxStoreOrderService.delete(id);
|
||||
return new ResponseEntity(HttpStatus.OK);
|
||||
}
|
||||
|
||||
@Log("修改订单")
|
||||
@ApiOperation(value = "修改订单")
|
||||
@PostMapping(value = "/yxStoreOrder/edit")
|
||||
@PreAuthorize("hasAnyRole('ADMIN','YXSTOREORDER_ALL','YXSTOREORDER_EDIT')")
|
||||
public ResponseEntity editOrder(@RequestBody YxStoreOrder resources){
|
||||
if(ObjectUtil.isNull(resources.getPayPrice())) throw new BadRequestException("请输入支付金额");
|
||||
if(resources.getPayPrice().doubleValue() < 0) throw new BadRequestException("金额不能低于0");
|
||||
yxStoreOrderService.update(resources);
|
||||
|
||||
YxStoreOrderStatus storeOrderStatus = new YxStoreOrderStatus();
|
||||
storeOrderStatus.setOid(resources.getId());
|
||||
storeOrderStatus.setChangeType("order_edit");
|
||||
storeOrderStatus.setChangeMessage("修改订单价格为:"+resources.getPayPrice());
|
||||
storeOrderStatus.setChangeTime(OrderUtil.getSecondTimestampTwo());
|
||||
|
||||
yxStoreOrderStatusService.create(storeOrderStatus);
|
||||
return new ResponseEntity(HttpStatus.OK);
|
||||
}
|
||||
|
||||
@Log("修改订单备注")
|
||||
@ApiOperation(value = "修改订单备注")
|
||||
@PostMapping(value = "/yxStoreOrder/remark")
|
||||
@PreAuthorize("hasAnyRole('ADMIN','YXSTOREORDER_ALL','YXSTOREORDER_EDIT')")
|
||||
public ResponseEntity editOrderRemark(@RequestBody YxStoreOrder resources){
|
||||
if(StrUtil.isBlank(resources.getRemark())) throw new BadRequestException("请输入备注");
|
||||
yxStoreOrderService.update(resources);
|
||||
return new ResponseEntity(HttpStatus.OK);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
@ -37,7 +37,7 @@ public class YxStoreProductController {
|
||||
@Log("查询商品")
|
||||
@ApiOperation(value = "查询商品")
|
||||
@GetMapping(value = "/yxStoreProduct")
|
||||
@PreAuthorize("hasAnyRole('ADMIN','YXSTOREPRODUCT_ALL','YXSTOREPRODUCT_SELECT')")
|
||||
@PreAuthorize("@el.check('admin','YXSTOREPRODUCT_ALL','YXSTOREPRODUCT_SELECT')")
|
||||
public ResponseEntity getYxStoreProducts(YxStoreProductQueryCriteria criteria, Pageable pageable){
|
||||
return new ResponseEntity(yxStoreProductService.queryAll(criteria,pageable),HttpStatus.OK);
|
||||
}
|
||||
@ -45,7 +45,7 @@ public class YxStoreProductController {
|
||||
@Log("新增商品")
|
||||
@ApiOperation(value = "新增商品")
|
||||
@PostMapping(value = "/yxStoreProduct")
|
||||
@PreAuthorize("hasAnyRole('ADMIN','YXSTOREPRODUCT_ALL','YXSTOREPRODUCT_CREATE')")
|
||||
@PreAuthorize("@el.check('admin','YXSTOREPRODUCT_ALL','YXSTOREPRODUCT_CREATE')")
|
||||
public ResponseEntity create(@Validated @RequestBody YxStoreProduct resources){
|
||||
//if(StrUtil.isNotEmpty("22")) throw new BadRequestException("演示环境禁止操作");
|
||||
resources.setAddTime(OrderUtil.getSecondTimestampTwo());
|
||||
@ -57,7 +57,7 @@ public class YxStoreProductController {
|
||||
@Log("修改商品")
|
||||
@ApiOperation(value = "修改商品")
|
||||
@PutMapping(value = "/yxStoreProduct")
|
||||
@PreAuthorize("hasAnyRole('ADMIN','YXSTOREPRODUCT_ALL','YXSTOREPRODUCT_EDIT')")
|
||||
@PreAuthorize("@el.check('admin','YXSTOREPRODUCT_ALL','YXSTOREPRODUCT_EDIT')")
|
||||
public ResponseEntity update(@Validated @RequestBody YxStoreProduct resources){
|
||||
//if(StrUtil.isNotEmpty("22")) throw new BadRequestException("演示环境禁止操作");
|
||||
yxStoreProductService.update(resources);
|
||||
@ -67,7 +67,7 @@ public class YxStoreProductController {
|
||||
@Log("删除商品")
|
||||
@ApiOperation(value = "删除商品")
|
||||
@DeleteMapping(value = "/yxStoreProduct/{id}")
|
||||
@PreAuthorize("hasAnyRole('ADMIN','YXSTOREPRODUCT_ALL','YXSTOREPRODUCT_DELETE')")
|
||||
@PreAuthorize("@el.check('admin','YXSTOREPRODUCT_ALL','YXSTOREPRODUCT_DELETE')")
|
||||
public ResponseEntity delete(@PathVariable Integer id){
|
||||
//if(StrUtil.isNotEmpty("22")) throw new BadRequestException("演示环境禁止操作");
|
||||
yxStoreProductService.delete(id);
|
||||
@ -76,7 +76,7 @@ public class YxStoreProductController {
|
||||
|
||||
@ApiOperation(value = "恢复数据")
|
||||
@DeleteMapping(value = "/yxStoreProduct/recovery/{id}")
|
||||
@PreAuthorize("hasAnyRole('ADMIN','YXSTOREPRODUCT_ALL','YXSTOREPRODUCT_DELETE')")
|
||||
@PreAuthorize("@el.check('admin','YXSTOREPRODUCT_ALL','YXSTOREPRODUCT_DELETE')")
|
||||
public ResponseEntity recovery(@PathVariable Integer id){
|
||||
yxStoreProductService.recovery(id);
|
||||
return new ResponseEntity(HttpStatus.OK);
|
||||
|
@ -1,9 +1,13 @@
|
||||
package co.yixiang.modules.shop.rest;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import co.yixiang.aop.log.Log;
|
||||
import co.yixiang.exception.BadRequestException;
|
||||
import co.yixiang.modules.shop.domain.YxStoreProductReply;
|
||||
import co.yixiang.modules.shop.service.YxStoreProductReplyService;
|
||||
import co.yixiang.modules.shop.service.dto.YxStoreProductReplyQueryCriteria;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import org.springframework.http.HttpStatus;
|
||||
@ -11,7 +15,6 @@ import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import io.swagger.annotations.*;
|
||||
|
||||
/**
|
||||
* @author hupeng
|
||||
@ -28,7 +31,7 @@ public class YxStoreProductReplyController {
|
||||
@Log("查询")
|
||||
@ApiOperation(value = "查询")
|
||||
@GetMapping(value = "/yxStoreProductReply")
|
||||
@PreAuthorize("hasAnyRole('ADMIN','YXSTOREPRODUCTREPLY_ALL','YXSTOREPRODUCTREPLY_SELECT')")
|
||||
@PreAuthorize("@el.check('admin','YXSTOREPRODUCTREPLY_ALL','YXSTOREPRODUCTREPLY_SELECT')")
|
||||
public ResponseEntity getYxStoreProductReplys(YxStoreProductReplyQueryCriteria criteria, Pageable pageable){
|
||||
criteria.setIsDel(0);
|
||||
return new ResponseEntity(yxStoreProductReplyService.queryAll(criteria,pageable),HttpStatus.OK);
|
||||
@ -39,7 +42,7 @@ public class YxStoreProductReplyController {
|
||||
@Log("修改")
|
||||
@ApiOperation(value = "修改")
|
||||
@PutMapping(value = "/yxStoreProductReply")
|
||||
@PreAuthorize("hasAnyRole('ADMIN','YXSTOREPRODUCTREPLY_ALL','YXSTOREPRODUCTREPLY_EDIT')")
|
||||
@PreAuthorize("@el.check('admin','YXSTOREPRODUCTREPLY_ALL','YXSTOREPRODUCTREPLY_EDIT')")
|
||||
public ResponseEntity update(@Validated @RequestBody YxStoreProductReply resources){
|
||||
yxStoreProductReplyService.update(resources);
|
||||
return new ResponseEntity(HttpStatus.NO_CONTENT);
|
||||
@ -48,8 +51,9 @@ public class YxStoreProductReplyController {
|
||||
@Log("删除")
|
||||
@ApiOperation(value = "删除")
|
||||
@DeleteMapping(value = "/yxStoreProductReply/{id}")
|
||||
@PreAuthorize("hasAnyRole('ADMIN','YXSTOREPRODUCTREPLY_ALL','YXSTOREPRODUCTREPLY_DELETE')")
|
||||
@PreAuthorize("@el.check('admin','YXSTOREPRODUCTREPLY_ALL','YXSTOREPRODUCTREPLY_DELETE')")
|
||||
public ResponseEntity delete(@PathVariable Integer id){
|
||||
//if(StrUtil.isNotEmpty("22")) throw new BadRequestException("演示环境禁止操作");
|
||||
YxStoreProductReply reply = new YxStoreProductReply();
|
||||
reply.setIsDel(1);
|
||||
reply.setId(id);
|
||||
|
@ -34,7 +34,7 @@ public class YxSystemGroupDataController {
|
||||
@Log("查询数据配置")
|
||||
@ApiOperation(value = "查询数据配置")
|
||||
@GetMapping(value = "/yxSystemGroupData")
|
||||
@PreAuthorize("hasAnyRole('ADMIN','YXSYSTEMGROUPDATA_ALL','YXSYSTEMGROUPDATA_SELECT')")
|
||||
@PreAuthorize("@el.check('admin','YXSYSTEMGROUPDATA_ALL','YXSYSTEMGROUPDATA_SELECT')")
|
||||
public ResponseEntity getYxSystemGroupDatas(YxSystemGroupDataQueryCriteria criteria, Pageable pageable){
|
||||
|
||||
return new ResponseEntity(yxSystemGroupDataService.queryAll(criteria,pageable),HttpStatus.OK);
|
||||
@ -43,7 +43,7 @@ public class YxSystemGroupDataController {
|
||||
@Log("新增数据配置")
|
||||
@ApiOperation(value = "新增数据配置")
|
||||
@PostMapping(value = "/yxSystemGroupData")
|
||||
@PreAuthorize("hasAnyRole('ADMIN','YXSYSTEMGROUPDATA_ALL','YXSYSTEMGROUPDATA_CREATE')")
|
||||
@PreAuthorize("@el.check('admin','YXSYSTEMGROUPDATA_ALL','YXSYSTEMGROUPDATA_CREATE')")
|
||||
public ResponseEntity create(@RequestBody String jsonStr){
|
||||
//if(StrUtil.isNotEmpty("22")) throw new BadRequestException("演示环境禁止操作");
|
||||
JSONObject jsonObject = JSON.parseObject(jsonStr);
|
||||
@ -86,7 +86,7 @@ public class YxSystemGroupDataController {
|
||||
@Log("修改数据配置")
|
||||
@ApiOperation(value = "修改数据配置")
|
||||
@PutMapping(value = "/yxSystemGroupData")
|
||||
@PreAuthorize("hasAnyRole('ADMIN','YXSYSTEMGROUPDATA_ALL','YXSYSTEMGROUPDATA_EDIT')")
|
||||
@PreAuthorize("@el.check('admin','YXSYSTEMGROUPDATA_ALL','YXSYSTEMGROUPDATA_EDIT')")
|
||||
public ResponseEntity update(@RequestBody String jsonStr){
|
||||
//if(StrUtil.isNotEmpty("22")) throw new BadRequestException("演示环境禁止操作");
|
||||
JSONObject jsonObject = JSON.parseObject(jsonStr);
|
||||
@ -121,7 +121,7 @@ public class YxSystemGroupDataController {
|
||||
@Log("删除数据配置")
|
||||
@ApiOperation(value = "删除数据配置")
|
||||
@DeleteMapping(value = "/yxSystemGroupData/{id}")
|
||||
@PreAuthorize("hasAnyRole('ADMIN','YXSYSTEMGROUPDATA_ALL','YXSYSTEMGROUPDATA_DELETE')")
|
||||
@PreAuthorize("@el.check('admin','YXSYSTEMGROUPDATA_ALL','YXSYSTEMGROUPDATA_DELETE')")
|
||||
public ResponseEntity delete(@PathVariable Integer id){
|
||||
//if(StrUtil.isNotEmpty("22")) throw new BadRequestException("演示环境禁止操作");
|
||||
yxSystemGroupDataService.delete(id);
|
||||
|
@ -32,7 +32,7 @@ public class YxSystemUserLevelController {
|
||||
@Log("查询")
|
||||
@ApiOperation(value = "查询")
|
||||
@GetMapping(value = "/yxSystemUserLevel")
|
||||
@PreAuthorize("hasAnyRole('ADMIN','YXSYSTEMUSERLEVEL_ALL','YXSYSTEMUSERLEVEL_SELECT')")
|
||||
@PreAuthorize("@el.check('admin','YXSYSTEMUSERLEVEL_ALL','YXSYSTEMUSERLEVEL_SELECT')")
|
||||
public ResponseEntity getYxSystemUserLevels(YxSystemUserLevelQueryCriteria criteria, Pageable pageable){
|
||||
return new ResponseEntity(yxSystemUserLevelService.queryAll(criteria,pageable),HttpStatus.OK);
|
||||
}
|
||||
@ -40,7 +40,7 @@ public class YxSystemUserLevelController {
|
||||
@Log("新增")
|
||||
@ApiOperation(value = "新增")
|
||||
@PostMapping(value = "/yxSystemUserLevel")
|
||||
@PreAuthorize("hasAnyRole('ADMIN','YXSYSTEMUSERLEVEL_ALL','YXSYSTEMUSERLEVEL_CREATE')")
|
||||
@PreAuthorize("@el.check('admin','YXSYSTEMUSERLEVEL_ALL','YXSYSTEMUSERLEVEL_CREATE')")
|
||||
public ResponseEntity create(@Validated @RequestBody YxSystemUserLevel resources){
|
||||
//if(StrUtil.isNotEmpty("22")) throw new BadRequestException("演示环境禁止操作");
|
||||
resources.setAddTime(OrderUtil.getSecondTimestampTwo());
|
||||
@ -50,7 +50,7 @@ public class YxSystemUserLevelController {
|
||||
@Log("修改")
|
||||
@ApiOperation(value = "修改")
|
||||
@PutMapping(value = "/yxSystemUserLevel")
|
||||
@PreAuthorize("hasAnyRole('ADMIN','YXSYSTEMUSERLEVEL_ALL','YXSYSTEMUSERLEVEL_EDIT')")
|
||||
@PreAuthorize("@el.check('admin','YXSYSTEMUSERLEVEL_ALL','YXSYSTEMUSERLEVEL_EDIT')")
|
||||
public ResponseEntity update(@Validated @RequestBody YxSystemUserLevel resources){
|
||||
//if(StrUtil.isNotEmpty("22")) throw new BadRequestException("演示环境禁止操作");
|
||||
yxSystemUserLevelService.update(resources);
|
||||
@ -60,7 +60,7 @@ public class YxSystemUserLevelController {
|
||||
@Log("删除")
|
||||
@ApiOperation(value = "删除")
|
||||
@DeleteMapping(value = "/yxSystemUserLevel/{id}")
|
||||
@PreAuthorize("hasAnyRole('ADMIN','YXSYSTEMUSERLEVEL_ALL','YXSYSTEMUSERLEVEL_DELETE')")
|
||||
@PreAuthorize("@el.check('admin','YXSYSTEMUSERLEVEL_ALL','YXSYSTEMUSERLEVEL_DELETE')")
|
||||
public ResponseEntity delete(@PathVariable Integer id){
|
||||
//if(StrUtil.isNotEmpty("22")) throw new BadRequestException("演示环境禁止操作");
|
||||
yxSystemUserLevelService.delete(id);
|
||||
|
@ -33,7 +33,7 @@ public class YxSystemUserTaskController {
|
||||
@Log("查询")
|
||||
@ApiOperation(value = "查询")
|
||||
@GetMapping(value = "/yxSystemUserTask")
|
||||
@PreAuthorize("hasAnyRole('ADMIN','YXSYSTEMUSERTASK_ALL','YXSYSTEMUSERTASK_SELECT')")
|
||||
@PreAuthorize("@el.check('admin','YXSYSTEMUSERTASK_ALL','YXSYSTEMUSERTASK_SELECT')")
|
||||
public ResponseEntity getYxSystemUserTasks(YxSystemUserTaskQueryCriteria criteria,
|
||||
Pageable pageable){
|
||||
Sort sort = new Sort(Sort.Direction.ASC, "levelId");
|
||||
@ -47,7 +47,7 @@ public class YxSystemUserTaskController {
|
||||
@Log("新增")
|
||||
@ApiOperation(value = "新增")
|
||||
@PostMapping(value = "/yxSystemUserTask")
|
||||
@PreAuthorize("hasAnyRole('ADMIN','YXSYSTEMUSERTASK_ALL','YXSYSTEMUSERTASK_CREATE')")
|
||||
@PreAuthorize("@el.check('admin','YXSYSTEMUSERTASK_ALL','YXSYSTEMUSERTASK_CREATE')")
|
||||
public ResponseEntity create(@Validated @RequestBody YxSystemUserTask resources){
|
||||
return new ResponseEntity(yxSystemUserTaskService.create(resources),HttpStatus.CREATED);
|
||||
}
|
||||
@ -55,7 +55,7 @@ public class YxSystemUserTaskController {
|
||||
@Log("修改")
|
||||
@ApiOperation(value = "修改")
|
||||
@PutMapping(value = "/yxSystemUserTask")
|
||||
@PreAuthorize("hasAnyRole('ADMIN','YXSYSTEMUSERTASK_ALL','YXSYSTEMUSERTASK_EDIT')")
|
||||
@PreAuthorize("@el.check('admin','YXSYSTEMUSERTASK_ALL','YXSYSTEMUSERTASK_EDIT')")
|
||||
public ResponseEntity update(@Validated @RequestBody YxSystemUserTask resources){
|
||||
//if(StrUtil.isNotEmpty("22")) throw new BadRequestException("演示环境禁止操作");
|
||||
yxSystemUserTaskService.update(resources);
|
||||
@ -65,7 +65,7 @@ public class YxSystemUserTaskController {
|
||||
@Log("删除")
|
||||
@ApiOperation(value = "删除")
|
||||
@DeleteMapping(value = "/yxSystemUserTask/{id}")
|
||||
@PreAuthorize("hasAnyRole('ADMIN','YXSYSTEMUSERTASK_ALL','YXSYSTEMUSERTASK_DELETE')")
|
||||
@PreAuthorize("@el.check('admin','YXSYSTEMUSERTASK_ALL','YXSYSTEMUSERTASK_DELETE')")
|
||||
public ResponseEntity delete(@PathVariable Integer id){
|
||||
//if(StrUtil.isNotEmpty("22")) throw new BadRequestException("演示环境禁止操作");
|
||||
yxSystemUserTaskService.delete(id);
|
||||
|
@ -29,7 +29,7 @@ public class YxUserBillController {
|
||||
@Log("查询")
|
||||
@ApiOperation(value = "查询")
|
||||
@GetMapping(value = "/yxUserBill")
|
||||
@PreAuthorize("hasAnyRole('ADMIN','YXUSERBILL_ALL','YXUSERBILL_SELECT')")
|
||||
@PreAuthorize("@el.check('admin','YXUSERBILL_ALL','YXUSERBILL_SELECT')")
|
||||
public ResponseEntity getYxUserBills(YxUserBillQueryCriteria criteria, Pageable pageable){
|
||||
return new ResponseEntity(yxUserBillService.queryAll(criteria,pageable),HttpStatus.OK);
|
||||
}
|
||||
|
@ -1,7 +1,9 @@
|
||||
package co.yixiang.modules.shop.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.shop.domain.YxUser;
|
||||
import co.yixiang.modules.shop.service.YxUserService;
|
||||
import co.yixiang.modules.shop.service.dto.UserMoneyDTO;
|
||||
@ -37,7 +39,7 @@ public class YxUserController {
|
||||
@Log("查询用户")
|
||||
@ApiOperation(value = "查询用户")
|
||||
@GetMapping(value = "/yxUser")
|
||||
@PreAuthorize("hasAnyRole('ADMIN','YXUSER_ALL','YXUSER_SELECT')")
|
||||
@PreAuthorize("@el.check('admin','YXUSER_ALL','YXUSER_SELECT')")
|
||||
public ResponseEntity getYxUsers(YxUserQueryCriteria criteria, Pageable pageable){
|
||||
if(ObjectUtil.isNotNull(criteria.getIsPromoter())){
|
||||
if(criteria.getIsPromoter() == 1){
|
||||
@ -54,7 +56,7 @@ public class YxUserController {
|
||||
@Log("新增用户")
|
||||
@ApiOperation(value = "新增用户")
|
||||
@PostMapping(value = "/yxUser")
|
||||
@PreAuthorize("hasAnyRole('ADMIN','YXUSER_ALL','YXUSER_CREATE')")
|
||||
@PreAuthorize("@el.check('admin','YXUSER_ALL','YXUSER_CREATE')")
|
||||
public ResponseEntity create(@Validated @RequestBody YxUser resources){
|
||||
return new ResponseEntity(yxUserService.create(resources),HttpStatus.CREATED);
|
||||
}
|
||||
@ -62,7 +64,7 @@ public class YxUserController {
|
||||
@Log("修改用户")
|
||||
@ApiOperation(value = "修改用户")
|
||||
@PutMapping(value = "/yxUser")
|
||||
@PreAuthorize("hasAnyRole('ADMIN','YXUSER_ALL','YXUSER_EDIT')")
|
||||
@PreAuthorize("@el.check('admin','YXUSER_ALL','YXUSER_EDIT')")
|
||||
public ResponseEntity update(@Validated @RequestBody YxUser resources){
|
||||
yxUserService.update(resources);
|
||||
return new ResponseEntity(HttpStatus.NO_CONTENT);
|
||||
@ -71,8 +73,9 @@ public class YxUserController {
|
||||
@Log("删除用户")
|
||||
@ApiOperation(value = "删除用户")
|
||||
@DeleteMapping(value = "/yxUser/{uid}")
|
||||
@PreAuthorize("hasAnyRole('ADMIN','YXUSER_ALL','YXUSER_DELETE')")
|
||||
@PreAuthorize("@el.check('admin','YXUSER_ALL','YXUSER_DELETE')")
|
||||
public ResponseEntity delete(@PathVariable Integer uid){
|
||||
//if(StrUtil.isNotEmpty("22")) throw new BadRequestException("演示环境禁止操作");
|
||||
yxUserService.delete(uid);
|
||||
return new ResponseEntity(HttpStatus.OK);
|
||||
}
|
||||
@ -80,6 +83,7 @@ public class YxUserController {
|
||||
@ApiOperation(value = "用户禁用启用")
|
||||
@PostMapping(value = "/yxUser/onStatus/{id}")
|
||||
public ResponseEntity onStatus(@PathVariable Integer id,@RequestBody String jsonStr){
|
||||
//if(StrUtil.isNotEmpty("22")) throw new BadRequestException("演示环境禁止操作");
|
||||
JSONObject jsonObject = JSON.parseObject(jsonStr);
|
||||
int status = Integer.valueOf(jsonObject.get("status").toString());
|
||||
//System.out.println(status);
|
||||
@ -89,7 +93,7 @@ public class YxUserController {
|
||||
|
||||
@ApiOperation(value = "修改余额")
|
||||
@PostMapping(value = "/yxUser/money")
|
||||
@PreAuthorize("hasAnyRole('ADMIN','YXUSER_ALL','YXUSER_EDIT')")
|
||||
@PreAuthorize("@el.check('admin','YXUSER_ALL','YXUSER_EDIT')")
|
||||
public ResponseEntity updatePrice(@Validated @RequestBody UserMoneyDTO param){
|
||||
|
||||
yxUserService.updateMoney(param);
|
||||
|
@ -4,8 +4,11 @@ import co.yixiang.modules.shop.domain.YxStoreCategory;
|
||||
import co.yixiang.modules.shop.service.dto.YxStoreCategoryDTO;
|
||||
import co.yixiang.modules.shop.service.dto.YxStoreCategoryQueryCriteria;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author hupeng
|
||||
@ -14,6 +17,15 @@ import java.util.List;
|
||||
//@CacheConfig(cacheNames = "yxStoreCategory")
|
||||
public interface YxStoreCategoryService {
|
||||
|
||||
/**
|
||||
* 导出数据
|
||||
* @param queryAll 待导出的数据
|
||||
* @param response /
|
||||
* @throws IOException /
|
||||
*/
|
||||
void download(List<YxStoreCategoryDTO> queryAll, HttpServletResponse response) throws IOException;
|
||||
|
||||
|
||||
/**
|
||||
* 查询数据分页
|
||||
* @param criteria
|
||||
|
@ -5,8 +5,9 @@ import co.yixiang.modules.shop.service.dto.OrderTimeDataDTO;
|
||||
import co.yixiang.modules.shop.service.dto.YxStoreOrderDTO;
|
||||
import co.yixiang.modules.shop.service.dto.YxStoreOrderQueryCriteria;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import java.util.Map;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author hupeng
|
||||
@ -18,7 +19,7 @@ public interface YxStoreOrderService {
|
||||
|
||||
Map<String,Object> chartCount();
|
||||
|
||||
String orderType(int id,int pinkId,int combinationId,int seckillId);
|
||||
String orderType(int id, int pinkId, int combinationId, int seckillId);
|
||||
|
||||
void refund(YxStoreOrder resources);
|
||||
|
||||
|
@ -5,8 +5,9 @@ import co.yixiang.modules.shop.service.dto.ProductFormatDTO;
|
||||
import co.yixiang.modules.shop.service.dto.YxStoreProductDTO;
|
||||
import co.yixiang.modules.shop.service.dto.YxStoreProductQueryCriteria;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import java.util.Map;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author hupeng
|
||||
@ -64,15 +65,15 @@ public interface YxStoreProductService {
|
||||
|
||||
void recovery(Integer id);
|
||||
|
||||
void onSale(Integer id,Integer status);
|
||||
void onSale(Integer id, Integer status);
|
||||
|
||||
List<ProductFormatDTO> isFormatAttr(Integer id, String jsonStr);
|
||||
|
||||
void createProductAttr(Integer id, String jsonStr);
|
||||
|
||||
void setResult(Map<String,Object> map,Integer id);
|
||||
void setResult(Map<String, Object> map, Integer id);
|
||||
|
||||
void clearProductAttr(Integer id,boolean isActice);
|
||||
void clearProductAttr(Integer id, boolean isActice);
|
||||
|
||||
String getStoreProductAttrResult(Integer id);
|
||||
}
|
@ -5,8 +5,9 @@ import co.yixiang.modules.shop.service.dto.UserMoneyDTO;
|
||||
import co.yixiang.modules.shop.service.dto.YxUserDTO;
|
||||
import co.yixiang.modules.shop.service.dto.YxUserQueryCriteria;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import java.util.Map;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author hupeng
|
||||
@ -66,5 +67,5 @@ public interface YxUserService {
|
||||
|
||||
void onStatus(Integer uid, Integer status);
|
||||
|
||||
void incBrokeragePrice(double price,int uid);
|
||||
void incBrokeragePrice(double price, int uid);
|
||||
}
|
@ -1,19 +1,14 @@
|
||||
package co.yixiang.modules.shop.service.dto;
|
||||
|
||||
import lombok.Data;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @ClassName ChartDataDTO
|
||||
* @Author hupeng <610796224@qq.com>
|
||||
* @Date 2019/11/25
|
||||
**/
|
||||
//@Data
|
||||
public interface ChartDataDTO{
|
||||
|
||||
// @Value("#{target.adminCount}")
|
||||
Double getNum();
|
||||
String getTime();
|
||||
}
|
||||
package co.yixiang.modules.shop.service.dto;
|
||||
|
||||
/**
|
||||
* @ClassName ChartDataDTO
|
||||
* @Author hupeng <610796224@qq.com>
|
||||
* @Date 2019/11/25
|
||||
**/
|
||||
//@Data
|
||||
public interface ChartDataDTO{
|
||||
|
||||
// @Value("#{target.adminCount}")
|
||||
Double getNum();
|
||||
String getTime();
|
||||
}
|
||||
|
@ -1,20 +1,20 @@
|
||||
package co.yixiang.modules.shop.service.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @ClassName DetailDTO
|
||||
* @Author hupeng <610796224@qq.com>
|
||||
* @Date 2019/10/12
|
||||
**/
|
||||
@Data
|
||||
public class DetailDTO {
|
||||
private List<String> data;
|
||||
|
||||
//private List<Map<String,List<Map<String,String>>>> res;
|
||||
|
||||
private List<Map<String,Map<String,String>>> res;
|
||||
}
|
||||
package co.yixiang.modules.shop.service.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @ClassName DetailDTO
|
||||
* @Author hupeng <610796224@qq.com>
|
||||
* @Date 2019/10/12
|
||||
**/
|
||||
@Data
|
||||
public class DetailDTO {
|
||||
private List<String> data;
|
||||
|
||||
//private List<Map<String,List<Map<String,String>>>> res;
|
||||
|
||||
private List<Map<String,Map<String,String>>> res;
|
||||
}
|
||||
|
@ -1,23 +1,23 @@
|
||||
package co.yixiang.modules.shop.service.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @ClassName FromatDetailDTO
|
||||
* @Author hupeng <610796224@qq.com>
|
||||
* @Date 2019/10/12
|
||||
**/
|
||||
|
||||
@Data
|
||||
public class FromatDetailDTO {
|
||||
private boolean attrHidden;
|
||||
|
||||
private String detailValue;
|
||||
|
||||
private List<String> detail;
|
||||
|
||||
private String value;
|
||||
|
||||
}
|
||||
package co.yixiang.modules.shop.service.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @ClassName FromatDetailDTO
|
||||
* @Author hupeng <610796224@qq.com>
|
||||
* @Date 2019/10/12
|
||||
**/
|
||||
|
||||
@Data
|
||||
public class FromatDetailDTO {
|
||||
private boolean attrHidden;
|
||||
|
||||
private String detailValue;
|
||||
|
||||
private List<String> detail;
|
||||
|
||||
private String value;
|
||||
|
||||
}
|
||||
|
@ -1,23 +1,23 @@
|
||||
package co.yixiang.modules.shop.service.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @ClassName OrderTimeDataDTO
|
||||
* @Author hupeng <610796224@qq.com>
|
||||
* @Date 2019/11/25
|
||||
**/
|
||||
@Data
|
||||
public class OrderTimeDataDTO implements Serializable {
|
||||
private Double todayPrice; //今日成交额
|
||||
private Integer todayCount; //今日订单数
|
||||
private Double proPrice; //昨日成交额
|
||||
private Integer proCount;//昨日订单数
|
||||
private Double monthPrice;//本月成交额
|
||||
private Integer monthCount;//本月订单数
|
||||
|
||||
private Integer lastWeekCount;//上周
|
||||
private Double lastWeekPrice; //上周
|
||||
}
|
||||
package co.yixiang.modules.shop.service.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @ClassName OrderTimeDataDTO
|
||||
* @Author hupeng <610796224@qq.com>
|
||||
* @Date 2019/11/25
|
||||
**/
|
||||
@Data
|
||||
public class OrderTimeDataDTO implements Serializable {
|
||||
private Double todayPrice; //今日成交额
|
||||
private Integer todayCount; //今日订单数
|
||||
private Double proPrice; //昨日成交额
|
||||
private Integer proCount;//昨日订单数
|
||||
private Double monthPrice;//本月成交额
|
||||
private Integer monthCount;//本月订单数
|
||||
|
||||
private Integer lastWeekCount;//上周
|
||||
private Double lastWeekPrice; //上周
|
||||
}
|
||||
|
@ -1,33 +1,31 @@
|
||||
package co.yixiang.modules.shop.service.dto;
|
||||
|
||||
import lombok.Data;
|
||||
import org.omg.CORBA.PRIVATE_MEMBER;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @ClassName ProductFormatDTO
|
||||
* @Author hupeng <610796224@qq.com>
|
||||
* @Date 2019/10/12
|
||||
**/
|
||||
|
||||
@Data
|
||||
public class ProductFormatDTO {
|
||||
|
||||
private Double price;
|
||||
|
||||
private Double cost;
|
||||
|
||||
private int sales;
|
||||
|
||||
private String pic;
|
||||
|
||||
// private Map<String, List<Map<String,String>>> detail;
|
||||
|
||||
//private List<Map<String, String>> detail;
|
||||
private Map<String, String> detail;
|
||||
private Boolean check;
|
||||
|
||||
|
||||
}
|
||||
package co.yixiang.modules.shop.service.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @ClassName ProductFormatDTO
|
||||
* @Author hupeng <610796224@qq.com>
|
||||
* @Date 2019/10/12
|
||||
**/
|
||||
|
||||
@Data
|
||||
public class ProductFormatDTO {
|
||||
|
||||
private Double price;
|
||||
|
||||
private Double cost;
|
||||
|
||||
private int sales;
|
||||
|
||||
private String pic;
|
||||
|
||||
// private Map<String, List<Map<String,String>>> detail;
|
||||
|
||||
//private List<Map<String, String>> detail;
|
||||
private Map<String, String> detail;
|
||||
private Boolean check;
|
||||
|
||||
|
||||
}
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user