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
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
...
...
@@ -20,10 +20,12 @@
<result
column=
"is_setted"
jdbcType=
"INTEGER"
property=
"isSetted"
/>
<result
column=
"original_source_url"
jdbcType=
"VARCHAR"
property=
"originalSourceUrl"
/>
<result
column=
"source"
jdbcType=
"INTEGER"
property=
"source"
/>
<result
column=
"type"
jdbcType=
"INTEGER"
property=
"type"
/>
</resultMap>
<resultMap
extends=
"BaseResultMap"
id=
"ResultMapWithBLOBs"
type=
"com.wwdz.ch.db.domain.Item"
>
<result
column=
"extra"
jdbcType=
"LONGVARCHAR"
property=
"extra"
/>
<result
column=
"images"
jdbcType=
"LONGVARCHAR"
property=
"images"
/>
<result
column=
"vedios"
jdbcType=
"LONGVARCHAR"
property=
"vedios"
/>
<result
column=
"detail"
jdbcType=
"LONGVARCHAR"
property=
"detail"
/>
<result
column=
"original_extra"
jdbcType=
"LONGVARCHAR"
property=
"originalExtra"
/>
</resultMap>
...
...
@@ -88,10 +90,10 @@
<sql
id=
"Base_Column_List"
>
id, `name`, cid, is_on_sale, is_std, sort, share_image, top_image, price, create_time,
source_type, update_time, is_deleted, bid_time, remark, is_setted, original_source_url,
`source`
`source`
, `type`
</sql>
<sql
id=
"Blob_Column_List"
>
extra, images, detail, original_extra
extra, images,
vedios,
detail, original_extra
</sql>
<select
id=
"selectByExampleWithBLOBs"
parameterType=
"com.wwdz.ch.db.domain.ItemExample"
resultMap=
"ResultMapWithBLOBs"
>
select
...
...
@@ -145,7 +147,7 @@
<otherwise>
id, `name`, cid, is_on_sale, is_std, sort, share_image, top_image, price, create_time,
source_type, update_time, is_deleted, bid_time, remark, is_setted, original_source_url,
`source`,
extra, image
s, detail, original_extra
`source`,
`type`, extra, images, vedio
s, detail, original_extra
</otherwise>
</choose>
from item
...
...
@@ -180,7 +182,7 @@
<otherwise>
id, `name`, cid, is_on_sale, is_std, sort, share_image, top_image, price, create_time,
source_type, update_time, is_deleted, bid_time, remark, is_setted, original_source_url,
`source`,
extra, image
s, detail, original_extra
`source`,
`type`, extra, images, vedio
s, detail, original_extra
</otherwise>
</choose>
from item
...
...
@@ -205,17 +207,17 @@
top_image, price, create_time,
source_type, update_time, is_deleted,
bid_time, remark, is_setted,
original_source_url, `source`,
extra
,
images, detail, original_extra
)
original_source_url, `source`,
`type`
,
extra, images, vedios,
detail, original_extra
)
values (#{name,jdbcType=VARCHAR}, #{cid,jdbcType=INTEGER}, #{isOnSale,jdbcType=BIT},
#{isStd,jdbcType=BIT}, #{sort,jdbcType=INTEGER}, #{shareImage,jdbcType=VARCHAR},
#{topImage,jdbcType=VARCHAR}, #{price,jdbcType=BIGINT}, #{createTime,jdbcType=TIMESTAMP},
#{sourceType,jdbcType=INTEGER}, #{updateTime,jdbcType=TIMESTAMP}, #{isDeleted,jdbcType=BIT},
#{bidTime,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR}, #{isSetted,jdbcType=INTEGER},
#{originalSourceUrl,jdbcType=VARCHAR}, #{source,jdbcType=INTEGER}, #{
extra,jdbcType=LONGVARCHA
R},
#{
images,jdbcType=LONGVARCHAR}, #{detail,jdbcType=LONGVARCHAR}, #{originalExtra,jdbcType=LONGVARCHAR}
)
#{originalSourceUrl,jdbcType=VARCHAR}, #{source,jdbcType=INTEGER}, #{
type,jdbcType=INTEGE
R},
#{
extra,jdbcType=LONGVARCHAR}, #{images,jdbcType=LONGVARCHAR}, #{vedios,jdbcType=LONGVARCHAR},
#{detail,jdbcType=LONGVARCHAR}, #{originalExtra,jdbcType=LONGVARCHAR}
)
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.wwdz.ch.db.domain.Item"
>
<selectKey
keyProperty=
"id"
order=
"AFTER"
resultType=
"java.lang.Long"
>
...
...
@@ -274,12 +276,18 @@
<if
test=
"source != null"
>
`source`,
</if>
<if
test=
"type != null"
>
`type`,
</if>
<if
test=
"extra != null"
>
extra,
</if>
<if
test=
"images != null"
>
images,
</if>
<if
test=
"vedios != null"
>
vedios,
</if>
<if
test=
"detail != null"
>
detail,
</if>
...
...
@@ -339,12 +347,18 @@
<if
test=
"source != null"
>
#{source,jdbcType=INTEGER},
</if>
<if
test=
"type != null"
>
#{type,jdbcType=INTEGER},
</if>
<if
test=
"extra != null"
>
#{extra,jdbcType=LONGVARCHAR},
</if>
<if
test=
"images != null"
>
#{images,jdbcType=LONGVARCHAR},
</if>
<if
test=
"vedios != null"
>
#{vedios,jdbcType=LONGVARCHAR},
</if>
<if
test=
"detail != null"
>
#{detail,jdbcType=LONGVARCHAR},
</if>
...
...
@@ -416,12 +430,18 @@
<if
test=
"record.source != null"
>
`source` = #{record.source,jdbcType=INTEGER},
</if>
<if
test=
"record.type != null"
>
`type` = #{record.type,jdbcType=INTEGER},
</if>
<if
test=
"record.extra != null"
>
extra = #{record.extra,jdbcType=LONGVARCHAR},
</if>
<if
test=
"record.images != null"
>
images = #{record.images,jdbcType=LONGVARCHAR},
</if>
<if
test=
"record.vedios != null"
>
vedios = #{record.vedios,jdbcType=LONGVARCHAR},
</if>
<if
test=
"record.detail != null"
>
detail = #{record.detail,jdbcType=LONGVARCHAR},
</if>
...
...
@@ -453,8 +473,10 @@
is_setted = #{record.isSetted,jdbcType=INTEGER},
original_source_url = #{record.originalSourceUrl,jdbcType=VARCHAR},
`source` = #{record.source,jdbcType=INTEGER},
`type` = #{record.type,jdbcType=INTEGER},
extra = #{record.extra,jdbcType=LONGVARCHAR},
images = #{record.images,jdbcType=LONGVARCHAR},
vedios = #{record.vedios,jdbcType=LONGVARCHAR},
detail = #{record.detail,jdbcType=LONGVARCHAR},
original_extra = #{record.originalExtra,jdbcType=LONGVARCHAR}
<if
test=
"_parameter != null"
>
...
...
@@ -480,7 +502,8 @@
remark = #{record.remark,jdbcType=VARCHAR},
is_setted = #{record.isSetted,jdbcType=INTEGER},
original_source_url = #{record.originalSourceUrl,jdbcType=VARCHAR},
`source` = #{record.source,jdbcType=INTEGER}
`source` = #{record.source,jdbcType=INTEGER},
`type` = #{record.type,jdbcType=INTEGER}
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
...
...
@@ -539,12 +562,18 @@
<if
test=
"source != null"
>
`source` = #{source,jdbcType=INTEGER},
</if>
<if
test=
"type != null"
>
`type` = #{type,jdbcType=INTEGER},
</if>
<if
test=
"extra != null"
>
extra = #{extra,jdbcType=LONGVARCHAR},
</if>
<if
test=
"images != null"
>
images = #{images,jdbcType=LONGVARCHAR},
</if>
<if
test=
"vedios != null"
>
vedios = #{vedios,jdbcType=LONGVARCHAR},
</if>
<if
test=
"detail != null"
>
detail = #{detail,jdbcType=LONGVARCHAR},
</if>
...
...
@@ -573,8 +602,10 @@
is_setted = #{isSetted,jdbcType=INTEGER},
original_source_url = #{originalSourceUrl,jdbcType=VARCHAR},
`source` = #{source,jdbcType=INTEGER},
`type` = #{type,jdbcType=INTEGER},
extra = #{extra,jdbcType=LONGVARCHAR},
images = #{images,jdbcType=LONGVARCHAR},
vedios = #{vedios,jdbcType=LONGVARCHAR},
detail = #{detail,jdbcType=LONGVARCHAR},
original_extra = #{originalExtra,jdbcType=LONGVARCHAR}
where id = #{id,jdbcType=BIGINT}
...
...
@@ -597,7 +628,8 @@
remark = #{remark,jdbcType=VARCHAR},
is_setted = #{isSetted,jdbcType=INTEGER},
original_source_url = #{originalSourceUrl,jdbcType=VARCHAR},
`source` = #{source,jdbcType=INTEGER}
`source` = #{source,jdbcType=INTEGER},
`type` = #{type,jdbcType=INTEGER}
where id = #{id,jdbcType=BIGINT}
</update>
<select
id=
"selectOneByExample"
parameterType=
"com.wwdz.ch.db.domain.ItemExample"
resultMap=
"BaseResultMap"
>
...
...
@@ -655,7 +687,7 @@
<otherwise>
id, `name`, cid, is_on_sale, is_std, sort, share_image, top_image, price, create_time,
source_type, update_time, is_deleted, bid_time, remark, is_setted, original_source_url,
`source`,
extra, image
s, detail, original_extra
`source`,
`type`, extra, images, vedio
s, detail, original_extra
</otherwise>
</choose>
from item
...
...
@@ -667,4 +699,550 @@
</if>
limit 1
</select>
<resultMap
id=
"BaseResultMap"
type=
"com.wwdz.ch.db.domain.Item"
>
<id
column=
"id"
jdbcType=
"BIGINT"
property=
"id"
/>
<result
column=
"name"
jdbcType=
"VARCHAR"
property=
"name"
/>
<result
column=
"cid"
jdbcType=
"INTEGER"
property=
"cid"
/>
<result
column=
"is_on_sale"
jdbcType=
"BIT"
property=
"isOnSale"
/>
<result
column=
"is_std"
jdbcType=
"BIT"
property=
"isStd"
/>
<result
column=
"sort"
jdbcType=
"INTEGER"
property=
"sort"
/>
<result
column=
"share_image"
jdbcType=
"VARCHAR"
property=
"shareImage"
/>
<result
column=
"top_image"
jdbcType=
"VARCHAR"
property=
"topImage"
/>
<result
column=
"price"
jdbcType=
"BIGINT"
property=
"price"
/>
<result
column=
"create_time"
jdbcType=
"TIMESTAMP"
property=
"createTime"
/>
<result
column=
"source_type"
jdbcType=
"INTEGER"
property=
"sourceType"
/>
<result
column=
"update_time"
jdbcType=
"TIMESTAMP"
property=
"updateTime"
/>
<result
column=
"is_deleted"
jdbcType=
"BIT"
property=
"isDeleted"
/>
<result
column=
"bid_time"
jdbcType=
"VARCHAR"
property=
"bidTime"
/>
<result
column=
"remark"
jdbcType=
"VARCHAR"
property=
"remark"
/>
<result
column=
"is_setted"
jdbcType=
"INTEGER"
property=
"isSetted"
/>
<result
column=
"original_source_url"
jdbcType=
"VARCHAR"
property=
"originalSourceUrl"
/>
<result
column=
"source"
jdbcType=
"INTEGER"
property=
"source"
/>
</resultMap>
<resultMap
extends=
"BaseResultMap"
id=
"ResultMapWithBLOBs"
type=
"com.wwdz.ch.db.domain.Item"
>
<result
column=
"extra"
jdbcType=
"LONGVARCHAR"
property=
"extra"
/>
<result
column=
"images"
jdbcType=
"LONGVARCHAR"
property=
"images"
/>
<result
column=
"detail"
jdbcType=
"LONGVARCHAR"
property=
"detail"
/>
<result
column=
"original_extra"
jdbcType=
"LONGVARCHAR"
property=
"originalExtra"
/>
</resultMap>
<sql
id=
"Example_Where_Clause"
>
<where>
<foreach
collection=
"oredCriteria"
item=
"criteria"
separator=
"or"
>
<if
test=
"criteria.valid"
>
<trim
prefix=
"("
prefixOverrides=
"and"
suffix=
")"
>
<foreach
collection=
"criteria.criteria"
item=
"criterion"
>
<choose>
<when
test=
"criterion.noValue"
>
and ${criterion.condition}
</when>
<when
test=
"criterion.singleValue"
>
and ${criterion.condition} #{criterion.value}
</when>
<when
test=
"criterion.betweenValue"
>
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when
test=
"criterion.listValue"
>
and ${criterion.condition}
<foreach
close=
")"
collection=
"criterion.value"
item=
"listItem"
open=
"("
separator=
","
>
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql
id=
"Update_By_Example_Where_Clause"
>
<where>
<foreach
collection=
"example.oredCriteria"
item=
"criteria"
separator=
"or"
>
<if
test=
"criteria.valid"
>
<trim
prefix=
"("
prefixOverrides=
"and"
suffix=
")"
>
<foreach
collection=
"criteria.criteria"
item=
"criterion"
>
<choose>
<when
test=
"criterion.noValue"
>
and ${criterion.condition}
</when>
<when
test=
"criterion.singleValue"
>
and ${criterion.condition} #{criterion.value}
</when>
<when
test=
"criterion.betweenValue"
>
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when
test=
"criterion.listValue"
>
and ${criterion.condition}
<foreach
close=
")"
collection=
"criterion.value"
item=
"listItem"
open=
"("
separator=
","
>
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql
id=
"Base_Column_List"
>
id, `name`, cid, is_on_sale, is_std, sort, share_image, top_image, price, create_time,
source_type, update_time, is_deleted, bid_time, remark, is_setted, original_source_url,
`source`
</sql>
<sql
id=
"Blob_Column_List"
>
extra, images, detail, original_extra
</sql>
<select
id=
"selectByExampleWithBLOBs"
parameterType=
"com.wwdz.ch.db.domain.ItemExample"
resultMap=
"ResultMapWithBLOBs"
>
select
<if
test=
"distinct"
>
distinct
</if>
'true' as QUERYID,
<include
refid=
"Base_Column_List"
/>
,
<include
refid=
"Blob_Column_List"
/>
from item
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
<if
test=
"orderByClause != null"
>
order by ${orderByClause}
</if>
</select>
<select
id=
"selectByExample"
parameterType=
"com.wwdz.ch.db.domain.ItemExample"
resultMap=
"BaseResultMap"
>
select
<if
test=
"distinct"
>
distinct
</if>
'true' as QUERYID,
<include
refid=
"Base_Column_List"
/>
from item
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
<if
test=
"orderByClause != null"
>
order by ${orderByClause}
</if>
</select>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.lang.Long"
resultMap=
"ResultMapWithBLOBs"
>
select
<include
refid=
"Base_Column_List"
/>
,
<include
refid=
"Blob_Column_List"
/>
from item
where id = #{id,jdbcType=BIGINT}
</select>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.Long"
>
delete from item
where id = #{id,jdbcType=BIGINT}
</delete>
<delete
id=
"deleteByExample"
parameterType=
"com.wwdz.ch.db.domain.ItemExample"
>
delete from item
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
</delete>
<insert
id=
"insert"
parameterType=
"com.wwdz.ch.db.domain.Item"
>
<selectKey
keyProperty=
"id"
order=
"AFTER"
resultType=
"java.lang.Long"
>
SELECT LAST_INSERT_ID()
</selectKey>
insert into item (`name`, cid, is_on_sale,
is_std, sort, share_image,
top_image, price, create_time,
source_type, update_time, is_deleted,
bid_time, remark, is_setted,
original_source_url, `source`, extra,
images, detail, original_extra
)
values (#{name,jdbcType=VARCHAR}, #{cid,jdbcType=INTEGER}, #{isOnSale,jdbcType=BIT},
#{isStd,jdbcType=BIT}, #{sort,jdbcType=INTEGER}, #{shareImage,jdbcType=VARCHAR},
#{topImage,jdbcType=VARCHAR}, #{price,jdbcType=BIGINT}, #{createTime,jdbcType=TIMESTAMP},
#{sourceType,jdbcType=INTEGER}, #{updateTime,jdbcType=TIMESTAMP}, #{isDeleted,jdbcType=BIT},
#{bidTime,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR}, #{isSetted,jdbcType=INTEGER},
#{originalSourceUrl,jdbcType=VARCHAR}, #{source,jdbcType=INTEGER}, #{extra,jdbcType=LONGVARCHAR},
#{images,jdbcType=LONGVARCHAR}, #{detail,jdbcType=LONGVARCHAR}, #{originalExtra,jdbcType=LONGVARCHAR}
)
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.wwdz.ch.db.domain.Item"
>
<selectKey
keyProperty=
"id"
order=
"AFTER"
resultType=
"java.lang.Long"
>
SELECT LAST_INSERT_ID()
</selectKey>
insert into item
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"name != null"
>
`name`,
</if>
<if
test=
"cid != null"
>
cid,
</if>
<if
test=
"isOnSale != null"
>
is_on_sale,
</if>
<if
test=
"isStd != null"
>
is_std,
</if>
<if
test=
"sort != null"
>
sort,
</if>
<if
test=
"shareImage != null"
>
share_image,
</if>
<if
test=
"topImage != null"
>
top_image,
</if>
<if
test=
"price != null"
>
price,
</if>
<if
test=
"createTime != null"
>
create_time,
</if>
<if
test=
"sourceType != null"
>
source_type,
</if>
<if
test=
"updateTime != null"
>
update_time,
</if>
<if
test=
"isDeleted != null"
>
is_deleted,
</if>
<if
test=
"bidTime != null"
>
bid_time,
</if>
<if
test=
"remark != null"
>
remark,
</if>
<if
test=
"isSetted != null"
>
is_setted,
</if>
<if
test=
"originalSourceUrl != null"
>
original_source_url,
</if>
<if
test=
"source != null"
>
`source`,
</if>
<if
test=
"extra != null"
>
extra,
</if>
<if
test=
"images != null"
>
images,
</if>
<if
test=
"detail != null"
>
detail,
</if>
<if
test=
"originalExtra != null"
>
original_extra,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"name != null"
>
#{name,jdbcType=VARCHAR},
</if>
<if
test=
"cid != null"
>
#{cid,jdbcType=INTEGER},
</if>
<if
test=
"isOnSale != null"
>
#{isOnSale,jdbcType=BIT},
</if>
<if
test=
"isStd != null"
>
#{isStd,jdbcType=BIT},
</if>
<if
test=
"sort != null"
>
#{sort,jdbcType=INTEGER},
</if>
<if
test=
"shareImage != null"
>
#{shareImage,jdbcType=VARCHAR},
</if>
<if
test=
"topImage != null"
>
#{topImage,jdbcType=VARCHAR},
</if>
<if
test=
"price != null"
>
#{price,jdbcType=BIGINT},
</if>
<if
test=
"createTime != null"
>
#{createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"sourceType != null"
>
#{sourceType,jdbcType=INTEGER},
</if>
<if
test=
"updateTime != null"
>
#{updateTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"isDeleted != null"
>
#{isDeleted,jdbcType=BIT},
</if>
<if
test=
"bidTime != null"
>
#{bidTime,jdbcType=VARCHAR},
</if>
<if
test=
"remark != null"
>
#{remark,jdbcType=VARCHAR},
</if>
<if
test=
"isSetted != null"
>
#{isSetted,jdbcType=INTEGER},
</if>
<if
test=
"originalSourceUrl != null"
>
#{originalSourceUrl,jdbcType=VARCHAR},
</if>
<if
test=
"source != null"
>
#{source,jdbcType=INTEGER},
</if>
<if
test=
"extra != null"
>
#{extra,jdbcType=LONGVARCHAR},
</if>
<if
test=
"images != null"
>
#{images,jdbcType=LONGVARCHAR},
</if>
<if
test=
"detail != null"
>
#{detail,jdbcType=LONGVARCHAR},
</if>
<if
test=
"originalExtra != null"
>
#{originalExtra,jdbcType=LONGVARCHAR},
</if>
</trim>
</insert>
<select
id=
"countByExample"
parameterType=
"com.wwdz.ch.db.domain.ItemExample"
resultType=
"java.lang.Long"
>
select count(*) from item
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
</select>
<update
id=
"updateByExampleSelective"
parameterType=
"map"
>
update item
<set>
<if
test=
"record.id != null"
>
id = #{record.id,jdbcType=BIGINT},
</if>
<if
test=
"record.name != null"
>
`name` = #{record.name,jdbcType=VARCHAR},
</if>
<if
test=
"record.cid != null"
>
cid = #{record.cid,jdbcType=INTEGER},
</if>
<if
test=
"record.isOnSale != null"
>
is_on_sale = #{record.isOnSale,jdbcType=BIT},
</if>
<if
test=
"record.isStd != null"
>
is_std = #{record.isStd,jdbcType=BIT},
</if>
<if
test=
"record.sort != null"
>
sort = #{record.sort,jdbcType=INTEGER},
</if>
<if
test=
"record.shareImage != null"
>
share_image = #{record.shareImage,jdbcType=VARCHAR},
</if>
<if
test=
"record.topImage != null"
>
top_image = #{record.topImage,jdbcType=VARCHAR},
</if>
<if
test=
"record.price != null"
>
price = #{record.price,jdbcType=BIGINT},
</if>
<if
test=
"record.createTime != null"
>
create_time = #{record.createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"record.sourceType != null"
>
source_type = #{record.sourceType,jdbcType=INTEGER},
</if>
<if
test=
"record.updateTime != null"
>
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"record.isDeleted != null"
>
is_deleted = #{record.isDeleted,jdbcType=BIT},
</if>
<if
test=
"record.bidTime != null"
>
bid_time = #{record.bidTime,jdbcType=VARCHAR},
</if>
<if
test=
"record.remark != null"
>
remark = #{record.remark,jdbcType=VARCHAR},
</if>
<if
test=
"record.isSetted != null"
>
is_setted = #{record.isSetted,jdbcType=INTEGER},
</if>
<if
test=
"record.originalSourceUrl != null"
>
original_source_url = #{record.originalSourceUrl,jdbcType=VARCHAR},
</if>
<if
test=
"record.source != null"
>
`source` = #{record.source,jdbcType=INTEGER},
</if>
<if
test=
"record.extra != null"
>
extra = #{record.extra,jdbcType=LONGVARCHAR},
</if>
<if
test=
"record.images != null"
>
images = #{record.images,jdbcType=LONGVARCHAR},
</if>
<if
test=
"record.detail != null"
>
detail = #{record.detail,jdbcType=LONGVARCHAR},
</if>
<if
test=
"record.originalExtra != null"
>
original_extra = #{record.originalExtra,jdbcType=LONGVARCHAR},
</if>
</set>
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
</update>
<update
id=
"updateByExampleWithBLOBs"
parameterType=
"map"
>
update item
set id = #{record.id,jdbcType=BIGINT},
`name` = #{record.name,jdbcType=VARCHAR},
cid = #{record.cid,jdbcType=INTEGER},
is_on_sale = #{record.isOnSale,jdbcType=BIT},
is_std = #{record.isStd,jdbcType=BIT},
sort = #{record.sort,jdbcType=INTEGER},
share_image = #{record.shareImage,jdbcType=VARCHAR},
top_image = #{record.topImage,jdbcType=VARCHAR},
price = #{record.price,jdbcType=BIGINT},
create_time = #{record.createTime,jdbcType=TIMESTAMP},
source_type = #{record.sourceType,jdbcType=INTEGER},
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
is_deleted = #{record.isDeleted,jdbcType=BIT},
bid_time = #{record.bidTime,jdbcType=VARCHAR},
remark = #{record.remark,jdbcType=VARCHAR},
is_setted = #{record.isSetted,jdbcType=INTEGER},
original_source_url = #{record.originalSourceUrl,jdbcType=VARCHAR},
`source` = #{record.source,jdbcType=INTEGER},
extra = #{record.extra,jdbcType=LONGVARCHAR},
images = #{record.images,jdbcType=LONGVARCHAR},
detail = #{record.detail,jdbcType=LONGVARCHAR},
original_extra = #{record.originalExtra,jdbcType=LONGVARCHAR}
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
</update>
<update
id=
"updateByExample"
parameterType=
"map"
>
update item
set id = #{record.id,jdbcType=BIGINT},
`name` = #{record.name,jdbcType=VARCHAR},
cid = #{record.cid,jdbcType=INTEGER},
is_on_sale = #{record.isOnSale,jdbcType=BIT},
is_std = #{record.isStd,jdbcType=BIT},
sort = #{record.sort,jdbcType=INTEGER},
share_image = #{record.shareImage,jdbcType=VARCHAR},
top_image = #{record.topImage,jdbcType=VARCHAR},
price = #{record.price,jdbcType=BIGINT},
create_time = #{record.createTime,jdbcType=TIMESTAMP},
source_type = #{record.sourceType,jdbcType=INTEGER},
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
is_deleted = #{record.isDeleted,jdbcType=BIT},
bid_time = #{record.bidTime,jdbcType=VARCHAR},
remark = #{record.remark,jdbcType=VARCHAR},
is_setted = #{record.isSetted,jdbcType=INTEGER},
original_source_url = #{record.originalSourceUrl,jdbcType=VARCHAR},
`source` = #{record.source,jdbcType=INTEGER}
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
</update>
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.wwdz.ch.db.domain.Item"
>
update item
<set>
<if
test=
"name != null"
>
`name` = #{name,jdbcType=VARCHAR},
</if>
<if
test=
"cid != null"
>
cid = #{cid,jdbcType=INTEGER},
</if>
<if
test=
"isOnSale != null"
>
is_on_sale = #{isOnSale,jdbcType=BIT},
</if>
<if
test=
"isStd != null"
>
is_std = #{isStd,jdbcType=BIT},
</if>
<if
test=
"sort != null"
>
sort = #{sort,jdbcType=INTEGER},
</if>
<if
test=
"shareImage != null"
>
share_image = #{shareImage,jdbcType=VARCHAR},
</if>
<if
test=
"topImage != null"
>
top_image = #{topImage,jdbcType=VARCHAR},
</if>
<if
test=
"price != null"
>
price = #{price,jdbcType=BIGINT},
</if>
<if
test=
"createTime != null"
>
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"sourceType != null"
>
source_type = #{sourceType,jdbcType=INTEGER},
</if>
<if
test=
"updateTime != null"
>
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"isDeleted != null"
>
is_deleted = #{isDeleted,jdbcType=BIT},
</if>
<if
test=
"bidTime != null"
>
bid_time = #{bidTime,jdbcType=VARCHAR},
</if>
<if
test=
"remark != null"
>
remark = #{remark,jdbcType=VARCHAR},
</if>
<if
test=
"isSetted != null"
>
is_setted = #{isSetted,jdbcType=INTEGER},
</if>
<if
test=
"originalSourceUrl != null"
>
original_source_url = #{originalSourceUrl,jdbcType=VARCHAR},
</if>
<if
test=
"source != null"
>
`source` = #{source,jdbcType=INTEGER},
</if>
<if
test=
"extra != null"
>
extra = #{extra,jdbcType=LONGVARCHAR},
</if>
<if
test=
"images != null"
>
images = #{images,jdbcType=LONGVARCHAR},
</if>
<if
test=
"detail != null"
>
detail = #{detail,jdbcType=LONGVARCHAR},
</if>
<if
test=
"originalExtra != null"
>
original_extra = #{originalExtra,jdbcType=LONGVARCHAR},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update
id=
"updateByPrimaryKeyWithBLOBs"
parameterType=
"com.wwdz.ch.db.domain.Item"
>
update item
set `name` = #{name,jdbcType=VARCHAR},
cid = #{cid,jdbcType=INTEGER},
is_on_sale = #{isOnSale,jdbcType=BIT},
is_std = #{isStd,jdbcType=BIT},
sort = #{sort,jdbcType=INTEGER},
share_image = #{shareImage,jdbcType=VARCHAR},
top_image = #{topImage,jdbcType=VARCHAR},
price = #{price,jdbcType=BIGINT},
create_time = #{createTime,jdbcType=TIMESTAMP},
source_type = #{sourceType,jdbcType=INTEGER},
update_time = #{updateTime,jdbcType=TIMESTAMP},
is_deleted = #{isDeleted,jdbcType=BIT},
bid_time = #{bidTime,jdbcType=VARCHAR},
remark = #{remark,jdbcType=VARCHAR},
is_setted = #{isSetted,jdbcType=INTEGER},
original_source_url = #{originalSourceUrl,jdbcType=VARCHAR},
`source` = #{source,jdbcType=INTEGER},
extra = #{extra,jdbcType=LONGVARCHAR},
images = #{images,jdbcType=LONGVARCHAR},
detail = #{detail,jdbcType=LONGVARCHAR},
original_extra = #{originalExtra,jdbcType=LONGVARCHAR}
where id = #{id,jdbcType=BIGINT}
</update>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.wwdz.ch.db.domain.Item"
>
update item
set `name` = #{name,jdbcType=VARCHAR},
cid = #{cid,jdbcType=INTEGER},
is_on_sale = #{isOnSale,jdbcType=BIT},
is_std = #{isStd,jdbcType=BIT},
sort = #{sort,jdbcType=INTEGER},
share_image = #{shareImage,jdbcType=VARCHAR},
top_image = #{topImage,jdbcType=VARCHAR},
price = #{price,jdbcType=BIGINT},
create_time = #{createTime,jdbcType=TIMESTAMP},
source_type = #{sourceType,jdbcType=INTEGER},
update_time = #{updateTime,jdbcType=TIMESTAMP},
is_deleted = #{isDeleted,jdbcType=BIT},
bid_time = #{bidTime,jdbcType=VARCHAR},
remark = #{remark,jdbcType=VARCHAR},
is_setted = #{isSetted,jdbcType=INTEGER},
original_source_url = #{originalSourceUrl,jdbcType=VARCHAR},
`source` = #{source,jdbcType=INTEGER}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>
\ No newline at end of file
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