项目初始CRUD代码创建

This commit is contained in:
Kirk Lin 2021-06-07 16:51:30 +08:00
parent f515127d9b
commit 6e006f172d
1221 changed files with 212842 additions and 5 deletions

View file

@ -0,0 +1,57 @@
<?xml version="1.0" encoding="UTF-8"?>
<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
<component name="FacetManager">
<facet type="Spring" name="Spring">
<configuration />
</facet>
</component>
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8">
<output url="file://$MODULE_DIR$/target/classes" />
<output-test url="file://$MODULE_DIR$/target/test-classes" />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
<excludeFolder url="file://$MODULE_DIR$/target" />
</content>
<orderEntry type="jdk" jdkName="1.8" jdkType="JavaSDK" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="Maven: com.baomidou:mybatis-plus-boot-starter:3.4.3" level="project" />
<orderEntry type="library" name="Maven: com.baomidou:mybatis-plus:3.4.3" level="project" />
<orderEntry type="library" name="Maven: com.baomidou:mybatis-plus-extension:3.4.3" level="project" />
<orderEntry type="library" name="Maven: com.baomidou:mybatis-plus-core:3.4.3" level="project" />
<orderEntry type="library" name="Maven: com.baomidou:mybatis-plus-annotation:3.4.3" level="project" />
<orderEntry type="library" name="Maven: com.github.jsqlparser:jsqlparser:4.0" level="project" />
<orderEntry type="library" name="Maven: org.mybatis:mybatis:3.5.7" level="project" />
<orderEntry type="library" name="Maven: org.mybatis:mybatis-spring:2.0.6" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-autoconfigure:2.4.5" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot:2.4.5" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-core:5.3.6" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-jcl:5.3.6" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-context:5.3.6" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-aop:5.3.6" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-expression:5.3.6" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-jdbc:2.4.5" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter:2.4.5" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-logging:2.4.5" level="project" />
<orderEntry type="library" name="Maven: ch.qos.logback:logback-classic:1.2.3" level="project" />
<orderEntry type="library" name="Maven: ch.qos.logback:logback-core:1.2.3" level="project" />
<orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-to-slf4j:2.13.3" level="project" />
<orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-api:2.13.3" level="project" />
<orderEntry type="library" name="Maven: org.slf4j:jul-to-slf4j:1.7.30" level="project" />
<orderEntry type="library" name="Maven: jakarta.annotation:jakarta.annotation-api:1.3.5" level="project" />
<orderEntry type="library" name="Maven: org.yaml:snakeyaml:1.27" level="project" />
<orderEntry type="library" name="Maven: com.zaxxer:HikariCP:3.4.5" level="project" />
<orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.7.25" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-jdbc:5.3.6" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-beans:5.3.6" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-tx:5.3.6" level="project" />
<orderEntry type="library" name="Maven: org.projectlombok:lombok:1.18.18" level="project" />
<orderEntry type="library" name="Maven: org.apache.httpcomponents:httpcore:4.4.14" level="project" />
<orderEntry type="library" name="Maven: cn.hutool:hutool-all:4.1.1" level="project" />
<orderEntry type="library" name="Maven: commons-lang:commons-lang:2.6" level="project" />
<orderEntry type="library" name="Maven: mysql:mysql-connector-java:8.0.23" level="project" />
<orderEntry type="library" name="Maven: com.google.protobuf:protobuf-java:3.11.4" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: javax.servlet:servlet-api:2.5" level="project" />
</component>
</module>

64
kkmall-common/pom.xml Normal file
View file

@ -0,0 +1,64 @@
<?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">
<parent>
<artifactId>kkmall</artifactId>
<groupId>name.lkk.kkmall</groupId>
<version>0.0.1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>kkmall-common</artifactId>
<description>每个微服务的公共的依赖bean工具类等等</description>
<properties>
<java.version>1.8</java.version>
<mysql.version>8.0.23</mysql.version>
<commons.lang.version>2.6</commons.lang.version>
<hutool.version>4.1.1</hutool.version>
<lombok.version>1.18.18</lombok.version>
<javax.servlet.version>2.5</javax.servlet.version>
</properties>
<dependencies>
<!-- Mybatis-Plus -->
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-boot-starter</artifactId>
<version>3.4.3</version>
</dependency>
<!-- Lombok-->
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>${lombok.version}</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.apache.httpcomponents/httpcore -->
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpcore</artifactId>
<version>4.4.14</version>
</dependency>
<dependency>
<groupId>cn.hutool</groupId>
<artifactId>hutool-all</artifactId>
<version>${hutool.version}</version>
</dependency>
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
<version>${commons.lang.version}</version>
</dependency>
<!-- Mysql驱动-->
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>${mysql.version}</version>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>${javax.servlet.version}</version>
<scope>provided</scope>
</dependency>
</dependencies>
</project>

View file

@ -0,0 +1,61 @@
/**
* Copyright (c) 2016-2019 人人开源 All rights reserved.
*
* https://www.renren.io
*
* 版权所有侵权必究
*/
package name.lkk.common.exception;
/**
* 自定义异常
*
* @author Mark sunlightcs@gmail.com
*/
public class RRException extends RuntimeException {
private static final long serialVersionUID = 1L;
private String msg;
private int code = 500;
public RRException(String msg) {
super(msg);
this.msg = msg;
}
public RRException(String msg, Throwable e) {
super(msg, e);
this.msg = msg;
}
public RRException(String msg, int code) {
super(msg);
this.msg = msg;
this.code = code;
}
public RRException(String msg, int code, Throwable e) {
super(msg, e);
this.msg = msg;
this.code = code;
}
public String getMsg() {
return msg;
}
public void setMsg(String msg) {
this.msg = msg;
}
public int getCode() {
return code;
}
public void setCode(int code) {
this.code = code;
}
}

View file

@ -0,0 +1,126 @@
/**
* Copyright (c) 2016-2019 人人开源 All rights reserved.
*
* https://www.renren.io
*
* 版权所有侵权必究
*/
package name.lkk.common.utils;
/**
* 常量
*
*/
public class Constant {
/** 超级管理员ID */
public static final int SUPER_ADMIN = 1;
/**
* 当前页码
*/
public static final String PAGE = "page";
/**
* 每页显示记录数
*/
public static final String LIMIT = "limit";
/**
* 排序字段
*/
public static final String ORDER_FIELD = "sidx";
/**
* 排序方式
*/
public static final String ORDER = "order";
/**
* 升序
*/
public static final String ASC = "asc";
/**
* 菜单类型
*
* @author chenshun
* @email sunlightcs@gmail.com
* @date 2016年11月15日 下午1:24:29
*/
public enum MenuType {
/**
* 目录
*/
CATALOG(0),
/**
* 菜单
*/
MENU(1),
/**
* 按钮
*/
BUTTON(2);
private int value;
MenuType(int value) {
this.value = value;
}
public int getValue() {
return value;
}
}
/**
* 定时任务状态
*
* @author chenshun
* @email sunlightcs@gmail.com
* @date 2016年12月3日 上午12:07:22
*/
public enum ScheduleStatus {
/**
* 正常
*/
NORMAL(0),
/**
* 暂停
*/
PAUSE(1);
private int value;
ScheduleStatus(int value) {
this.value = value;
}
public int getValue() {
return value;
}
}
/**
* 云服务商
*/
public enum CloudService {
/**
* 七牛云
*/
QINIU(1),
/**
* 阿里云
*/
ALIYUN(2),
/**
* 腾讯云
*/
QCLOUD(3);
private int value;
CloudService(int value) {
this.value = value;
}
public int getValue() {
return value;
}
}
}

View file

@ -0,0 +1,109 @@
/**
* Copyright (c) 2016-2019 人人开源 All rights reserved.
*
* https://www.renren.io
*
* 版权所有侵权必究
*/
package name.lkk.common.utils;
import com.baomidou.mybatisplus.core.metadata.IPage;
import java.io.Serializable;
import java.util.List;
/**
* 分页工具类
*
*/
public class PageUtils implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 总记录数
*/
private int totalCount;
/**
* 每页记录数
*/
private int pageSize;
/**
* 总页数
*/
private int totalPage;
/**
* 当前页数
*/
private int currPage;
/**
* 列表数据
*/
private List<?> list;
/**
* 分页
* @param list 列表数据
* @param totalCount 总记录数
* @param pageSize 每页记录数
* @param currPage 当前页数
*/
public PageUtils(List<?> list, int totalCount, int pageSize, int currPage) {
this.list = list;
this.totalCount = totalCount;
this.pageSize = pageSize;
this.currPage = currPage;
this.totalPage = (int)Math.ceil((double)totalCount/pageSize);
}
/**
* 分页
*/
public PageUtils(IPage<?> page) {
this.list = page.getRecords();
this.totalCount = (int)page.getTotal();
this.pageSize = (int)page.getSize();
this.currPage = (int)page.getCurrent();
this.totalPage = (int)page.getPages();
}
public int getTotalCount() {
return totalCount;
}
public void setTotalCount(int totalCount) {
this.totalCount = totalCount;
}
public int getPageSize() {
return pageSize;
}
public void setPageSize(int pageSize) {
this.pageSize = pageSize;
}
public int getTotalPage() {
return totalPage;
}
public void setTotalPage(int totalPage) {
this.totalPage = totalPage;
}
public int getCurrPage() {
return currPage;
}
public void setCurrPage(int currPage) {
this.currPage = currPage;
}
public List<?> getList() {
return list;
}
public void setList(List<?> list) {
this.list = list;
}
}

View file

@ -0,0 +1,76 @@
/**
* Copyright (c) 2016-2019 人人开源 All rights reserved.
*
* https://www.renren.io
*
* 版权所有侵权必究
*/
package name.lkk.common.utils;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.metadata.OrderItem;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import name.lkk.common.xss.SQLFilter;
import org.apache.commons.lang.StringUtils;
import java.util.Map;
/**
* 查询参数
*
*/
public class Query<T> {
public IPage<T> getPage(Map<String, Object> params) {
return this.getPage(params, null, false);
}
public IPage<T> getPage(Map<String, Object> params, String defaultOrderField, boolean isAsc) {
//分页参数
long curPage = 1;
long limit = 10;
if(params.get(Constant.PAGE) != null){
curPage = Long.parseLong((String)params.get(Constant.PAGE));
}
if(params.get(Constant.LIMIT) != null){
limit = Long.parseLong((String)params.get(Constant.LIMIT));
}
//分页对象
Page<T> page = new Page<>(curPage, limit);
//分页参数
params.put(Constant.PAGE, page);
//排序字段
//防止SQL注入因为sidxorder是通过拼接SQL实现排序的会有SQL注入风险
String orderField = SQLFilter.sqlInject((String)params.get(Constant.ORDER_FIELD));
String order = (String)params.get(Constant.ORDER);
//前端字段排序
if(StringUtils.isNotEmpty(orderField) && StringUtils.isNotEmpty(order)){
if(Constant.ASC.equalsIgnoreCase(order)) {
return page.addOrder(OrderItem.asc(orderField));
}else {
return page.addOrder(OrderItem.desc(orderField));
}
}
//没有排序字段则不排序
if(StringUtils.isBlank(defaultOrderField)){
return page;
}
//默认排序
if(isAsc) {
page.addOrder(OrderItem.asc(defaultOrderField));
}else {
page.addOrder(OrderItem.desc(defaultOrderField));
}
return page;
}
}

View file

@ -0,0 +1,63 @@
/**
* Copyright (c) 2016-2019 人人开源 All rights reserved.
*
* https://www.renren.io
*
* 版权所有侵权必究
*/
package name.lkk.common.utils;
import org.apache.http.HttpStatus;
import java.util.HashMap;
import java.util.Map;
/**
* 返回数据
*
*/
public class R extends HashMap<String, Object> {
private static final long serialVersionUID = 1L;
public R() {
put("code", 0);
put("msg", "success");
}
public static R error() {
return error(HttpStatus.SC_INTERNAL_SERVER_ERROR, "未知异常,请联系管理员");
}
public static R error(String msg) {
return error(HttpStatus.SC_INTERNAL_SERVER_ERROR, msg);
}
public static R error(int code, String msg) {
R r = new R();
r.put("code", code);
r.put("msg", msg);
return r;
}
public static R ok(String msg) {
R r = new R();
r.put("msg", msg);
return r;
}
public static R ok(Map<String, Object> map) {
R r = new R();
r.putAll(map);
return r;
}
public static R ok() {
return new R();
}
public R put(String key, Object value) {
super.put(key, value);
return this;
}
}

View file

@ -0,0 +1,530 @@
package name.lkk.common.xss;
import java.util.*;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;
import java.util.logging.Logger;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
/**
*
* HTML filtering utility for protecting against XSS (Cross Site Scripting).
*
* This code is licensed LGPLv3
*
* This code is a Java port of the original work in PHP by Cal Hendersen.
* http://code.iamcal.com/php/lib_filter/
*
* The trickiest part of the translation was handling the differences in regex handling
* between PHP and Java. These resources were helpful in the process:
*
* http://java.sun.com/j2se/1.4.2/docs/api/java/util/regex/Pattern.html
* http://us2.php.net/manual/en/reference.pcre.pattern.modifiers.php
* http://www.regular-expressions.info/modifiers.html
*
* A note on naming conventions: instance variables are prefixed with a "v"; global
* constants are in all caps.
*
* Sample use:
* String input = ...
* String clean = new HTMLFilter().filter( input );
*
* The class is not thread safe. Create a new instance if in doubt.
*
* If you find bugs or have suggestions on improvement (especially regarding
* performance), please contact us. The latest version of this
* source, and our contact details, can be found at http://xss-html-filter.sf.net
*
* @author Joseph O'Connell
* @author Cal Hendersen
* @author Michael Semb Wever
*/
public final class HTMLFilter {
/** regex flag union representing /si modifiers in php **/
private static final int REGEX_FLAGS_SI = Pattern.CASE_INSENSITIVE | Pattern.DOTALL;
private static final Pattern P_COMMENTS = Pattern.compile("<!--(.*?)-->", Pattern.DOTALL);
private static final Pattern P_COMMENT = Pattern.compile("^!--(.*)--$", REGEX_FLAGS_SI);
private static final Pattern P_TAGS = Pattern.compile("<(.*?)>", Pattern.DOTALL);
private static final Pattern P_END_TAG = Pattern.compile("^/([a-z0-9]+)", REGEX_FLAGS_SI);
private static final Pattern P_START_TAG = Pattern.compile("^([a-z0-9]+)(.*?)(/?)$", REGEX_FLAGS_SI);
private static final Pattern P_QUOTED_ATTRIBUTES = Pattern.compile("([a-z0-9]+)=([\"'])(.*?)\\2", REGEX_FLAGS_SI);
private static final Pattern P_UNQUOTED_ATTRIBUTES = Pattern.compile("([a-z0-9]+)(=)([^\"\\s']+)", REGEX_FLAGS_SI);
private static final Pattern P_PROTOCOL = Pattern.compile("^([^:]+):", REGEX_FLAGS_SI);
private static final Pattern P_ENTITY = Pattern.compile("&#(\\d+);?");
private static final Pattern P_ENTITY_UNICODE = Pattern.compile("&#x([0-9a-f]+);?");
private static final Pattern P_ENCODE = Pattern.compile("%([0-9a-f]{2});?");
private static final Pattern P_VALID_ENTITIES = Pattern.compile("&([^&;]*)(?=(;|&|$))");
private static final Pattern P_VALID_QUOTES = Pattern.compile("(>|^)([^<]+?)(<|$)", Pattern.DOTALL);
private static final Pattern P_END_ARROW = Pattern.compile("^>");
private static final Pattern P_BODY_TO_END = Pattern.compile("<([^>]*?)(?=<|$)");
private static final Pattern P_XML_CONTENT = Pattern.compile("(^|>)([^<]*?)(?=>)");
private static final Pattern P_STRAY_LEFT_ARROW = Pattern.compile("<([^>]*?)(?=<|$)");
private static final Pattern P_STRAY_RIGHT_ARROW = Pattern.compile("(^|>)([^<]*?)(?=>)");
private static final Pattern P_AMP = Pattern.compile("&");
private static final Pattern P_QUOTE = Pattern.compile("<");
private static final Pattern P_LEFT_ARROW = Pattern.compile("<");
private static final Pattern P_RIGHT_ARROW = Pattern.compile(">");
private static final Pattern P_BOTH_ARROWS = Pattern.compile("<>");
// @xxx could grow large... maybe use sesat's ReferenceMap
private static final ConcurrentMap<String,Pattern> P_REMOVE_PAIR_BLANKS = new ConcurrentHashMap<String, Pattern>();
private static final ConcurrentMap<String,Pattern> P_REMOVE_SELF_BLANKS = new ConcurrentHashMap<String, Pattern>();
/** set of allowed html elements, along with allowed attributes for each element **/
private final Map<String, List<String>> vAllowed;
/** counts of open tags for each (allowable) html element **/
private final Map<String, Integer> vTagCounts = new HashMap<String, Integer>();
/** html elements which must always be self-closing (e.g. "<img />") **/
private final String[] vSelfClosingTags;
/** html elements which must always have separate opening and closing tags (e.g. "<b></b>") **/
private final String[] vNeedClosingTags;
/** set of disallowed html elements **/
private final String[] vDisallowed;
/** attributes which should be checked for valid protocols **/
private final String[] vProtocolAtts;
/** allowed protocols **/
private final String[] vAllowedProtocols;
/** tags which should be removed if they contain no content (e.g. "<b></b>" or "<b />") **/
private final String[] vRemoveBlanks;
/** entities allowed within html markup **/
private final String[] vAllowedEntities;
/** flag determining whether comments are allowed in input String. */
private final boolean stripComment;
private final boolean encodeQuotes;
private boolean vDebug = false;
/**
* flag determining whether to try to make tags when presented with "unbalanced"
* angle brackets (e.g. "<b text </b>" becomes "<b> text </b>"). If set to false,
* unbalanced angle brackets will be html escaped.
*/
private final boolean alwaysMakeTags;
/** Default constructor.
*
*/
public HTMLFilter() {
vAllowed = new HashMap<>();
final ArrayList<String> a_atts = new ArrayList<String>();
a_atts.add("href");
a_atts.add("target");
vAllowed.put("a", a_atts);
final ArrayList<String> img_atts = new ArrayList<String>();
img_atts.add("src");
img_atts.add("width");
img_atts.add("height");
img_atts.add("alt");
vAllowed.put("img", img_atts);
final ArrayList<String> no_atts = new ArrayList<String>();
vAllowed.put("b", no_atts);
vAllowed.put("strong", no_atts);
vAllowed.put("i", no_atts);
vAllowed.put("em", no_atts);
vSelfClosingTags = new String[]{"img"};
vNeedClosingTags = new String[]{"a", "b", "strong", "i", "em"};
vDisallowed = new String[]{};
vAllowedProtocols = new String[]{"http", "mailto", "https"}; // no ftp.
vProtocolAtts = new String[]{"src", "href"};
vRemoveBlanks = new String[]{"a", "b", "strong", "i", "em"};
vAllowedEntities = new String[]{"amp", "gt", "lt", "quot"};
stripComment = true;
encodeQuotes = true;
alwaysMakeTags = true;
}
/** Set debug flag to true. Otherwise use default settings. See the default constructor.
*
* @param debug turn debug on with a true argument
*/
public HTMLFilter(final boolean debug) {
this();
vDebug = debug;
}
/** Map-parameter configurable constructor.
*
* @param conf map containing configuration. keys match field names.
*/
public HTMLFilter(final Map<String,Object> conf) {
assert conf.containsKey("vAllowed") : "configuration requires vAllowed";
assert conf.containsKey("vSelfClosingTags") : "configuration requires vSelfClosingTags";
assert conf.containsKey("vNeedClosingTags") : "configuration requires vNeedClosingTags";
assert conf.containsKey("vDisallowed") : "configuration requires vDisallowed";
assert conf.containsKey("vAllowedProtocols") : "configuration requires vAllowedProtocols";
assert conf.containsKey("vProtocolAtts") : "configuration requires vProtocolAtts";
assert conf.containsKey("vRemoveBlanks") : "configuration requires vRemoveBlanks";
assert conf.containsKey("vAllowedEntities") : "configuration requires vAllowedEntities";
vAllowed = Collections.unmodifiableMap((HashMap<String, List<String>>) conf.get("vAllowed"));
vSelfClosingTags = (String[]) conf.get("vSelfClosingTags");
vNeedClosingTags = (String[]) conf.get("vNeedClosingTags");
vDisallowed = (String[]) conf.get("vDisallowed");
vAllowedProtocols = (String[]) conf.get("vAllowedProtocols");
vProtocolAtts = (String[]) conf.get("vProtocolAtts");
vRemoveBlanks = (String[]) conf.get("vRemoveBlanks");
vAllowedEntities = (String[]) conf.get("vAllowedEntities");
stripComment = conf.containsKey("stripComment") ? (Boolean) conf.get("stripComment") : true;
encodeQuotes = conf.containsKey("encodeQuotes") ? (Boolean) conf.get("encodeQuotes") : true;
alwaysMakeTags = conf.containsKey("alwaysMakeTags") ? (Boolean) conf.get("alwaysMakeTags") : true;
}
private void reset() {
vTagCounts.clear();
}
private void debug(final String msg) {
if (vDebug) {
Logger.getAnonymousLogger().info(msg);
}
}
//---------------------------------------------------------------
// my versions of some PHP library functions
public static String chr(final int decimal) {
return String.valueOf((char) decimal);
}
public static String htmlSpecialChars(final String s) {
String result = s;
result = regexReplace(P_AMP, "&amp;", result);
result = regexReplace(P_QUOTE, "&quot;", result);
result = regexReplace(P_LEFT_ARROW, "&lt;", result);
result = regexReplace(P_RIGHT_ARROW, "&gt;", result);
return result;
}
//---------------------------------------------------------------
/**
* given a user submitted input String, filter out any invalid or restricted
* html.
*
* @param input text (i.e. submitted by a user) than may contain html
* @return "clean" version of input, with only valid, whitelisted html elements allowed
*/
public String filter(final String input) {
reset();
String s = input;
debug("************************************************");
debug(" INPUT: " + input);
s = escapeComments(s);
debug(" escapeComments: " + s);
s = balanceHTML(s);
debug(" balanceHTML: " + s);
s = checkTags(s);
debug(" checkTags: " + s);
s = processRemoveBlanks(s);
debug("processRemoveBlanks: " + s);
s = validateEntities(s);
debug(" validateEntites: " + s);
debug("************************************************\n\n");
return s;
}
public boolean isAlwaysMakeTags(){
return alwaysMakeTags;
}
public boolean isStripComments(){
return stripComment;
}
private String escapeComments(final String s) {
final Matcher m = P_COMMENTS.matcher(s);
final StringBuffer buf = new StringBuffer();
if (m.find()) {
final String match = m.group(1); //(.*?)
m.appendReplacement(buf, Matcher.quoteReplacement("<!--" + htmlSpecialChars(match) + "-->"));
}
m.appendTail(buf);
return buf.toString();
}
private String balanceHTML(String s) {
if (alwaysMakeTags) {
//
// try and form html
//
s = regexReplace(P_END_ARROW, "", s);
s = regexReplace(P_BODY_TO_END, "<$1>", s);
s = regexReplace(P_XML_CONTENT, "$1<$2", s);
} else {
//
// escape stray brackets
//
s = regexReplace(P_STRAY_LEFT_ARROW, "&lt;$1", s);
s = regexReplace(P_STRAY_RIGHT_ARROW, "$1$2&gt;<", s);
//
// the last regexp causes '<>' entities to appear
// (we need to do a lookahead assertion so that the last bracket can
// be used in the next pass of the regexp)
//
s = regexReplace(P_BOTH_ARROWS, "", s);
}
return s;
}
private String checkTags(String s) {
Matcher m = P_TAGS.matcher(s);
final StringBuffer buf = new StringBuffer();
while (m.find()) {
String replaceStr = m.group(1);
replaceStr = processTag(replaceStr);
m.appendReplacement(buf, Matcher.quoteReplacement(replaceStr));
}
m.appendTail(buf);
s = buf.toString();
// these get tallied in processTag
// (remember to reset before subsequent calls to filter method)
for (String key : vTagCounts.keySet()) {
for (int ii = 0; ii < vTagCounts.get(key); ii++) {
s += "</" + key + ">";
}
}
return s;
}
private String processRemoveBlanks(final String s) {
String result = s;
for (String tag : vRemoveBlanks) {
if(!P_REMOVE_PAIR_BLANKS.containsKey(tag)){
P_REMOVE_PAIR_BLANKS.putIfAbsent(tag, Pattern.compile("<" + tag + "(\\s[^>]*)?></" + tag + ">"));
}
result = regexReplace(P_REMOVE_PAIR_BLANKS.get(tag), "", result);
if(!P_REMOVE_SELF_BLANKS.containsKey(tag)){
P_REMOVE_SELF_BLANKS.putIfAbsent(tag, Pattern.compile("<" + tag + "(\\s[^>]*)?/>"));
}
result = regexReplace(P_REMOVE_SELF_BLANKS.get(tag), "", result);
}
return result;
}
private static String regexReplace(final Pattern regex_pattern, final String replacement, final String s) {
Matcher m = regex_pattern.matcher(s);
return m.replaceAll(replacement);
}
private String processTag(final String s) {
// ending tags
Matcher m = P_END_TAG.matcher(s);
if (m.find()) {
final String name = m.group(1).toLowerCase();
if (allowed(name)) {
if (!inArray(name, vSelfClosingTags)) {
if (vTagCounts.containsKey(name)) {
vTagCounts.put(name, vTagCounts.get(name) - 1);
return "</" + name + ">";
}
}
}
}
// starting tags
m = P_START_TAG.matcher(s);
if (m.find()) {
final String name = m.group(1).toLowerCase();
final String body = m.group(2);
String ending = m.group(3);
//debug( "in a starting tag, name='" + name + "'; body='" + body + "'; ending='" + ending + "'" );
if (allowed(name)) {
String params = "";
final Matcher m2 = P_QUOTED_ATTRIBUTES.matcher(body);
final Matcher m3 = P_UNQUOTED_ATTRIBUTES.matcher(body);
final List<String> paramNames = new ArrayList<String>();
final List<String> paramValues = new ArrayList<String>();
while (m2.find()) {
paramNames.add(m2.group(1)); //([a-z0-9]+)
paramValues.add(m2.group(3)); //(.*?)
}
while (m3.find()) {
paramNames.add(m3.group(1)); //([a-z0-9]+)
paramValues.add(m3.group(3)); //([^\"\\s']+)
}
String paramName, paramValue;
for (int ii = 0; ii < paramNames.size(); ii++) {
paramName = paramNames.get(ii).toLowerCase();
paramValue = paramValues.get(ii);
// debug( "paramName='" + paramName + "'" );
// debug( "paramValue='" + paramValue + "'" );
// debug( "allowed? " + vAllowed.get( name ).contains( paramName ) );
if (allowedAttribute(name, paramName)) {
if (inArray(paramName, vProtocolAtts)) {
paramValue = processParamProtocol(paramValue);
}
params += " " + paramName + "=\"" + paramValue + "\"";
}
}
if (inArray(name, vSelfClosingTags)) {
ending = " /";
}
if (inArray(name, vNeedClosingTags)) {
ending = "";
}
if (ending == null || ending.length() < 1) {
if (vTagCounts.containsKey(name)) {
vTagCounts.put(name, vTagCounts.get(name) + 1);
} else {
vTagCounts.put(name, 1);
}
} else {
ending = " /";
}
return "<" + name + params + ending + ">";
} else {
return "";
}
}
// comments
m = P_COMMENT.matcher(s);
if (!stripComment && m.find()) {
return "<" + m.group() + ">";
}
return "";
}
private String processParamProtocol(String s) {
s = decodeEntities(s);
final Matcher m = P_PROTOCOL.matcher(s);
if (m.find()) {
final String protocol = m.group(1);
if (!inArray(protocol, vAllowedProtocols)) {
// bad protocol, turn into local anchor link instead
s = "#" + s.substring(protocol.length() + 1, s.length());
if (s.startsWith("#//")) {
s = "#" + s.substring(3, s.length());
}
}
}
return s;
}
private String decodeEntities(String s) {
StringBuffer buf = new StringBuffer();
Matcher m = P_ENTITY.matcher(s);
while (m.find()) {
final String match = m.group(1);
final int decimal = Integer.decode(match).intValue();
m.appendReplacement(buf, Matcher.quoteReplacement(chr(decimal)));
}
m.appendTail(buf);
s = buf.toString();
buf = new StringBuffer();
m = P_ENTITY_UNICODE.matcher(s);
while (m.find()) {
final String match = m.group(1);
final int decimal = Integer.valueOf(match, 16).intValue();
m.appendReplacement(buf, Matcher.quoteReplacement(chr(decimal)));
}
m.appendTail(buf);
s = buf.toString();
buf = new StringBuffer();
m = P_ENCODE.matcher(s);
while (m.find()) {
final String match = m.group(1);
final int decimal = Integer.valueOf(match, 16).intValue();
m.appendReplacement(buf, Matcher.quoteReplacement(chr(decimal)));
}
m.appendTail(buf);
s = buf.toString();
s = validateEntities(s);
return s;
}
private String validateEntities(final String s) {
StringBuffer buf = new StringBuffer();
// validate entities throughout the string
Matcher m = P_VALID_ENTITIES.matcher(s);
while (m.find()) {
final String one = m.group(1); //([^&;]*)
final String two = m.group(2); //(?=(;|&|$))
m.appendReplacement(buf, Matcher.quoteReplacement(checkEntity(one, two)));
}
m.appendTail(buf);
return encodeQuotes(buf.toString());
}
private String encodeQuotes(final String s){
if(encodeQuotes){
StringBuffer buf = new StringBuffer();
Matcher m = P_VALID_QUOTES.matcher(s);
while (m.find()) {
final String one = m.group(1); //(>|^)
final String two = m.group(2); //([^<]+?)
final String three = m.group(3); //(<|$)
m.appendReplacement(buf, Matcher.quoteReplacement(one + regexReplace(P_QUOTE, "&quot;", two) + three));
}
m.appendTail(buf);
return buf.toString();
}else{
return s;
}
}
private String checkEntity(final String preamble, final String term) {
return ";".equals(term) && isValidEntity(preamble)
? '&' + preamble
: "&amp;" + preamble;
}
private boolean isValidEntity(final String entity) {
return inArray(entity, vAllowedEntities);
}
private static boolean inArray(final String s, final String[] array) {
for (String item : array) {
if (item != null && item.equals(s)) {
return true;
}
}
return false;
}
private boolean allowed(final String name) {
return (vAllowed.isEmpty() || vAllowed.containsKey(name)) && !inArray(name, vDisallowed);
}
private boolean allowedAttribute(final String name, final String paramName) {
return allowed(name) && (vAllowed.isEmpty() || vAllowed.get(name).contains(paramName));
}
}

View file

@ -0,0 +1,50 @@
/**
* Copyright (c) 2016-2019 人人开源 All rights reserved.
*
* https://www.renren.io
*
* 版权所有侵权必究
*/
package name.lkk.common.xss;
import name.lkk.common.exception.RRException;
import org.apache.commons.lang.StringUtils;
/**
* SQL过滤
*
* @author Mark sunlightcs@gmail.com
*/
public class SQLFilter {
/**
* SQL注入过滤
* @param str 待验证的字符串
*/
public static String sqlInject(String str){
if(StringUtils.isBlank(str)){
return null;
}
//去掉'|"|;|\字符
str = StringUtils.replace(str, "'", "");
str = StringUtils.replace(str, "\"", "");
str = StringUtils.replace(str, ";", "");
str = StringUtils.replace(str, "\\", "");
//转换成小写
str = str.toLowerCase();
//非法字符
String[] keywords = {"master", "truncate", "insert", "select", "delete", "update", "declare", "alter", "drop"};
//判断是否包含非法字符
for(String keyword : keywords){
if(str.indexOf(keyword) != -1){
throw new RRException("包含非法字符");
}
}
return str;
}
}

View file

@ -18,6 +18,13 @@
<spring-cloud.version>2020.0.3</spring-cloud.version>
</properties>
<dependencies>
<!-- 每个微服务的公共的依赖bean工具类等等-->
<dependency>
<groupId>name.lkk.kkmall</groupId>
<artifactId>kkmall-common</artifactId>
<version>0.0.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>

View file

@ -1,9 +1,11 @@
package name.lkk.kkmall.coupon;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
@MapperScan("name.lkk.kkmall.coupon.dao")
public class KkmallCouponApplication {
public static void main(String[] args) {

View file

@ -0,0 +1,89 @@
package name.lkk.kkmall.coupon.controller;
import java.util.Arrays;
import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import name.lkk.kkmall.coupon.entity.CouponEntity;
import name.lkk.kkmall.coupon.service.CouponService;
import name.lkk.common.utils.PageUtils;
import name.lkk.common.utils.R;
/**
* 优惠券信息
*
* @author KirkLin
* @email linkirk@163.com
* @date 2021-06-07 16:10:19
*/
@RestController
@RequestMapping("coupon/coupon")
public class CouponController {
@Autowired
private CouponService couponService;
/**
* 列表
*/
@RequestMapping("/list")
//@RequiresPermissions("coupon:coupon:list")
public R list(@RequestParam Map<String, Object> params){
PageUtils page = couponService.queryPage(params);
return R.ok().put("page", page);
}
/**
* 信息
*/
@RequestMapping("/info/{id}")
//@RequiresPermissions("coupon:coupon:info")
public R info(@PathVariable("id") Long id){
CouponEntity coupon = couponService.getById(id);
return R.ok().put("coupon", coupon);
}
/**
* 保存
*/
@RequestMapping("/save")
//@RequiresPermissions("coupon:coupon:save")
public R save(@RequestBody CouponEntity coupon){
couponService.save(coupon);
return R.ok();
}
/**
* 修改
*/
@RequestMapping("/update")
//@RequiresPermissions("coupon:coupon:update")
public R update(@RequestBody CouponEntity coupon){
couponService.updateById(coupon);
return R.ok();
}
/**
* 删除
*/
@RequestMapping("/delete")
//@RequiresPermissions("coupon:coupon:delete")
public R delete(@RequestBody Long[] ids){
couponService.removeByIds(Arrays.asList(ids));
return R.ok();
}
}

View file

@ -0,0 +1,89 @@
package name.lkk.kkmall.coupon.controller;
import java.util.Arrays;
import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import name.lkk.kkmall.coupon.entity.CouponHistoryEntity;
import name.lkk.kkmall.coupon.service.CouponHistoryService;
import name.lkk.common.utils.PageUtils;
import name.lkk.common.utils.R;
/**
* 优惠券领取历史记录
*
* @author KirkLin
* @email linkirk@163.com
* @date 2021-06-07 16:10:19
*/
@RestController
@RequestMapping("coupon/couponhistory")
public class CouponHistoryController {
@Autowired
private CouponHistoryService couponHistoryService;
/**
* 列表
*/
@RequestMapping("/list")
//@RequiresPermissions("coupon:couponhistory:list")
public R list(@RequestParam Map<String, Object> params){
PageUtils page = couponHistoryService.queryPage(params);
return R.ok().put("page", page);
}
/**
* 信息
*/
@RequestMapping("/info/{id}")
//@RequiresPermissions("coupon:couponhistory:info")
public R info(@PathVariable("id") Long id){
CouponHistoryEntity couponHistory = couponHistoryService.getById(id);
return R.ok().put("couponHistory", couponHistory);
}
/**
* 保存
*/
@RequestMapping("/save")
//@RequiresPermissions("coupon:couponhistory:save")
public R save(@RequestBody CouponHistoryEntity couponHistory){
couponHistoryService.save(couponHistory);
return R.ok();
}
/**
* 修改
*/
@RequestMapping("/update")
//@RequiresPermissions("coupon:couponhistory:update")
public R update(@RequestBody CouponHistoryEntity couponHistory){
couponHistoryService.updateById(couponHistory);
return R.ok();
}
/**
* 删除
*/
@RequestMapping("/delete")
//@RequiresPermissions("coupon:couponhistory:delete")
public R delete(@RequestBody Long[] ids){
couponHistoryService.removeByIds(Arrays.asList(ids));
return R.ok();
}
}

View file

@ -0,0 +1,89 @@
package name.lkk.kkmall.coupon.controller;
import java.util.Arrays;
import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import name.lkk.kkmall.coupon.entity.CouponSpuCategoryRelationEntity;
import name.lkk.kkmall.coupon.service.CouponSpuCategoryRelationService;
import name.lkk.common.utils.PageUtils;
import name.lkk.common.utils.R;
/**
* 优惠券分类关联
*
* @author KirkLin
* @email linkirk@163.com
* @date 2021-06-07 16:10:19
*/
@RestController
@RequestMapping("coupon/couponspucategoryrelation")
public class CouponSpuCategoryRelationController {
@Autowired
private CouponSpuCategoryRelationService couponSpuCategoryRelationService;
/**
* 列表
*/
@RequestMapping("/list")
//@RequiresPermissions("coupon:couponspucategoryrelation:list")
public R list(@RequestParam Map<String, Object> params){
PageUtils page = couponSpuCategoryRelationService.queryPage(params);
return R.ok().put("page", page);
}
/**
* 信息
*/
@RequestMapping("/info/{id}")
//@RequiresPermissions("coupon:couponspucategoryrelation:info")
public R info(@PathVariable("id") Long id){
CouponSpuCategoryRelationEntity couponSpuCategoryRelation = couponSpuCategoryRelationService.getById(id);
return R.ok().put("couponSpuCategoryRelation", couponSpuCategoryRelation);
}
/**
* 保存
*/
@RequestMapping("/save")
//@RequiresPermissions("coupon:couponspucategoryrelation:save")
public R save(@RequestBody CouponSpuCategoryRelationEntity couponSpuCategoryRelation){
couponSpuCategoryRelationService.save(couponSpuCategoryRelation);
return R.ok();
}
/**
* 修改
*/
@RequestMapping("/update")
//@RequiresPermissions("coupon:couponspucategoryrelation:update")
public R update(@RequestBody CouponSpuCategoryRelationEntity couponSpuCategoryRelation){
couponSpuCategoryRelationService.updateById(couponSpuCategoryRelation);
return R.ok();
}
/**
* 删除
*/
@RequestMapping("/delete")
//@RequiresPermissions("coupon:couponspucategoryrelation:delete")
public R delete(@RequestBody Long[] ids){
couponSpuCategoryRelationService.removeByIds(Arrays.asList(ids));
return R.ok();
}
}

View file

@ -0,0 +1,89 @@
package name.lkk.kkmall.coupon.controller;
import java.util.Arrays;
import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import name.lkk.kkmall.coupon.entity.CouponSpuRelationEntity;
import name.lkk.kkmall.coupon.service.CouponSpuRelationService;
import name.lkk.common.utils.PageUtils;
import name.lkk.common.utils.R;
/**
* 优惠券与产品关联
*
* @author KirkLin
* @email linkirk@163.com
* @date 2021-06-07 16:10:19
*/
@RestController
@RequestMapping("coupon/couponspurelation")
public class CouponSpuRelationController {
@Autowired
private CouponSpuRelationService couponSpuRelationService;
/**
* 列表
*/
@RequestMapping("/list")
//@RequiresPermissions("coupon:couponspurelation:list")
public R list(@RequestParam Map<String, Object> params){
PageUtils page = couponSpuRelationService.queryPage(params);
return R.ok().put("page", page);
}
/**
* 信息
*/
@RequestMapping("/info/{id}")
//@RequiresPermissions("coupon:couponspurelation:info")
public R info(@PathVariable("id") Long id){
CouponSpuRelationEntity couponSpuRelation = couponSpuRelationService.getById(id);
return R.ok().put("couponSpuRelation", couponSpuRelation);
}
/**
* 保存
*/
@RequestMapping("/save")
//@RequiresPermissions("coupon:couponspurelation:save")
public R save(@RequestBody CouponSpuRelationEntity couponSpuRelation){
couponSpuRelationService.save(couponSpuRelation);
return R.ok();
}
/**
* 修改
*/
@RequestMapping("/update")
//@RequiresPermissions("coupon:couponspurelation:update")
public R update(@RequestBody CouponSpuRelationEntity couponSpuRelation){
couponSpuRelationService.updateById(couponSpuRelation);
return R.ok();
}
/**
* 删除
*/
@RequestMapping("/delete")
//@RequiresPermissions("coupon:couponspurelation:delete")
public R delete(@RequestBody Long[] ids){
couponSpuRelationService.removeByIds(Arrays.asList(ids));
return R.ok();
}
}

View file

@ -0,0 +1,89 @@
package name.lkk.kkmall.coupon.controller;
import java.util.Arrays;
import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import name.lkk.kkmall.coupon.entity.HomeAdvEntity;
import name.lkk.kkmall.coupon.service.HomeAdvService;
import name.lkk.common.utils.PageUtils;
import name.lkk.common.utils.R;
/**
* 首页轮播广告
*
* @author KirkLin
* @email linkirk@163.com
* @date 2021-06-07 16:10:19
*/
@RestController
@RequestMapping("coupon/homeadv")
public class HomeAdvController {
@Autowired
private HomeAdvService homeAdvService;
/**
* 列表
*/
@RequestMapping("/list")
//@RequiresPermissions("coupon:homeadv:list")
public R list(@RequestParam Map<String, Object> params){
PageUtils page = homeAdvService.queryPage(params);
return R.ok().put("page", page);
}
/**
* 信息
*/
@RequestMapping("/info/{id}")
//@RequiresPermissions("coupon:homeadv:info")
public R info(@PathVariable("id") Long id){
HomeAdvEntity homeAdv = homeAdvService.getById(id);
return R.ok().put("homeAdv", homeAdv);
}
/**
* 保存
*/
@RequestMapping("/save")
//@RequiresPermissions("coupon:homeadv:save")
public R save(@RequestBody HomeAdvEntity homeAdv){
homeAdvService.save(homeAdv);
return R.ok();
}
/**
* 修改
*/
@RequestMapping("/update")
//@RequiresPermissions("coupon:homeadv:update")
public R update(@RequestBody HomeAdvEntity homeAdv){
homeAdvService.updateById(homeAdv);
return R.ok();
}
/**
* 删除
*/
@RequestMapping("/delete")
//@RequiresPermissions("coupon:homeadv:delete")
public R delete(@RequestBody Long[] ids){
homeAdvService.removeByIds(Arrays.asList(ids));
return R.ok();
}
}

View file

@ -0,0 +1,89 @@
package name.lkk.kkmall.coupon.controller;
import java.util.Arrays;
import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import name.lkk.kkmall.coupon.entity.HomeSubjectEntity;
import name.lkk.kkmall.coupon.service.HomeSubjectService;
import name.lkk.common.utils.PageUtils;
import name.lkk.common.utils.R;
/**
* 首页专题表jd首页下面很多专题每个专题链接新的页面展示专题商品信息
*
* @author KirkLin
* @email linkirk@163.com
* @date 2021-06-07 16:10:19
*/
@RestController
@RequestMapping("coupon/homesubject")
public class HomeSubjectController {
@Autowired
private HomeSubjectService homeSubjectService;
/**
* 列表
*/
@RequestMapping("/list")
//@RequiresPermissions("coupon:homesubject:list")
public R list(@RequestParam Map<String, Object> params){
PageUtils page = homeSubjectService.queryPage(params);
return R.ok().put("page", page);
}
/**
* 信息
*/
@RequestMapping("/info/{id}")
//@RequiresPermissions("coupon:homesubject:info")
public R info(@PathVariable("id") Long id){
HomeSubjectEntity homeSubject = homeSubjectService.getById(id);
return R.ok().put("homeSubject", homeSubject);
}
/**
* 保存
*/
@RequestMapping("/save")
//@RequiresPermissions("coupon:homesubject:save")
public R save(@RequestBody HomeSubjectEntity homeSubject){
homeSubjectService.save(homeSubject);
return R.ok();
}
/**
* 修改
*/
@RequestMapping("/update")
//@RequiresPermissions("coupon:homesubject:update")
public R update(@RequestBody HomeSubjectEntity homeSubject){
homeSubjectService.updateById(homeSubject);
return R.ok();
}
/**
* 删除
*/
@RequestMapping("/delete")
//@RequiresPermissions("coupon:homesubject:delete")
public R delete(@RequestBody Long[] ids){
homeSubjectService.removeByIds(Arrays.asList(ids));
return R.ok();
}
}

View file

@ -0,0 +1,89 @@
package name.lkk.kkmall.coupon.controller;
import java.util.Arrays;
import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import name.lkk.kkmall.coupon.entity.HomeSubjectSpuEntity;
import name.lkk.kkmall.coupon.service.HomeSubjectSpuService;
import name.lkk.common.utils.PageUtils;
import name.lkk.common.utils.R;
/**
* 专题商品
*
* @author KirkLin
* @email linkirk@163.com
* @date 2021-06-07 16:10:19
*/
@RestController
@RequestMapping("coupon/homesubjectspu")
public class HomeSubjectSpuController {
@Autowired
private HomeSubjectSpuService homeSubjectSpuService;
/**
* 列表
*/
@RequestMapping("/list")
//@RequiresPermissions("coupon:homesubjectspu:list")
public R list(@RequestParam Map<String, Object> params){
PageUtils page = homeSubjectSpuService.queryPage(params);
return R.ok().put("page", page);
}
/**
* 信息
*/
@RequestMapping("/info/{id}")
//@RequiresPermissions("coupon:homesubjectspu:info")
public R info(@PathVariable("id") Long id){
HomeSubjectSpuEntity homeSubjectSpu = homeSubjectSpuService.getById(id);
return R.ok().put("homeSubjectSpu", homeSubjectSpu);
}
/**
* 保存
*/
@RequestMapping("/save")
//@RequiresPermissions("coupon:homesubjectspu:save")
public R save(@RequestBody HomeSubjectSpuEntity homeSubjectSpu){
homeSubjectSpuService.save(homeSubjectSpu);
return R.ok();
}
/**
* 修改
*/
@RequestMapping("/update")
//@RequiresPermissions("coupon:homesubjectspu:update")
public R update(@RequestBody HomeSubjectSpuEntity homeSubjectSpu){
homeSubjectSpuService.updateById(homeSubjectSpu);
return R.ok();
}
/**
* 删除
*/
@RequestMapping("/delete")
//@RequiresPermissions("coupon:homesubjectspu:delete")
public R delete(@RequestBody Long[] ids){
homeSubjectSpuService.removeByIds(Arrays.asList(ids));
return R.ok();
}
}

View file

@ -0,0 +1,89 @@
package name.lkk.kkmall.coupon.controller;
import java.util.Arrays;
import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import name.lkk.kkmall.coupon.entity.MemberPriceEntity;
import name.lkk.kkmall.coupon.service.MemberPriceService;
import name.lkk.common.utils.PageUtils;
import name.lkk.common.utils.R;
/**
* 商品会员价格
*
* @author KirkLin
* @email linkirk@163.com
* @date 2021-06-07 16:10:19
*/
@RestController
@RequestMapping("coupon/memberprice")
public class MemberPriceController {
@Autowired
private MemberPriceService memberPriceService;
/**
* 列表
*/
@RequestMapping("/list")
//@RequiresPermissions("coupon:memberprice:list")
public R list(@RequestParam Map<String, Object> params){
PageUtils page = memberPriceService.queryPage(params);
return R.ok().put("page", page);
}
/**
* 信息
*/
@RequestMapping("/info/{id}")
//@RequiresPermissions("coupon:memberprice:info")
public R info(@PathVariable("id") Long id){
MemberPriceEntity memberPrice = memberPriceService.getById(id);
return R.ok().put("memberPrice", memberPrice);
}
/**
* 保存
*/
@RequestMapping("/save")
//@RequiresPermissions("coupon:memberprice:save")
public R save(@RequestBody MemberPriceEntity memberPrice){
memberPriceService.save(memberPrice);
return R.ok();
}
/**
* 修改
*/
@RequestMapping("/update")
//@RequiresPermissions("coupon:memberprice:update")
public R update(@RequestBody MemberPriceEntity memberPrice){
memberPriceService.updateById(memberPrice);
return R.ok();
}
/**
* 删除
*/
@RequestMapping("/delete")
//@RequiresPermissions("coupon:memberprice:delete")
public R delete(@RequestBody Long[] ids){
memberPriceService.removeByIds(Arrays.asList(ids));
return R.ok();
}
}

View file

@ -0,0 +1,89 @@
package name.lkk.kkmall.coupon.controller;
import java.util.Arrays;
import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import name.lkk.kkmall.coupon.entity.SeckillPromotionEntity;
import name.lkk.kkmall.coupon.service.SeckillPromotionService;
import name.lkk.common.utils.PageUtils;
import name.lkk.common.utils.R;
/**
* 秒杀活动
*
* @author KirkLin
* @email linkirk@163.com
* @date 2021-06-07 16:10:19
*/
@RestController
@RequestMapping("coupon/seckillpromotion")
public class SeckillPromotionController {
@Autowired
private SeckillPromotionService seckillPromotionService;
/**
* 列表
*/
@RequestMapping("/list")
//@RequiresPermissions("coupon:seckillpromotion:list")
public R list(@RequestParam Map<String, Object> params){
PageUtils page = seckillPromotionService.queryPage(params);
return R.ok().put("page", page);
}
/**
* 信息
*/
@RequestMapping("/info/{id}")
//@RequiresPermissions("coupon:seckillpromotion:info")
public R info(@PathVariable("id") Long id){
SeckillPromotionEntity seckillPromotion = seckillPromotionService.getById(id);
return R.ok().put("seckillPromotion", seckillPromotion);
}
/**
* 保存
*/
@RequestMapping("/save")
//@RequiresPermissions("coupon:seckillpromotion:save")
public R save(@RequestBody SeckillPromotionEntity seckillPromotion){
seckillPromotionService.save(seckillPromotion);
return R.ok();
}
/**
* 修改
*/
@RequestMapping("/update")
//@RequiresPermissions("coupon:seckillpromotion:update")
public R update(@RequestBody SeckillPromotionEntity seckillPromotion){
seckillPromotionService.updateById(seckillPromotion);
return R.ok();
}
/**
* 删除
*/
@RequestMapping("/delete")
//@RequiresPermissions("coupon:seckillpromotion:delete")
public R delete(@RequestBody Long[] ids){
seckillPromotionService.removeByIds(Arrays.asList(ids));
return R.ok();
}
}

View file

@ -0,0 +1,89 @@
package name.lkk.kkmall.coupon.controller;
import java.util.Arrays;
import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import name.lkk.kkmall.coupon.entity.SeckillSessionEntity;
import name.lkk.kkmall.coupon.service.SeckillSessionService;
import name.lkk.common.utils.PageUtils;
import name.lkk.common.utils.R;
/**
* 秒杀活动场次
*
* @author KirkLin
* @email linkirk@163.com
* @date 2021-06-07 16:10:19
*/
@RestController
@RequestMapping("coupon/seckillsession")
public class SeckillSessionController {
@Autowired
private SeckillSessionService seckillSessionService;
/**
* 列表
*/
@RequestMapping("/list")
//@RequiresPermissions("coupon:seckillsession:list")
public R list(@RequestParam Map<String, Object> params){
PageUtils page = seckillSessionService.queryPage(params);
return R.ok().put("page", page);
}
/**
* 信息
*/
@RequestMapping("/info/{id}")
//@RequiresPermissions("coupon:seckillsession:info")
public R info(@PathVariable("id") Long id){
SeckillSessionEntity seckillSession = seckillSessionService.getById(id);
return R.ok().put("seckillSession", seckillSession);
}
/**
* 保存
*/
@RequestMapping("/save")
//@RequiresPermissions("coupon:seckillsession:save")
public R save(@RequestBody SeckillSessionEntity seckillSession){
seckillSessionService.save(seckillSession);
return R.ok();
}
/**
* 修改
*/
@RequestMapping("/update")
//@RequiresPermissions("coupon:seckillsession:update")
public R update(@RequestBody SeckillSessionEntity seckillSession){
seckillSessionService.updateById(seckillSession);
return R.ok();
}
/**
* 删除
*/
@RequestMapping("/delete")
//@RequiresPermissions("coupon:seckillsession:delete")
public R delete(@RequestBody Long[] ids){
seckillSessionService.removeByIds(Arrays.asList(ids));
return R.ok();
}
}

View file

@ -0,0 +1,89 @@
package name.lkk.kkmall.coupon.controller;
import java.util.Arrays;
import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import name.lkk.kkmall.coupon.entity.SeckillSkuNoticeEntity;
import name.lkk.kkmall.coupon.service.SeckillSkuNoticeService;
import name.lkk.common.utils.PageUtils;
import name.lkk.common.utils.R;
/**
* 秒杀商品通知订阅
*
* @author KirkLin
* @email linkirk@163.com
* @date 2021-06-07 16:10:19
*/
@RestController
@RequestMapping("coupon/seckillskunotice")
public class SeckillSkuNoticeController {
@Autowired
private SeckillSkuNoticeService seckillSkuNoticeService;
/**
* 列表
*/
@RequestMapping("/list")
//@RequiresPermissions("coupon:seckillskunotice:list")
public R list(@RequestParam Map<String, Object> params){
PageUtils page = seckillSkuNoticeService.queryPage(params);
return R.ok().put("page", page);
}
/**
* 信息
*/
@RequestMapping("/info/{id}")
//@RequiresPermissions("coupon:seckillskunotice:info")
public R info(@PathVariable("id") Long id){
SeckillSkuNoticeEntity seckillSkuNotice = seckillSkuNoticeService.getById(id);
return R.ok().put("seckillSkuNotice", seckillSkuNotice);
}
/**
* 保存
*/
@RequestMapping("/save")
//@RequiresPermissions("coupon:seckillskunotice:save")
public R save(@RequestBody SeckillSkuNoticeEntity seckillSkuNotice){
seckillSkuNoticeService.save(seckillSkuNotice);
return R.ok();
}
/**
* 修改
*/
@RequestMapping("/update")
//@RequiresPermissions("coupon:seckillskunotice:update")
public R update(@RequestBody SeckillSkuNoticeEntity seckillSkuNotice){
seckillSkuNoticeService.updateById(seckillSkuNotice);
return R.ok();
}
/**
* 删除
*/
@RequestMapping("/delete")
//@RequiresPermissions("coupon:seckillskunotice:delete")
public R delete(@RequestBody Long[] ids){
seckillSkuNoticeService.removeByIds(Arrays.asList(ids));
return R.ok();
}
}

View file

@ -0,0 +1,89 @@
package name.lkk.kkmall.coupon.controller;
import java.util.Arrays;
import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import name.lkk.kkmall.coupon.entity.SeckillSkuRelationEntity;
import name.lkk.kkmall.coupon.service.SeckillSkuRelationService;
import name.lkk.common.utils.PageUtils;
import name.lkk.common.utils.R;
/**
* 秒杀活动商品关联
*
* @author KirkLin
* @email linkirk@163.com
* @date 2021-06-07 16:10:19
*/
@RestController
@RequestMapping("coupon/seckillskurelation")
public class SeckillSkuRelationController {
@Autowired
private SeckillSkuRelationService seckillSkuRelationService;
/**
* 列表
*/
@RequestMapping("/list")
//@RequiresPermissions("coupon:seckillskurelation:list")
public R list(@RequestParam Map<String, Object> params){
PageUtils page = seckillSkuRelationService.queryPage(params);
return R.ok().put("page", page);
}
/**
* 信息
*/
@RequestMapping("/info/{id}")
//@RequiresPermissions("coupon:seckillskurelation:info")
public R info(@PathVariable("id") Long id){
SeckillSkuRelationEntity seckillSkuRelation = seckillSkuRelationService.getById(id);
return R.ok().put("seckillSkuRelation", seckillSkuRelation);
}
/**
* 保存
*/
@RequestMapping("/save")
//@RequiresPermissions("coupon:seckillskurelation:save")
public R save(@RequestBody SeckillSkuRelationEntity seckillSkuRelation){
seckillSkuRelationService.save(seckillSkuRelation);
return R.ok();
}
/**
* 修改
*/
@RequestMapping("/update")
//@RequiresPermissions("coupon:seckillskurelation:update")
public R update(@RequestBody SeckillSkuRelationEntity seckillSkuRelation){
seckillSkuRelationService.updateById(seckillSkuRelation);
return R.ok();
}
/**
* 删除
*/
@RequestMapping("/delete")
//@RequiresPermissions("coupon:seckillskurelation:delete")
public R delete(@RequestBody Long[] ids){
seckillSkuRelationService.removeByIds(Arrays.asList(ids));
return R.ok();
}
}

View file

@ -0,0 +1,89 @@
package name.lkk.kkmall.coupon.controller;
import java.util.Arrays;
import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import name.lkk.kkmall.coupon.entity.SkuFullReductionEntity;
import name.lkk.kkmall.coupon.service.SkuFullReductionService;
import name.lkk.common.utils.PageUtils;
import name.lkk.common.utils.R;
/**
* 商品满减信息
*
* @author KirkLin
* @email linkirk@163.com
* @date 2021-06-07 16:10:19
*/
@RestController
@RequestMapping("coupon/skufullreduction")
public class SkuFullReductionController {
@Autowired
private SkuFullReductionService skuFullReductionService;
/**
* 列表
*/
@RequestMapping("/list")
//@RequiresPermissions("coupon:skufullreduction:list")
public R list(@RequestParam Map<String, Object> params){
PageUtils page = skuFullReductionService.queryPage(params);
return R.ok().put("page", page);
}
/**
* 信息
*/
@RequestMapping("/info/{id}")
//@RequiresPermissions("coupon:skufullreduction:info")
public R info(@PathVariable("id") Long id){
SkuFullReductionEntity skuFullReduction = skuFullReductionService.getById(id);
return R.ok().put("skuFullReduction", skuFullReduction);
}
/**
* 保存
*/
@RequestMapping("/save")
//@RequiresPermissions("coupon:skufullreduction:save")
public R save(@RequestBody SkuFullReductionEntity skuFullReduction){
skuFullReductionService.save(skuFullReduction);
return R.ok();
}
/**
* 修改
*/
@RequestMapping("/update")
//@RequiresPermissions("coupon:skufullreduction:update")
public R update(@RequestBody SkuFullReductionEntity skuFullReduction){
skuFullReductionService.updateById(skuFullReduction);
return R.ok();
}
/**
* 删除
*/
@RequestMapping("/delete")
//@RequiresPermissions("coupon:skufullreduction:delete")
public R delete(@RequestBody Long[] ids){
skuFullReductionService.removeByIds(Arrays.asList(ids));
return R.ok();
}
}

View file

@ -0,0 +1,89 @@
package name.lkk.kkmall.coupon.controller;
import java.util.Arrays;
import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import name.lkk.kkmall.coupon.entity.SkuLadderEntity;
import name.lkk.kkmall.coupon.service.SkuLadderService;
import name.lkk.common.utils.PageUtils;
import name.lkk.common.utils.R;
/**
* 商品阶梯价格
*
* @author KirkLin
* @email linkirk@163.com
* @date 2021-06-07 16:10:19
*/
@RestController
@RequestMapping("coupon/skuladder")
public class SkuLadderController {
@Autowired
private SkuLadderService skuLadderService;
/**
* 列表
*/
@RequestMapping("/list")
//@RequiresPermissions("coupon:skuladder:list")
public R list(@RequestParam Map<String, Object> params){
PageUtils page = skuLadderService.queryPage(params);
return R.ok().put("page", page);
}
/**
* 信息
*/
@RequestMapping("/info/{id}")
//@RequiresPermissions("coupon:skuladder:info")
public R info(@PathVariable("id") Long id){
SkuLadderEntity skuLadder = skuLadderService.getById(id);
return R.ok().put("skuLadder", skuLadder);
}
/**
* 保存
*/
@RequestMapping("/save")
//@RequiresPermissions("coupon:skuladder:save")
public R save(@RequestBody SkuLadderEntity skuLadder){
skuLadderService.save(skuLadder);
return R.ok();
}
/**
* 修改
*/
@RequestMapping("/update")
//@RequiresPermissions("coupon:skuladder:update")
public R update(@RequestBody SkuLadderEntity skuLadder){
skuLadderService.updateById(skuLadder);
return R.ok();
}
/**
* 删除
*/
@RequestMapping("/delete")
//@RequiresPermissions("coupon:skuladder:delete")
public R delete(@RequestBody Long[] ids){
skuLadderService.removeByIds(Arrays.asList(ids));
return R.ok();
}
}

View file

@ -0,0 +1,89 @@
package name.lkk.kkmall.coupon.controller;
import java.util.Arrays;
import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import name.lkk.kkmall.coupon.entity.SpuBoundsEntity;
import name.lkk.kkmall.coupon.service.SpuBoundsService;
import name.lkk.common.utils.PageUtils;
import name.lkk.common.utils.R;
/**
* 商品spu积分设置
*
* @author KirkLin
* @email linkirk@163.com
* @date 2021-06-07 16:10:19
*/
@RestController
@RequestMapping("coupon/spubounds")
public class SpuBoundsController {
@Autowired
private SpuBoundsService spuBoundsService;
/**
* 列表
*/
@RequestMapping("/list")
//@RequiresPermissions("coupon:spubounds:list")
public R list(@RequestParam Map<String, Object> params){
PageUtils page = spuBoundsService.queryPage(params);
return R.ok().put("page", page);
}
/**
* 信息
*/
@RequestMapping("/info/{id}")
//@RequiresPermissions("coupon:spubounds:info")
public R info(@PathVariable("id") Long id){
SpuBoundsEntity spuBounds = spuBoundsService.getById(id);
return R.ok().put("spuBounds", spuBounds);
}
/**
* 保存
*/
@RequestMapping("/save")
//@RequiresPermissions("coupon:spubounds:save")
public R save(@RequestBody SpuBoundsEntity spuBounds){
spuBoundsService.save(spuBounds);
return R.ok();
}
/**
* 修改
*/
@RequestMapping("/update")
//@RequiresPermissions("coupon:spubounds:update")
public R update(@RequestBody SpuBoundsEntity spuBounds){
spuBoundsService.updateById(spuBounds);
return R.ok();
}
/**
* 删除
*/
@RequestMapping("/delete")
//@RequiresPermissions("coupon:spubounds:delete")
public R delete(@RequestBody Long[] ids){
spuBoundsService.removeByIds(Arrays.asList(ids));
return R.ok();
}
}

View file

@ -0,0 +1,17 @@
package name.lkk.kkmall.coupon.dao;
import name.lkk.kkmall.coupon.entity.CouponEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
/**
* 优惠券信息
*
* @author KirkLin
* @email linkirk@163.com
* @date 2021-06-07 16:10:19
*/
@Mapper
public interface CouponDao extends BaseMapper<CouponEntity> {
}

View file

@ -0,0 +1,17 @@
package name.lkk.kkmall.coupon.dao;
import name.lkk.kkmall.coupon.entity.CouponHistoryEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
/**
* 优惠券领取历史记录
*
* @author KirkLin
* @email linkirk@163.com
* @date 2021-06-07 16:10:19
*/
@Mapper
public interface CouponHistoryDao extends BaseMapper<CouponHistoryEntity> {
}

View file

@ -0,0 +1,17 @@
package name.lkk.kkmall.coupon.dao;
import name.lkk.kkmall.coupon.entity.CouponSpuCategoryRelationEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
/**
* 优惠券分类关联
*
* @author KirkLin
* @email linkirk@163.com
* @date 2021-06-07 16:10:19
*/
@Mapper
public interface CouponSpuCategoryRelationDao extends BaseMapper<CouponSpuCategoryRelationEntity> {
}

View file

@ -0,0 +1,17 @@
package name.lkk.kkmall.coupon.dao;
import name.lkk.kkmall.coupon.entity.CouponSpuRelationEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
/**
* 优惠券与产品关联
*
* @author KirkLin
* @email linkirk@163.com
* @date 2021-06-07 16:10:19
*/
@Mapper
public interface CouponSpuRelationDao extends BaseMapper<CouponSpuRelationEntity> {
}

View file

@ -0,0 +1,17 @@
package name.lkk.kkmall.coupon.dao;
import name.lkk.kkmall.coupon.entity.HomeAdvEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
/**
* 首页轮播广告
*
* @author KirkLin
* @email linkirk@163.com
* @date 2021-06-07 16:10:19
*/
@Mapper
public interface HomeAdvDao extends BaseMapper<HomeAdvEntity> {
}

View file

@ -0,0 +1,17 @@
package name.lkk.kkmall.coupon.dao;
import name.lkk.kkmall.coupon.entity.HomeSubjectEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
/**
* 首页专题表jd首页下面很多专题每个专题链接新的页面展示专题商品信息
*
* @author KirkLin
* @email linkirk@163.com
* @date 2021-06-07 16:10:19
*/
@Mapper
public interface HomeSubjectDao extends BaseMapper<HomeSubjectEntity> {
}

View file

@ -0,0 +1,17 @@
package name.lkk.kkmall.coupon.dao;
import name.lkk.kkmall.coupon.entity.HomeSubjectSpuEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
/**
* 专题商品
*
* @author KirkLin
* @email linkirk@163.com
* @date 2021-06-07 16:10:19
*/
@Mapper
public interface HomeSubjectSpuDao extends BaseMapper<HomeSubjectSpuEntity> {
}

View file

@ -0,0 +1,17 @@
package name.lkk.kkmall.coupon.dao;
import name.lkk.kkmall.coupon.entity.MemberPriceEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
/**
* 商品会员价格
*
* @author KirkLin
* @email linkirk@163.com
* @date 2021-06-07 16:10:19
*/
@Mapper
public interface MemberPriceDao extends BaseMapper<MemberPriceEntity> {
}

View file

@ -0,0 +1,17 @@
package name.lkk.kkmall.coupon.dao;
import name.lkk.kkmall.coupon.entity.SeckillPromotionEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
/**
* 秒杀活动
*
* @author KirkLin
* @email linkirk@163.com
* @date 2021-06-07 16:10:19
*/
@Mapper
public interface SeckillPromotionDao extends BaseMapper<SeckillPromotionEntity> {
}

View file

@ -0,0 +1,17 @@
package name.lkk.kkmall.coupon.dao;
import name.lkk.kkmall.coupon.entity.SeckillSessionEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
/**
* 秒杀活动场次
*
* @author KirkLin
* @email linkirk@163.com
* @date 2021-06-07 16:10:19
*/
@Mapper
public interface SeckillSessionDao extends BaseMapper<SeckillSessionEntity> {
}

View file

@ -0,0 +1,17 @@
package name.lkk.kkmall.coupon.dao;
import name.lkk.kkmall.coupon.entity.SeckillSkuNoticeEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
/**
* 秒杀商品通知订阅
*
* @author KirkLin
* @email linkirk@163.com
* @date 2021-06-07 16:10:19
*/
@Mapper
public interface SeckillSkuNoticeDao extends BaseMapper<SeckillSkuNoticeEntity> {
}

View file

@ -0,0 +1,17 @@
package name.lkk.kkmall.coupon.dao;
import name.lkk.kkmall.coupon.entity.SeckillSkuRelationEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
/**
* 秒杀活动商品关联
*
* @author KirkLin
* @email linkirk@163.com
* @date 2021-06-07 16:10:19
*/
@Mapper
public interface SeckillSkuRelationDao extends BaseMapper<SeckillSkuRelationEntity> {
}

View file

@ -0,0 +1,17 @@
package name.lkk.kkmall.coupon.dao;
import name.lkk.kkmall.coupon.entity.SkuFullReductionEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
/**
* 商品满减信息
*
* @author KirkLin
* @email linkirk@163.com
* @date 2021-06-07 16:10:19
*/
@Mapper
public interface SkuFullReductionDao extends BaseMapper<SkuFullReductionEntity> {
}

View file

@ -0,0 +1,17 @@
package name.lkk.kkmall.coupon.dao;
import name.lkk.kkmall.coupon.entity.SkuLadderEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
/**
* 商品阶梯价格
*
* @author KirkLin
* @email linkirk@163.com
* @date 2021-06-07 16:10:19
*/
@Mapper
public interface SkuLadderDao extends BaseMapper<SkuLadderEntity> {
}

View file

@ -0,0 +1,17 @@
package name.lkk.kkmall.coupon.dao;
import name.lkk.kkmall.coupon.entity.SpuBoundsEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
/**
* 商品spu积分设置
*
* @author KirkLin
* @email linkirk@163.com
* @date 2021-06-07 16:10:19
*/
@Mapper
public interface SpuBoundsDao extends BaseMapper<SpuBoundsEntity> {
}

View file

@ -0,0 +1,105 @@
package name.lkk.kkmall.coupon.entity;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.math.BigDecimal;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
/**
* 优惠券信息
*
* @author KirkLin
* @email linkirk@163.com
* @date 2021-06-07 16:10:19
*/
@Data
@TableName("sms_coupon")
public class CouponEntity implements Serializable {
private static final long serialVersionUID = 1L;
/**
* id
*/
@TableId
private Long id;
/**
* 优惠卷类型[0->全场赠券1->会员赠券2->购物赠券3->注册赠券]
*/
private Integer couponType;
/**
* 优惠券图片
*/
private String couponImg;
/**
* 优惠卷名字
*/
private String couponName;
/**
* 数量
*/
private Integer num;
/**
* 金额
*/
private BigDecimal amount;
/**
* 每人限领张数
*/
private Integer perLimit;
/**
* 使用门槛
*/
private BigDecimal minPoint;
/**
* 开始时间
*/
private Date startTime;
/**
* 结束时间
*/
private Date endTime;
/**
* 使用类型[0->全场通用1->指定分类2->指定商品]
*/
private Integer useType;
/**
* 备注
*/
private String note;
/**
* 发行数量
*/
private Integer publishCount;
/**
* 已使用数量
*/
private Integer useCount;
/**
* 领取数量
*/
private Integer receiveCount;
/**
* 可以领取的开始日期
*/
private Date enableStartTime;
/**
* 可以领取的结束日期
*/
private Date enableEndTime;
/**
* 优惠码
*/
private String code;
/**
* 可以领取的会员等级[0->不限等级其他-对应等级]
*/
private Integer memberLevel;
/**
* 发布状态[0-未发布1-已发布]
*/
private Integer publish;
}

View file

@ -0,0 +1,64 @@
package name.lkk.kkmall.coupon.entity;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
/**
* 优惠券领取历史记录
*
* @author KirkLin
* @email linkirk@163.com
* @date 2021-06-07 16:10:19
*/
@Data
@TableName("sms_coupon_history")
public class CouponHistoryEntity implements Serializable {
private static final long serialVersionUID = 1L;
/**
* id
*/
@TableId
private Long id;
/**
* 优惠券id
*/
private Long couponId;
/**
* 会员id
*/
private Long memberId;
/**
* 会员名字
*/
private String memberNickName;
/**
* 获取方式[0->后台赠送1->主动领取]
*/
private Integer getType;
/**
* 创建时间
*/
private Date createTime;
/**
* 使用状态[0->未使用1->已使用2->已过期]
*/
private Integer useType;
/**
* 使用时间
*/
private Date useTime;
/**
* 订单id
*/
private Long orderId;
/**
* 订单号
*/
private Long orderSn;
}

View file

@ -0,0 +1,40 @@
package name.lkk.kkmall.coupon.entity;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
/**
* 优惠券分类关联
*
* @author KirkLin
* @email linkirk@163.com
* @date 2021-06-07 16:10:19
*/
@Data
@TableName("sms_coupon_spu_category_relation")
public class CouponSpuCategoryRelationEntity implements Serializable {
private static final long serialVersionUID = 1L;
/**
* id
*/
@TableId
private Long id;
/**
* 优惠券id
*/
private Long couponId;
/**
* 产品分类id
*/
private Long categoryId;
/**
* 产品分类名称
*/
private String categoryName;
}

View file

@ -0,0 +1,40 @@
package name.lkk.kkmall.coupon.entity;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
/**
* 优惠券与产品关联
*
* @author KirkLin
* @email linkirk@163.com
* @date 2021-06-07 16:10:19
*/
@Data
@TableName("sms_coupon_spu_relation")
public class CouponSpuRelationEntity implements Serializable {
private static final long serialVersionUID = 1L;
/**
* id
*/
@TableId
private Long id;
/**
* 优惠券id
*/
private Long couponId;
/**
* spu_id
*/
private Long spuId;
/**
* spu_name
*/
private String spuName;
}

View file

@ -0,0 +1,72 @@
package name.lkk.kkmall.coupon.entity;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
/**
* 首页轮播广告
*
* @author KirkLin
* @email linkirk@163.com
* @date 2021-06-07 16:10:19
*/
@Data
@TableName("sms_home_adv")
public class HomeAdvEntity implements Serializable {
private static final long serialVersionUID = 1L;
/**
* id
*/
@TableId
private Long id;
/**
* 名字
*/
private String name;
/**
* 图片地址
*/
private String pic;
/**
* 开始时间
*/
private Date startTime;
/**
* 结束时间
*/
private Date endTime;
/**
* 状态
*/
private Integer status;
/**
* 点击数
*/
private Integer clickCount;
/**
* 广告详情连接地址
*/
private String url;
/**
* 备注
*/
private String note;
/**
* 排序
*/
private Integer sort;
/**
* 发布者
*/
private Long publisherId;
/**
* 审核者
*/
private Long authId;
}

View file

@ -0,0 +1,56 @@
package name.lkk.kkmall.coupon.entity;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
/**
* 首页专题表jd首页下面很多专题每个专题链接新的页面展示专题商品信息
*
* @author KirkLin
* @email linkirk@163.com
* @date 2021-06-07 16:10:19
*/
@Data
@TableName("sms_home_subject")
public class HomeSubjectEntity implements Serializable {
private static final long serialVersionUID = 1L;
/**
* id
*/
@TableId
private Long id;
/**
* 专题名字
*/
private String name;
/**
* 专题标题
*/
private String title;
/**
* 专题副标题
*/
private String subTitle;
/**
* 显示状态
*/
private Integer status;
/**
* 详情连接
*/
private String url;
/**
* 排序
*/
private Integer sort;
/**
* 专题图片地址
*/
private String img;
}

View file

@ -0,0 +1,44 @@
package name.lkk.kkmall.coupon.entity;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
/**
* 专题商品
*
* @author KirkLin
* @email linkirk@163.com
* @date 2021-06-07 16:10:19
*/
@Data
@TableName("sms_home_subject_spu")
public class HomeSubjectSpuEntity implements Serializable {
private static final long serialVersionUID = 1L;
/**
* id
*/
@TableId
private Long id;
/**
* 专题名字
*/
private String name;
/**
* 专题id
*/
private Long subjectId;
/**
* spu_id
*/
private Long spuId;
/**
* 排序
*/
private Integer sort;
}

View file

@ -0,0 +1,49 @@
package name.lkk.kkmall.coupon.entity;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.math.BigDecimal;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
/**
* 商品会员价格
*
* @author KirkLin
* @email linkirk@163.com
* @date 2021-06-07 16:10:19
*/
@Data
@TableName("sms_member_price")
public class MemberPriceEntity implements Serializable {
private static final long serialVersionUID = 1L;
/**
* id
*/
@TableId
private Long id;
/**
* sku_id
*/
private Long skuId;
/**
* 会员等级id
*/
private Long memberLevelId;
/**
* 会员等级名
*/
private String memberLevelName;
/**
* 会员对应价格
*/
private BigDecimal memberPrice;
/**
* 可否叠加其他优惠[0-不可叠加优惠1-可叠加]
*/
private Integer addOther;
}

View file

@ -0,0 +1,52 @@
package name.lkk.kkmall.coupon.entity;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
/**
* 秒杀活动
*
* @author KirkLin
* @email linkirk@163.com
* @date 2021-06-07 16:10:19
*/
@Data
@TableName("sms_seckill_promotion")
public class SeckillPromotionEntity implements Serializable {
private static final long serialVersionUID = 1L;
/**
* id
*/
@TableId
private Long id;
/**
* 活动标题
*/
private String title;
/**
* 开始日期
*/
private Date startTime;
/**
* 结束日期
*/
private Date endTime;
/**
* 上下线状态
*/
private Integer status;
/**
* 创建时间
*/
private Date createTime;
/**
* 创建人
*/
private Long userId;
}

View file

@ -0,0 +1,48 @@
package name.lkk.kkmall.coupon.entity;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
/**
* 秒杀活动场次
*
* @author KirkLin
* @email linkirk@163.com
* @date 2021-06-07 16:10:19
*/
@Data
@TableName("sms_seckill_session")
public class SeckillSessionEntity implements Serializable {
private static final long serialVersionUID = 1L;
/**
* id
*/
@TableId
private Long id;
/**
* 场次名称
*/
private String name;
/**
* 每日开始时间
*/
private Date startTime;
/**
* 每日结束时间
*/
private Date endTime;
/**
* 启用状态
*/
private Integer status;
/**
* 创建时间
*/
private Date createTime;
}

View file

@ -0,0 +1,52 @@
package name.lkk.kkmall.coupon.entity;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
/**
* 秒杀商品通知订阅
*
* @author KirkLin
* @email linkirk@163.com
* @date 2021-06-07 16:10:19
*/
@Data
@TableName("sms_seckill_sku_notice")
public class SeckillSkuNoticeEntity implements Serializable {
private static final long serialVersionUID = 1L;
/**
* id
*/
@TableId
private Long id;
/**
* member_id
*/
private Long memberId;
/**
* sku_id
*/
private Long skuId;
/**
* 活动场次id
*/
private Long sessionId;
/**
* 订阅时间
*/
private Date subcribeTime;
/**
* 发送时间
*/
private Date sendTime;
/**
* 通知方式[0-短信1-邮件]
*/
private Integer noticeType;
}

View file

@ -0,0 +1,57 @@
package name.lkk.kkmall.coupon.entity;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.math.BigDecimal;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
/**
* 秒杀活动商品关联
*
* @author KirkLin
* @email linkirk@163.com
* @date 2021-06-07 16:10:19
*/
@Data
@TableName("sms_seckill_sku_relation")
public class SeckillSkuRelationEntity implements Serializable {
private static final long serialVersionUID = 1L;
/**
* id
*/
@TableId
private Long id;
/**
* 活动id
*/
private Long promotionId;
/**
* 活动场次id
*/
private Long promotionSessionId;
/**
* 商品id
*/
private Long skuId;
/**
* 秒杀价格
*/
private BigDecimal seckillPrice;
/**
* 秒杀总量
*/
private BigDecimal seckillCount;
/**
* 每人限购数量
*/
private BigDecimal seckillLimit;
/**
* 排序
*/
private Integer seckillSort;
}

View file

@ -0,0 +1,45 @@
package name.lkk.kkmall.coupon.entity;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.math.BigDecimal;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
/**
* 商品满减信息
*
* @author KirkLin
* @email linkirk@163.com
* @date 2021-06-07 16:10:19
*/
@Data
@TableName("sms_sku_full_reduction")
public class SkuFullReductionEntity implements Serializable {
private static final long serialVersionUID = 1L;
/**
* id
*/
@TableId
private Long id;
/**
* spu_id
*/
private Long skuId;
/**
* 满多少
*/
private BigDecimal fullPrice;
/**
* 减多少
*/
private BigDecimal reducePrice;
/**
* 是否参与其他优惠
*/
private Integer addOther;
}

View file

@ -0,0 +1,49 @@
package name.lkk.kkmall.coupon.entity;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.math.BigDecimal;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
/**
* 商品阶梯价格
*
* @author KirkLin
* @email linkirk@163.com
* @date 2021-06-07 16:10:19
*/
@Data
@TableName("sms_sku_ladder")
public class SkuLadderEntity implements Serializable {
private static final long serialVersionUID = 1L;
/**
* id
*/
@TableId
private Long id;
/**
* spu_id
*/
private Long skuId;
/**
* 满几件
*/
private Integer fullCount;
/**
* 打几折
*/
private BigDecimal discount;
/**
* 折后价
*/
private BigDecimal price;
/**
* 是否叠加其他优惠[0-不可叠加1-可叠加]
*/
private Integer addOther;
}

View file

@ -0,0 +1,45 @@
package name.lkk.kkmall.coupon.entity;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.math.BigDecimal;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
/**
* 商品spu积分设置
*
* @author KirkLin
* @email linkirk@163.com
* @date 2021-06-07 16:10:19
*/
@Data
@TableName("sms_spu_bounds")
public class SpuBoundsEntity implements Serializable {
private static final long serialVersionUID = 1L;
/**
* id
*/
@TableId
private Long id;
/**
*
*/
private Long spuId;
/**
* 成长积分
*/
private BigDecimal growBounds;
/**
* 购物积分
*/
private BigDecimal buyBounds;
/**
* 优惠生效情况[1111四个状态位从右到左;0 - 无优惠成长积分是否赠送;1 - 无优惠购物积分是否赠送;2 - 有优惠成长积分是否赠送;3 - 有优惠购物积分是否赠送状态位0不赠送1赠送]
*/
private Integer work;
}

View file

@ -0,0 +1,20 @@
package name.lkk.kkmall.coupon.service;
import com.baomidou.mybatisplus.extension.service.IService;
import name.lkk.common.utils.PageUtils;
import name.lkk.kkmall.coupon.entity.CouponHistoryEntity;
import java.util.Map;
/**
* 优惠券领取历史记录
*
* @author KirkLin
* @email linkirk@163.com
* @date 2021-06-07 16:10:19
*/
public interface CouponHistoryService extends IService<CouponHistoryEntity> {
PageUtils queryPage(Map<String, Object> params);
}

View file

@ -0,0 +1,20 @@
package name.lkk.kkmall.coupon.service;
import com.baomidou.mybatisplus.extension.service.IService;
import name.lkk.common.utils.PageUtils;
import name.lkk.kkmall.coupon.entity.CouponEntity;
import java.util.Map;
/**
* 优惠券信息
*
* @author KirkLin
* @email linkirk@163.com
* @date 2021-06-07 16:10:19
*/
public interface CouponService extends IService<CouponEntity> {
PageUtils queryPage(Map<String, Object> params);
}

View file

@ -0,0 +1,20 @@
package name.lkk.kkmall.coupon.service;
import com.baomidou.mybatisplus.extension.service.IService;
import name.lkk.common.utils.PageUtils;
import name.lkk.kkmall.coupon.entity.CouponSpuCategoryRelationEntity;
import java.util.Map;
/**
* 优惠券分类关联
*
* @author KirkLin
* @email linkirk@163.com
* @date 2021-06-07 16:10:19
*/
public interface CouponSpuCategoryRelationService extends IService<CouponSpuCategoryRelationEntity> {
PageUtils queryPage(Map<String, Object> params);
}

View file

@ -0,0 +1,20 @@
package name.lkk.kkmall.coupon.service;
import com.baomidou.mybatisplus.extension.service.IService;
import name.lkk.common.utils.PageUtils;
import name.lkk.kkmall.coupon.entity.CouponSpuRelationEntity;
import java.util.Map;
/**
* 优惠券与产品关联
*
* @author KirkLin
* @email linkirk@163.com
* @date 2021-06-07 16:10:19
*/
public interface CouponSpuRelationService extends IService<CouponSpuRelationEntity> {
PageUtils queryPage(Map<String, Object> params);
}

View file

@ -0,0 +1,20 @@
package name.lkk.kkmall.coupon.service;
import com.baomidou.mybatisplus.extension.service.IService;
import name.lkk.common.utils.PageUtils;
import name.lkk.kkmall.coupon.entity.HomeAdvEntity;
import java.util.Map;
/**
* 首页轮播广告
*
* @author KirkLin
* @email linkirk@163.com
* @date 2021-06-07 16:10:19
*/
public interface HomeAdvService extends IService<HomeAdvEntity> {
PageUtils queryPage(Map<String, Object> params);
}

View file

@ -0,0 +1,20 @@
package name.lkk.kkmall.coupon.service;
import com.baomidou.mybatisplus.extension.service.IService;
import name.lkk.common.utils.PageUtils;
import name.lkk.kkmall.coupon.entity.HomeSubjectEntity;
import java.util.Map;
/**
* 首页专题表jd首页下面很多专题每个专题链接新的页面展示专题商品信息
*
* @author KirkLin
* @email linkirk@163.com
* @date 2021-06-07 16:10:19
*/
public interface HomeSubjectService extends IService<HomeSubjectEntity> {
PageUtils queryPage(Map<String, Object> params);
}

View file

@ -0,0 +1,20 @@
package name.lkk.kkmall.coupon.service;
import com.baomidou.mybatisplus.extension.service.IService;
import name.lkk.common.utils.PageUtils;
import name.lkk.kkmall.coupon.entity.HomeSubjectSpuEntity;
import java.util.Map;
/**
* 专题商品
*
* @author KirkLin
* @email linkirk@163.com
* @date 2021-06-07 16:10:19
*/
public interface HomeSubjectSpuService extends IService<HomeSubjectSpuEntity> {
PageUtils queryPage(Map<String, Object> params);
}

View file

@ -0,0 +1,20 @@
package name.lkk.kkmall.coupon.service;
import com.baomidou.mybatisplus.extension.service.IService;
import name.lkk.common.utils.PageUtils;
import name.lkk.kkmall.coupon.entity.MemberPriceEntity;
import java.util.Map;
/**
* 商品会员价格
*
* @author KirkLin
* @email linkirk@163.com
* @date 2021-06-07 16:10:19
*/
public interface MemberPriceService extends IService<MemberPriceEntity> {
PageUtils queryPage(Map<String, Object> params);
}

View file

@ -0,0 +1,20 @@
package name.lkk.kkmall.coupon.service;
import com.baomidou.mybatisplus.extension.service.IService;
import name.lkk.common.utils.PageUtils;
import name.lkk.kkmall.coupon.entity.SeckillPromotionEntity;
import java.util.Map;
/**
* 秒杀活动
*
* @author KirkLin
* @email linkirk@163.com
* @date 2021-06-07 16:10:19
*/
public interface SeckillPromotionService extends IService<SeckillPromotionEntity> {
PageUtils queryPage(Map<String, Object> params);
}

View file

@ -0,0 +1,20 @@
package name.lkk.kkmall.coupon.service;
import com.baomidou.mybatisplus.extension.service.IService;
import name.lkk.common.utils.PageUtils;
import name.lkk.kkmall.coupon.entity.SeckillSessionEntity;
import java.util.Map;
/**
* 秒杀活动场次
*
* @author KirkLin
* @email linkirk@163.com
* @date 2021-06-07 16:10:19
*/
public interface SeckillSessionService extends IService<SeckillSessionEntity> {
PageUtils queryPage(Map<String, Object> params);
}

View file

@ -0,0 +1,20 @@
package name.lkk.kkmall.coupon.service;
import com.baomidou.mybatisplus.extension.service.IService;
import name.lkk.common.utils.PageUtils;
import name.lkk.kkmall.coupon.entity.SeckillSkuNoticeEntity;
import java.util.Map;
/**
* 秒杀商品通知订阅
*
* @author KirkLin
* @email linkirk@163.com
* @date 2021-06-07 16:10:19
*/
public interface SeckillSkuNoticeService extends IService<SeckillSkuNoticeEntity> {
PageUtils queryPage(Map<String, Object> params);
}

View file

@ -0,0 +1,20 @@
package name.lkk.kkmall.coupon.service;
import com.baomidou.mybatisplus.extension.service.IService;
import name.lkk.common.utils.PageUtils;
import name.lkk.kkmall.coupon.entity.SeckillSkuRelationEntity;
import java.util.Map;
/**
* 秒杀活动商品关联
*
* @author KirkLin
* @email linkirk@163.com
* @date 2021-06-07 16:10:19
*/
public interface SeckillSkuRelationService extends IService<SeckillSkuRelationEntity> {
PageUtils queryPage(Map<String, Object> params);
}

View file

@ -0,0 +1,20 @@
package name.lkk.kkmall.coupon.service;
import com.baomidou.mybatisplus.extension.service.IService;
import name.lkk.common.utils.PageUtils;
import name.lkk.kkmall.coupon.entity.SkuFullReductionEntity;
import java.util.Map;
/**
* 商品满减信息
*
* @author KirkLin
* @email linkirk@163.com
* @date 2021-06-07 16:10:19
*/
public interface SkuFullReductionService extends IService<SkuFullReductionEntity> {
PageUtils queryPage(Map<String, Object> params);
}

View file

@ -0,0 +1,20 @@
package name.lkk.kkmall.coupon.service;
import com.baomidou.mybatisplus.extension.service.IService;
import name.lkk.common.utils.PageUtils;
import name.lkk.kkmall.coupon.entity.SkuLadderEntity;
import java.util.Map;
/**
* 商品阶梯价格
*
* @author KirkLin
* @email linkirk@163.com
* @date 2021-06-07 16:10:19
*/
public interface SkuLadderService extends IService<SkuLadderEntity> {
PageUtils queryPage(Map<String, Object> params);
}

View file

@ -0,0 +1,20 @@
package name.lkk.kkmall.coupon.service;
import com.baomidou.mybatisplus.extension.service.IService;
import name.lkk.common.utils.PageUtils;
import name.lkk.kkmall.coupon.entity.SpuBoundsEntity;
import java.util.Map;
/**
* 商品spu积分设置
*
* @author KirkLin
* @email linkirk@163.com
* @date 2021-06-07 16:10:19
*/
public interface SpuBoundsService extends IService<SpuBoundsEntity> {
PageUtils queryPage(Map<String, Object> params);
}

View file

@ -0,0 +1,29 @@
package name.lkk.kkmall.coupon.service.impl;
import org.springframework.stereotype.Service;
import java.util.Map;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import name.lkk.common.utils.PageUtils;
import name.lkk.common.utils.Query;
import name.lkk.kkmall.coupon.dao.CouponHistoryDao;
import name.lkk.kkmall.coupon.entity.CouponHistoryEntity;
import name.lkk.kkmall.coupon.service.CouponHistoryService;
@Service("couponHistoryService")
public class CouponHistoryServiceImpl extends ServiceImpl<CouponHistoryDao, CouponHistoryEntity> implements CouponHistoryService {
@Override
public PageUtils queryPage(Map<String, Object> params) {
IPage<CouponHistoryEntity> page = this.page(
new Query<CouponHistoryEntity>().getPage(params),
new QueryWrapper<CouponHistoryEntity>()
);
return new PageUtils(page);
}
}

View file

@ -0,0 +1,29 @@
package name.lkk.kkmall.coupon.service.impl;
import org.springframework.stereotype.Service;
import java.util.Map;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import name.lkk.common.utils.PageUtils;
import name.lkk.common.utils.Query;
import name.lkk.kkmall.coupon.dao.CouponDao;
import name.lkk.kkmall.coupon.entity.CouponEntity;
import name.lkk.kkmall.coupon.service.CouponService;
@Service("couponService")
public class CouponServiceImpl extends ServiceImpl<CouponDao, CouponEntity> implements CouponService {
@Override
public PageUtils queryPage(Map<String, Object> params) {
IPage<CouponEntity> page = this.page(
new Query<CouponEntity>().getPage(params),
new QueryWrapper<CouponEntity>()
);
return new PageUtils(page);
}
}

View file

@ -0,0 +1,29 @@
package name.lkk.kkmall.coupon.service.impl;
import org.springframework.stereotype.Service;
import java.util.Map;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import name.lkk.common.utils.PageUtils;
import name.lkk.common.utils.Query;
import name.lkk.kkmall.coupon.dao.CouponSpuCategoryRelationDao;
import name.lkk.kkmall.coupon.entity.CouponSpuCategoryRelationEntity;
import name.lkk.kkmall.coupon.service.CouponSpuCategoryRelationService;
@Service("couponSpuCategoryRelationService")
public class CouponSpuCategoryRelationServiceImpl extends ServiceImpl<CouponSpuCategoryRelationDao, CouponSpuCategoryRelationEntity> implements CouponSpuCategoryRelationService {
@Override
public PageUtils queryPage(Map<String, Object> params) {
IPage<CouponSpuCategoryRelationEntity> page = this.page(
new Query<CouponSpuCategoryRelationEntity>().getPage(params),
new QueryWrapper<CouponSpuCategoryRelationEntity>()
);
return new PageUtils(page);
}
}

View file

@ -0,0 +1,29 @@
package name.lkk.kkmall.coupon.service.impl;
import org.springframework.stereotype.Service;
import java.util.Map;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import name.lkk.common.utils.PageUtils;
import name.lkk.common.utils.Query;
import name.lkk.kkmall.coupon.dao.CouponSpuRelationDao;
import name.lkk.kkmall.coupon.entity.CouponSpuRelationEntity;
import name.lkk.kkmall.coupon.service.CouponSpuRelationService;
@Service("couponSpuRelationService")
public class CouponSpuRelationServiceImpl extends ServiceImpl<CouponSpuRelationDao, CouponSpuRelationEntity> implements CouponSpuRelationService {
@Override
public PageUtils queryPage(Map<String, Object> params) {
IPage<CouponSpuRelationEntity> page = this.page(
new Query<CouponSpuRelationEntity>().getPage(params),
new QueryWrapper<CouponSpuRelationEntity>()
);
return new PageUtils(page);
}
}

View file

@ -0,0 +1,29 @@
package name.lkk.kkmall.coupon.service.impl;
import org.springframework.stereotype.Service;
import java.util.Map;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import name.lkk.common.utils.PageUtils;
import name.lkk.common.utils.Query;
import name.lkk.kkmall.coupon.dao.HomeAdvDao;
import name.lkk.kkmall.coupon.entity.HomeAdvEntity;
import name.lkk.kkmall.coupon.service.HomeAdvService;
@Service("homeAdvService")
public class HomeAdvServiceImpl extends ServiceImpl<HomeAdvDao, HomeAdvEntity> implements HomeAdvService {
@Override
public PageUtils queryPage(Map<String, Object> params) {
IPage<HomeAdvEntity> page = this.page(
new Query<HomeAdvEntity>().getPage(params),
new QueryWrapper<HomeAdvEntity>()
);
return new PageUtils(page);
}
}

View file

@ -0,0 +1,29 @@
package name.lkk.kkmall.coupon.service.impl;
import org.springframework.stereotype.Service;
import java.util.Map;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import name.lkk.common.utils.PageUtils;
import name.lkk.common.utils.Query;
import name.lkk.kkmall.coupon.dao.HomeSubjectDao;
import name.lkk.kkmall.coupon.entity.HomeSubjectEntity;
import name.lkk.kkmall.coupon.service.HomeSubjectService;
@Service("homeSubjectService")
public class HomeSubjectServiceImpl extends ServiceImpl<HomeSubjectDao, HomeSubjectEntity> implements HomeSubjectService {
@Override
public PageUtils queryPage(Map<String, Object> params) {
IPage<HomeSubjectEntity> page = this.page(
new Query<HomeSubjectEntity>().getPage(params),
new QueryWrapper<HomeSubjectEntity>()
);
return new PageUtils(page);
}
}

View file

@ -0,0 +1,29 @@
package name.lkk.kkmall.coupon.service.impl;
import org.springframework.stereotype.Service;
import java.util.Map;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import name.lkk.common.utils.PageUtils;
import name.lkk.common.utils.Query;
import name.lkk.kkmall.coupon.dao.HomeSubjectSpuDao;
import name.lkk.kkmall.coupon.entity.HomeSubjectSpuEntity;
import name.lkk.kkmall.coupon.service.HomeSubjectSpuService;
@Service("homeSubjectSpuService")
public class HomeSubjectSpuServiceImpl extends ServiceImpl<HomeSubjectSpuDao, HomeSubjectSpuEntity> implements HomeSubjectSpuService {
@Override
public PageUtils queryPage(Map<String, Object> params) {
IPage<HomeSubjectSpuEntity> page = this.page(
new Query<HomeSubjectSpuEntity>().getPage(params),
new QueryWrapper<HomeSubjectSpuEntity>()
);
return new PageUtils(page);
}
}

View file

@ -0,0 +1,29 @@
package name.lkk.kkmall.coupon.service.impl;
import org.springframework.stereotype.Service;
import java.util.Map;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import name.lkk.common.utils.PageUtils;
import name.lkk.common.utils.Query;
import name.lkk.kkmall.coupon.dao.MemberPriceDao;
import name.lkk.kkmall.coupon.entity.MemberPriceEntity;
import name.lkk.kkmall.coupon.service.MemberPriceService;
@Service("memberPriceService")
public class MemberPriceServiceImpl extends ServiceImpl<MemberPriceDao, MemberPriceEntity> implements MemberPriceService {
@Override
public PageUtils queryPage(Map<String, Object> params) {
IPage<MemberPriceEntity> page = this.page(
new Query<MemberPriceEntity>().getPage(params),
new QueryWrapper<MemberPriceEntity>()
);
return new PageUtils(page);
}
}

View file

@ -0,0 +1,29 @@
package name.lkk.kkmall.coupon.service.impl;
import org.springframework.stereotype.Service;
import java.util.Map;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import name.lkk.common.utils.PageUtils;
import name.lkk.common.utils.Query;
import name.lkk.kkmall.coupon.dao.SeckillPromotionDao;
import name.lkk.kkmall.coupon.entity.SeckillPromotionEntity;
import name.lkk.kkmall.coupon.service.SeckillPromotionService;
@Service("seckillPromotionService")
public class SeckillPromotionServiceImpl extends ServiceImpl<SeckillPromotionDao, SeckillPromotionEntity> implements SeckillPromotionService {
@Override
public PageUtils queryPage(Map<String, Object> params) {
IPage<SeckillPromotionEntity> page = this.page(
new Query<SeckillPromotionEntity>().getPage(params),
new QueryWrapper<SeckillPromotionEntity>()
);
return new PageUtils(page);
}
}

View file

@ -0,0 +1,29 @@
package name.lkk.kkmall.coupon.service.impl;
import org.springframework.stereotype.Service;
import java.util.Map;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import name.lkk.common.utils.PageUtils;
import name.lkk.common.utils.Query;
import name.lkk.kkmall.coupon.dao.SeckillSessionDao;
import name.lkk.kkmall.coupon.entity.SeckillSessionEntity;
import name.lkk.kkmall.coupon.service.SeckillSessionService;
@Service("seckillSessionService")
public class SeckillSessionServiceImpl extends ServiceImpl<SeckillSessionDao, SeckillSessionEntity> implements SeckillSessionService {
@Override
public PageUtils queryPage(Map<String, Object> params) {
IPage<SeckillSessionEntity> page = this.page(
new Query<SeckillSessionEntity>().getPage(params),
new QueryWrapper<SeckillSessionEntity>()
);
return new PageUtils(page);
}
}

View file

@ -0,0 +1,29 @@
package name.lkk.kkmall.coupon.service.impl;
import org.springframework.stereotype.Service;
import java.util.Map;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import name.lkk.common.utils.PageUtils;
import name.lkk.common.utils.Query;
import name.lkk.kkmall.coupon.dao.SeckillSkuNoticeDao;
import name.lkk.kkmall.coupon.entity.SeckillSkuNoticeEntity;
import name.lkk.kkmall.coupon.service.SeckillSkuNoticeService;
@Service("seckillSkuNoticeService")
public class SeckillSkuNoticeServiceImpl extends ServiceImpl<SeckillSkuNoticeDao, SeckillSkuNoticeEntity> implements SeckillSkuNoticeService {
@Override
public PageUtils queryPage(Map<String, Object> params) {
IPage<SeckillSkuNoticeEntity> page = this.page(
new Query<SeckillSkuNoticeEntity>().getPage(params),
new QueryWrapper<SeckillSkuNoticeEntity>()
);
return new PageUtils(page);
}
}

View file

@ -0,0 +1,29 @@
package name.lkk.kkmall.coupon.service.impl;
import org.springframework.stereotype.Service;
import java.util.Map;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import name.lkk.common.utils.PageUtils;
import name.lkk.common.utils.Query;
import name.lkk.kkmall.coupon.dao.SeckillSkuRelationDao;
import name.lkk.kkmall.coupon.entity.SeckillSkuRelationEntity;
import name.lkk.kkmall.coupon.service.SeckillSkuRelationService;
@Service("seckillSkuRelationService")
public class SeckillSkuRelationServiceImpl extends ServiceImpl<SeckillSkuRelationDao, SeckillSkuRelationEntity> implements SeckillSkuRelationService {
@Override
public PageUtils queryPage(Map<String, Object> params) {
IPage<SeckillSkuRelationEntity> page = this.page(
new Query<SeckillSkuRelationEntity>().getPage(params),
new QueryWrapper<SeckillSkuRelationEntity>()
);
return new PageUtils(page);
}
}

View file

@ -0,0 +1,29 @@
package name.lkk.kkmall.coupon.service.impl;
import org.springframework.stereotype.Service;
import java.util.Map;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import name.lkk.common.utils.PageUtils;
import name.lkk.common.utils.Query;
import name.lkk.kkmall.coupon.dao.SkuFullReductionDao;
import name.lkk.kkmall.coupon.entity.SkuFullReductionEntity;
import name.lkk.kkmall.coupon.service.SkuFullReductionService;
@Service("skuFullReductionService")
public class SkuFullReductionServiceImpl extends ServiceImpl<SkuFullReductionDao, SkuFullReductionEntity> implements SkuFullReductionService {
@Override
public PageUtils queryPage(Map<String, Object> params) {
IPage<SkuFullReductionEntity> page = this.page(
new Query<SkuFullReductionEntity>().getPage(params),
new QueryWrapper<SkuFullReductionEntity>()
);
return new PageUtils(page);
}
}

View file

@ -0,0 +1,29 @@
package name.lkk.kkmall.coupon.service.impl;
import org.springframework.stereotype.Service;
import java.util.Map;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import name.lkk.common.utils.PageUtils;
import name.lkk.common.utils.Query;
import name.lkk.kkmall.coupon.dao.SkuLadderDao;
import name.lkk.kkmall.coupon.entity.SkuLadderEntity;
import name.lkk.kkmall.coupon.service.SkuLadderService;
@Service("skuLadderService")
public class SkuLadderServiceImpl extends ServiceImpl<SkuLadderDao, SkuLadderEntity> implements SkuLadderService {
@Override
public PageUtils queryPage(Map<String, Object> params) {
IPage<SkuLadderEntity> page = this.page(
new Query<SkuLadderEntity>().getPage(params),
new QueryWrapper<SkuLadderEntity>()
);
return new PageUtils(page);
}
}

View file

@ -0,0 +1,29 @@
package name.lkk.kkmall.coupon.service.impl;
import org.springframework.stereotype.Service;
import java.util.Map;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import name.lkk.common.utils.PageUtils;
import name.lkk.common.utils.Query;
import name.lkk.kkmall.coupon.dao.SpuBoundsDao;
import name.lkk.kkmall.coupon.entity.SpuBoundsEntity;
import name.lkk.kkmall.coupon.service.SpuBoundsService;
@Service("spuBoundsService")
public class SpuBoundsServiceImpl extends ServiceImpl<SpuBoundsDao, SpuBoundsEntity> implements SpuBoundsService {
@Override
public PageUtils queryPage(Map<String, Object> params) {
IPage<SpuBoundsEntity> page = this.page(
new Query<SpuBoundsEntity>().getPage(params),
new QueryWrapper<SpuBoundsEntity>()
);
return new PageUtils(page);
}
}

View file

@ -0,0 +1,14 @@
spring:
datasource:
#MySQL配置
driverClassName: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://localhost:3306/kkmall_sms?useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai
username: root
password: 66CcFf!!
mybatis-plus:
mapper-locations: classpath:/mapper/**/*.xml
global-config:
db-config:
id-type: auto
server:
port: 7000

View file

@ -0,0 +1,31 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="name.lkk.kkmall.coupon.dao.CouponDao">
<!-- 可根据自己的需求,是否要使用 -->
<resultMap type="name.lkk.kkmall.coupon.entity.CouponEntity" id="couponMap">
<result property="id" column="id"/>
<result property="couponType" column="coupon_type"/>
<result property="couponImg" column="coupon_img"/>
<result property="couponName" column="coupon_name"/>
<result property="num" column="num"/>
<result property="amount" column="amount"/>
<result property="perLimit" column="per_limit"/>
<result property="minPoint" column="min_point"/>
<result property="startTime" column="start_time"/>
<result property="endTime" column="end_time"/>
<result property="useType" column="use_type"/>
<result property="note" column="note"/>
<result property="publishCount" column="publish_count"/>
<result property="useCount" column="use_count"/>
<result property="receiveCount" column="receive_count"/>
<result property="enableStartTime" column="enable_start_time"/>
<result property="enableEndTime" column="enable_end_time"/>
<result property="code" column="code"/>
<result property="memberLevel" column="member_level"/>
<result property="publish" column="publish"/>
</resultMap>
</mapper>

View file

@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="name.lkk.kkmall.coupon.dao.CouponHistoryDao">
<!-- 可根据自己的需求,是否要使用 -->
<resultMap type="name.lkk.kkmall.coupon.entity.CouponHistoryEntity" id="couponHistoryMap">
<result property="id" column="id"/>
<result property="couponId" column="coupon_id"/>
<result property="memberId" column="member_id"/>
<result property="memberNickName" column="member_nick_name"/>
<result property="getType" column="get_type"/>
<result property="createTime" column="create_time"/>
<result property="useType" column="use_type"/>
<result property="useTime" column="use_time"/>
<result property="orderId" column="order_id"/>
<result property="orderSn" column="order_sn"/>
</resultMap>
</mapper>

View file

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="name.lkk.kkmall.coupon.dao.CouponSpuCategoryRelationDao">
<!-- 可根据自己的需求,是否要使用 -->
<resultMap type="name.lkk.kkmall.coupon.entity.CouponSpuCategoryRelationEntity" id="couponSpuCategoryRelationMap">
<result property="id" column="id"/>
<result property="couponId" column="coupon_id"/>
<result property="categoryId" column="category_id"/>
<result property="categoryName" column="category_name"/>
</resultMap>
</mapper>

View file

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="name.lkk.kkmall.coupon.dao.CouponSpuRelationDao">
<!-- 可根据自己的需求,是否要使用 -->
<resultMap type="name.lkk.kkmall.coupon.entity.CouponSpuRelationEntity" id="couponSpuRelationMap">
<result property="id" column="id"/>
<result property="couponId" column="coupon_id"/>
<result property="spuId" column="spu_id"/>
<result property="spuName" column="spu_name"/>
</resultMap>
</mapper>

View file

@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="name.lkk.kkmall.coupon.dao.HomeAdvDao">
<!-- 可根据自己的需求,是否要使用 -->
<resultMap type="name.lkk.kkmall.coupon.entity.HomeAdvEntity" id="homeAdvMap">
<result property="id" column="id"/>
<result property="name" column="name"/>
<result property="pic" column="pic"/>
<result property="startTime" column="start_time"/>
<result property="endTime" column="end_time"/>
<result property="status" column="status"/>
<result property="clickCount" column="click_count"/>
<result property="url" column="url"/>
<result property="note" column="note"/>
<result property="sort" column="sort"/>
<result property="publisherId" column="publisher_id"/>
<result property="authId" column="auth_id"/>
</resultMap>
</mapper>

View file

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="name.lkk.kkmall.coupon.dao.HomeSubjectDao">
<!-- 可根据自己的需求,是否要使用 -->
<resultMap type="name.lkk.kkmall.coupon.entity.HomeSubjectEntity" id="homeSubjectMap">
<result property="id" column="id"/>
<result property="name" column="name"/>
<result property="title" column="title"/>
<result property="subTitle" column="sub_title"/>
<result property="status" column="status"/>
<result property="url" column="url"/>
<result property="sort" column="sort"/>
<result property="img" column="img"/>
</resultMap>
</mapper>

View file

@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="name.lkk.kkmall.coupon.dao.HomeSubjectSpuDao">
<!-- 可根据自己的需求,是否要使用 -->
<resultMap type="name.lkk.kkmall.coupon.entity.HomeSubjectSpuEntity" id="homeSubjectSpuMap">
<result property="id" column="id"/>
<result property="name" column="name"/>
<result property="subjectId" column="subject_id"/>
<result property="spuId" column="spu_id"/>
<result property="sort" column="sort"/>
</resultMap>
</mapper>

View file

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="name.lkk.kkmall.coupon.dao.MemberPriceDao">
<!-- 可根据自己的需求,是否要使用 -->
<resultMap type="name.lkk.kkmall.coupon.entity.MemberPriceEntity" id="memberPriceMap">
<result property="id" column="id"/>
<result property="skuId" column="sku_id"/>
<result property="memberLevelId" column="member_level_id"/>
<result property="memberLevelName" column="member_level_name"/>
<result property="memberPrice" column="member_price"/>
<result property="addOther" column="add_other"/>
</resultMap>
</mapper>

View file

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="name.lkk.kkmall.coupon.dao.SeckillPromotionDao">
<!-- 可根据自己的需求,是否要使用 -->
<resultMap type="name.lkk.kkmall.coupon.entity.SeckillPromotionEntity" id="seckillPromotionMap">
<result property="id" column="id"/>
<result property="title" column="title"/>
<result property="startTime" column="start_time"/>
<result property="endTime" column="end_time"/>
<result property="status" column="status"/>
<result property="createTime" column="create_time"/>
<result property="userId" column="user_id"/>
</resultMap>
</mapper>

View file

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="name.lkk.kkmall.coupon.dao.SeckillSessionDao">
<!-- 可根据自己的需求,是否要使用 -->
<resultMap type="name.lkk.kkmall.coupon.entity.SeckillSessionEntity" id="seckillSessionMap">
<result property="id" column="id"/>
<result property="name" column="name"/>
<result property="startTime" column="start_time"/>
<result property="endTime" column="end_time"/>
<result property="status" column="status"/>
<result property="createTime" column="create_time"/>
</resultMap>
</mapper>

View file

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="name.lkk.kkmall.coupon.dao.SeckillSkuNoticeDao">
<!-- 可根据自己的需求,是否要使用 -->
<resultMap type="name.lkk.kkmall.coupon.entity.SeckillSkuNoticeEntity" id="seckillSkuNoticeMap">
<result property="id" column="id"/>
<result property="memberId" column="member_id"/>
<result property="skuId" column="sku_id"/>
<result property="sessionId" column="session_id"/>
<result property="subcribeTime" column="subcribe_time"/>
<result property="sendTime" column="send_time"/>
<result property="noticeType" column="notice_type"/>
</resultMap>
</mapper>

View file

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="name.lkk.kkmall.coupon.dao.SeckillSkuRelationDao">
<!-- 可根据自己的需求,是否要使用 -->
<resultMap type="name.lkk.kkmall.coupon.entity.SeckillSkuRelationEntity" id="seckillSkuRelationMap">
<result property="id" column="id"/>
<result property="promotionId" column="promotion_id"/>
<result property="promotionSessionId" column="promotion_session_id"/>
<result property="skuId" column="sku_id"/>
<result property="seckillPrice" column="seckill_price"/>
<result property="seckillCount" column="seckill_count"/>
<result property="seckillLimit" column="seckill_limit"/>
<result property="seckillSort" column="seckill_sort"/>
</resultMap>
</mapper>

Some files were not shown because too many files have changed in this diff Show more