Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Q
qk_backend
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
quanku
qk_backend
Commits
3a9fb258
Commit
3a9fb258
authored
Aug 15, 2023
by
shiyu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
商品表新增字段
parent
784e593a
Changes
4
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
783 additions
and
19 deletions
+783
-19
ch-core/src/main/java/com/wwdz/ch/core/consts/ItemTypeEnum.java
...e/src/main/java/com/wwdz/ch/core/consts/ItemTypeEnum.java
+36
-0
ch-dao/src/main/java/com/wwdz/ch/db/domain/Item.java
ch-dao/src/main/java/com/wwdz/ch/db/domain/Item.java
+23
-5
ch-dao/src/main/java/com/wwdz/ch/db/domain/ItemExample.java
ch-dao/src/main/java/com/wwdz/ch/db/domain/ItemExample.java
+132
-0
ch-dao/src/main/resources/com/wwdz/ch/db/mapper/ItemMapper.xml
...o/src/main/resources/com/wwdz/ch/db/mapper/ItemMapper.xml
+592
-14
No files found.
ch-core/src/main/java/com/wwdz/ch/core/consts/ItemTypeEnum.java
0 → 100644
View file @
3a9fb258
package
com.wwdz.ch.core.consts
;
/**
* 商品种类
*/
public
enum
ItemTypeEnum
{
COIN
(
1
,
"钱币"
),
NEPHRITE
(
2
,
"和田玉"
),
;
private
int
code
;
private
String
des
;
ItemTypeEnum
(
int
code
,
String
des
)
{
this
.
code
=
code
;
this
.
des
=
des
;
}
public
static
String
getNameByCode
(
int
code
)
{
for
(
ItemTypeEnum
itemTypeEnum
:
ItemTypeEnum
.
values
())
{
if
(
code
==
itemTypeEnum
.
getCode
())
{
return
itemTypeEnum
.
getDes
();
}
}
return
null
;
}
public
int
getCode
()
{
return
code
;
}
public
String
getDes
()
{
return
des
;
}
}
ch-dao/src/main/java/com/wwdz/ch/db/domain/Item.java
View file @
3a9fb258
...
...
@@ -10,19 +10,19 @@ import lombok.Data;
/**
* @author shiyu
* @date 2023/0
7/27
* @date 2023/0
8/15
*/
@Data
public
class
Item
implements
Entity
{
private
Long
id
;
/**
*
钱币
名称
*
商品
名称
*/
private
String
name
;
/**
*
钱币
所属类目ID
*
商品
所属类目ID
*/
private
Integer
cid
;
...
...
@@ -102,15 +102,25 @@ public class Item implements Entity {
private
Integer
source
;
/**
* 钱币额外信息
* 商品种类1钱币
*/
private
Integer
type
;
/**
* 商品额外信息
*/
private
String
extra
;
/**
* 商品图片
,
分号分隔
* 商品图片
,
分号分隔
*/
private
String
images
;
/**
* 商品视频, 分号分隔
*/
private
String
vedios
;
/**
* 商品详细介绍,是富文本格式
*/
...
...
@@ -147,8 +157,10 @@ public class Item implements Entity {
sb
.
append
(
", isSetted="
).
append
(
isSetted
);
sb
.
append
(
", originalSourceUrl="
).
append
(
originalSourceUrl
);
sb
.
append
(
", source="
).
append
(
source
);
sb
.
append
(
", type="
).
append
(
type
);
sb
.
append
(
", extra="
).
append
(
extra
);
sb
.
append
(
", images="
).
append
(
images
);
sb
.
append
(
", vedios="
).
append
(
vedios
);
sb
.
append
(
", detail="
).
append
(
detail
);
sb
.
append
(
", originalExtra="
).
append
(
originalExtra
);
sb
.
append
(
", serialVersionUID="
).
append
(
serialVersionUID
);
...
...
@@ -186,8 +198,10 @@ public class Item implements Entity {
&&
(
this
.
getIsSetted
()
==
null
?
other
.
getIsSetted
()
==
null
:
this
.
getIsSetted
().
equals
(
other
.
getIsSetted
()))
&&
(
this
.
getOriginalSourceUrl
()
==
null
?
other
.
getOriginalSourceUrl
()
==
null
:
this
.
getOriginalSourceUrl
().
equals
(
other
.
getOriginalSourceUrl
()))
&&
(
this
.
getSource
()
==
null
?
other
.
getSource
()
==
null
:
this
.
getSource
().
equals
(
other
.
getSource
()))
&&
(
this
.
getType
()
==
null
?
other
.
getType
()
==
null
:
this
.
getType
().
equals
(
other
.
getType
()))
&&
(
this
.
getExtra
()
==
null
?
other
.
getExtra
()
==
null
:
this
.
getExtra
().
equals
(
other
.
getExtra
()))
&&
(
this
.
getImages
()
==
null
?
other
.
getImages
()
==
null
:
this
.
getImages
().
equals
(
other
.
getImages
()))
&&
(
this
.
getVedios
()
==
null
?
other
.
getVedios
()
==
null
:
this
.
getVedios
().
equals
(
other
.
getVedios
()))
&&
(
this
.
getDetail
()
==
null
?
other
.
getDetail
()
==
null
:
this
.
getDetail
().
equals
(
other
.
getDetail
()))
&&
(
this
.
getOriginalExtra
()
==
null
?
other
.
getOriginalExtra
()
==
null
:
this
.
getOriginalExtra
().
equals
(
other
.
getOriginalExtra
()));
}
...
...
@@ -214,8 +228,10 @@ public class Item implements Entity {
result
=
prime
*
result
+
((
getIsSetted
()
==
null
)
?
0
:
getIsSetted
().
hashCode
());
result
=
prime
*
result
+
((
getOriginalSourceUrl
()
==
null
)
?
0
:
getOriginalSourceUrl
().
hashCode
());
result
=
prime
*
result
+
((
getSource
()
==
null
)
?
0
:
getSource
().
hashCode
());
result
=
prime
*
result
+
((
getType
()
==
null
)
?
0
:
getType
().
hashCode
());
result
=
prime
*
result
+
((
getExtra
()
==
null
)
?
0
:
getExtra
().
hashCode
());
result
=
prime
*
result
+
((
getImages
()
==
null
)
?
0
:
getImages
().
hashCode
());
result
=
prime
*
result
+
((
getVedios
()
==
null
)
?
0
:
getVedios
().
hashCode
());
result
=
prime
*
result
+
((
getDetail
()
==
null
)
?
0
:
getDetail
().
hashCode
());
result
=
prime
*
result
+
((
getOriginalExtra
()
==
null
)
?
0
:
getOriginalExtra
().
hashCode
());
return
result
;
...
...
@@ -247,8 +263,10 @@ public class Item implements Entity {
isSetted
(
"is_setted"
,
"isSetted"
,
"INTEGER"
,
false
),
originalSourceUrl
(
"original_source_url"
,
"originalSourceUrl"
,
"VARCHAR"
,
false
),
source
(
"source"
,
"source"
,
"INTEGER"
,
true
),
type
(
"type"
,
"type"
,
"INTEGER"
,
true
),
extra
(
"extra"
,
"extra"
,
"LONGVARCHAR"
,
false
),
images
(
"images"
,
"images"
,
"LONGVARCHAR"
,
false
),
vedios
(
"vedios"
,
"vedios"
,
"LONGVARCHAR"
,
false
),
detail
(
"detail"
,
"detail"
,
"LONGVARCHAR"
,
false
),
originalExtra
(
"original_extra"
,
"originalExtra"
,
"LONGVARCHAR"
,
false
);
...
...
ch-dao/src/main/java/com/wwdz/ch/db/domain/ItemExample.java
View file @
3a9fb258
...
...
@@ -2583,6 +2583,138 @@ public class ItemExample {
addCriterion
(
"`source` not between"
,
value1
,
value2
,
"source"
);
return
(
Criteria
)
this
;
}
public
Criteria
andTypeIsNull
()
{
addCriterion
(
"`type` is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andTypeIsNotNull
()
{
addCriterion
(
"`type` is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andTypeEqualTo
(
Integer
value
)
{
addCriterion
(
"`type` ="
,
value
,
"type"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table item
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andTypeEqualToColumn
(
Item
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"`type` = "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andTypeNotEqualTo
(
Integer
value
)
{
addCriterion
(
"`type` <>"
,
value
,
"type"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table item
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andTypeNotEqualToColumn
(
Item
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"`type` <> "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andTypeGreaterThan
(
Integer
value
)
{
addCriterion
(
"`type` >"
,
value
,
"type"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table item
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andTypeGreaterThanColumn
(
Item
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"`type` > "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andTypeGreaterThanOrEqualTo
(
Integer
value
)
{
addCriterion
(
"`type` >="
,
value
,
"type"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table item
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andTypeGreaterThanOrEqualToColumn
(
Item
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"`type` >= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andTypeLessThan
(
Integer
value
)
{
addCriterion
(
"`type` <"
,
value
,
"type"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table item
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andTypeLessThanColumn
(
Item
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"`type` < "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andTypeLessThanOrEqualTo
(
Integer
value
)
{
addCriterion
(
"`type` <="
,
value
,
"type"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table item
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andTypeLessThanOrEqualToColumn
(
Item
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"`type` <= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andTypeIn
(
List
<
Integer
>
values
)
{
addCriterion
(
"`type` in"
,
values
,
"type"
);
return
(
Criteria
)
this
;
}
public
Criteria
andTypeNotIn
(
List
<
Integer
>
values
)
{
addCriterion
(
"`type` not in"
,
values
,
"type"
);
return
(
Criteria
)
this
;
}
public
Criteria
andTypeBetween
(
Integer
value1
,
Integer
value2
)
{
addCriterion
(
"`type` between"
,
value1
,
value2
,
"type"
);
return
(
Criteria
)
this
;
}
public
Criteria
andTypeNotBetween
(
Integer
value1
,
Integer
value2
)
{
addCriterion
(
"`type` not between"
,
value1
,
value2
,
"type"
);
return
(
Criteria
)
this
;
}
}
public
static
class
Criteria
extends
GeneratedCriteria
{
...
...
ch-dao/src/main/resources/com/wwdz/ch/db/mapper/ItemMapper.xml
View file @
3a9fb258
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment