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
f4815296
Commit
f4815296
authored
Jul 26, 2023
by
shiyu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
同步数据
parent
f1f1f6a3
Changes
14
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
3045 additions
and
27 deletions
+3045
-27
ch-admin-api/src/main/java/com/wwdz/ch/admin/controller/ItemController.java
...ain/java/com/wwdz/ch/admin/controller/ItemController.java
+9
-0
ch-admin-api/src/test/java/com/wwdz/ch/admin/impl/SynCoinJobTest.java
.../src/test/java/com/wwdz/ch/admin/impl/SynCoinJobTest.java
+22
-0
ch-core/src/main/resources/application-dev.yml
ch-core/src/main/resources/application-dev.yml
+4
-4
ch-core/src/main/resources/application-prod.yml
ch-core/src/main/resources/application-prod.yml
+2
-2
ch-dao/src/main/java/com/wwdz/ch/db/dao/CoinsDao.java
ch-dao/src/main/java/com/wwdz/ch/db/dao/CoinsDao.java
+17
-0
ch-dao/src/main/java/com/wwdz/ch/db/dao/impl/CoinsDaoImpl.java
...o/src/main/java/com/wwdz/ch/db/dao/impl/CoinsDaoImpl.java
+46
-0
ch-dao/src/main/java/com/wwdz/ch/db/domain/Coins.java
ch-dao/src/main/java/com/wwdz/ch/db/domain/Coins.java
+345
-0
ch-dao/src/main/java/com/wwdz/ch/db/domain/CoinsExample.java
ch-dao/src/main/java/com/wwdz/ch/db/domain/CoinsExample.java
+1778
-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
+21
-3
ch-dao/src/main/java/com/wwdz/ch/db/domain/ItemExample.java
ch-dao/src/main/java/com/wwdz/ch/db/domain/ItemExample.java
+142
-0
ch-dao/src/main/java/com/wwdz/ch/db/mapper/CoinsMapper.java
ch-dao/src/main/java/com/wwdz/ch/db/mapper/CoinsMapper.java
+84
-0
ch-dao/src/main/java/com/wwdz/ch/db/mapper/ItemMapper.java
ch-dao/src/main/java/com/wwdz/ch/db/mapper/ItemMapper.java
+0
-1
ch-dao/src/main/resources/com/wwdz/ch/db/mapper/CoinsMapper.xml
.../src/main/resources/com/wwdz/ch/db/mapper/CoinsMapper.xml
+526
-0
ch-dao/src/main/resources/com/wwdz/ch/db/mapper/ItemMapper.xml
...o/src/main/resources/com/wwdz/ch/db/mapper/ItemMapper.xml
+49
-17
No files found.
ch-admin-api/src/main/java/com/wwdz/ch/admin/controller/ItemController.java
View file @
f4815296
package
com.wwdz.ch.admin.controller
;
package
com.wwdz.ch.admin.controller
;
import
com.wwdz.ch.admin.annotation.RequiresPermissionsDesc
;
import
com.wwdz.ch.admin.annotation.RequiresPermissionsDesc
;
import
com.wwdz.ch.admin.job.SynCoinJob
;
import
com.wwdz.ch.admin.service.ItemService
;
import
com.wwdz.ch.admin.service.ItemService
;
import
com.wwdz.ch.admin.util.AuthSupport
;
import
com.wwdz.ch.admin.util.AuthSupport
;
import
com.wwdz.ch.core.type.Result
;
import
com.wwdz.ch.core.type.Result
;
...
@@ -24,6 +25,9 @@ public class ItemController {
...
@@ -24,6 +25,9 @@ public class ItemController {
@Autowired
@Autowired
private
ItemService
itemService
;
private
ItemService
itemService
;
@Autowired
SynCoinJob
synCoinJob
;
// @RequiresPermissions("admin:item:findDetail")
// @RequiresPermissions("admin:item:findDetail")
@RequiresPermissionsDesc
(
menu
=
{
"钱币列表"
,
"钱币明细"
},
button
=
"查询"
)
@RequiresPermissionsDesc
(
menu
=
{
"钱币列表"
,
"钱币明细"
},
button
=
"查询"
)
@PostMapping
(
"/findDetail"
)
@PostMapping
(
"/findDetail"
)
...
@@ -44,4 +48,9 @@ public class ItemController {
...
@@ -44,4 +48,9 @@ public class ItemController {
logger
.
info
(
"【请求结束】钱币列表->钱币明细->更新"
);
logger
.
info
(
"【请求结束】钱币列表->钱币明细->更新"
);
return
result
;
return
result
;
}
}
@GetMapping
(
"/syn"
)
public
void
syn
()
{
synCoinJob
.
execute
();
}
}
}
ch-admin-api/src/test/java/com/wwdz/ch/admin/impl/SynCoinJobTest.java
0 → 100644
View file @
f4815296
package
com.wwdz.ch.admin.impl
;
import
com.wwdz.ch.admin.job.SynCoinJob
;
import
org.junit.Test
;
import
org.junit.runner.RunWith
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.boot.test.context.SpringBootTest
;
import
org.springframework.test.context.junit4.SpringJUnit4ClassRunner
;
import
static
org
.
junit
.
Assert
.*;
@SpringBootTest
@RunWith
(
SpringJUnit4ClassRunner
.
class
)
public
class
SynCoinJobTest
{
@Autowired
SynCoinJob
synCoinJob
;
@Test
public
void
execute
()
{
synCoinJob
.
execute
();
}
}
\ No newline at end of file
ch-core/src/main/resources/application-dev.yml
View file @
f4815296
...
@@ -134,16 +134,16 @@ spring:
...
@@ -134,16 +134,16 @@ spring:
username
:
owner
username
:
owner
password
:
VS1xaA37hyu1wJSw
password
:
VS1xaA37hyu1wJSw
initial-size
:
10
initial-size
:
10
max-active
:
5
0
max-active
:
10
0
min-idle
:
10
min-idle
:
10
max-wait
:
60000
max-wait
:
60000
0
pool-prepared-statements
:
true
pool-prepared-statements
:
true
max-pool-prepared-statement-per-connection-size
:
20
max-pool-prepared-statement-per-connection-size
:
20
0
validation-query
:
SELECT 1 FROM DUAL
validation-query
:
SELECT 1 FROM DUAL
test-on-borrow
:
false
test-on-borrow
:
false
test-on-return
:
false
test-on-return
:
false
test-while-idle
:
true
test-while-idle
:
true
time-between-eviction-runs-millis
:
60000
time-between-eviction-runs-millis
:
60000
0
filters
:
stat,wall
filters
:
stat,wall
...
...
ch-core/src/main/resources/application-prod.yml
View file @
f4815296
...
@@ -133,11 +133,11 @@ spring:
...
@@ -133,11 +133,11 @@ spring:
username
:
quanku
username
:
quanku
password
:
3N0W8i0b1Wm35MJ5
password
:
3N0W8i0b1Wm35MJ5
initial-size
:
10
initial-size
:
10
max-active
:
5
0
max-active
:
10
0
min-idle
:
10
min-idle
:
10
max-wait
:
60000
max-wait
:
60000
pool-prepared-statements
:
true
pool-prepared-statements
:
true
max-pool-prepared-statement-per-connection-size
:
20
max-pool-prepared-statement-per-connection-size
:
20
0
validation-query
:
SELECT 1 FROM DUAL
validation-query
:
SELECT 1 FROM DUAL
test-on-borrow
:
false
test-on-borrow
:
false
test-on-return
:
false
test-on-return
:
false
...
...
ch-dao/src/main/java/com/wwdz/ch/db/dao/CoinsDao.java
0 → 100644
View file @
f4815296
package
com.wwdz.ch.db.dao
;
import
com.github.pagehelper.PageInfo
;
import
com.wwdz.ch.db.domain.Coins
;
import
com.wwdz.ch.db.dto.request.CoinRequestDto
;
import
java.util.List
;
public
interface
CoinsDao
{
void
insert
(
Coins
coins
);
List
<
Coins
>
findList
(
CoinRequestDto
dto
);
PageInfo
<
Coins
>
findByPage
(
CoinRequestDto
dto
);
}
ch-dao/src/main/java/com/wwdz/ch/db/dao/impl/CoinsDaoImpl.java
0 → 100644
View file @
f4815296
package
com.wwdz.ch.db.dao.impl
;
import
com.github.pagehelper.PageHelper
;
import
com.github.pagehelper.PageInfo
;
import
com.wwdz.ch.db.dao.CoinsDao
;
import
com.wwdz.ch.db.domain.Coins
;
import
com.wwdz.ch.db.domain.CoinsExample
;
import
com.wwdz.ch.db.domain.Favorites
;
import
com.wwdz.ch.db.dto.request.CoinRequestDto
;
import
com.wwdz.ch.db.mapper.CoinsMapper
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Repository
;
import
java.util.List
;
@Repository
public
class
CoinsDaoImpl
implements
CoinsDao
{
@Autowired
CoinsMapper
coinsMapper
;
@Override
public
void
insert
(
Coins
coins
)
{
}
@Override
public
List
<
Coins
>
findList
(
CoinRequestDto
dto
)
{
CoinsExample
coinsExample
=
new
CoinsExample
();
CoinsExample
.
Criteria
criteria
=
coinsExample
.
createCriteria
();
coinsExample
.
setOrderByClause
(
"created asc"
);
PageHelper
.
startPage
(
dto
.
getPage
(),
dto
.
getLimit
());
List
<
Coins
>
list
=
coinsMapper
.
selectByExampleWithBLOBs
(
coinsExample
);
return
list
;
}
@Override
public
PageInfo
<
Coins
>
findByPage
(
CoinRequestDto
dto
)
{
CoinsExample
coinsExample
=
new
CoinsExample
();
coinsExample
.
setOrderByClause
(
"created asc"
);
PageHelper
.
startPage
(
dto
.
getPage
(),
dto
.
getLimit
());
List
<
Coins
>
list
=
coinsMapper
.
selectByExampleWithBLOBs
(
coinsExample
);
return
new
PageInfo
<>(
list
);
}
}
ch-dao/src/main/java/com/wwdz/ch/db/domain/Coins.java
0 → 100644
View file @
f4815296
This diff is collapsed.
Click to expand it.
ch-dao/src/main/java/com/wwdz/ch/db/domain/CoinsExample.java
0 → 100644
View file @
f4815296
This diff is collapsed.
Click to expand it.
ch-dao/src/main/java/com/wwdz/ch/db/domain/Item.java
View file @
f4815296
...
@@ -10,7 +10,7 @@ import lombok.Data;
...
@@ -10,7 +10,7 @@ import lombok.Data;
/**
/**
* @author shiyu
* @author shiyu
* @date 2023/07/2
0
* @date 2023/07/2
6
*/
*/
@Data
@Data
public
class
Item
implements
Entity
{
public
class
Item
implements
Entity
{
...
@@ -91,6 +91,11 @@ public class Item implements Entity {
...
@@ -91,6 +91,11 @@ public class Item implements Entity {
*/
*/
private
Integer
isSetted
;
private
Integer
isSetted
;
/**
* 原始的资源url
*/
private
String
originalSourceUrl
;
/**
/**
* 钱币额外信息
* 钱币额外信息
*/
*/
...
@@ -106,6 +111,11 @@ public class Item implements Entity {
...
@@ -106,6 +111,11 @@ public class Item implements Entity {
*/
*/
private
String
detail
;
private
String
detail
;
/**
* 原始额外信息
*/
private
String
originalExtra
;
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
@Override
@Override
...
@@ -130,9 +140,11 @@ public class Item implements Entity {
...
@@ -130,9 +140,11 @@ public class Item implements Entity {
sb
.
append
(
", bidTime="
).
append
(
bidTime
);
sb
.
append
(
", bidTime="
).
append
(
bidTime
);
sb
.
append
(
", remark="
).
append
(
remark
);
sb
.
append
(
", remark="
).
append
(
remark
);
sb
.
append
(
", isSetted="
).
append
(
isSetted
);
sb
.
append
(
", isSetted="
).
append
(
isSetted
);
sb
.
append
(
", originalSourceUrl="
).
append
(
originalSourceUrl
);
sb
.
append
(
", extra="
).
append
(
extra
);
sb
.
append
(
", extra="
).
append
(
extra
);
sb
.
append
(
", images="
).
append
(
images
);
sb
.
append
(
", images="
).
append
(
images
);
sb
.
append
(
", detail="
).
append
(
detail
);
sb
.
append
(
", detail="
).
append
(
detail
);
sb
.
append
(
", originalExtra="
).
append
(
originalExtra
);
sb
.
append
(
", serialVersionUID="
).
append
(
serialVersionUID
);
sb
.
append
(
", serialVersionUID="
).
append
(
serialVersionUID
);
sb
.
append
(
"]"
);
sb
.
append
(
"]"
);
return
sb
.
toString
();
return
sb
.
toString
();
...
@@ -166,9 +178,11 @@ public class Item implements Entity {
...
@@ -166,9 +178,11 @@ public class Item implements Entity {
&&
(
this
.
getBidTime
()
==
null
?
other
.
getBidTime
()
==
null
:
this
.
getBidTime
().
equals
(
other
.
getBidTime
()))
&&
(
this
.
getBidTime
()
==
null
?
other
.
getBidTime
()
==
null
:
this
.
getBidTime
().
equals
(
other
.
getBidTime
()))
&&
(
this
.
getRemark
()
==
null
?
other
.
getRemark
()
==
null
:
this
.
getRemark
().
equals
(
other
.
getRemark
()))
&&
(
this
.
getRemark
()
==
null
?
other
.
getRemark
()
==
null
:
this
.
getRemark
().
equals
(
other
.
getRemark
()))
&&
(
this
.
getIsSetted
()
==
null
?
other
.
getIsSetted
()
==
null
:
this
.
getIsSetted
().
equals
(
other
.
getIsSetted
()))
&&
(
this
.
getIsSetted
()
==
null
?
other
.
getIsSetted
()
==
null
:
this
.
getIsSetted
().
equals
(
other
.
getIsSetted
()))
&&
(
this
.
getOriginalSourceUrl
()
==
null
?
other
.
getOriginalSourceUrl
()
==
null
:
this
.
getOriginalSourceUrl
().
equals
(
other
.
getOriginalSourceUrl
()))
&&
(
this
.
getExtra
()
==
null
?
other
.
getExtra
()
==
null
:
this
.
getExtra
().
equals
(
other
.
getExtra
()))
&&
(
this
.
getExtra
()
==
null
?
other
.
getExtra
()
==
null
:
this
.
getExtra
().
equals
(
other
.
getExtra
()))
&&
(
this
.
getImages
()
==
null
?
other
.
getImages
()
==
null
:
this
.
getImages
().
equals
(
other
.
getImages
()))
&&
(
this
.
getImages
()
==
null
?
other
.
getImages
()
==
null
:
this
.
getImages
().
equals
(
other
.
getImages
()))
&&
(
this
.
getDetail
()
==
null
?
other
.
getDetail
()
==
null
:
this
.
getDetail
().
equals
(
other
.
getDetail
()));
&&
(
this
.
getDetail
()
==
null
?
other
.
getDetail
()
==
null
:
this
.
getDetail
().
equals
(
other
.
getDetail
()))
&&
(
this
.
getOriginalExtra
()
==
null
?
other
.
getOriginalExtra
()
==
null
:
this
.
getOriginalExtra
().
equals
(
other
.
getOriginalExtra
()));
}
}
@Override
@Override
...
@@ -191,9 +205,11 @@ public class Item implements Entity {
...
@@ -191,9 +205,11 @@ public class Item implements Entity {
result
=
prime
*
result
+
((
getBidTime
()
==
null
)
?
0
:
getBidTime
().
hashCode
());
result
=
prime
*
result
+
((
getBidTime
()
==
null
)
?
0
:
getBidTime
().
hashCode
());
result
=
prime
*
result
+
((
getRemark
()
==
null
)
?
0
:
getRemark
().
hashCode
());
result
=
prime
*
result
+
((
getRemark
()
==
null
)
?
0
:
getRemark
().
hashCode
());
result
=
prime
*
result
+
((
getIsSetted
()
==
null
)
?
0
:
getIsSetted
().
hashCode
());
result
=
prime
*
result
+
((
getIsSetted
()
==
null
)
?
0
:
getIsSetted
().
hashCode
());
result
=
prime
*
result
+
((
getOriginalSourceUrl
()
==
null
)
?
0
:
getOriginalSourceUrl
().
hashCode
());
result
=
prime
*
result
+
((
getExtra
()
==
null
)
?
0
:
getExtra
().
hashCode
());
result
=
prime
*
result
+
((
getExtra
()
==
null
)
?
0
:
getExtra
().
hashCode
());
result
=
prime
*
result
+
((
getImages
()
==
null
)
?
0
:
getImages
().
hashCode
());
result
=
prime
*
result
+
((
getImages
()
==
null
)
?
0
:
getImages
().
hashCode
());
result
=
prime
*
result
+
((
getDetail
()
==
null
)
?
0
:
getDetail
().
hashCode
());
result
=
prime
*
result
+
((
getDetail
()
==
null
)
?
0
:
getDetail
().
hashCode
());
result
=
prime
*
result
+
((
getOriginalExtra
()
==
null
)
?
0
:
getOriginalExtra
().
hashCode
());
return
result
;
return
result
;
}
}
...
@@ -221,9 +237,11 @@ public class Item implements Entity {
...
@@ -221,9 +237,11 @@ public class Item implements Entity {
bidTime
(
"bid_time"
,
"bidTime"
,
"VARCHAR"
,
false
),
bidTime
(
"bid_time"
,
"bidTime"
,
"VARCHAR"
,
false
),
remark
(
"remark"
,
"remark"
,
"VARCHAR"
,
false
),
remark
(
"remark"
,
"remark"
,
"VARCHAR"
,
false
),
isSetted
(
"is_setted"
,
"isSetted"
,
"INTEGER"
,
false
),
isSetted
(
"is_setted"
,
"isSetted"
,
"INTEGER"
,
false
),
originalSourceUrl
(
"original_source_url"
,
"originalSourceUrl"
,
"VARCHAR"
,
false
),
extra
(
"extra"
,
"extra"
,
"LONGVARCHAR"
,
false
),
extra
(
"extra"
,
"extra"
,
"LONGVARCHAR"
,
false
),
images
(
"images"
,
"images"
,
"LONGVARCHAR"
,
false
),
images
(
"images"
,
"images"
,
"LONGVARCHAR"
,
false
),
detail
(
"detail"
,
"detail"
,
"LONGVARCHAR"
,
false
);
detail
(
"detail"
,
"detail"
,
"LONGVARCHAR"
,
false
),
originalExtra
(
"original_extra"
,
"originalExtra"
,
"LONGVARCHAR"
,
false
);
/**
/**
* This field was generated by MyBatis Generator.
* This field was generated by MyBatis Generator.
...
...
ch-dao/src/main/java/com/wwdz/ch/db/domain/ItemExample.java
View file @
f4815296
...
@@ -2309,6 +2309,148 @@ public class ItemExample {
...
@@ -2309,6 +2309,148 @@ public class ItemExample {
addCriterion
(
"is_setted not between"
,
value1
,
value2
,
"isSetted"
);
addCriterion
(
"is_setted not between"
,
value1
,
value2
,
"isSetted"
);
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
public
Criteria
andOriginalSourceUrlIsNull
()
{
addCriterion
(
"original_source_url is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andOriginalSourceUrlIsNotNull
()
{
addCriterion
(
"original_source_url is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andOriginalSourceUrlEqualTo
(
String
value
)
{
addCriterion
(
"original_source_url ="
,
value
,
"originalSourceUrl"
);
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
andOriginalSourceUrlEqualToColumn
(
Item
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"original_source_url = "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andOriginalSourceUrlNotEqualTo
(
String
value
)
{
addCriterion
(
"original_source_url <>"
,
value
,
"originalSourceUrl"
);
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
andOriginalSourceUrlNotEqualToColumn
(
Item
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"original_source_url <> "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andOriginalSourceUrlGreaterThan
(
String
value
)
{
addCriterion
(
"original_source_url >"
,
value
,
"originalSourceUrl"
);
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
andOriginalSourceUrlGreaterThanColumn
(
Item
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"original_source_url > "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andOriginalSourceUrlGreaterThanOrEqualTo
(
String
value
)
{
addCriterion
(
"original_source_url >="
,
value
,
"originalSourceUrl"
);
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
andOriginalSourceUrlGreaterThanOrEqualToColumn
(
Item
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"original_source_url >= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andOriginalSourceUrlLessThan
(
String
value
)
{
addCriterion
(
"original_source_url <"
,
value
,
"originalSourceUrl"
);
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
andOriginalSourceUrlLessThanColumn
(
Item
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"original_source_url < "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andOriginalSourceUrlLessThanOrEqualTo
(
String
value
)
{
addCriterion
(
"original_source_url <="
,
value
,
"originalSourceUrl"
);
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
andOriginalSourceUrlLessThanOrEqualToColumn
(
Item
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"original_source_url <= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andOriginalSourceUrlLike
(
String
value
)
{
addCriterion
(
"original_source_url like"
,
value
,
"originalSourceUrl"
);
return
(
Criteria
)
this
;
}
public
Criteria
andOriginalSourceUrlNotLike
(
String
value
)
{
addCriterion
(
"original_source_url not like"
,
value
,
"originalSourceUrl"
);
return
(
Criteria
)
this
;
}
public
Criteria
andOriginalSourceUrlIn
(
List
<
String
>
values
)
{
addCriterion
(
"original_source_url in"
,
values
,
"originalSourceUrl"
);
return
(
Criteria
)
this
;
}
public
Criteria
andOriginalSourceUrlNotIn
(
List
<
String
>
values
)
{
addCriterion
(
"original_source_url not in"
,
values
,
"originalSourceUrl"
);
return
(
Criteria
)
this
;
}
public
Criteria
andOriginalSourceUrlBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"original_source_url between"
,
value1
,
value2
,
"originalSourceUrl"
);
return
(
Criteria
)
this
;
}
public
Criteria
andOriginalSourceUrlNotBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"original_source_url not between"
,
value1
,
value2
,
"originalSourceUrl"
);
return
(
Criteria
)
this
;
}
}
}
public
static
class
Criteria
extends
GeneratedCriteria
{
public
static
class
Criteria
extends
GeneratedCriteria
{
...
...
ch-dao/src/main/java/com/wwdz/ch/db/mapper/CoinsMapper.java
0 → 100644
View file @
f4815296
package
com.wwdz.ch.db.mapper
;
import
com.wwdz.ch.db.domain.Coins
;
import
com.wwdz.ch.db.domain.CoinsExample
;
import
java.util.List
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
@Mapper
public
interface
CoinsMapper
{
long
countByExample
(
CoinsExample
example
);
int
deleteByExample
(
CoinsExample
example
);
int
deleteByPrimaryKey
(
Long
id
);
int
insert
(
Coins
record
);
int
insertSelective
(
Coins
record
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table coins
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
Coins
selectOneByExample
(
CoinsExample
example
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table coins
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
Coins
selectOneByExampleSelective
(
@Param
(
"example"
)
CoinsExample
example
,
@Param
(
"selective"
)
Coins
.
Column
...
selective
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table coins
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
Coins
selectOneByExampleWithBLOBs
(
CoinsExample
example
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table coins
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
List
<
Coins
>
selectByExampleSelective
(
@Param
(
"example"
)
CoinsExample
example
,
@Param
(
"selective"
)
Coins
.
Column
...
selective
);
List
<
Coins
>
selectByExampleWithBLOBs
(
CoinsExample
example
);
List
<
Coins
>
selectByExample
(
CoinsExample
example
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table coins
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
Coins
selectByPrimaryKeySelective
(
@Param
(
"id"
)
Long
id
,
@Param
(
"selective"
)
Coins
.
Column
...
selective
);
Coins
selectByPrimaryKey
(
Long
id
);
int
updateByExampleSelective
(
@Param
(
"record"
)
Coins
record
,
@Param
(
"example"
)
CoinsExample
example
);
int
updateByExampleWithBLOBs
(
@Param
(
"record"
)
Coins
record
,
@Param
(
"example"
)
CoinsExample
example
);
int
updateByExample
(
@Param
(
"record"
)
Coins
record
,
@Param
(
"example"
)
CoinsExample
example
);
int
updateByPrimaryKeySelective
(
Coins
record
);
int
updateByPrimaryKeyWithBLOBs
(
Coins
record
);
int
updateByPrimaryKey
(
Coins
record
);
}
\ No newline at end of file
ch-dao/src/main/java/com/wwdz/ch/db/mapper/ItemMapper.java
View file @
f4815296
...
@@ -6,7 +6,6 @@ import java.util.List;
...
@@ -6,7 +6,6 @@ import java.util.List;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Param
;
@Mapper
@Mapper
public
interface
ItemMapper
{
public
interface
ItemMapper
{
long
countByExample
(
ItemExample
example
);
long
countByExample
(
ItemExample
example
);
...
...
ch-dao/src/main/resources/com/wwdz/ch/db/mapper/CoinsMapper.xml
0 → 100644
View file @
f4815296
This diff is collapsed.
Click to expand it.
ch-dao/src/main/resources/com/wwdz/ch/db/mapper/ItemMapper.xml
View file @
f4815296
...
@@ -18,11 +18,13 @@
...
@@ -18,11 +18,13 @@
<result
column=
"bid_time"
jdbcType=
"VARCHAR"
property=
"bidTime"
/>
<result
column=
"bid_time"
jdbcType=
"VARCHAR"
property=
"bidTime"
/>
<result
column=
"remark"
jdbcType=
"VARCHAR"
property=
"remark"
/>
<result
column=
"remark"
jdbcType=
"VARCHAR"
property=
"remark"
/>
<result
column=
"is_setted"
jdbcType=
"INTEGER"
property=
"isSetted"
/>
<result
column=
"is_setted"
jdbcType=
"INTEGER"
property=
"isSetted"
/>
<result
column=
"original_source_url"
jdbcType=
"VARCHAR"
property=
"originalSourceUrl"
/>
</resultMap>
</resultMap>
<resultMap
extends=
"BaseResultMap"
id=
"ResultMapWithBLOBs"
type=
"com.wwdz.ch.db.domain.Item"
>
<resultMap
extends=
"BaseResultMap"
id=
"ResultMapWithBLOBs"
type=
"com.wwdz.ch.db.domain.Item"
>
<result
column=
"extra"
jdbcType=
"LONGVARCHAR"
property=
"extra"
/>
<result
column=
"extra"
jdbcType=
"LONGVARCHAR"
property=
"extra"
/>
<result
column=
"images"
jdbcType=
"LONGVARCHAR"
property=
"images"
/>
<result
column=
"images"
jdbcType=
"LONGVARCHAR"
property=
"images"
/>
<result
column=
"detail"
jdbcType=
"LONGVARCHAR"
property=
"detail"
/>
<result
column=
"detail"
jdbcType=
"LONGVARCHAR"
property=
"detail"
/>
<result
column=
"original_extra"
jdbcType=
"LONGVARCHAR"
property=
"originalExtra"
/>
</resultMap>
</resultMap>
<sql
id=
"Example_Where_Clause"
>
<sql
id=
"Example_Where_Clause"
>
<where>
<where>
...
@@ -84,10 +86,10 @@
...
@@ -84,10 +86,10 @@
</sql>
</sql>
<sql
id=
"Base_Column_List"
>
<sql
id=
"Base_Column_List"
>
id, `name`, cid, is_on_sale, is_std, sort, share_image, top_image, price, create_time,
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
source_type, update_time, is_deleted, bid_time, remark, is_setted
, original_source_url
</sql>
</sql>
<sql
id=
"Blob_Column_List"
>
<sql
id=
"Blob_Column_List"
>
extra, images, detail
extra, images, detail
, original_extra
</sql>
</sql>
<select
id=
"selectByExampleWithBLOBs"
parameterType=
"com.wwdz.ch.db.domain.ItemExample"
resultMap=
"ResultMapWithBLOBs"
>
<select
id=
"selectByExampleWithBLOBs"
parameterType=
"com.wwdz.ch.db.domain.ItemExample"
resultMap=
"ResultMapWithBLOBs"
>
select
select
...
@@ -140,8 +142,8 @@
...
@@ -140,8 +142,8 @@
</when>
</when>
<otherwise>
<otherwise>
id, `name`, cid, is_on_sale, is_std, sort, share_image, top_image, price, create_time,
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,
extra, images
,
source_type, update_time, is_deleted, bid_time, remark, is_setted,
original_source_url
,
detail
extra, images, detail, original_extra
</otherwise>
</otherwise>
</choose>
</choose>
from item
from item
...
@@ -175,8 +177,8 @@
...
@@ -175,8 +177,8 @@
</when>
</when>
<otherwise>
<otherwise>
id, `name`, cid, is_on_sale, is_std, sort, share_image, top_image, price, create_time,
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,
extra, images
,
source_type, update_time, is_deleted, bid_time, remark, is_setted,
original_source_url
,
detail
extra, images, detail, original_extra
</otherwise>
</otherwise>
</choose>
</choose>
from item
from item
...
@@ -196,20 +198,20 @@
...
@@ -196,20 +198,20 @@
<selectKey
keyProperty=
"id"
order=
"AFTER"
resultType=
"java.lang.Long"
>
<selectKey
keyProperty=
"id"
order=
"AFTER"
resultType=
"java.lang.Long"
>
SELECT LAST_INSERT_ID()
SELECT LAST_INSERT_ID()
</selectKey>
</selectKey>
insert into item
(`name`, cid, is_on_sale,
insert into item
_temp (`name`, cid, is_on_sale,
is_std, sort, share_image,
is_std, sort, share_image,
top_image, price, create_time,
top_image, price, create_time,
source_type, update_time, is_deleted,
source_type, update_time, is_deleted,
bid_time, remark, is_setted,
bid_time, remark, is_setted,
extra, images, detail
original_source_url, extra, images,
)
detail, original_extra
)
values (#{name,jdbcType=VARCHAR}, #{cid,jdbcType=INTEGER}, #{isOnSale,jdbcType=BIT},
values (#{name,jdbcType=VARCHAR}, #{cid,jdbcType=INTEGER}, #{isOnSale,jdbcType=BIT},
#{isStd,jdbcType=BIT}, #{sort,jdbcType=INTEGER}, #{shareImage,jdbcType=VARCHAR},
#{isStd,jdbcType=BIT}, #{sort,jdbcType=INTEGER}, #{shareImage,jdbcType=VARCHAR},
#{topImage,jdbcType=VARCHAR}, #{price,jdbcType=BIGINT}, #{createTime,jdbcType=TIMESTAMP},
#{topImage,jdbcType=VARCHAR}, #{price,jdbcType=BIGINT}, #{createTime,jdbcType=TIMESTAMP},
#{sourceType,jdbcType=INTEGER}, #{updateTime,jdbcType=TIMESTAMP}, #{isDeleted,jdbcType=BIT},
#{sourceType,jdbcType=INTEGER}, #{updateTime,jdbcType=TIMESTAMP}, #{isDeleted,jdbcType=BIT},
#{bidTime,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR}, #{isSetted,jdbcType=INTEGER},
#{bidTime,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR}, #{isSetted,jdbcType=INTEGER},
#{
extra,jdbcType=LONGVARCHAR}, #{images,jdbcType=LONGVARCHAR}, #{detail,jdbcType=LONGVARCHAR}
#{
originalSourceUrl,jdbcType=VARCHAR}, #{extra,jdbcType=LONGVARCHAR}, #{images,jdbcType=LONGVARCHAR},
)
#{detail,jdbcType=LONGVARCHAR}, #{originalExtra,jdbcType=LONGVARCHAR}
)
</insert>
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.wwdz.ch.db.domain.Item"
>
<insert
id=
"insertSelective"
parameterType=
"com.wwdz.ch.db.domain.Item"
>
<selectKey
keyProperty=
"id"
order=
"AFTER"
resultType=
"java.lang.Long"
>
<selectKey
keyProperty=
"id"
order=
"AFTER"
resultType=
"java.lang.Long"
>
...
@@ -262,6 +264,9 @@
...
@@ -262,6 +264,9 @@
<if
test=
"isSetted != null"
>
<if
test=
"isSetted != null"
>
is_setted,
is_setted,
</if>
</if>
<if
test=
"originalSourceUrl != null"
>
original_source_url,
</if>
<if
test=
"extra != null"
>
<if
test=
"extra != null"
>
extra,
extra,
</if>
</if>
...
@@ -271,6 +276,9 @@
...
@@ -271,6 +276,9 @@
<if
test=
"detail != null"
>
<if
test=
"detail != null"
>
detail,
detail,
</if>
</if>
<if
test=
"originalExtra != null"
>
original_extra,
</if>
</trim>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"name != null"
>
<if
test=
"name != null"
>
...
@@ -318,6 +326,9 @@
...
@@ -318,6 +326,9 @@
<if
test=
"isSetted != null"
>
<if
test=
"isSetted != null"
>
#{isSetted,jdbcType=INTEGER},
#{isSetted,jdbcType=INTEGER},
</if>
</if>
<if
test=
"originalSourceUrl != null"
>
#{originalSourceUrl,jdbcType=VARCHAR},
</if>
<if
test=
"extra != null"
>
<if
test=
"extra != null"
>
#{extra,jdbcType=LONGVARCHAR},
#{extra,jdbcType=LONGVARCHAR},
</if>
</if>
...
@@ -327,6 +338,9 @@
...
@@ -327,6 +338,9 @@
<if
test=
"detail != null"
>
<if
test=
"detail != null"
>
#{detail,jdbcType=LONGVARCHAR},
#{detail,jdbcType=LONGVARCHAR},
</if>
</if>
<if
test=
"originalExtra != null"
>
#{originalExtra,jdbcType=LONGVARCHAR},
</if>
</trim>
</trim>
</insert>
</insert>
<select
id=
"countByExample"
parameterType=
"com.wwdz.ch.db.domain.ItemExample"
resultType=
"java.lang.Long"
>
<select
id=
"countByExample"
parameterType=
"com.wwdz.ch.db.domain.ItemExample"
resultType=
"java.lang.Long"
>
...
@@ -386,6 +400,9 @@
...
@@ -386,6 +400,9 @@
<if
test=
"record.isSetted != null"
>
<if
test=
"record.isSetted != null"
>
is_setted = #{record.isSetted,jdbcType=INTEGER},
is_setted = #{record.isSetted,jdbcType=INTEGER},
</if>
</if>
<if
test=
"record.originalSourceUrl != null"
>
original_source_url = #{record.originalSourceUrl,jdbcType=VARCHAR},
</if>
<if
test=
"record.extra != null"
>
<if
test=
"record.extra != null"
>
extra = #{record.extra,jdbcType=LONGVARCHAR},
extra = #{record.extra,jdbcType=LONGVARCHAR},
</if>
</if>
...
@@ -395,6 +412,9 @@
...
@@ -395,6 +412,9 @@
<if
test=
"record.detail != null"
>
<if
test=
"record.detail != null"
>
detail = #{record.detail,jdbcType=LONGVARCHAR},
detail = #{record.detail,jdbcType=LONGVARCHAR},
</if>
</if>
<if
test=
"record.originalExtra != null"
>
original_extra = #{record.originalExtra,jdbcType=LONGVARCHAR},
</if>
</set>
</set>
<if
test=
"_parameter != null"
>
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
<include
refid=
"Update_By_Example_Where_Clause"
/>
...
@@ -418,9 +438,11 @@
...
@@ -418,9 +438,11 @@
bid_time = #{record.bidTime,jdbcType=VARCHAR},
bid_time = #{record.bidTime,jdbcType=VARCHAR},
remark = #{record.remark,jdbcType=VARCHAR},
remark = #{record.remark,jdbcType=VARCHAR},
is_setted = #{record.isSetted,jdbcType=INTEGER},
is_setted = #{record.isSetted,jdbcType=INTEGER},
original_source_url = #{record.originalSourceUrl,jdbcType=VARCHAR},
extra = #{record.extra,jdbcType=LONGVARCHAR},
extra = #{record.extra,jdbcType=LONGVARCHAR},
images = #{record.images,jdbcType=LONGVARCHAR},
images = #{record.images,jdbcType=LONGVARCHAR},
detail = #{record.detail,jdbcType=LONGVARCHAR}
detail = #{record.detail,jdbcType=LONGVARCHAR},
original_extra = #{record.originalExtra,jdbcType=LONGVARCHAR}
<if
test=
"_parameter != null"
>
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
</if>
...
@@ -442,7 +464,8 @@
...
@@ -442,7 +464,8 @@
is_deleted = #{record.isDeleted,jdbcType=BIT},
is_deleted = #{record.isDeleted,jdbcType=BIT},
bid_time = #{record.bidTime,jdbcType=VARCHAR},
bid_time = #{record.bidTime,jdbcType=VARCHAR},
remark = #{record.remark,jdbcType=VARCHAR},
remark = #{record.remark,jdbcType=VARCHAR},
is_setted = #{record.isSetted,jdbcType=INTEGER}
is_setted = #{record.isSetted,jdbcType=INTEGER},
original_source_url = #{record.originalSourceUrl,jdbcType=VARCHAR}
<if
test=
"_parameter != null"
>
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
</if>
...
@@ -495,6 +518,9 @@
...
@@ -495,6 +518,9 @@
<if
test=
"isSetted != null"
>
<if
test=
"isSetted != null"
>
is_setted = #{isSetted,jdbcType=INTEGER},
is_setted = #{isSetted,jdbcType=INTEGER},
</if>
</if>
<if
test=
"originalSourceUrl != null"
>
original_source_url = #{originalSourceUrl,jdbcType=VARCHAR},
</if>
<if
test=
"extra != null"
>
<if
test=
"extra != null"
>
extra = #{extra,jdbcType=LONGVARCHAR},
extra = #{extra,jdbcType=LONGVARCHAR},
</if>
</if>
...
@@ -504,6 +530,9 @@
...
@@ -504,6 +530,9 @@
<if
test=
"detail != null"
>
<if
test=
"detail != null"
>
detail = #{detail,jdbcType=LONGVARCHAR},
detail = #{detail,jdbcType=LONGVARCHAR},
</if>
</if>
<if
test=
"originalExtra != null"
>
original_extra = #{originalExtra,jdbcType=LONGVARCHAR},
</if>
</set>
</set>
where id = #{id,jdbcType=BIGINT}
where id = #{id,jdbcType=BIGINT}
</update>
</update>
...
@@ -524,9 +553,11 @@
...
@@ -524,9 +553,11 @@
bid_time = #{bidTime,jdbcType=VARCHAR},
bid_time = #{bidTime,jdbcType=VARCHAR},
remark = #{remark,jdbcType=VARCHAR},
remark = #{remark,jdbcType=VARCHAR},
is_setted = #{isSetted,jdbcType=INTEGER},
is_setted = #{isSetted,jdbcType=INTEGER},
original_source_url = #{originalSourceUrl,jdbcType=VARCHAR},
extra = #{extra,jdbcType=LONGVARCHAR},
extra = #{extra,jdbcType=LONGVARCHAR},
images = #{images,jdbcType=LONGVARCHAR},
images = #{images,jdbcType=LONGVARCHAR},
detail = #{detail,jdbcType=LONGVARCHAR}
detail = #{detail,jdbcType=LONGVARCHAR},
original_extra = #{originalExtra,jdbcType=LONGVARCHAR}
where id = #{id,jdbcType=BIGINT}
where id = #{id,jdbcType=BIGINT}
</update>
</update>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.wwdz.ch.db.domain.Item"
>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.wwdz.ch.db.domain.Item"
>
...
@@ -545,7 +576,8 @@
...
@@ -545,7 +576,8 @@
is_deleted = #{isDeleted,jdbcType=BIT},
is_deleted = #{isDeleted,jdbcType=BIT},
bid_time = #{bidTime,jdbcType=VARCHAR},
bid_time = #{bidTime,jdbcType=VARCHAR},
remark = #{remark,jdbcType=VARCHAR},
remark = #{remark,jdbcType=VARCHAR},
is_setted = #{isSetted,jdbcType=INTEGER}
is_setted = #{isSetted,jdbcType=INTEGER},
original_source_url = #{originalSourceUrl,jdbcType=VARCHAR}
where id = #{id,jdbcType=BIGINT}
where id = #{id,jdbcType=BIGINT}
</update>
</update>
<select
id=
"selectOneByExample"
parameterType=
"com.wwdz.ch.db.domain.ItemExample"
resultMap=
"BaseResultMap"
>
<select
id=
"selectOneByExample"
parameterType=
"com.wwdz.ch.db.domain.ItemExample"
resultMap=
"BaseResultMap"
>
...
@@ -602,8 +634,8 @@
...
@@ -602,8 +634,8 @@
</when>
</when>
<otherwise>
<otherwise>
id, `name`, cid, is_on_sale, is_std, sort, share_image, top_image, price, create_time,
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,
extra, images
,
source_type, update_time, is_deleted, bid_time, remark, is_setted,
original_source_url
,
detail
extra, images, detail, original_extra
</otherwise>
</otherwise>
</choose>
</choose>
from item
from item
...
...
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