Unverified Commit b68151cb authored by Menethil's avatar Menethil Committed by GitHub
Browse files

Merge pull request #1 from linlinjava/master

update
parents 126d027a 02679509
......@@ -7,9 +7,9 @@
</el-input>
<el-input clearable class="filter-item" style="width: 200px;" placeholder="请输入商品ID" v-model="listQuery.valueId">
</el-input>
<el-button class="filter-item" type="primary" v-waves icon="el-icon-search" @click="handleFilter">查找</el-button>
<el-button class="filter-item" type="primary" icon="el-icon-search" @click="handleFilter">查找</el-button>
<el-button class="filter-item" type="primary" @click="handleCreate" icon="el-icon-edit">添加</el-button>
<el-button class="filter-item" type="primary" :loading="downloadLoading" v-waves icon="el-icon-download" @click="handleDownload">导出</el-button>
<el-button class="filter-item" type="primary" :loading="downloadLoading" icon="el-icon-download" @click="handleDownload">导出</el-button>
</div>
<!-- 查询结果 -->
......@@ -67,13 +67,9 @@
<script>
import { listCollect, createCollect, updateCollect, deleteCollect } from '@/api/collect'
import waves from '@/directive/waves' // 水波纹指令
export default {
name: 'Collect',
directives: {
waves
},
data() {
return {
list: null,
......@@ -84,7 +80,8 @@ export default {
limit: 20,
userId: undefined,
valueId: undefined,
sort: '+id'
sort: 'add_time',
order: 'desc'
},
dataForm: {
id: undefined,
......
......@@ -7,9 +7,9 @@
</el-input>
<el-input clearable class="filter-item" style="width: 200px;" placeholder="请输入商品ID" v-model="listQuery.goodsId">
</el-input>
<el-button class="filter-item" type="primary" v-waves icon="el-icon-search" @click="handleFilter">查找</el-button>
<el-button class="filter-item" type="primary" icon="el-icon-search" @click="handleFilter">查找</el-button>
<el-button class="filter-item" type="primary" @click="handleCreate" icon="el-icon-edit">添加</el-button>
<el-button class="filter-item" type="primary" :loading="downloadLoading" v-waves icon="el-icon-download" @click="handleDownload">导出</el-button>
<el-button class="filter-item" type="primary" :loading="downloadLoading" icon="el-icon-download" @click="handleDownload">导出</el-button>
</div>
<!-- 查询结果 -->
......@@ -67,13 +67,9 @@
<script>
import { listFootprint, createFootprint, updateFootprint, deleteFootprint } from '@/api/footprint'
import waves from '@/directive/waves' // 水波纹指令
export default {
name: 'FootPrint',
directives: {
waves
},
data() {
return {
list: null,
......@@ -84,7 +80,8 @@ export default {
limit: 20,
userId: undefined,
goodsId: undefined,
sort: '+id'
sort: 'add_time',
order: 'desc'
},
dataForm: {
id: undefined,
......
......@@ -7,9 +7,9 @@
</el-input>
<el-input clearable class="filter-item" style="width: 200px;" placeholder="请输入搜索历史关键字" v-model="listQuery.keyword">
</el-input>
<el-button class="filter-item" type="primary" v-waves icon="el-icon-search" @click="handleFilter">查找</el-button>
<el-button class="filter-item" type="primary" icon="el-icon-search" @click="handleFilter">查找</el-button>
<el-button class="filter-item" type="primary" @click="handleCreate" icon="el-icon-edit">添加</el-button>
<el-button class="filter-item" type="primary" :loading="downloadLoading" v-waves icon="el-icon-download" @click="handleDownload">导出</el-button>
<el-button class="filter-item" type="primary" :loading="downloadLoading" icon="el-icon-download" @click="handleDownload">导出</el-button>
</div>
<!-- 查询结果 -->
......@@ -66,13 +66,9 @@
<script>
import { listHistory, createHistory, updateHistory, deleteHistory } from '@/api/history'
import waves from '@/directive/waves' // 水波纹指令
export default {
name: 'History',
directives: {
waves
},
data() {
return {
list: null,
......@@ -83,7 +79,8 @@ export default {
limit: 20,
userId: undefined,
keyword: undefined,
sort: '+id'
sort: 'add_time',
order: 'desc'
},
dataForm: {
id: undefined,
......
......@@ -7,9 +7,9 @@
</el-input>
<el-input clearable class="filter-item" style="width: 200px;" placeholder="请输入手机号" v-model="listQuery.mobile">
</el-input>
<el-button class="filter-item" type="primary" v-waves icon="el-icon-search" @click="handleFilter">查找</el-button>
<el-button class="filter-item" type="primary" icon="el-icon-search" @click="handleFilter">查找</el-button>
<el-button class="filter-item" type="primary" @click="handleCreate" icon="el-icon-edit">添加</el-button>
<el-button class="filter-item" type="primary" :loading="downloadLoading" v-waves icon="el-icon-download" @click="handleDownload">导出</el-button>
<el-button class="filter-item" type="primary" :loading="downloadLoading" icon="el-icon-download" @click="handleDownload">导出</el-button>
</div>
<!-- 查询结果 -->
......@@ -17,29 +17,34 @@
<el-table-column align="center" width="100px" label="用户ID" prop="id" sortable>
</el-table-column>
<el-table-column align="center" min-width="100px" label="用户名" prop="username">
<el-table-column align="center" label="用户名" prop="username">
</el-table-column>
<el-table-column align="center" min-width="100px" label="手机号码" prop="mobile">
<el-table-column align="center" label="手机号码" prop="mobile">
</el-table-column>
<el-table-column align="center" min-width="50px" label="性别" prop="gender">
<el-table-column align="center" label="性别" prop="gender">
<template slot-scope="scope">
<el-tag >{{genderDic[scope.row.status]}}</el-tag>
</template>
</el-table-column>
<el-table-column align="center" min-width="100px" label="生日" prop="birthday">
<el-table-column align="center" label="生日" prop="birthday">
</el-table-column>
<el-table-column align="center" min-width="100px" label="用户等级" prop="userLevel">
<el-table-column align="center" label="用户等级" prop="userLevel">
<template slot-scope="scope">
<el-tag >{{levelDic[scope.row.userLevel]}}</el-tag>
</template>
</el-table-column>
<el-table-column align="center" min-width="100px" label="状态" prop="status"
:filters="[{ text: '可用', value: '可用' }, { text: '禁用', value: '禁用' }, { text: '删除', value: '删除' }]" :filter-method="filterStatus">
<el-table-column align="center" label="状态" prop="status">
<template slot-scope="scope">
<el-tag :type="scope.row.status | statusFilter">{{scope.row.status}}</el-tag>
<el-tag>{{statusDic[scope.row.status]}}</el-tag>
</template>
</el-table-column>
<el-table-column align="center" label="操作" width="250" class-name="small-padding fixed-width">
<el-table-column align="center" label="操作" width="200" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button type="primary" size="mini" @click="handleUpdate(scope.row)">编辑</el-button>
<el-button type="danger" size="mini" @click="handleDelete(scope.row)">删除</el-button>
......@@ -70,36 +75,36 @@
<el-input type="password" v-model="dataForm.checkPassword" auto-complete="off"></el-input>
</el-form-item>
<el-form-item label="性别" prop="gender">
<el-select v-model="dataForm.gender" placeholder="请选择">
<el-option label="未知" value="未知">
<el-select v-model="dataForm.gender">
<el-option label="未知" :value="0">
</el-option>
<el-option label="男" value="">
<el-option label="男" :value="1">
</el-option>
<el-option label="女" value="">
<el-option label="女" :value="2">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="生日" prop="birthday">
<el-date-picker v-model="dataForm.birthday" type="date" placeholder="选择日期" value-format="yyyy-MM-dd">
<el-date-picker v-model="dataForm.birthday" type="date" value-format="yyyy-MM-dd">
</el-date-picker>
</el-form-item>
<el-form-item label="用户等级" prop="userLevel">
<el-select v-model="dataForm.userLevel" placeholder="请选择">
<el-option label="普通用户" value="普通用户">
<el-select v-model="dataForm.userLevel">
<el-option label="普通用户" :value="0">
</el-option>
<el-option label="VIP用户" value="VIP用户">
<el-option label="VIP用户" :value="1">
</el-option>
<el-option label="高级VIP用户" value="高级VIP用户">
<el-option label="高级VIP用户" :value="2">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="状态" prop="status">
<el-select v-model="dataForm.status" placeholder="请选择">
<el-option label="可用" value="可用">
<el-select v-model="dataForm.status">
<el-option label="可用" :value="0">
</el-option>
<el-option label="禁用" value="禁用">
<el-option label="禁用" :value="1">
</el-option>
<el-option label="删除" value="删除">
<el-option label="注销" :value="2">
</el-option>
</el-select>
</el-form-item>
......@@ -116,13 +121,9 @@
<script>
import { fetchList, createUser, updateUser } from '@/api/user'
import waves from '@/directive/waves' // 水波纹指令
export default {
name: 'User',
directives: {
waves
},
data() {
var validatePass = (rule, value, callback) => {
if (value === '') {
......@@ -152,7 +153,8 @@ export default {
limit: 20,
username: undefined,
mobile: undefined,
sort: '+id'
sort: 'add_time',
order: 'desc'
},
dataForm: {
id: undefined,
......@@ -160,10 +162,10 @@ export default {
mobile: '',
password: undefined,
checkPassword: undefined,
gender: '',
userLevel: '普通用户',
gender: 0,
userLevel: 0,
birthday: undefined,
status: '可用'
status: 0
},
dialogFormVisible: false,
dialogStatus: '',
......@@ -183,17 +185,10 @@ export default {
{ validator: validatePass2, trigger: 'blur' }
]
},
downloadLoading: false
}
},
filters: {
statusFilter(status) {
const statusMap = {
'可用': 'success',
'禁用': 'info',
'删除': 'danger'
}
return statusMap[status]
downloadLoading: false,
genderDic: ['未知', '', ''],
levelDic: ['普通用户', 'VIP用户', '高级VIP用户'],
statusDic: ['可用', '禁用', '注销']
}
},
created() {
......@@ -231,15 +226,12 @@ export default {
mobile: '',
pass: undefined,
checkPass: undefined,
gender: '',
userLevel: '普通用户',
gender: 0,
userLevel: 0,
birthday: undefined,
status: '可用'
status: 0
}
},
filterStatus(value, row) {
return row.status === value
},
handleCreate() {
this.resetForm()
this.dialogStatus = 'create'
......
......@@ -47,6 +47,21 @@
<build>
<resources>
<resource>
<directory>src/main/resources</directory>
</resource>
<resource>
<directory>src/main/java</directory>
<includes>
<include>**/*.properties</include>
<include>**/*.xml</include>
</includes>
<filtering>false</filtering>
</resource>
</resources>
<plugins>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
......
......@@ -7,9 +7,9 @@ spring.datasource.druid.url=jdbc:mysql://localhost:3306/litemall?useUnicode=true
spring.datasource.druid.driver-class-name=com.mysql.jdbc.Driver
spring.datasource.druid.username=litemall
spring.datasource.druid.password=litemall123456
spring.datasource.druid.initial-size=50
spring.datasource.druid.max-active=100
spring.datasource.druid.min-idle=20
spring.datasource.druid.initial-size=10
spring.datasource.druid.max-active=50
spring.datasource.druid.min-idle=10
spring.datasource.druid.max-wait=60000
spring.datasource.druid.pool-prepared-statements=true
spring.datasource.druid.max-pool-prepared-statement-per-connection-size=20
......@@ -25,3 +25,7 @@ logging.level.root=ERROR
logging.level.org.springframework=ERROR
logging.level.org.mybatis=ERROR
logging.level.org.linlinjava.litemall=DEBUG
# 开发者应该设置成自己的域名,必须附带http或者https
org.linlinjava.litemall.os.address=http://122.152.206.172
org.linlinjava.litemall.os.port=8080
......@@ -7,9 +7,9 @@ spring.datasource.druid.url=jdbc:mysql://localhost:3306/litemall?useUnicode=true
spring.datasource.druid.driver-class-name=com.mysql.jdbc.Driver
spring.datasource.druid.username=litemall
spring.datasource.druid.password=litemall123456
spring.datasource.druid.initial-size=50
spring.datasource.druid.max-active=100
spring.datasource.druid.min-idle=20
spring.datasource.druid.initial-size=10
spring.datasource.druid.max-active=50
spring.datasource.druid.min-idle=10
spring.datasource.druid.max-wait=60000
spring.datasource.druid.pool-prepared-statements=true
spring.datasource.druid.max-pool-prepared-statement-per-connection-size=20
......@@ -25,3 +25,7 @@ logging.level.root=ERROR
logging.level.org.springframework=ERROR
logging.level.org.mybatis=ERROR
logging.level.org.linlinjava.litemall=DEBUG
# 开发者应该设置成自己的域名,必须附带http或者https
org.linlinjava.litemall.os.address=http://127.0.0.1
org.linlinjava.litemall.os.port=8080
......@@ -7,9 +7,9 @@ spring.datasource.druid.url=jdbc:mysql://localhost:3306/litemall?useUnicode=true
spring.datasource.druid.driver-class-name=com.mysql.jdbc.Driver
spring.datasource.druid.username=litemall
spring.datasource.druid.password=litemall123456
spring.datasource.druid.initial-size=50
spring.datasource.druid.max-active=100
spring.datasource.druid.min-idle=20
spring.datasource.druid.initial-size=10
spring.datasource.druid.max-active=50
spring.datasource.druid.min-idle=10
spring.datasource.druid.max-wait=60000
spring.datasource.druid.pool-prepared-statements=true
spring.datasource.druid.max-pool-prepared-statement-per-connection-size=20
......@@ -23,4 +23,8 @@ spring.datasource.druid.filters=stat,wall,log4j
logging.level.root=ERROR
logging.level.org.springframework=ERROR
logging.level.org.mybatis=ERROR
logging.level.org.linlinjava.litemall=ERROR
\ No newline at end of file
logging.level.org.linlinjava.litemall=ERROR
# 开发者应该设置成自己的域名,必须附带http或者https
org.linlinjava.litemall.os.address=https://www.example.com
org.linlinjava.litemall.os.port=443
\ No newline at end of file
......@@ -34,4 +34,21 @@
</dependencies>
<build>
<resources>
<resource>
<directory>src/main/resources</directory>
</resource>
<resource>
<directory>src/main/java</directory>
<includes>
<include>**/*.properties</include>
<include>**/*.xml</include>
</includes>
<filtering>false</filtering>
</resource>
</resources>
</build>
</project>
\ No newline at end of file
package org.linlinjava.litemall.core.config;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.SerializationFeature;
import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule;
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateDeserializer;
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer;
import com.fasterxml.jackson.datatype.jsr310.deser.LocalTimeDeserializer;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateSerializer;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalTimeSerializer;
import org.springframework.boot.autoconfigure.jackson.Jackson2ObjectMapperBuilderCustomizer;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Primary;
import org.springframework.core.Ordered;
import org.springframework.core.annotation.Order;
import org.springframework.http.converter.json.Jackson2ObjectMapperBuilder;
import java.time.LocalDate;
......@@ -19,18 +22,24 @@ import java.time.format.DateTimeFormatter;
@Configuration
public class JacksonConfig {
@Bean
@Primary
public ObjectMapper objectMapper(Jackson2ObjectMapperBuilder builder) {
JavaTimeModule javaTimeModule = new JavaTimeModule();
javaTimeModule.addSerializer(LocalDateTime.class, new LocalDateTimeSerializer(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")));
javaTimeModule.addSerializer(LocalDate.class, new LocalDateSerializer(DateTimeFormatter.ofPattern("yyyy-MM-dd")));
javaTimeModule.addSerializer(LocalTime.class, new LocalTimeSerializer(DateTimeFormatter.ofPattern("HH:mm:ss")));
@Order(Ordered.HIGHEST_PRECEDENCE)
public Jackson2ObjectMapperBuilderCustomizer customJackson() {
return new Jackson2ObjectMapperBuilderCustomizer() {
@Override
public void customize(Jackson2ObjectMapperBuilder builder) {
builder.serializerByType(LocalDateTime.class, new LocalDateTimeSerializer(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")));
builder.serializerByType(LocalDate.class, new LocalDateSerializer(DateTimeFormatter.ofPattern("yyyy-MM-dd")));
builder.serializerByType(LocalTime.class, new LocalTimeSerializer(DateTimeFormatter.ofPattern("HH:mm:ss")));
ObjectMapper objectMapper = builder.createXmlMapper(false).build();
objectMapper.registerModule(javaTimeModule);
objectMapper.configure(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS, false);
objectMapper.setSerializationInclusion(JsonInclude.Include.NON_NULL);
return objectMapper;
builder.deserializerByType(LocalDateTime.class, new LocalDateTimeDeserializer(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")));
builder.deserializerByType(LocalDate.class, new LocalDateDeserializer(DateTimeFormatter.ofPattern("yyyy-MM-dd")));
builder.deserializerByType(LocalTime.class, new LocalTimeDeserializer(DateTimeFormatter.ofPattern("HH:mm:ss")));
builder.serializationInclusion(JsonInclude.Include.NON_NULL);
builder.failOnUnknownProperties(false);
builder.featuresToDisable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS);
}
};
}
}
......@@ -85,6 +85,22 @@ public class JacksonUtil {
return null;
}
public static Byte parseByte(String body, String field) {
ObjectMapper mapper = new ObjectMapper();
JsonNode node = null;
try {
node = mapper.readTree(body);
JsonNode leaf = node.get(field);
if(leaf != null) {
Integer value = leaf.asInt();
return value.byteValue();
}
} catch (IOException e) {
e.printStackTrace();
}
return null;
}
public static <T> T parseObject(String body, String field, Class<T> clazz) {
ObjectMapper mapper = new ObjectMapper();
JsonNode node = null;
......@@ -112,4 +128,5 @@ public class JacksonUtil {
return null;
}
}
......@@ -41,46 +41,27 @@ public class ResponseUtil {
return obj;
}
public static Object fail401() {
return fail(401, "请登录");
}
public static Object unlogin(){
return fail401();
}
public static Object fail402() {
return fail(402, "参数不对");
}
public static Object badArgument(){
return fail402();
return fail(401, "参数不对");
}
public static Object fail403() {
return fail(403, "参数值不对");
}
public static Object badArgumentValue(){
return fail403();
}
public static Object fail501() {
return fail(501, "业务不支持");
return fail(402, "参数值不对");
}
public static Object unsupport(){
return fail501();
public static Object unlogin(){
return fail(501, "请登录");
}
public static Object fail502() {
public static Object serious(){
return fail(502, "系统内部错误");
}
public static Object serious(){
return fail502();
public static Object unsupport(){
return fail(503, "业务不支持");
}
}
......@@ -67,7 +67,6 @@
<table tableName="litemall_admin">
<generatedKey column="id" sqlStatement="MySql" identity="true" />
<columnOverride javaType="java.time.LocalDateTime" column="last_login_time"/>
<columnOverride javaType="java.time.LocalDateTime" column="update_time"/>
<columnOverride javaType="java.time.LocalDateTime" column="add_time"/>
</table>
<table tableName="litemall_brand">
......@@ -76,7 +75,7 @@
</table>
<table tableName="litemall_cart">
<generatedKey column="id" sqlStatement="MySql" identity="true" />
<columnOverride column="goods_specification_ids" javaType="java.lang.Integer[]" typeHandler="org.linlinjava.litemall.db.mybatis.JsonIntegerArrayTypeHandler"/>
<columnOverride column="specifications" javaType="java.lang.String[]" typeHandler="org.linlinjava.litemall.db.mybatis.JsonStringArrayTypeHandler"/>
<columnOverride javaType="java.time.LocalDateTime" column="add_time"/>
</table>
<table tableName="litemall_category">
......@@ -92,14 +91,6 @@
<columnOverride javaType="java.time.LocalDateTime" column="add_time"/>
<columnOverride column="pic_urls" javaType="java.lang.String[]" typeHandler="org.linlinjava.litemall.db.mybatis.JsonStringArrayTypeHandler"/>
</table>
<table tableName="litemall_coupon">
<generatedKey column="id" sqlStatement="MySql" identity="true" />
<columnOverride javaType="java.time.LocalDateTime" column="send_start"/>
<columnOverride javaType="java.time.LocalDateTime" column="send_end"/>
<columnOverride javaType="java.time.LocalDateTime" column="use_start"/>
<columnOverride javaType="java.time.LocalDateTime" column="use_end"/>
<columnOverride javaType="java.time.LocalDateTime" column="add_time"/>
</table>
<table tableName="litemall_footprint">
<generatedKey column="id" sqlStatement="MySql" identity="true" />
<columnOverride javaType="java.time.LocalDateTime" column="add_time"/>
......@@ -129,19 +120,18 @@
<generatedKey column="id" sqlStatement="MySql" identity="true" />
<columnOverride javaType="java.time.LocalDateTime" column="add_time"/>
<columnOverride javaType="java.time.LocalDateTime" column="pay_time"/>
<columnOverride javaType="java.time.LocalDateTime" column="ship_start_time"/>
<columnOverride javaType="java.time.LocalDateTime" column="ship_end_time"/>
<columnOverride javaType="java.time.LocalDateTime" column="ship_time"/>
<columnOverride javaType="java.time.LocalDateTime" column="confirm_time"/>
<columnOverride javaType="java.time.LocalDateTime" column="end_time"/>
</table>
<table tableName="litemall_order_goods">
<generatedKey column="id" sqlStatement="MySql" identity="true" />
<columnOverride column="goods_specification_ids" javaType="java.lang.Integer[]" typeHandler="org.linlinjava.litemall.db.mybatis.JsonIntegerArrayTypeHandler"/>
<columnOverride column="specifications" javaType="java.lang.String[]" typeHandler="org.linlinjava.litemall.db.mybatis.JsonStringArrayTypeHandler"/>
<columnOverride javaType="java.time.LocalDateTime" column="add_time"/>
</table>
<table tableName="litemall_product">
<generatedKey column="id" sqlStatement="MySql" identity="true" />
<columnOverride column="goods_specification_ids" javaType="java.lang.Integer[]" typeHandler="org.linlinjava.litemall.db.mybatis.JsonIntegerArrayTypeHandler"/>
<columnOverride column="specifications" javaType="java.lang.String[]" typeHandler="org.linlinjava.litemall.db.mybatis.JsonStringArrayTypeHandler"/>
<columnOverride javaType="java.time.LocalDateTime" column="add_time"/>
</table>
<table tableName="litemall_region">
......@@ -158,6 +148,7 @@
</table>
<table tableName="litemall_topic">
<generatedKey column="id" sqlStatement="MySql" identity="true" />
<columnOverride column="goods" javaType="java.lang.Integer[]" typeHandler="org.linlinjava.litemall.db.mybatis.JsonIntegerArrayTypeHandler"/>
<columnOverride javaType="java.time.LocalDateTime" column="add_time"/>
</table>
<table tableName="litemall_user">
......@@ -166,12 +157,5 @@
<columnOverride javaType="java.time.LocalDateTime" column="last_login_time"/>
<columnOverride javaType="java.time.LocalDateTime" column="add_time"/>
</table>
<table tableName="litemall_user_coupon">
<generatedKey column="id" sqlStatement="MySql" identity="true" />
<columnOverride javaType="java.time.LocalDateTime" column="used_time"/>
<columnOverride javaType="java.time.LocalDateTime" column="add_time"/>
</table>
</context>
</generatorConfiguration>
\ No newline at end of file
......@@ -41,6 +41,22 @@
<build>
<resources>
<resource>
<directory>src/main/resources</directory>
</resource>
<resource>
<directory>src/main/java</directory>
<includes>
<include>**/*.properties</include>
<include>**/*.xml</include>
</includes>
<filtering>false</filtering>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.mybatis.generator</groupId>
......@@ -62,7 +78,7 @@
<dependency>
<groupId>com.itfsw</groupId>
<artifactId>mybatis-generator-plugin</artifactId>
<version>1.2.3</version>
<version>1.2.6</version>
</dependency>
</dependencies>
</plugin>
......
这里的数据库由三个sql文件组成:
1. litemall_schema.sql
作用是创建空数据库、创建用户、设置访问权限。
开发者开发测试阶段可以使用,但是部署生产阶段一定要注意修改这里的默认用户名和密码。
2. litemall_table.sql
作用是创建数据库表,但是没有创建任何数据。
因此,开发者可以在部署生产阶段直接使用。
3. litemall_data.sql
作用是创建测试数据。
这里的测试数据来自开源项目[nideshop-mini-program](https://github.com/tumobi/nideshop-mini-program)
开发者开发测试阶段可以使用,但是部署开发阶段应该使用自己的数据。
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
-- MySQL dump 10.13 Distrib 5.7.17, for Win64 (x86_64)
--
-- Host: 127.0.0.1 Database: litemall
-- ------------------------------------------------------
-- Server version 5.7.21-log
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
--
-- Table structure for table `litemall_ad`
--
DROP TABLE IF EXISTS `litemall_ad`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `litemall_ad` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(63) NOT NULL DEFAULT '' COMMENT '广告标题',
`link` varchar(255) NOT NULL DEFAULT '' COMMENT '所广告的商品页面或者活动页面链接地址',
`url` varchar(255) NOT NULL COMMENT '广告宣传图片',
`position` tinyint(3) DEFAULT '1' COMMENT '广告位置:1则是首页',
`content` varchar(255) DEFAULT '' COMMENT '活动内容',
`start_time` datetime DEFAULT NULL COMMENT '广告开始时间',
`end_time` datetime DEFAULT NULL COMMENT '广告结束时间',
`enabled` tinyint(1) DEFAULT '0' COMMENT '是否启动',
`add_time` datetime DEFAULT NULL COMMENT '创建时间',
`deleted` tinyint(1) DEFAULT '0' COMMENT '逻辑删除',
PRIMARY KEY (`id`),
KEY `enabled` (`enabled`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COMMENT='广告表';
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `litemall_address`
--
DROP TABLE IF EXISTS `litemall_address`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `litemall_address` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(63) NOT NULL DEFAULT '' COMMENT '收货人名称',
`user_id` int(11) NOT NULL DEFAULT '0' COMMENT '用户表的用户ID',
`province_id` int(11) NOT NULL DEFAULT '0' COMMENT '行政区域表的省ID',
`city_id` int(11) NOT NULL DEFAULT '0' COMMENT '行政区域表的市ID',
`area_id` int(11) NOT NULL DEFAULT '0' COMMENT '行政区域表的区县ID',
`address` varchar(127) NOT NULL DEFAULT '' COMMENT '具体收货地址',
`mobile` varchar(20) NOT NULL DEFAULT '' COMMENT '手机号码',
`is_default` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否默认地址',
`add_time` datetime DEFAULT NULL COMMENT '创建时间',
`deleted` tinyint(1) DEFAULT '0' COMMENT '逻辑删除',
PRIMARY KEY (`id`),
KEY `user_id` (`user_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='收货地址表';
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `litemall_admin`
--
DROP TABLE IF EXISTS `litemall_admin`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `litemall_admin` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`username` varchar(63) NOT NULL DEFAULT '' COMMENT '管理员名称',
`password` varchar(63) NOT NULL DEFAULT '' COMMENT '管理员密码',
`last_login_ip` varchar(63) DEFAULT '' COMMENT '最近一次登录IP地址',
`last_login_time` datetime DEFAULT NULL COMMENT '最近一次登录时间',
`avatar` varchar(255) DEFAULT '''' COMMENT '头像图片',
`add_time` datetime DEFAULT NULL COMMENT '创建时间',
`deleted` tinyint(1) DEFAULT '0' COMMENT '逻辑删除',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COMMENT='管理员表';
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `litemall_brand`
--
DROP TABLE IF EXISTS `litemall_brand`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `litemall_brand` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(255) NOT NULL DEFAULT '' COMMENT '品牌商名称',
`desc` varchar(255) NOT NULL DEFAULT '' COMMENT '品牌商简介',
`pic_url` varchar(255) NOT NULL DEFAULT '' COMMENT '品牌商页的品牌商图片',
`sort_order` tinyint(3) DEFAULT '50',
`floor_price` decimal(10,2) DEFAULT '0.00' COMMENT '品牌商的商品低价,仅用于页面展示',
`add_time` datetime DEFAULT NULL COMMENT '创建时间',
`deleted` tinyint(1) DEFAULT '0' COMMENT '逻辑删除',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1046001 DEFAULT CHARSET=utf8mb4 COMMENT='品牌商表';
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `litemall_cart`
--
DROP TABLE IF EXISTS `litemall_cart`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `litemall_cart` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`user_id` int(11) DEFAULT NULL COMMENT '用户表的用户ID',
`goods_id` int(11) DEFAULT NULL COMMENT '商品表的商品ID',
`goods_sn` varchar(63) DEFAULT NULL COMMENT '商品编号',
`goods_name` varchar(127) DEFAULT NULL COMMENT '商品名称',
`product_id` int(11) DEFAULT NULL COMMENT '商品货品表的货品ID',
`price` decimal(10,2) DEFAULT '0.00' COMMENT '商品货品的价格',
`number` smallint(5) DEFAULT '0' COMMENT '商品货品的数量',
`specifications` varchar(1023) DEFAULT NULL COMMENT '商品规格值列表,采用JSON数组格式',
`checked` tinyint(1) DEFAULT '1' COMMENT '购物车中商品是否选择状态',
`pic_url` varchar(255) DEFAULT NULL COMMENT '商品图片或者商品货品图片',
`add_time` datetime DEFAULT NULL COMMENT '创建时间',
`deleted` tinyint(1) DEFAULT '0' COMMENT '逻辑删除',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='购物车商品表';
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `litemall_category`
--
DROP TABLE IF EXISTS `litemall_category`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `litemall_category` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(63) NOT NULL DEFAULT '' COMMENT '类目名称',
`keywords` varchar(1023) NOT NULL DEFAULT '' COMMENT '类目关键字,以JSON数组格式',
`desc` varchar(255) DEFAULT '' COMMENT '类目广告语介绍',
`pid` int(11) NOT NULL DEFAULT '0' COMMENT '父类目ID',
`icon_url` varchar(255) DEFAULT '' COMMENT '类目图标',
`pic_url` varchar(255) DEFAULT '' COMMENT '类目图片',
`level` varchar(255) DEFAULT 'L1',
`sort_order` tinyint(3) DEFAULT '50' COMMENT '排序',
`add_time` datetime DEFAULT NULL COMMENT '创建时间',
`deleted` tinyint(1) DEFAULT '0' COMMENT '逻辑删除',
PRIMARY KEY (`id`),
KEY `parent_id` (`pid`)
) ENGINE=InnoDB AUTO_INCREMENT=1036005 DEFAULT CHARSET=utf8mb4 COMMENT='类目表';
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `litemall_collect`
--
DROP TABLE IF EXISTS `litemall_collect`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `litemall_collect` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`user_id` int(11) NOT NULL DEFAULT '0' COMMENT '用户表的用户ID',
`value_id` int(11) NOT NULL DEFAULT '0' COMMENT '如果type=0,则是商品ID;如果type=1,则是专题ID',
`type` tinyint(3) NOT NULL DEFAULT '0' COMMENT '收藏类型,如果type=0,则是商品ID;如果type=1,则是专题ID',
`add_time` datetime DEFAULT NULL COMMENT '创建时间',
`deleted` tinyint(1) DEFAULT '0' COMMENT '逻辑删除',
PRIMARY KEY (`id`),
KEY `user_id` (`user_id`),
KEY `goods_id` (`value_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='收藏表';
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `litemall_comment`
--
DROP TABLE IF EXISTS `litemall_comment`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `litemall_comment` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`value_id` int(11) NOT NULL DEFAULT '0' COMMENT '如果type=0,则是商品评论;如果是type=1,则是专题评论。',
`type` tinyint(3) NOT NULL DEFAULT '0' COMMENT '评论类型,如果type=0,则是商品评论;如果是type=1,则是专题评论。',
`content` varchar(1023) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '评论内容',
`user_id` int(11) NOT NULL DEFAULT '0' COMMENT '用户表的用户ID',
`has_picture` tinyint(1) DEFAULT '0' COMMENT '是否含有图片',
`pic_urls` varchar(1023) DEFAULT NULL COMMENT '图片地址列表,采用JSON数组格式',
`star` smallint(6) DEFAULT '1' COMMENT '评分, 1-5',
`add_time` datetime DEFAULT NULL COMMENT '创建时间',
`deleted` tinyint(1) DEFAULT '0' COMMENT '逻辑删除',
PRIMARY KEY (`id`),
KEY `id_value` (`value_id`)
) ENGINE=InnoDB AUTO_INCREMENT=1002 DEFAULT CHARSET=utf8 COMMENT='评论表';
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `litemall_footprint`
--
DROP TABLE IF EXISTS `litemall_footprint`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `litemall_footprint` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`user_id` int(11) NOT NULL DEFAULT '0' COMMENT '用户表的用户ID',
`goods_id` int(11) NOT NULL DEFAULT '0' COMMENT '浏览商品ID',
`add_time` datetime DEFAULT NULL COMMENT '创建时间',
`deleted` tinyint(1) DEFAULT '0' COMMENT '逻辑删除',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='用户浏览足迹表';
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `litemall_goods`
--
DROP TABLE IF EXISTS `litemall_goods`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `litemall_goods` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`goods_sn` varchar(63) NOT NULL DEFAULT '' COMMENT '商品编号',
`name` varchar(127) NOT NULL DEFAULT '' COMMENT '商品名称',
`category_id` int(11) DEFAULT '0' COMMENT '商品所属类目ID',
`brand_id` int(11) DEFAULT '0',
`gallery` varchar(1023) DEFAULT NULL COMMENT '商品宣传图片列表,采用JSON数组格式',
`keywords` varchar(255) DEFAULT '' COMMENT '商品关键字,采用逗号间隔',
`brief` varchar(255) DEFAULT '' COMMENT '商品简介',
`is_on_sale` tinyint(1) DEFAULT '1' COMMENT '是否上架',
`sort_order` smallint(4) DEFAULT '100',
`pic_url` varchar(255) DEFAULT NULL COMMENT '商品页面商品图片',
`is_new` tinyint(1) DEFAULT '0' COMMENT '是否新品首发,如果设置则可以在新品首发页面展示',
`is_hot` tinyint(1) DEFAULT '0' COMMENT '是否人气推荐,如果设置则可以在人气推荐页面展示',
`unit` varchar(31) DEFAULT '’件‘' COMMENT '商品单位,例如件、盒',
`counter_price` decimal(10,2) DEFAULT '0.00' COMMENT '专柜价格',
`retail_price` decimal(10,2) DEFAULT '100000.00' COMMENT '零售价格',
`desc` text COMMENT '商品详细介绍,是富文本格式',
`add_time` datetime DEFAULT NULL COMMENT '创建时间',
`deleted` tinyint(1) DEFAULT '0' COMMENT '逻辑删除',
PRIMARY KEY (`id`),
KEY `goods_sn` (`goods_sn`),
KEY `cat_id` (`category_id`),
KEY `brand_id` (`brand_id`),
KEY `sort_order` (`sort_order`)
) ENGINE=InnoDB AUTO_INCREMENT=1181003 DEFAULT CHARSET=utf8mb4 COMMENT='商品基本信息表';
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `litemall_goods_attribute`
--
DROP TABLE IF EXISTS `litemall_goods_attribute`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `litemall_goods_attribute` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`goods_id` int(11) NOT NULL DEFAULT '0' COMMENT '商品表的商品ID',
`attribute` varchar(255) NOT NULL COMMENT '商品参数名称',
`value` varchar(255) NOT NULL COMMENT '商品参数值',
`add_time` datetime DEFAULT NULL COMMENT '创建时间',
`deleted` tinyint(1) DEFAULT '0' COMMENT '逻辑删除',
PRIMARY KEY (`id`),
KEY `goods_id` (`goods_id`)
) ENGINE=InnoDB AUTO_INCREMENT=874 DEFAULT CHARSET=utf8mb4 COMMENT='商品参数表';
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `litemall_goods_specification`
--
DROP TABLE IF EXISTS `litemall_goods_specification`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `litemall_goods_specification` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`goods_id` int(11) NOT NULL DEFAULT '0' COMMENT '商品表的商品ID',
`specification` varchar(255) NOT NULL DEFAULT '' COMMENT '商品规格名称',
`value` varchar(255) NOT NULL DEFAULT '' COMMENT '商品规格值',
`pic_url` varchar(255) NOT NULL DEFAULT '' COMMENT '商品规格图片',
`add_time` datetime DEFAULT NULL COMMENT '创建时间',
`deleted` tinyint(1) DEFAULT '0' COMMENT '逻辑删除',
PRIMARY KEY (`id`),
KEY `goods_id` (`goods_id`)
) ENGINE=InnoDB AUTO_INCREMENT=260 DEFAULT CHARSET=utf8mb4 COMMENT='商品规格表';
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `litemall_issue`
--
DROP TABLE IF EXISTS `litemall_issue`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `litemall_issue` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`question` varchar(255) DEFAULT NULL COMMENT '问题标题',
`answer` varchar(255) DEFAULT NULL COMMENT '问题答案',
`add_time` datetime DEFAULT NULL COMMENT '创建时间',
`deleted` tinyint(1) DEFAULT '0' COMMENT '逻辑删除',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COMMENT='常见问题表';
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `litemall_keyword`
--
DROP TABLE IF EXISTS `litemall_keyword`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `litemall_keyword` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`keyword` varchar(127) NOT NULL DEFAULT '' COMMENT '关键字',
`url` varchar(255) NOT NULL DEFAULT '' COMMENT '关键字的跳转链接',
`is_hot` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否是热门关键字',
`is_default` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否是默认关键字',
`sort_order` int(11) NOT NULL DEFAULT '100' COMMENT '排序',
`add_time` datetime DEFAULT NULL COMMENT '创建时间',
`deleted` tinyint(1) DEFAULT '0' COMMENT '逻辑删除',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8mb4 COMMENT='关键字表';
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `litemall_order`
--
DROP TABLE IF EXISTS `litemall_order`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `litemall_order` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`user_id` int(11) NOT NULL COMMENT '用户表的用户ID',
`order_sn` varchar(63) NOT NULL COMMENT '订单编号',
`order_status` smallint(6) NOT NULL COMMENT '订单状态',
`consignee` varchar(63) NOT NULL COMMENT '收货人名称',
`mobile` varchar(63) NOT NULL COMMENT '收货人手机号',
`address` varchar(127) NOT NULL COMMENT '收货具体地址',
`goods_price` decimal(10,2) NOT NULL COMMENT '商品总费用',
`freight_price` decimal(10,2) NOT NULL COMMENT '配送费用',
`coupon_price` decimal(10,2) NOT NULL COMMENT '优惠券减免',
`integral_price` decimal(10,2) NOT NULL COMMENT '用户积分减免',
`order_price` decimal(10,2) NOT NULL COMMENT '订单费用, = goods_price + freight_price - coupon_price',
`actual_price` decimal(10,2) NOT NULL COMMENT '实付费用, = order_price - integral_price',
`pay_id` varchar(63) DEFAULT NULL COMMENT '微信付款编号',
`pay_time` datetime DEFAULT NULL COMMENT '微信付款时间',
`ship_sn` varchar(63) DEFAULT NULL COMMENT '发货编号',
`ship_channel` varchar(63) DEFAULT NULL COMMENT '发货快递公司',
`ship_time` datetime DEFAULT NULL COMMENT '发货开始时间',
`confirm_time` datetime DEFAULT NULL COMMENT '用户确认收货时间',
`end_time` datetime DEFAULT NULL COMMENT '订单关闭时间',
`add_time` datetime DEFAULT NULL COMMENT '创建时间',
`deleted` tinyint(1) DEFAULT '0' COMMENT '逻辑删除',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='订单表';
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `litemall_order_goods`
--
DROP TABLE IF EXISTS `litemall_order_goods`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `litemall_order_goods` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`order_id` int(11) NOT NULL DEFAULT '0' COMMENT '订单表的订单ID',
`goods_id` int(11) NOT NULL DEFAULT '0' COMMENT '商品表的商品ID',
`goods_name` varchar(127) NOT NULL DEFAULT '' COMMENT '商品名称',
`goods_sn` varchar(63) NOT NULL DEFAULT '' COMMENT '商品编号',
`product_id` int(11) NOT NULL DEFAULT '0' COMMENT '商品货品表的货品ID',
`number` smallint(5) NOT NULL DEFAULT '0' COMMENT '商品货品的购买数量',
`price` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '商品货品的售价',
`specifications` varchar(1023) NOT NULL COMMENT '商品货品的规格列表',
`pic_url` varchar(255) NOT NULL DEFAULT '' COMMENT '商品货品图片或者商品图片',
`add_time` datetime DEFAULT NULL COMMENT '创建时间',
`deleted` tinyint(1) DEFAULT '0' COMMENT '逻辑删除',
PRIMARY KEY (`id`),
KEY `order_id` (`order_id`),
KEY `goods_id` (`goods_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='订单商品表';
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `litemall_product`
--
DROP TABLE IF EXISTS `litemall_product`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `litemall_product` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`goods_id` int(11) NOT NULL DEFAULT '0' COMMENT '商品表的商品ID',
`specifications` varchar(1023) NOT NULL COMMENT '商品规格值列表,采用JSON数组格式',
`price` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '商品货品价格',
`number` int(11) NOT NULL DEFAULT '0' COMMENT '商品货品数量',
`url` varchar(125) DEFAULT NULL COMMENT '商品货品图片',
`add_time` datetime DEFAULT NULL COMMENT '创建时间',
`deleted` tinyint(1) DEFAULT '0' COMMENT '逻辑删除',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=259 DEFAULT CHARSET=utf8mb4 COMMENT='商品货品表';
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `litemall_region`
--
DROP TABLE IF EXISTS `litemall_region`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `litemall_region` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`pid` int(11) NOT NULL DEFAULT '0' COMMENT '行政区域父ID,例如区县的pid指向市,市的pid指向省,省的pid则是0',
`name` varchar(120) NOT NULL DEFAULT '' COMMENT '行政区域名称',
`type` tinyint(3) NOT NULL DEFAULT '0' COMMENT '行政区域类型,如如1则是省, 如果是2则是市,如果是3则是区县',
`code` int(11) NOT NULL DEFAULT '0' COMMENT '行政区域编码',
PRIMARY KEY (`id`),
KEY `parent_id` (`pid`),
KEY `region_type` (`type`),
KEY `agency_id` (`code`)
) ENGINE=InnoDB AUTO_INCREMENT=46183 DEFAULT CHARSET=utf8mb4 COMMENT='行政区域表';
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `litemall_search_history`
--
DROP TABLE IF EXISTS `litemall_search_history`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `litemall_search_history` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`user_id` int(11) NOT NULL COMMENT '用户表的用户ID',
`keyword` varchar(63) NOT NULL COMMENT '搜索关键字',
`from` varchar(63) NOT NULL DEFAULT '' COMMENT '搜索来源,如pc、wx、app',
`add_time` datetime DEFAULT NULL COMMENT '创建时间',
`deleted` tinyint(1) DEFAULT '0' COMMENT '逻辑删除',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='搜索历史表';
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `litemall_storage`
--
DROP TABLE IF EXISTS `litemall_storage`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `litemall_storage` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`key` varchar(63) NOT NULL COMMENT '文件的唯一索引',
`name` varchar(255) NOT NULL COMMENT '文件名',
`type` varchar(20) NOT NULL COMMENT '文件类型',
`size` int(11) NOT NULL COMMENT '文件大小',
`modified` datetime DEFAULT NULL COMMENT '最后更新时间',
`url` varchar(255) DEFAULT NULL COMMENT '文件访问链接',
`add_time` datetime DEFAULT NULL COMMENT '创建时间',
`deleted` tinyint(1) DEFAULT '0' COMMENT '逻辑删除',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='文件存储表';
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `litemall_topic`
--
DROP TABLE IF EXISTS `litemall_topic`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `litemall_topic` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`title` varchar(255) NOT NULL DEFAULT '''' COMMENT '专题标题',
`subtitle` varchar(255) NOT NULL DEFAULT '''' COMMENT '专题子标题',
`content` text NOT NULL COMMENT '专题内容,富文本格式',
`price` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '专题相关商品最低价',
`read_count` varchar(255) NOT NULL DEFAULT '1k' COMMENT '专题阅读量',
`pic_url` varchar(255) NOT NULL DEFAULT '' COMMENT '专题图片',
`sort_order` int(11) NOT NULL DEFAULT '100' COMMENT '排序',
`goods` varchar(1023) DEFAULT NULL COMMENT '专题相关商品,采用JSON数组格式',
`add_time` datetime DEFAULT NULL COMMENT '创建时间',
`deleted` tinyint(1) DEFAULT '0' COMMENT '逻辑删除',
PRIMARY KEY (`id`),
KEY `topic_id` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=315 DEFAULT CHARSET=utf8mb4 COMMENT='专题表';
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `litemall_user`
--
DROP TABLE IF EXISTS `litemall_user`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `litemall_user` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`username` varchar(63) NOT NULL COMMENT '用户名称',
`password` varchar(63) NOT NULL DEFAULT '' COMMENT '用户密码',
`gender` tinyint(3) NOT NULL DEFAULT '0' COMMENT '性别:0 未知, 1男, 1 女',
`birthday` date DEFAULT NULL COMMENT '生日',
`last_login_time` datetime DEFAULT NULL COMMENT '最近一次登录时间',
`last_login_ip` varchar(63) NOT NULL DEFAULT '' COMMENT '最近一次登录IP地址',
`user_level` tinyint(3) DEFAULT '0' COMMENT '0 普通用户,1 VIP用户,2 高级VIP用户',
`nickname` varchar(63) NOT NULL DEFAULT '' COMMENT '用户昵称或网络名称',
`mobile` varchar(20) NOT NULL DEFAULT '' COMMENT '用户手机号码',
`avatar` varchar(255) NOT NULL DEFAULT '' COMMENT '用户头像图片',
`weixin_openid` varchar(63) NOT NULL DEFAULT '' COMMENT '微信登录openid',
`status` tinyint(3) NOT NULL DEFAULT '0' COMMENT '0 可用, 1 禁用, 2 注销',
`add_time` datetime DEFAULT NULL COMMENT '创建时间',
`deleted` tinyint(1) DEFAULT '0' COMMENT '逻辑删除',
PRIMARY KEY (`id`),
UNIQUE KEY `user_name` (`username`)
) ENGINE=InnoDB AUTO_INCREMENT=31 DEFAULT CHARSET=utf8mb4 COMMENT='用户表';
/*!40101 SET character_set_client = @saved_cs_client */;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
-- Dump completed on 2018-07-05 22:36:57
This source diff could not be displayed because it is too large. You can view the blob instead.
package org.linlinjava.litemall.db.dao;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.linlinjava.litemall.db.domain.LitemallCoupon;
import org.linlinjava.litemall.db.domain.LitemallCouponExample;
public interface LitemallCouponMapper {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table litemall_coupon
*
* @mbg.generated
*/
long countByExample(LitemallCouponExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table litemall_coupon
*
* @mbg.generated
*/
int deleteByExample(LitemallCouponExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table litemall_coupon
*
* @mbg.generated
*/
int deleteByPrimaryKey(Integer id);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table litemall_coupon
*
* @mbg.generated
*/
int insert(LitemallCoupon record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table litemall_coupon
*
* @mbg.generated
*/
int insertSelective(LitemallCoupon record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table litemall_coupon
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
LitemallCoupon selectOneByExample(LitemallCouponExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table litemall_coupon
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
LitemallCoupon selectOneByExampleSelective(@Param("example") LitemallCouponExample example, @Param("selective") LitemallCoupon.Column ... selective);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table litemall_coupon
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
List<LitemallCoupon> selectByExampleSelective(@Param("example") LitemallCouponExample example, @Param("selective") LitemallCoupon.Column ... selective);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table litemall_coupon
*
* @mbg.generated
*/
List<LitemallCoupon> selectByExample(LitemallCouponExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table litemall_coupon
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
LitemallCoupon selectByPrimaryKeySelective(@Param("id") Integer id, @Param("selective") LitemallCoupon.Column ... selective);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table litemall_coupon
*
* @mbg.generated
*/
LitemallCoupon selectByPrimaryKey(Integer id);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table litemall_coupon
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
LitemallCoupon selectByPrimaryKeyWithLogicalDelete(@Param("id") Integer id, @Param("andLogicalDeleted") boolean andLogicalDeleted);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table litemall_coupon
*
* @mbg.generated
*/
int updateByExampleSelective(@Param("record") LitemallCoupon record, @Param("example") LitemallCouponExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table litemall_coupon
*
* @mbg.generated
*/
int updateByExample(@Param("record") LitemallCoupon record, @Param("example") LitemallCouponExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table litemall_coupon
*
* @mbg.generated
*/
int updateByPrimaryKeySelective(LitemallCoupon record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table litemall_coupon
*
* @mbg.generated
*/
int updateByPrimaryKey(LitemallCoupon record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table litemall_coupon
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
int logicalDeleteByExample(@Param("example") LitemallCouponExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table litemall_coupon
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
int logicalDeleteByPrimaryKey(Integer id);
}
\ No newline at end of file
package org.linlinjava.litemall.db.dao;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.linlinjava.litemall.db.domain.LitemallUserCoupon;
import org.linlinjava.litemall.db.domain.LitemallUserCouponExample;
public interface LitemallUserCouponMapper {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table litemall_user_coupon
*
* @mbg.generated
*/
long countByExample(LitemallUserCouponExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table litemall_user_coupon
*
* @mbg.generated
*/
int deleteByExample(LitemallUserCouponExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table litemall_user_coupon
*
* @mbg.generated
*/
int deleteByPrimaryKey(Integer id);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table litemall_user_coupon
*
* @mbg.generated
*/
int insert(LitemallUserCoupon record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table litemall_user_coupon
*
* @mbg.generated
*/
int insertSelective(LitemallUserCoupon record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table litemall_user_coupon
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
LitemallUserCoupon selectOneByExample(LitemallUserCouponExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table litemall_user_coupon
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
LitemallUserCoupon selectOneByExampleSelective(@Param("example") LitemallUserCouponExample example, @Param("selective") LitemallUserCoupon.Column ... selective);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table litemall_user_coupon
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
List<LitemallUserCoupon> selectByExampleSelective(@Param("example") LitemallUserCouponExample example, @Param("selective") LitemallUserCoupon.Column ... selective);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table litemall_user_coupon
*
* @mbg.generated
*/
List<LitemallUserCoupon> selectByExample(LitemallUserCouponExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table litemall_user_coupon
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
LitemallUserCoupon selectByPrimaryKeySelective(@Param("id") Integer id, @Param("selective") LitemallUserCoupon.Column ... selective);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table litemall_user_coupon
*
* @mbg.generated
*/
LitemallUserCoupon selectByPrimaryKey(Integer id);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table litemall_user_coupon
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
LitemallUserCoupon selectByPrimaryKeyWithLogicalDelete(@Param("id") Integer id, @Param("andLogicalDeleted") boolean andLogicalDeleted);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table litemall_user_coupon
*
* @mbg.generated
*/
int updateByExampleSelective(@Param("record") LitemallUserCoupon record, @Param("example") LitemallUserCouponExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table litemall_user_coupon
*
* @mbg.generated
*/
int updateByExample(@Param("record") LitemallUserCoupon record, @Param("example") LitemallUserCouponExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table litemall_user_coupon
*
* @mbg.generated
*/
int updateByPrimaryKeySelective(LitemallUserCoupon record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table litemall_user_coupon
*
* @mbg.generated
*/
int updateByPrimaryKey(LitemallUserCoupon record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table litemall_user_coupon
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
int logicalDeleteByExample(@Param("example") LitemallUserCouponExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table litemall_user_coupon
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
int logicalDeleteByPrimaryKey(Integer id);
}
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment