Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
platform
/
platform-shopmall-parent
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 9c41597a
authored
Nov 29, 2023
by
张漳铖
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
新增表实例化
1 parent
669118c0
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
126 additions
and
7 deletions
platform-shopmall-api/pom.xml
platform-shopmall-api/src/main/java/cn/com/glsx/admin/modules/entity/OilCoupon.java
platform-shopmall/pom.xml
platform-shopmall/src/main/java/cn/com/glsx/admin/modules/mapper/OilCouponMapper.java
platform-shopmall/src/main/resources/mapper/OilCouponMapper.xml
platform-shopmall/src/test/resources/generatorConfig.xml
pom.xml
platform-shopmall-api/pom.xml
View file @
9c41597
...
@@ -5,8 +5,9 @@
...
@@ -5,8 +5,9 @@
<parent>
<parent>
<groupId>
cn.com.glsx
</groupId>
<groupId>
cn.com.glsx
</groupId>
<artifactId>
platform-shopmall-parent
</artifactId>
<artifactId>
platform-shopmall-parent
</artifactId>
<version>
3.22.1
-SNAPSHOT
</version>
<version>
1.0.0
-SNAPSHOT
</version>
</parent>
</parent>
<version>
3.22.1-SNAPSHOT
</version>
<modelVersion>
4.0.0
</modelVersion>
<modelVersion>
4.0.0
</modelVersion>
<packaging>
jar
</packaging>
<packaging>
jar
</packaging>
<description>
Microservice Scaffolding Api Base on Spring Cloud
</description>
<description>
Microservice Scaffolding Api Base on Spring Cloud
</description>
...
...
platform-shopmall-api/src/main/java/cn/com/glsx/admin/modules/entity/OilCoupon.java
0 → 100644
View file @
9c41597
package
cn
.
com
.
glsx
.
admin
.
modules
.
entity
;
import
java.io.Serializable
;
import
java.util.Date
;
import
javax.persistence.*
;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
lombok.experimental.Accessors
;
@Table
(
name
=
"shopmall_oil_coupon"
)
@Data
@Accessors
(
chain
=
true
)
@NoArgsConstructor
@AllArgsConstructor
public
class
OilCoupon
implements
Serializable
{
/**
* id
*/
@Id
private
Integer
id
;
/**
* 商品编号
*/
private
String
alias
;
/**
* 商品名称
*/
@Column
(
name
=
"alias_name"
)
private
String
aliasName
;
/**
* 面额(单位/元)
*/
@Column
(
name
=
"face_value"
)
private
String
faceValue
;
/**
* 成本价(单位/元)
*/
@Column
(
name
=
"sell_price"
)
private
String
sellPrice
;
/**
* 库存
*/
private
Integer
stock
;
/**
* 创建人
*/
@Column
(
name
=
"created_by"
)
private
String
createdBy
;
/**
* 创建时间
*/
@Column
(
name
=
"created_date"
)
private
Date
createdDate
;
/**
* 修改人
*/
@Column
(
name
=
"updated_by"
)
private
String
updatedBy
;
/**
* 修改时间
*/
@Column
(
name
=
"updated_date"
)
private
Date
updatedDate
;
/**
* 删除标识(D:已删除;N:未删除)
*/
@Column
(
name
=
"deleted_flag"
)
private
String
deletedFlag
;
private
static
final
long
serialVersionUID
=
1L
;
}
\ No newline at end of file
\ No newline at end of file
platform-shopmall/pom.xml
View file @
9c41597
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
<parent>
<parent>
<groupId>
cn.com.glsx
</groupId>
<groupId>
cn.com.glsx
</groupId>
<artifactId>
platform-shopmall-parent
</artifactId>
<artifactId>
platform-shopmall-parent
</artifactId>
<version>
3.22.1
-SNAPSHOT
</version>
<version>
1.0.0
-SNAPSHOT
</version>
</parent>
</parent>
<modelVersion>
4.0.0
</modelVersion>
<modelVersion>
4.0.0
</modelVersion>
<packaging>
war
</packaging>
<packaging>
war
</packaging>
...
...
platform-shopmall/src/main/java/cn/com/glsx/admin/modules/mapper/OilCouponMapper.java
0 → 100644
View file @
9c41597
package
cn
.
com
.
glsx
.
admin
.
modules
.
mapper
;
import
cn.com.glsx.admin.modules.entity.OilCoupon
;
import
com.glsx.plat.mybatis.mapper.CommonBaseMapper
;
import
org.apache.ibatis.annotations.Mapper
;
@Mapper
public
interface
OilCouponMapper
extends
CommonBaseMapper
<
OilCoupon
>
{
}
\ No newline at end of file
\ No newline at end of file
platform-shopmall/src/main/resources/mapper/OilCouponMapper.xml
0 → 100644
View file @
9c41597
<?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=
"cn.com.glsx.admin.modules.mapper.OilCouponMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"cn.com.glsx.admin.modules.entity.OilCoupon"
>
<!--
WARNING - @mbg.generated
-->
<id
column=
"id"
jdbcType=
"INTEGER"
property=
"id"
/>
<result
column=
"alias"
jdbcType=
"VARCHAR"
property=
"alias"
/>
<result
column=
"alias_name"
jdbcType=
"VARCHAR"
property=
"aliasName"
/>
<result
column=
"face_value"
jdbcType=
"VARCHAR"
property=
"faceValue"
/>
<result
column=
"sell_price"
jdbcType=
"VARCHAR"
property=
"sellPrice"
/>
<result
column=
"stock"
jdbcType=
"INTEGER"
property=
"stock"
/>
<result
column=
"created_by"
jdbcType=
"VARCHAR"
property=
"createdBy"
/>
<result
column=
"created_date"
jdbcType=
"TIMESTAMP"
property=
"createdDate"
/>
<result
column=
"updated_by"
jdbcType=
"VARCHAR"
property=
"updatedBy"
/>
<result
column=
"updated_date"
jdbcType=
"TIMESTAMP"
property=
"updatedDate"
/>
<result
column=
"deleted_flag"
jdbcType=
"CHAR"
property=
"deletedFlag"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
<!--
WARNING - @mbg.generated
-->
id, `alias`, alias_name, face_value, sell_price, stock, created_by, created_date,
updated_by, updated_date, deleted_flag
</sql>
</mapper>
\ No newline at end of file
\ No newline at end of file
platform-shopmall/src/test/resources/generatorConfig.xml
View file @
9c41597
...
@@ -35,9 +35,9 @@
...
@@ -35,9 +35,9 @@
</commentGenerator>
</commentGenerator>
<!-- jdbc连接-->
<!-- jdbc连接-->
<jdbcConnection
driverClass=
"com.mysql.cj.jdbc.Driver"
<jdbcConnection
driverClass=
"com.mysql.cj.jdbc.Driver"
connectionURL=
"jdbc:mysql://192.168.3.
190
:3306/platform_shopmall?serverTimeZone=Shanghai&useUnicode=true&characterEncoding=utf8&useSSL=false"
connectionURL=
"jdbc:mysql://192.168.3.
227
:3306/platform_shopmall?serverTimeZone=Shanghai&useUnicode=true&characterEncoding=utf8&useSSL=false"
userId=
"
dev_user
"
userId=
"
root
"
password=
"
df234fl
"
>
password=
"
manager
"
>
<!--防止生成其他库同名表-->
<!--防止生成其他库同名表-->
<property
name=
"nullCatalogMeansCurrent"
value=
"true"
/>
<property
name=
"nullCatalogMeansCurrent"
value=
"true"
/>
</jdbcConnection>
</jdbcConnection>
...
@@ -68,6 +68,6 @@
...
@@ -68,6 +68,6 @@
</javaClientGenerator>
</javaClientGenerator>
<!-- table可以有多个,每个数据库中的表都可以写一个table,tableName表示要匹配的数据库表,也可以在tableName属性中通过使用%通配符来匹配所有数据库表,只有匹配的表才会自动生成文件 enableSelectByPrimaryKey相应的配置表示是否生成相应的接口 -->
<!-- table可以有多个,每个数据库中的表都可以写一个table,tableName表示要匹配的数据库表,也可以在tableName属性中通过使用%通配符来匹配所有数据库表,只有匹配的表才会自动生成文件 enableSelectByPrimaryKey相应的配置表示是否生成相应的接口 -->
<table
tableName=
"shopmall_
test"
domainObjectName=
"ShopmallTest
"
enableCountByExample=
"false"
enableUpdateByExample=
"false"
enableDeleteByExample=
"false"
enableSelectByExample=
"false"
selectByExampleQueryId=
"false"
/>
<table
tableName=
"shopmall_
oil_coupon"
domainObjectName=
"OilCoupon
"
enableCountByExample=
"false"
enableUpdateByExample=
"false"
enableDeleteByExample=
"false"
enableSelectByExample=
"false"
selectByExampleQueryId=
"false"
/>
</context>
</context>
</generatorConfiguration>
</generatorConfiguration>
\ No newline at end of file
\ No newline at end of file
pom.xml
View file @
9c41597
...
@@ -11,7 +11,7 @@
...
@@ -11,7 +11,7 @@
<groupId>
cn.com.glsx
</groupId>
<groupId>
cn.com.glsx
</groupId>
<artifactId>
platform-shopmall-parent
</artifactId>
<artifactId>
platform-shopmall-parent
</artifactId>
<version>
3.22.1
-SNAPSHOT
</version>
<version>
1.0.0
-SNAPSHOT
</version>
<modelVersion>
4.0.0
</modelVersion>
<modelVersion>
4.0.0
</modelVersion>
<packaging>
pom
</packaging>
<packaging>
pom
</packaging>
<description>
Microservice Scaffolding project for Spring Boot
</description>
<description>
Microservice Scaffolding project for Spring Boot
</description>
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment