初始化提交
This commit is contained in:
		
							
								
								
									
										31
									
								
								tulingmall-common/.gitignore
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										31
									
								
								tulingmall-common/.gitignore
									
									
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,31 @@
 | 
			
		||||
HELP.md
 | 
			
		||||
target/
 | 
			
		||||
!.mvn/wrapper/maven-wrapper.jar
 | 
			
		||||
!**/src/main/**
 | 
			
		||||
!**/src/test/**
 | 
			
		||||
 | 
			
		||||
### STS ###
 | 
			
		||||
.apt_generated
 | 
			
		||||
.classpath
 | 
			
		||||
.factorypath
 | 
			
		||||
.project
 | 
			
		||||
.settings
 | 
			
		||||
.springBeans
 | 
			
		||||
.sts4-cache
 | 
			
		||||
 | 
			
		||||
### IntelliJ IDEA ###
 | 
			
		||||
.idea
 | 
			
		||||
*.iws
 | 
			
		||||
*.iml
 | 
			
		||||
*.ipr
 | 
			
		||||
 | 
			
		||||
### NetBeans ###
 | 
			
		||||
/nbproject/private/
 | 
			
		||||
/nbbuild/
 | 
			
		||||
/dist/
 | 
			
		||||
/nbdist/
 | 
			
		||||
/.nb-gradle/
 | 
			
		||||
build/
 | 
			
		||||
 | 
			
		||||
### VS Code ###
 | 
			
		||||
.vscode/
 | 
			
		||||
							
								
								
									
										66
									
								
								tulingmall-common/pom.xml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										66
									
								
								tulingmall-common/pom.xml
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,66 @@
 | 
			
		||||
<?xml version="1.0" encoding="UTF-8"?>
 | 
			
		||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
 | 
			
		||||
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 | 
			
		||||
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
 | 
			
		||||
    <modelVersion>4.0.0</modelVersion>
 | 
			
		||||
    <artifactId>tulingmall-common</artifactId>
 | 
			
		||||
    <packaging>jar</packaging>
 | 
			
		||||
 | 
			
		||||
    <name>tulingmall-common</name>
 | 
			
		||||
    <description>图灵商城通用工程</description>
 | 
			
		||||
 | 
			
		||||
    <parent>
 | 
			
		||||
        <groupId>com.tuling</groupId>
 | 
			
		||||
        <artifactId>tuling-mall</artifactId>
 | 
			
		||||
        <version>0.0.5</version>
 | 
			
		||||
    </parent>
 | 
			
		||||
 | 
			
		||||
    <properties>
 | 
			
		||||
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
 | 
			
		||||
    </properties>
 | 
			
		||||
 | 
			
		||||
    <dependencies>
 | 
			
		||||
        <dependency>
 | 
			
		||||
            <groupId>com.github.pagehelper</groupId>
 | 
			
		||||
            <artifactId>pagehelper-spring-boot-starter</artifactId>
 | 
			
		||||
        </dependency>
 | 
			
		||||
        <dependency>
 | 
			
		||||
            <groupId>com.alibaba</groupId>
 | 
			
		||||
            <artifactId>druid-spring-boot-starter</artifactId>
 | 
			
		||||
        </dependency>
 | 
			
		||||
        <dependency>
 | 
			
		||||
            <groupId>io.springfox</groupId>
 | 
			
		||||
            <artifactId>springfox-swagger2</artifactId>
 | 
			
		||||
        </dependency>
 | 
			
		||||
        <dependency>
 | 
			
		||||
            <groupId>io.springfox</groupId>
 | 
			
		||||
            <artifactId>springfox-swagger-ui</artifactId>
 | 
			
		||||
        </dependency>
 | 
			
		||||
        <dependency>
 | 
			
		||||
            <groupId>org.springframework.data</groupId>
 | 
			
		||||
            <artifactId>spring-data-commons</artifactId>
 | 
			
		||||
        </dependency>
 | 
			
		||||
        <dependency>
 | 
			
		||||
            <groupId>cn.hutool</groupId>
 | 
			
		||||
            <artifactId>hutool-all</artifactId>
 | 
			
		||||
        </dependency>
 | 
			
		||||
        <dependency>
 | 
			
		||||
            <groupId>org.projectlombok</groupId>
 | 
			
		||||
            <artifactId>lombok</artifactId>
 | 
			
		||||
        </dependency>
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    </dependencies>
 | 
			
		||||
 | 
			
		||||
    <build>
 | 
			
		||||
        <plugins>
 | 
			
		||||
            <plugin>
 | 
			
		||||
                <groupId>org.apache.maven.plugins</groupId>
 | 
			
		||||
                <artifactId>maven-jar-plugin</artifactId>
 | 
			
		||||
                <version>2.4</version>
 | 
			
		||||
            </plugin>
 | 
			
		||||
        </plugins>
 | 
			
		||||
    </build>
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
</project>
 | 
			
		||||
@@ -0,0 +1,85 @@
 | 
			
		||||
package com.tuling.tulingmall.common.api;
 | 
			
		||||
 | 
			
		||||
import com.github.pagehelper.PageInfo;
 | 
			
		||||
import org.springframework.data.domain.Page;
 | 
			
		||||
 | 
			
		||||
import java.util.List;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 分页数据封装类
 | 
			
		||||
 * Created by macro on 2019/4/19.
 | 
			
		||||
 */
 | 
			
		||||
public class CommonPage<T> {
 | 
			
		||||
    private Integer pageNum;
 | 
			
		||||
    private Integer pageSize;
 | 
			
		||||
    private Integer totalPage;
 | 
			
		||||
    private Long total;
 | 
			
		||||
    private List<T> list;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 将PageHelper分页后的list转为分页信息
 | 
			
		||||
     */
 | 
			
		||||
    public static <T> CommonPage<T> restPage(List<T> list) {
 | 
			
		||||
        CommonPage<T> result = new CommonPage<T>();
 | 
			
		||||
        PageInfo<T> pageInfo = new PageInfo<T>(list);
 | 
			
		||||
        result.setTotalPage(pageInfo.getPages());
 | 
			
		||||
        result.setPageNum(pageInfo.getPageNum());
 | 
			
		||||
        result.setPageSize(pageInfo.getPageSize());
 | 
			
		||||
        result.setTotal(pageInfo.getTotal());
 | 
			
		||||
        result.setList(pageInfo.getList());
 | 
			
		||||
        return result;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 将SpringData分页后的list转为分页信息
 | 
			
		||||
     */
 | 
			
		||||
    public static <T> CommonPage<T> restPage(Page<T> pageInfo) {
 | 
			
		||||
        CommonPage<T> result = new CommonPage<T>();
 | 
			
		||||
        result.setTotalPage(pageInfo.getTotalPages());
 | 
			
		||||
        result.setPageNum(pageInfo.getNumber());
 | 
			
		||||
        result.setPageSize(pageInfo.getSize());
 | 
			
		||||
        result.setTotal(pageInfo.getTotalElements());
 | 
			
		||||
        result.setList(pageInfo.getContent());
 | 
			
		||||
        return result;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public Integer getPageNum() {
 | 
			
		||||
        return pageNum;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public void setPageNum(Integer pageNum) {
 | 
			
		||||
        this.pageNum = pageNum;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public Integer getPageSize() {
 | 
			
		||||
        return pageSize;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public void setPageSize(Integer pageSize) {
 | 
			
		||||
        this.pageSize = pageSize;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public Integer getTotalPage() {
 | 
			
		||||
        return totalPage;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public void setTotalPage(Integer totalPage) {
 | 
			
		||||
        this.totalPage = totalPage;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public List<T> getList() {
 | 
			
		||||
        return list;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public void setList(List<T> list) {
 | 
			
		||||
        this.list = list;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public Long getTotal() {
 | 
			
		||||
        return total;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public void setTotal(Long total) {
 | 
			
		||||
        this.total = total;
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
@@ -0,0 +1,131 @@
 | 
			
		||||
package com.tuling.tulingmall.common.api;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 通用返回对象
 | 
			
		||||
 * Created by macro on 2019/4/19.
 | 
			
		||||
 */
 | 
			
		||||
public class CommonResult<T> {
 | 
			
		||||
    private long code;
 | 
			
		||||
    private String message;
 | 
			
		||||
    private T data;
 | 
			
		||||
 | 
			
		||||
    protected CommonResult() {
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    protected CommonResult(long code, String message, T data) {
 | 
			
		||||
        this.code = code;
 | 
			
		||||
        this.message = message;
 | 
			
		||||
        this.data = data;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 成功返回结果
 | 
			
		||||
     *
 | 
			
		||||
     * @param data 获取的数据
 | 
			
		||||
     */
 | 
			
		||||
    public static <T> CommonResult<T> success(T data) {
 | 
			
		||||
        return new CommonResult<T>(ResultCode.SUCCESS.getCode(), ResultCode.SUCCESS.getMessage(), data);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 成功返回结果
 | 
			
		||||
     *
 | 
			
		||||
     * @param data 获取的数据
 | 
			
		||||
     * @param  message 提示信息
 | 
			
		||||
     */
 | 
			
		||||
    public static <T> CommonResult<T> success(T data, String message) {
 | 
			
		||||
        return new CommonResult<T>(ResultCode.SUCCESS.getCode(), message, data);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 失败返回结果
 | 
			
		||||
     * @param errorCode 错误码
 | 
			
		||||
     */
 | 
			
		||||
    public static <T> CommonResult<T> failed(IErrorCode errorCode) {
 | 
			
		||||
        return new CommonResult<T>(errorCode.getCode(), errorCode.getMessage(), null);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public static <T> CommonResult<T> doing() {
 | 
			
		||||
        return new CommonResult<T>(ResultCode.ACCEPTED.getCode(), ResultCode.ACCEPTED.getMessage(), null);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 失败返回结果
 | 
			
		||||
     * @param message 提示信息
 | 
			
		||||
     */
 | 
			
		||||
    public static <T> CommonResult<T> failed(String message) {
 | 
			
		||||
        return new CommonResult<T>(ResultCode.FAILED.getCode(), message, null);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 失败返回结果
 | 
			
		||||
     * @param message 提示信息
 | 
			
		||||
     */
 | 
			
		||||
    public static <T> CommonResult<T> failed(long code,String message) {
 | 
			
		||||
        return new CommonResult<T>(code, message, null);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public static <T> CommonResult<T> failed(T data,String message) {
 | 
			
		||||
        return new CommonResult<T>(ResultCode.FAILED.getCode(), message, data);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 失败返回结果
 | 
			
		||||
     */
 | 
			
		||||
    public static <T> CommonResult<T> failed() {
 | 
			
		||||
        return failed(ResultCode.FAILED);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 参数验证失败返回结果
 | 
			
		||||
     */
 | 
			
		||||
    public static <T> CommonResult<T> validateFailed() {
 | 
			
		||||
        return failed(ResultCode.VALIDATE_FAILED);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 参数验证失败返回结果
 | 
			
		||||
     * @param message 提示信息
 | 
			
		||||
     */
 | 
			
		||||
    public static <T> CommonResult<T> validateFailed(String message) {
 | 
			
		||||
        return new CommonResult<T>(ResultCode.VALIDATE_FAILED.getCode(), message, null);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 未登录返回结果
 | 
			
		||||
     */
 | 
			
		||||
    public static <T> CommonResult<T> unauthorized(T data) {
 | 
			
		||||
        return new CommonResult<T>(ResultCode.UNAUTHORIZED.getCode(), ResultCode.UNAUTHORIZED.getMessage(), data);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 未授权返回结果
 | 
			
		||||
     */
 | 
			
		||||
    public static <T> CommonResult<T> forbidden(T data) {
 | 
			
		||||
        return new CommonResult<T>(ResultCode.FORBIDDEN.getCode(), ResultCode.FORBIDDEN.getMessage(), data);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public long getCode() {
 | 
			
		||||
        return code;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public void setCode(long code) {
 | 
			
		||||
        this.code = code;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public String getMessage() {
 | 
			
		||||
        return message;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public void setMessage(String message) {
 | 
			
		||||
        this.message = message;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public T getData() {
 | 
			
		||||
        return data;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public void setData(T data) {
 | 
			
		||||
        this.data = data;
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
@@ -0,0 +1,11 @@
 | 
			
		||||
package com.tuling.tulingmall.common.api;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 封装API的错误码
 | 
			
		||||
 * Created by macro on 2019/4/19.
 | 
			
		||||
 */
 | 
			
		||||
public interface IErrorCode {
 | 
			
		||||
    long getCode();
 | 
			
		||||
 | 
			
		||||
    String getMessage();
 | 
			
		||||
}
 | 
			
		||||
@@ -0,0 +1,37 @@
 | 
			
		||||
package com.tuling.tulingmall.common.api;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 枚举了一些常用API操作码
 | 
			
		||||
 * Created by macro on 2019/4/19.
 | 
			
		||||
 */
 | 
			
		||||
public enum ResultCode implements IErrorCode {
 | 
			
		||||
    SUCCESS(200, "操作成功"),
 | 
			
		||||
    FAILED(500, "操作失败"),
 | 
			
		||||
    ACCEPTED(202, "操作进行中"),
 | 
			
		||||
    VALIDATE_FAILED(404, "参数检验失败"),
 | 
			
		||||
    UNAUTHORIZED(401, "暂未登录或token已经过期"),
 | 
			
		||||
    AUTHORIZATION_HEADER_IS_EMPTY(600,"请求头中的token为空"),
 | 
			
		||||
    GET_TOKEN_KEY_ERROR(601,"远程获取TokenKey异常"),
 | 
			
		||||
    GEN_PUBLIC_KEY_ERROR(602,"生成公钥异常"),
 | 
			
		||||
    JWT_TOKEN_EXPIRE(603,"token校验异常"),
 | 
			
		||||
    TOMANY_REQUEST_ERROR(429,"后端服务触发流控"),
 | 
			
		||||
    BACKGROUD_DEGRADE_ERROR(604,"后端服务触发降级"),
 | 
			
		||||
    BAD_GATEWAY(502,"网关服务异常"),
 | 
			
		||||
    FORBIDDEN(403, "没有相关权限");
 | 
			
		||||
    private long code;
 | 
			
		||||
    private String message;
 | 
			
		||||
 | 
			
		||||
    private ResultCode(long code, String message) {
 | 
			
		||||
        this.code = code;
 | 
			
		||||
        this.message = message;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public long getCode() {
 | 
			
		||||
        return code;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public String getMessage() {
 | 
			
		||||
        return message;
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
@@ -0,0 +1,31 @@
 | 
			
		||||
/**
 | 
			
		||||
 * 
 | 
			
		||||
 */
 | 
			
		||||
package com.tuling.tulingmall.common.api;
 | 
			
		||||
 | 
			
		||||
import lombok.Data;
 | 
			
		||||
 | 
			
		||||
import java.util.Date;
 | 
			
		||||
import java.util.Map;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
* @vlog: 高于生活,源于生活
 | 
			
		||||
* @desc: 类的描述:认证服务器返回的TokenInfo的封装
 | 
			
		||||
* @author: smlz
 | 
			
		||||
* @createDate: 2020/1/22 15:06
 | 
			
		||||
* @version: 1.0
 | 
			
		||||
*/
 | 
			
		||||
@Data
 | 
			
		||||
public class TokenInfo {
 | 
			
		||||
 | 
			
		||||
	private String access_token;
 | 
			
		||||
 | 
			
		||||
	private String token_type;
 | 
			
		||||
 | 
			
		||||
	private String refresh_token;
 | 
			
		||||
	
 | 
			
		||||
	private String scope;
 | 
			
		||||
	
 | 
			
		||||
	private Map<String,String> additionalInfo;
 | 
			
		||||
 	
 | 
			
		||||
}
 | 
			
		||||
@@ -0,0 +1,49 @@
 | 
			
		||||
package com.tuling.tulingmall.common.constant;
 | 
			
		||||
 | 
			
		||||
public interface RedisKeyPrefixConst {
 | 
			
		||||
    /**
 | 
			
		||||
     * 产品详情内容缓存前缀
 | 
			
		||||
     */
 | 
			
		||||
    String PRODUCT_DETAIL_CACHE = "product:detail:cache:";
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 产品库存缓存
 | 
			
		||||
     */
 | 
			
		||||
    String MIAOSHA_STOCK_CACHE_PREFIX = "miaosha:stock:cache:";
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 已购买过商品的用户不能再次购买
 | 
			
		||||
     */
 | 
			
		||||
    String MEMBER_BUYED_MIAOSHA_PREFIX = "buyed:miaosha:";
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 秒杀用验证码限流
 | 
			
		||||
     */
 | 
			
		||||
    String MIAOSHA_VERIFY_CODE_PREFIX =  "miaosha:verifycode:";
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 秒杀token
 | 
			
		||||
     */
 | 
			
		||||
    String MIAOSHA_TOKEN_PREFIX = "miaosha:token:";
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 秒杀异步下单排队中
 | 
			
		||||
     * 0->排队中,-1->秒杀失败,>0 ->秒杀成功,对应的是订单编号
 | 
			
		||||
     */
 | 
			
		||||
    String MIAOSHA_ASYNC_WAITING_PREFIX = "miaosha:async:waiting:";
 | 
			
		||||
 | 
			
		||||
    /*当前正在进行的秒杀商品缓存hash - key*/
 | 
			
		||||
    String FLASH_PROMOTION_PRODUCT_KEY = "flash:promotion:hashtable";
 | 
			
		||||
 | 
			
		||||
    /*存储在redis的hashtable当中秒杀活动信息*/
 | 
			
		||||
    String ACTIVE_FLASH_PROMOTION_KEY = "flash:promotion:info";
 | 
			
		||||
 | 
			
		||||
    /*当库存减到0时,需要做一次库存同步,存在预减*/
 | 
			
		||||
    String STOCK_REFRESHED_MESSAGE_PREFIX = "stock:refreshed:message:";
 | 
			
		||||
 | 
			
		||||
    /*redis布隆过滤器key*/
 | 
			
		||||
    String PRODUCT_REDIS_BLOOM_FILTER = "product:redis:bloom:filter";
 | 
			
		||||
 | 
			
		||||
    String SECKILL_PRODUCT_PREFIX = "sk:prdt:";
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
@@ -0,0 +1,8 @@
 | 
			
		||||
package com.tuling.tulingmall.common.constant;
 | 
			
		||||
 | 
			
		||||
public class RedisMemberPrefix {
 | 
			
		||||
 | 
			
		||||
    public final static String MEMBER_INFO_PREFIX = "mmbr:info:";
 | 
			
		||||
    public final static String MEMBER_ADDRESS_PREFIX = "mmbr:addr:";
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
@@ -0,0 +1,28 @@
 | 
			
		||||
package com.tuling.tulingmall.common.exception;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * ,;,,;
 | 
			
		||||
 * ,;;'(    社
 | 
			
		||||
 * __      ,;;' ' \   会
 | 
			
		||||
 * /'  '\'~~'~' \ /'\.)  主
 | 
			
		||||
 * ,;(      )    /  |.     义
 | 
			
		||||
 * ,;' \    /-.,,(   ) \    码
 | 
			
		||||
 * ) /       ) / )|    农
 | 
			
		||||
 * ||        ||  \)
 | 
			
		||||
 * (_\       (_\
 | 
			
		||||
 *
 | 
			
		||||
 * @author :图灵学院
 | 
			
		||||
 * @date :Created in 2020/2/4
 | 
			
		||||
 * @version: V1.0
 | 
			
		||||
 * @slogan: 天下风云出我辈,一入代码岁月催
 | 
			
		||||
 * @description: 业务异常
 | 
			
		||||
 **/
 | 
			
		||||
public class BusinessException extends Exception {
 | 
			
		||||
 | 
			
		||||
    public BusinessException(){super();}
 | 
			
		||||
 | 
			
		||||
    public BusinessException(String message) {
 | 
			
		||||
        super(message);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
@@ -0,0 +1,25 @@
 | 
			
		||||
package com.tuling.tulingmall.common.exception;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
import com.tuling.tulingmall.common.api.IErrorCode;
 | 
			
		||||
import lombok.Data;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
* @vlog: 高于生活,源于生活
 | 
			
		||||
* @desc: 类的描述:网关异常类
 | 
			
		||||
* @author: smlz
 | 
			
		||||
* @createDate: 2020/1/22 10:52
 | 
			
		||||
* @version: 1.0
 | 
			
		||||
*/
 | 
			
		||||
@Data
 | 
			
		||||
public class GateWayException extends RuntimeException{
 | 
			
		||||
 | 
			
		||||
    private long code;
 | 
			
		||||
 | 
			
		||||
    private String message;
 | 
			
		||||
 | 
			
		||||
    public GateWayException(IErrorCode iErrorCode) {
 | 
			
		||||
        this.code = iErrorCode.getCode();
 | 
			
		||||
        this.message = iErrorCode.getMessage();
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
@@ -0,0 +1,514 @@
 | 
			
		||||
package com.tuling.tulingmall.model;
 | 
			
		||||
 | 
			
		||||
import io.swagger.annotations.ApiModelProperty;
 | 
			
		||||
 | 
			
		||||
import java.io.Serializable;
 | 
			
		||||
import java.math.BigDecimal;
 | 
			
		||||
import java.util.Date;
 | 
			
		||||
 | 
			
		||||
public class PmsProduct implements Serializable {
 | 
			
		||||
    private Long id;
 | 
			
		||||
 | 
			
		||||
    private Long brandId;
 | 
			
		||||
 | 
			
		||||
    private Long productCategoryId;
 | 
			
		||||
 | 
			
		||||
    private Long feightTemplateId;
 | 
			
		||||
 | 
			
		||||
    private Long productAttributeCategoryId;
 | 
			
		||||
 | 
			
		||||
    private String name;
 | 
			
		||||
 | 
			
		||||
    private String pic;
 | 
			
		||||
 | 
			
		||||
    @ApiModelProperty(value = "货号")
 | 
			
		||||
    private String productSn;
 | 
			
		||||
 | 
			
		||||
    @ApiModelProperty(value = "删除状态:0->未删除;1->已删除")
 | 
			
		||||
    private Integer deleteStatus;
 | 
			
		||||
 | 
			
		||||
    @ApiModelProperty(value = "上架状态:0->下架;1->上架")
 | 
			
		||||
    private Integer publishStatus;
 | 
			
		||||
 | 
			
		||||
    @ApiModelProperty(value = "新品状态:0->不是新品;1->新品")
 | 
			
		||||
    private Integer newStatus;
 | 
			
		||||
 | 
			
		||||
    @ApiModelProperty(value = "推荐状态;0->不推荐;1->推荐")
 | 
			
		||||
    private Integer recommandStatus;
 | 
			
		||||
 | 
			
		||||
    @ApiModelProperty(value = "审核状态:0->未审核;1->审核通过")
 | 
			
		||||
    private Integer verifyStatus;
 | 
			
		||||
 | 
			
		||||
    @ApiModelProperty(value = "排序")
 | 
			
		||||
    private Integer sort;
 | 
			
		||||
 | 
			
		||||
    @ApiModelProperty(value = "销量")
 | 
			
		||||
    private Integer sale;
 | 
			
		||||
 | 
			
		||||
    private BigDecimal price;
 | 
			
		||||
 | 
			
		||||
    @ApiModelProperty(value = "促销价格")
 | 
			
		||||
    private BigDecimal promotionPrice;
 | 
			
		||||
 | 
			
		||||
    @ApiModelProperty(value = "赠送的成长值")
 | 
			
		||||
    private Integer giftGrowth;
 | 
			
		||||
 | 
			
		||||
    @ApiModelProperty(value = "赠送的积分")
 | 
			
		||||
    private Integer giftPoint;
 | 
			
		||||
 | 
			
		||||
    @ApiModelProperty(value = "限制使用的积分数")
 | 
			
		||||
    private Integer usePointLimit;
 | 
			
		||||
 | 
			
		||||
    @ApiModelProperty(value = "副标题")
 | 
			
		||||
    private String subTitle;
 | 
			
		||||
 | 
			
		||||
    @ApiModelProperty(value = "市场价")
 | 
			
		||||
    private BigDecimal originalPrice;
 | 
			
		||||
 | 
			
		||||
    @ApiModelProperty(value = "库存")
 | 
			
		||||
    private Integer stock;
 | 
			
		||||
 | 
			
		||||
    @ApiModelProperty(value = "库存预警值")
 | 
			
		||||
    private Integer lowStock;
 | 
			
		||||
 | 
			
		||||
    @ApiModelProperty(value = "单位")
 | 
			
		||||
    private String unit;
 | 
			
		||||
 | 
			
		||||
    @ApiModelProperty(value = "商品重量,默认为克")
 | 
			
		||||
    private BigDecimal weight;
 | 
			
		||||
 | 
			
		||||
    @ApiModelProperty(value = "是否为预告商品:0->不是;1->是")
 | 
			
		||||
    private Integer previewStatus;
 | 
			
		||||
 | 
			
		||||
    @ApiModelProperty(value = "以逗号分割的产品服务:1->无忧退货;2->快速退款;3->免费包邮")
 | 
			
		||||
    private String serviceIds;
 | 
			
		||||
 | 
			
		||||
    private String keywords;
 | 
			
		||||
 | 
			
		||||
    private String note;
 | 
			
		||||
 | 
			
		||||
    @ApiModelProperty(value = "画册图片,连产品图片限制为5张,以逗号分割")
 | 
			
		||||
    private String albumPics;
 | 
			
		||||
 | 
			
		||||
    private String detailTitle;
 | 
			
		||||
 | 
			
		||||
    @ApiModelProperty(value = "促销开始时间")
 | 
			
		||||
    private Date promotionStartTime;
 | 
			
		||||
 | 
			
		||||
    @ApiModelProperty(value = "促销结束时间")
 | 
			
		||||
    private Date promotionEndTime;
 | 
			
		||||
 | 
			
		||||
    @ApiModelProperty(value = "活动限购数量")
 | 
			
		||||
    private Integer promotionPerLimit;
 | 
			
		||||
 | 
			
		||||
    @ApiModelProperty(value = "促销类型:0->没有促销使用原价;1->使用促销价;2->使用会员价;3->使用阶梯价格;4->使用满减价格;5->限时购")
 | 
			
		||||
    private Integer promotionType;
 | 
			
		||||
 | 
			
		||||
    @ApiModelProperty(value = "品牌名称")
 | 
			
		||||
    private String brandName;
 | 
			
		||||
 | 
			
		||||
    @ApiModelProperty(value = "商品分类名称")
 | 
			
		||||
    private String productCategoryName;
 | 
			
		||||
 | 
			
		||||
    @ApiModelProperty(value = "商品描述")
 | 
			
		||||
    private String description;
 | 
			
		||||
 | 
			
		||||
    private String detailDesc;
 | 
			
		||||
 | 
			
		||||
    @ApiModelProperty(value = "产品详情网页内容")
 | 
			
		||||
    private String detailHtml;
 | 
			
		||||
 | 
			
		||||
    @ApiModelProperty(value = "移动端网页详情")
 | 
			
		||||
    private String detailMobileHtml;
 | 
			
		||||
 | 
			
		||||
    private static final long serialVersionUID = 1L;
 | 
			
		||||
 | 
			
		||||
    public Long getId() {
 | 
			
		||||
        return id;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public void setId(Long id) {
 | 
			
		||||
        this.id = id;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public Long getBrandId() {
 | 
			
		||||
        return brandId;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public void setBrandId(Long brandId) {
 | 
			
		||||
        this.brandId = brandId;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public Long getProductCategoryId() {
 | 
			
		||||
        return productCategoryId;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public void setProductCategoryId(Long productCategoryId) {
 | 
			
		||||
        this.productCategoryId = productCategoryId;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public Long getFeightTemplateId() {
 | 
			
		||||
        return feightTemplateId;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public void setFeightTemplateId(Long feightTemplateId) {
 | 
			
		||||
        this.feightTemplateId = feightTemplateId;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public Long getProductAttributeCategoryId() {
 | 
			
		||||
        return productAttributeCategoryId;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public void setProductAttributeCategoryId(Long productAttributeCategoryId) {
 | 
			
		||||
        this.productAttributeCategoryId = productAttributeCategoryId;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public String getName() {
 | 
			
		||||
        return name;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public void setName(String name) {
 | 
			
		||||
        this.name = name;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public String getPic() {
 | 
			
		||||
        return pic;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public void setPic(String pic) {
 | 
			
		||||
        this.pic = pic;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public String getProductSn() {
 | 
			
		||||
        return productSn;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public void setProductSn(String productSn) {
 | 
			
		||||
        this.productSn = productSn;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public Integer getDeleteStatus() {
 | 
			
		||||
        return deleteStatus;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public void setDeleteStatus(Integer deleteStatus) {
 | 
			
		||||
        this.deleteStatus = deleteStatus;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public Integer getPublishStatus() {
 | 
			
		||||
        return publishStatus;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public void setPublishStatus(Integer publishStatus) {
 | 
			
		||||
        this.publishStatus = publishStatus;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public Integer getNewStatus() {
 | 
			
		||||
        return newStatus;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public void setNewStatus(Integer newStatus) {
 | 
			
		||||
        this.newStatus = newStatus;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public Integer getRecommandStatus() {
 | 
			
		||||
        return recommandStatus;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public void setRecommandStatus(Integer recommandStatus) {
 | 
			
		||||
        this.recommandStatus = recommandStatus;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public Integer getVerifyStatus() {
 | 
			
		||||
        return verifyStatus;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public void setVerifyStatus(Integer verifyStatus) {
 | 
			
		||||
        this.verifyStatus = verifyStatus;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public Integer getSort() {
 | 
			
		||||
        return sort;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public void setSort(Integer sort) {
 | 
			
		||||
        this.sort = sort;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public Integer getSale() {
 | 
			
		||||
        return sale;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public void setSale(Integer sale) {
 | 
			
		||||
        this.sale = sale;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public BigDecimal getPrice() {
 | 
			
		||||
        return price;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public void setPrice(BigDecimal price) {
 | 
			
		||||
        this.price = price;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public BigDecimal getPromotionPrice() {
 | 
			
		||||
        return promotionPrice;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public void setPromotionPrice(BigDecimal promotionPrice) {
 | 
			
		||||
        this.promotionPrice = promotionPrice;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public Integer getGiftGrowth() {
 | 
			
		||||
        return giftGrowth;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public void setGiftGrowth(Integer giftGrowth) {
 | 
			
		||||
        this.giftGrowth = giftGrowth;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public Integer getGiftPoint() {
 | 
			
		||||
        return giftPoint;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public void setGiftPoint(Integer giftPoint) {
 | 
			
		||||
        this.giftPoint = giftPoint;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public Integer getUsePointLimit() {
 | 
			
		||||
        return usePointLimit;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public void setUsePointLimit(Integer usePointLimit) {
 | 
			
		||||
        this.usePointLimit = usePointLimit;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public String getSubTitle() {
 | 
			
		||||
        return subTitle;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public void setSubTitle(String subTitle) {
 | 
			
		||||
        this.subTitle = subTitle;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public BigDecimal getOriginalPrice() {
 | 
			
		||||
        return originalPrice;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public void setOriginalPrice(BigDecimal originalPrice) {
 | 
			
		||||
        this.originalPrice = originalPrice;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public Integer getStock() {
 | 
			
		||||
        return stock;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public void setStock(Integer stock) {
 | 
			
		||||
        this.stock = stock;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public Integer getLowStock() {
 | 
			
		||||
        return lowStock;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public void setLowStock(Integer lowStock) {
 | 
			
		||||
        this.lowStock = lowStock;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public String getUnit() {
 | 
			
		||||
        return unit;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public void setUnit(String unit) {
 | 
			
		||||
        this.unit = unit;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public BigDecimal getWeight() {
 | 
			
		||||
        return weight;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public void setWeight(BigDecimal weight) {
 | 
			
		||||
        this.weight = weight;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public Integer getPreviewStatus() {
 | 
			
		||||
        return previewStatus;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public void setPreviewStatus(Integer previewStatus) {
 | 
			
		||||
        this.previewStatus = previewStatus;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public String getServiceIds() {
 | 
			
		||||
        return serviceIds;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public void setServiceIds(String serviceIds) {
 | 
			
		||||
        this.serviceIds = serviceIds;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public String getKeywords() {
 | 
			
		||||
        return keywords;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public void setKeywords(String keywords) {
 | 
			
		||||
        this.keywords = keywords;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public String getNote() {
 | 
			
		||||
        return note;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public void setNote(String note) {
 | 
			
		||||
        this.note = note;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public String getAlbumPics() {
 | 
			
		||||
        return albumPics;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public void setAlbumPics(String albumPics) {
 | 
			
		||||
        this.albumPics = albumPics;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public String getDetailTitle() {
 | 
			
		||||
        return detailTitle;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public void setDetailTitle(String detailTitle) {
 | 
			
		||||
        this.detailTitle = detailTitle;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public Date getPromotionStartTime() {
 | 
			
		||||
        return promotionStartTime;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public void setPromotionStartTime(Date promotionStartTime) {
 | 
			
		||||
        this.promotionStartTime = promotionStartTime;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public Date getPromotionEndTime() {
 | 
			
		||||
        return promotionEndTime;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public void setPromotionEndTime(Date promotionEndTime) {
 | 
			
		||||
        this.promotionEndTime = promotionEndTime;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public Integer getPromotionPerLimit() {
 | 
			
		||||
        return promotionPerLimit;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public void setPromotionPerLimit(Integer promotionPerLimit) {
 | 
			
		||||
        this.promotionPerLimit = promotionPerLimit;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public Integer getPromotionType() {
 | 
			
		||||
        return promotionType;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public void setPromotionType(Integer promotionType) {
 | 
			
		||||
        this.promotionType = promotionType;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public String getBrandName() {
 | 
			
		||||
        return brandName;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public void setBrandName(String brandName) {
 | 
			
		||||
        this.brandName = brandName;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public String getProductCategoryName() {
 | 
			
		||||
        return productCategoryName;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public void setProductCategoryName(String productCategoryName) {
 | 
			
		||||
        this.productCategoryName = productCategoryName;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public String getDescription() {
 | 
			
		||||
        return description;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public void setDescription(String description) {
 | 
			
		||||
        this.description = description;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public String getDetailDesc() {
 | 
			
		||||
        return detailDesc;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public void setDetailDesc(String detailDesc) {
 | 
			
		||||
        this.detailDesc = detailDesc;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public String getDetailHtml() {
 | 
			
		||||
        return detailHtml;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public void setDetailHtml(String detailHtml) {
 | 
			
		||||
        this.detailHtml = detailHtml;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public String getDetailMobileHtml() {
 | 
			
		||||
        return detailMobileHtml;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public void setDetailMobileHtml(String detailMobileHtml) {
 | 
			
		||||
        this.detailMobileHtml = detailMobileHtml;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @Override
 | 
			
		||||
    public String toString() {
 | 
			
		||||
        StringBuilder sb = new StringBuilder();
 | 
			
		||||
        sb.append(getClass().getSimpleName());
 | 
			
		||||
        sb.append(" [");
 | 
			
		||||
        sb.append("Hash = ").append(hashCode());
 | 
			
		||||
        sb.append(", id=").append(id);
 | 
			
		||||
        sb.append(", brandId=").append(brandId);
 | 
			
		||||
        sb.append(", productCategoryId=").append(productCategoryId);
 | 
			
		||||
        sb.append(", feightTemplateId=").append(feightTemplateId);
 | 
			
		||||
        sb.append(", productAttributeCategoryId=").append(productAttributeCategoryId);
 | 
			
		||||
        sb.append(", name=").append(name);
 | 
			
		||||
        sb.append(", pic=").append(pic);
 | 
			
		||||
        sb.append(", productSn=").append(productSn);
 | 
			
		||||
        sb.append(", deleteStatus=").append(deleteStatus);
 | 
			
		||||
        sb.append(", publishStatus=").append(publishStatus);
 | 
			
		||||
        sb.append(", newStatus=").append(newStatus);
 | 
			
		||||
        sb.append(", recommandStatus=").append(recommandStatus);
 | 
			
		||||
        sb.append(", verifyStatus=").append(verifyStatus);
 | 
			
		||||
        sb.append(", sort=").append(sort);
 | 
			
		||||
        sb.append(", sale=").append(sale);
 | 
			
		||||
        sb.append(", price=").append(price);
 | 
			
		||||
        sb.append(", promotionPrice=").append(promotionPrice);
 | 
			
		||||
        sb.append(", giftGrowth=").append(giftGrowth);
 | 
			
		||||
        sb.append(", giftPoint=").append(giftPoint);
 | 
			
		||||
        sb.append(", usePointLimit=").append(usePointLimit);
 | 
			
		||||
        sb.append(", subTitle=").append(subTitle);
 | 
			
		||||
        sb.append(", originalPrice=").append(originalPrice);
 | 
			
		||||
        sb.append(", stock=").append(stock);
 | 
			
		||||
        sb.append(", lowStock=").append(lowStock);
 | 
			
		||||
        sb.append(", unit=").append(unit);
 | 
			
		||||
        sb.append(", weight=").append(weight);
 | 
			
		||||
        sb.append(", previewStatus=").append(previewStatus);
 | 
			
		||||
        sb.append(", serviceIds=").append(serviceIds);
 | 
			
		||||
        sb.append(", keywords=").append(keywords);
 | 
			
		||||
        sb.append(", note=").append(note);
 | 
			
		||||
        sb.append(", albumPics=").append(albumPics);
 | 
			
		||||
        sb.append(", detailTitle=").append(detailTitle);
 | 
			
		||||
        sb.append(", promotionStartTime=").append(promotionStartTime);
 | 
			
		||||
        sb.append(", promotionEndTime=").append(promotionEndTime);
 | 
			
		||||
        sb.append(", promotionPerLimit=").append(promotionPerLimit);
 | 
			
		||||
        sb.append(", promotionType=").append(promotionType);
 | 
			
		||||
        sb.append(", brandName=").append(brandName);
 | 
			
		||||
        sb.append(", productCategoryName=").append(productCategoryName);
 | 
			
		||||
        sb.append(", description=").append(description);
 | 
			
		||||
        sb.append(", detailDesc=").append(detailDesc);
 | 
			
		||||
        sb.append(", detailHtml=").append(detailHtml);
 | 
			
		||||
        sb.append(", detailMobileHtml=").append(detailMobileHtml);
 | 
			
		||||
        sb.append(", serialVersionUID=").append(serialVersionUID);
 | 
			
		||||
        sb.append("]");
 | 
			
		||||
        return sb.toString();
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
@@ -0,0 +1,24 @@
 | 
			
		||||
package com.tuling.tulingmall.promotion.domain;
 | 
			
		||||
 | 
			
		||||
import com.tuling.tulingmall.model.PmsProduct;
 | 
			
		||||
import lombok.Getter;
 | 
			
		||||
import lombok.Setter;
 | 
			
		||||
 | 
			
		||||
import java.math.BigDecimal;
 | 
			
		||||
import java.util.Date;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 秒杀信息和商品对象封装
 | 
			
		||||
 */
 | 
			
		||||
@Getter
 | 
			
		||||
@Setter
 | 
			
		||||
public class FlashPromotionProduct extends PmsProduct {
 | 
			
		||||
    private Long relationId;
 | 
			
		||||
    private Long flashPromotionId;
 | 
			
		||||
    private BigDecimal flashPromotionPrice;
 | 
			
		||||
    private Integer flashPromotionCount;
 | 
			
		||||
    private Integer flashPromotionLimit;
 | 
			
		||||
    private Date flashPromotionStartDate;
 | 
			
		||||
    private Date flashPromotionEndDate;
 | 
			
		||||
    private String secKillServer;
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										16
									
								
								tulingmall-common/src/main/resources/rebel.xml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										16
									
								
								tulingmall-common/src/main/resources/rebel.xml
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,16 @@
 | 
			
		||||
<?xml version="1.0" encoding="UTF-8"?>
 | 
			
		||||
 | 
			
		||||
<!--
 | 
			
		||||
  This is the JRebel configuration file. It maps the running application to your IDE workspace, enabling JRebel reloading for this project.
 | 
			
		||||
  Refer to https://manuals.jrebel.com/jrebel/standalone/config.html for more information.
 | 
			
		||||
-->
 | 
			
		||||
<application generated-by="intellij" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.zeroturnaround.com" xsi:schemaLocation="http://www.zeroturnaround.com http://update.zeroturnaround.com/jrebel/rebel-2_3.xsd">
 | 
			
		||||
 | 
			
		||||
	<id>tulingmall-common</id>
 | 
			
		||||
 | 
			
		||||
	<classpath>
 | 
			
		||||
		<dir name="D:/GitSource/tmallV5/tulingmall-common/target/classes">
 | 
			
		||||
		</dir>
 | 
			
		||||
	</classpath>
 | 
			
		||||
 | 
			
		||||
</application>
 | 
			
		||||
		Reference in New Issue
	
	Block a user