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
776c2a3a
Commit
776c2a3a
authored
Jul 20, 2023
by
shiyu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
钱币设置
parent
48e385f8
Changes
14
Show whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
420 additions
and
66 deletions
+420
-66
ch-admin-api/src/main/java/com/wwdz/ch/admin/controller/AdminAdminController.java
...va/com/wwdz/ch/admin/controller/AdminAdminController.java
+1
-1
ch-admin-api/src/main/java/com/wwdz/ch/admin/controller/AdminRoleController.java
...ava/com/wwdz/ch/admin/controller/AdminRoleController.java
+1
-1
ch-admin-api/src/main/java/com/wwdz/ch/admin/impl/ItemServiceImpl.java
...src/main/java/com/wwdz/ch/admin/impl/ItemServiceImpl.java
+12
-20
ch-core/src/main/java/com/wwdz/ch/core/consts/CommonEnum.java
...ore/src/main/java/com/wwdz/ch/core/consts/CommonEnum.java
+37
-0
ch-dao/src/main/java/com/wwdz/ch/db/dao/ItemMapper.java
ch-dao/src/main/java/com/wwdz/ch/db/dao/ItemMapper.java
+1
-9
ch-dao/src/main/java/com/wwdz/ch/db/dao/OperateLogMapper.java
...ao/src/main/java/com/wwdz/ch/db/dao/OperateLogMapper.java
+1
-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
+9
-0
ch-dao/src/main/java/com/wwdz/ch/db/domain/ItemExample.java
ch-dao/src/main/java/com/wwdz/ch/db/domain/ItemExample.java
+133
-1
ch-dao/src/main/java/com/wwdz/ch/db/domain/OperateLog.java
ch-dao/src/main/java/com/wwdz/ch/db/domain/OperateLog.java
+16
-3
ch-dao/src/main/java/com/wwdz/ch/db/domain/OperateLogExample.java
...rc/main/java/com/wwdz/ch/db/domain/OperateLogExample.java
+132
-0
ch-dao/src/main/java/com/wwdz/ch/db/manager/ItemManager.java
ch-dao/src/main/java/com/wwdz/ch/db/manager/ItemManager.java
+2
-0
ch-dao/src/main/java/com/wwdz/ch/db/manager/impl/ItemManagerImpl.java
...ain/java/com/wwdz/ch/db/manager/impl/ItemManagerImpl.java
+10
-0
ch-dao/src/main/resources/com/wwdz/ch/db/dao/ItemMapper.xml
ch-dao/src/main/resources/com/wwdz/ch/db/dao/ItemMapper.xml
+33
-19
ch-dao/src/main/resources/com/wwdz/ch/db/dao/OperateLogMapper.xml
...rc/main/resources/com/wwdz/ch/db/dao/OperateLogMapper.xml
+32
-12
No files found.
ch-admin-api/src/main/java/com/wwdz/ch/admin/controller/AdminAdminController.java
View file @
776c2a3a
...
@@ -47,7 +47,7 @@ public class AdminAdminController {
...
@@ -47,7 +47,7 @@ public class AdminAdminController {
@GetMapping
(
"/list"
)
@GetMapping
(
"/list"
)
public
Object
list
(
String
username
,
@RequestParam
(
defaultValue
=
"1"
)
Integer
page
,
public
Object
list
(
String
username
,
@RequestParam
(
defaultValue
=
"1"
)
Integer
page
,
@RequestParam
(
defaultValue
=
"10"
)
Integer
limit
,
@RequestParam
(
defaultValue
=
"10"
)
Integer
limit
,
@
Sort
@
RequestParam
(
defaultValue
=
"add_time"
)
String
sort
,
@RequestParam
(
defaultValue
=
"add_time"
)
String
sort
,
@Order
@RequestParam
(
defaultValue
=
"desc"
)
String
order
)
{
@Order
@RequestParam
(
defaultValue
=
"desc"
)
String
order
)
{
logger
.
info
(
"【请求开始】操作人:["
+
AuthSupport
.
userName
()+
"] 系统管理->管理员管理->查询,请求参数:username:{},page:{}"
,
username
,
page
);
logger
.
info
(
"【请求开始】操作人:["
+
AuthSupport
.
userName
()+
"] 系统管理->管理员管理->查询,请求参数:username:{},page:{}"
,
username
,
page
);
...
...
ch-admin-api/src/main/java/com/wwdz/ch/admin/controller/AdminRoleController.java
View file @
776c2a3a
...
@@ -55,7 +55,7 @@ public class AdminRoleController {
...
@@ -55,7 +55,7 @@ public class AdminRoleController {
@GetMapping
(
"/list"
)
@GetMapping
(
"/list"
)
public
Object
list
(
String
name
,
@RequestParam
(
defaultValue
=
"1"
)
Integer
page
,
public
Object
list
(
String
name
,
@RequestParam
(
defaultValue
=
"1"
)
Integer
page
,
@RequestParam
(
defaultValue
=
"10"
)
Integer
limit
,
@RequestParam
(
defaultValue
=
"10"
)
Integer
limit
,
@
Sort
@
RequestParam
(
defaultValue
=
"add_time"
)
String
sort
,
@RequestParam
(
defaultValue
=
"add_time"
)
String
sort
,
@Order
@RequestParam
(
defaultValue
=
"desc"
)
String
order
)
{
@Order
@RequestParam
(
defaultValue
=
"desc"
)
String
order
)
{
logger
.
info
(
"【请求开始】操作人:["
+
AuthSupport
.
userName
()+
"] 系统管理->角色管理->角色查询,请求参数,name:{},page:{}"
,
name
,
page
);
logger
.
info
(
"【请求开始】操作人:["
+
AuthSupport
.
userName
()+
"] 系统管理->角色管理->角色查询,请求参数,name:{},page:{}"
,
name
,
page
);
...
...
ch-admin-api/src/main/java/com/wwdz/ch/admin/impl/ItemServiceImpl.java
View file @
776c2a3a
...
@@ -4,6 +4,7 @@ import com.wwdz.ch.admin.entity.vo.CoinVo;
...
@@ -4,6 +4,7 @@ import com.wwdz.ch.admin.entity.vo.CoinVo;
import
com.wwdz.ch.admin.service.ItemService
;
import
com.wwdz.ch.admin.service.ItemService
;
import
com.wwdz.ch.admin.service.OperateLogService
;
import
com.wwdz.ch.admin.service.OperateLogService
;
import
com.wwdz.ch.admin.util.AuthSupport
;
import
com.wwdz.ch.admin.util.AuthSupport
;
import
com.wwdz.ch.core.consts.CommonEnum
;
import
com.wwdz.ch.core.storage.QiniuStorage
;
import
com.wwdz.ch.core.storage.QiniuStorage
;
import
com.wwdz.ch.core.type.Result
;
import
com.wwdz.ch.core.type.Result
;
import
com.wwdz.ch.db.domain.Item
;
import
com.wwdz.ch.db.domain.Item
;
...
@@ -17,7 +18,6 @@ import org.slf4j.Logger;
...
@@ -17,7 +18,6 @@ import org.slf4j.Logger;
import
org.slf4j.LoggerFactory
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.util.ObjectUtils
;
import
java.util.*
;
import
java.util.*
;
...
@@ -59,29 +59,20 @@ public class ItemServiceImpl implements ItemService {
...
@@ -59,29 +59,20 @@ public class ItemServiceImpl implements ItemService {
public
Result
findDetails
(
CoinRequestDto
coinRequestDto
)
{
public
Result
findDetails
(
CoinRequestDto
coinRequestDto
)
{
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
try
{
try
{
//不需要查询新一页数据,则根据id查询明细
Item
item
;
if
(
ObjectUtils
.
isEmpty
(
coinRequestDto
.
getIsRefresh
())
||
coinRequestDto
.
getIsRefresh
()
!=
1
)
{
Long
itemId
=
coinRequestDto
.
getId
();
Item
item
=
itemManager
.
findDetails
(
coinRequestDto
.
getId
());
if
(!
ObjectUtils
.
isEmpty
(
itemId
))
{
CoinVo
coinVo
=
convertEntity
(
item
);
item
=
itemManager
.
findDetails
(
coinRequestDto
.
getId
());
EntityMapper
.
copyAttribute
(
item
,
coinVo
);
map
.
put
(
"isRefresh"
,
0
);
map
.
put
(
"data"
,
coinVo
);
}
else
{
}
else
{
List
<
CoinVo
>
coinVoList
=
new
ArrayList
<>();
item
=
itemManager
.
findOne
(
coinRequestDto
);
List
<
Item
>
itemList
=
itemManager
.
findList
(
coinRequestDto
);
itemList
.
forEach
(
coin
->
{
CoinVo
coinVo
=
convertEntity
(
coin
);
if
(
coinVo
!=
null
)
{
coinVoList
.
add
(
coinVo
);
}
});
map
.
put
(
"isRefresh"
,
1
);
map
.
put
(
"data"
,
coinVoList
);
}
}
CoinVo
coinVo
=
convertEntity
(
item
);
EntityMapper
.
copyAttribute
(
item
,
coinVo
);
return
Result
.
success
(
coinVo
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
logger
.
error
(
"钱币设置查询明细 error : {}"
,
e
);
logger
.
error
(
"钱币设置查询明细 error : {}"
,
e
);
}
}
return
Result
.
success
(
map
);
return
Result
.
failed
(
);
}
}
@Override
@Override
...
@@ -114,7 +105,8 @@ public class ItemServiceImpl implements ItemService {
...
@@ -114,7 +105,8 @@ public class ItemServiceImpl implements ItemService {
Map
<
String
,
Object
>
paramMap
=
JsonUtils
.
toMap
(
item
.
getExtra
());
Map
<
String
,
Object
>
paramMap
=
JsonUtils
.
toMap
(
item
.
getExtra
());
paramMap
.
remove
(
"s_url"
);
paramMap
.
remove
(
"s_url"
);
paramMap
.
put
(
"topImage"
,
url
);
paramMap
.
put
(
"topImage"
,
url
);
OperateLog
operateLog
=
OperateLog
.
of
(
"钱币设置"
,
1
,
AuthSupport
.
adminId
(),
AuthSupport
.
userName
(),
JsonUtils
.
fromMap
(
paramMap
));
OperateLog
operateLog
=
OperateLog
.
of
(
coinRequestDto
.
getId
(),
CommonEnum
.
OperateTypeEnum
.
COIN_SET
.
getDes
(),
CommonEnum
.
OperateTypeEnum
.
COIN_SET
.
getCode
(),
AuthSupport
.
adminId
(),
AuthSupport
.
userName
(),
JsonUtils
.
fromMap
(
paramMap
));
operateLogService
.
insert
(
operateLog
);
operateLogService
.
insert
(
operateLog
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
logger
.
error
(
"钱币设置 error :{}"
,
e
);
logger
.
error
(
"钱币设置 error :{}"
,
e
);
...
...
ch-core/src/main/java/com/wwdz/ch/core/consts/CommonEnum.java
0 → 100644
View file @
776c2a3a
package
com.wwdz.ch.core.consts
;
public
class
CommonEnum
{
public
enum
OperateTypeEnum
{
COIN_SET
(
1
,
"钱币设置"
),
;
private
int
code
;
private
String
des
;
OperateTypeEnum
(
int
code
,
String
des
)
{
this
.
code
=
code
;
this
.
des
=
des
;
}
public
static
String
getNameByCode
(
int
code
)
{
for
(
OperateTypeEnum
operateTypeEnum
:
OperateTypeEnum
.
values
())
{
if
(
code
==
operateTypeEnum
.
getCode
())
{
return
operateTypeEnum
.
getDes
();
}
}
return
null
;
}
public
int
getCode
()
{
return
code
;
}
public
String
getDes
()
{
return
des
;
}
}
}
ch-dao/src/main/java/com/wwdz/ch/db/dao/ItemMapper.java
View file @
776c2a3a
...
@@ -6,6 +6,7 @@ import java.util.List;
...
@@ -6,6 +6,7 @@ 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
);
...
@@ -80,13 +81,4 @@ public interface ItemMapper {
...
@@ -80,13 +81,4 @@ public interface ItemMapper {
int
updateByPrimaryKeyWithBLOBs
(
Item
record
);
int
updateByPrimaryKeyWithBLOBs
(
Item
record
);
int
updateByPrimaryKey
(
Item
record
);
int
updateByPrimaryKey
(
Item
record
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table dts_goods
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
int
logicalDeleteByPrimaryKey
(
Long
id
);
}
}
\ No newline at end of file
ch-dao/src/main/java/com/wwdz/ch/db/dao/OperateLogMapper.java
View file @
776c2a3a
...
@@ -3,6 +3,7 @@ package com.wwdz.ch.db.dao;
...
@@ -3,6 +3,7 @@ package com.wwdz.ch.db.dao;
import
com.wwdz.ch.db.domain.OperateLog
;
import
com.wwdz.ch.db.domain.OperateLog
;
import
com.wwdz.ch.db.domain.OperateLogExample
;
import
com.wwdz.ch.db.domain.OperateLogExample
;
import
java.util.List
;
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
;
...
...
ch-dao/src/main/java/com/wwdz/ch/db/domain/Item.java
View file @
776c2a3a
...
@@ -86,6 +86,11 @@ public class Item implements Entity {
...
@@ -86,6 +86,11 @@ public class Item implements Entity {
*/
*/
private
String
remark
;
private
String
remark
;
/**
* 是否设置过
*/
private
Integer
isSetted
;
/**
/**
* 钱币额外信息
* 钱币额外信息
*/
*/
...
@@ -124,6 +129,7 @@ public class Item implements Entity {
...
@@ -124,6 +129,7 @@ public class Item implements Entity {
sb
.
append
(
", isDeleted="
).
append
(
isDeleted
);
sb
.
append
(
", isDeleted="
).
append
(
isDeleted
);
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
(
", 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
);
...
@@ -159,6 +165,7 @@ public class Item implements Entity {
...
@@ -159,6 +165,7 @@ public class Item implements Entity {
&&
(
this
.
getIsDeleted
()
==
null
?
other
.
getIsDeleted
()
==
null
:
this
.
getIsDeleted
().
equals
(
other
.
getIsDeleted
()))
&&
(
this
.
getIsDeleted
()
==
null
?
other
.
getIsDeleted
()
==
null
:
this
.
getIsDeleted
().
equals
(
other
.
getIsDeleted
()))
&&
(
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
.
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
()));
...
@@ -183,6 +190,7 @@ public class Item implements Entity {
...
@@ -183,6 +190,7 @@ public class Item implements Entity {
result
=
prime
*
result
+
((
getIsDeleted
()
==
null
)
?
0
:
getIsDeleted
().
hashCode
());
result
=
prime
*
result
+
((
getIsDeleted
()
==
null
)
?
0
:
getIsDeleted
().
hashCode
());
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
+
((
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
());
...
@@ -212,6 +220,7 @@ public class Item implements Entity {
...
@@ -212,6 +220,7 @@ public class Item implements Entity {
isDeleted
(
"is_deleted"
,
"isDeleted"
,
"BIT"
,
false
),
isDeleted
(
"is_deleted"
,
"isDeleted"
,
"BIT"
,
false
),
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
),
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
);
...
...
ch-dao/src/main/java/com/wwdz/ch/db/domain/ItemExample.java
View file @
776c2a3a
...
@@ -393,7 +393,7 @@ public class ItemExample {
...
@@ -393,7 +393,7 @@ public class ItemExample {
}
}
public
Criteria
andNameLike
(
String
value
)
{
public
Criteria
andNameLike
(
String
value
)
{
addCriterion
(
"`name` like"
,
"%"
+
value
+
"% "
,
"name"
);
addCriterion
(
"`name` like"
,
value
,
"name"
);
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
...
@@ -2177,6 +2177,138 @@ public class ItemExample {
...
@@ -2177,6 +2177,138 @@ public class ItemExample {
addCriterion
(
"remark not between"
,
value1
,
value2
,
"remark"
);
addCriterion
(
"remark not between"
,
value1
,
value2
,
"remark"
);
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
public
Criteria
andIsSettedIsNull
()
{
addCriterion
(
"is_setted is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIsSettedIsNotNull
()
{
addCriterion
(
"is_setted is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIsSettedEqualTo
(
Integer
value
)
{
addCriterion
(
"is_setted ="
,
value
,
"isSetted"
);
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
andIsSettedEqualToColumn
(
Item
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"is_setted = "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andIsSettedNotEqualTo
(
Integer
value
)
{
addCriterion
(
"is_setted <>"
,
value
,
"isSetted"
);
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
andIsSettedNotEqualToColumn
(
Item
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"is_setted <> "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andIsSettedGreaterThan
(
Integer
value
)
{
addCriterion
(
"is_setted >"
,
value
,
"isSetted"
);
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
andIsSettedGreaterThanColumn
(
Item
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"is_setted > "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andIsSettedGreaterThanOrEqualTo
(
Integer
value
)
{
addCriterion
(
"is_setted >="
,
value
,
"isSetted"
);
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
andIsSettedGreaterThanOrEqualToColumn
(
Item
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"is_setted >= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andIsSettedLessThan
(
Integer
value
)
{
addCriterion
(
"is_setted <"
,
value
,
"isSetted"
);
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
andIsSettedLessThanColumn
(
Item
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"is_setted < "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andIsSettedLessThanOrEqualTo
(
Integer
value
)
{
addCriterion
(
"is_setted <="
,
value
,
"isSetted"
);
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
andIsSettedLessThanOrEqualToColumn
(
Item
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"is_setted <= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andIsSettedIn
(
List
<
Integer
>
values
)
{
addCriterion
(
"is_setted in"
,
values
,
"isSetted"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIsSettedNotIn
(
List
<
Integer
>
values
)
{
addCriterion
(
"is_setted not in"
,
values
,
"isSetted"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIsSettedBetween
(
Integer
value1
,
Integer
value2
)
{
addCriterion
(
"is_setted between"
,
value1
,
value2
,
"isSetted"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIsSettedNotBetween
(
Integer
value1
,
Integer
value2
)
{
addCriterion
(
"is_setted not between"
,
value1
,
value2
,
"isSetted"
);
return
(
Criteria
)
this
;
}
}
}
public
static
class
Criteria
extends
GeneratedCriteria
{
public
static
class
Criteria
extends
GeneratedCriteria
{
...
...
ch-dao/src/main/java/com/wwdz/ch/db/domain/OperateLog.java
View file @
776c2a3a
...
@@ -16,6 +16,11 @@ import lombok.Data;
...
@@ -16,6 +16,11 @@ import lombok.Data;
public
class
OperateLog
implements
Entity
{
public
class
OperateLog
implements
Entity
{
private
Integer
id
;
private
Integer
id
;
/**
* 操作对象的id
*/
private
Long
itemId
;
/**
/**
* 操作描述
* 操作描述
*/
*/
...
@@ -49,7 +54,8 @@ public class OperateLog implements Entity {
...
@@ -49,7 +54,8 @@ public class OperateLog implements Entity {
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
public
OperateLog
(
String
description
,
Integer
type
,
Integer
operaterCode
,
String
operaterName
,
String
param
)
{
public
OperateLog
(
Long
itemId
,
String
description
,
Integer
type
,
Integer
operaterCode
,
String
operaterName
,
String
param
)
{
this
.
itemId
=
itemId
;
this
.
description
=
description
;
this
.
description
=
description
;
this
.
type
=
type
;
this
.
type
=
type
;
this
.
operaterCode
=
operaterCode
;
this
.
operaterCode
=
operaterCode
;
...
@@ -57,10 +63,13 @@ public class OperateLog implements Entity {
...
@@ -57,10 +63,13 @@ public class OperateLog implements Entity {
this
.
param
=
param
;
this
.
param
=
param
;
}
}
public
static
OperateLog
of
(
String
description
,
Integer
type
,
Integer
operaterCode
,
String
operaterName
,
String
param
)
{
public
static
OperateLog
of
(
Long
itemId
,
String
description
,
Integer
type
,
Integer
operaterCode
,
String
operaterName
,
String
param
)
{
return
new
OperateLog
(
description
,
type
,
operaterCode
,
operaterName
,
param
);
return
new
OperateLog
(
itemId
,
description
,
type
,
operaterCode
,
operaterName
,
param
);
}
}
@Override
@Override
public
String
toString
()
{
public
String
toString
()
{
StringBuilder
sb
=
new
StringBuilder
();
StringBuilder
sb
=
new
StringBuilder
();
...
@@ -68,6 +77,7 @@ public class OperateLog implements Entity {
...
@@ -68,6 +77,7 @@ public class OperateLog implements Entity {
sb
.
append
(
" ["
);
sb
.
append
(
" ["
);
sb
.
append
(
"Hash = "
).
append
(
hashCode
());
sb
.
append
(
"Hash = "
).
append
(
hashCode
());
sb
.
append
(
", id="
).
append
(
id
);
sb
.
append
(
", id="
).
append
(
id
);
sb
.
append
(
", itemId="
).
append
(
itemId
);
sb
.
append
(
", description="
).
append
(
description
);
sb
.
append
(
", description="
).
append
(
description
);
sb
.
append
(
", type="
).
append
(
type
);
sb
.
append
(
", type="
).
append
(
type
);
sb
.
append
(
", createTime="
).
append
(
createTime
);
sb
.
append
(
", createTime="
).
append
(
createTime
);
...
@@ -92,6 +102,7 @@ public class OperateLog implements Entity {
...
@@ -92,6 +102,7 @@ public class OperateLog implements Entity {
}
}
OperateLog
other
=
(
OperateLog
)
that
;
OperateLog
other
=
(
OperateLog
)
that
;
return
(
this
.
getId
()
==
null
?
other
.
getId
()
==
null
:
this
.
getId
().
equals
(
other
.
getId
()))
return
(
this
.
getId
()
==
null
?
other
.
getId
()
==
null
:
this
.
getId
().
equals
(
other
.
getId
()))
&&
(
this
.
getItemId
()
==
null
?
other
.
getItemId
()
==
null
:
this
.
getItemId
().
equals
(
other
.
getItemId
()))
&&
(
this
.
getDescription
()
==
null
?
other
.
getDescription
()
==
null
:
this
.
getDescription
().
equals
(
other
.
getDescription
()))
&&
(
this
.
getDescription
()
==
null
?
other
.
getDescription
()
==
null
:
this
.
getDescription
().
equals
(
other
.
getDescription
()))
&&
(
this
.
getType
()
==
null
?
other
.
getType
()
==
null
:
this
.
getType
().
equals
(
other
.
getType
()))
&&
(
this
.
getType
()
==
null
?
other
.
getType
()
==
null
:
this
.
getType
().
equals
(
other
.
getType
()))
&&
(
this
.
getCreateTime
()
==
null
?
other
.
getCreateTime
()
==
null
:
this
.
getCreateTime
().
equals
(
other
.
getCreateTime
()))
&&
(
this
.
getCreateTime
()
==
null
?
other
.
getCreateTime
()
==
null
:
this
.
getCreateTime
().
equals
(
other
.
getCreateTime
()))
...
@@ -105,6 +116,7 @@ public class OperateLog implements Entity {
...
@@ -105,6 +116,7 @@ public class OperateLog implements Entity {
final
int
prime
=
31
;
final
int
prime
=
31
;
int
result
=
1
;
int
result
=
1
;
result
=
prime
*
result
+
((
getId
()
==
null
)
?
0
:
getId
().
hashCode
());
result
=
prime
*
result
+
((
getId
()
==
null
)
?
0
:
getId
().
hashCode
());
result
=
prime
*
result
+
((
getItemId
()
==
null
)
?
0
:
getItemId
().
hashCode
());
result
=
prime
*
result
+
((
getDescription
()
==
null
)
?
0
:
getDescription
().
hashCode
());
result
=
prime
*
result
+
((
getDescription
()
==
null
)
?
0
:
getDescription
().
hashCode
());
result
=
prime
*
result
+
((
getType
()
==
null
)
?
0
:
getType
().
hashCode
());
result
=
prime
*
result
+
((
getType
()
==
null
)
?
0
:
getType
().
hashCode
());
result
=
prime
*
result
+
((
getCreateTime
()
==
null
)
?
0
:
getCreateTime
().
hashCode
());
result
=
prime
*
result
+
((
getCreateTime
()
==
null
)
?
0
:
getCreateTime
().
hashCode
());
...
@@ -123,6 +135,7 @@ public class OperateLog implements Entity {
...
@@ -123,6 +135,7 @@ public class OperateLog implements Entity {
*/
*/
public
enum
Column
{
public
enum
Column
{
id
(
"id"
,
"id"
,
"INTEGER"
,
false
),
id
(
"id"
,
"id"
,
"INTEGER"
,
false
),
itemId
(
"item_id"
,
"itemId"
,
"BIGINT"
,
false
),
description
(
"description"
,
"description"
,
"VARCHAR"
,
false
),
description
(
"description"
,
"description"
,
"VARCHAR"
,
false
),
type
(
"type"
,
"type"
,
"INTEGER"
,
true
),
type
(
"type"
,
"type"
,
"INTEGER"
,
true
),
createTime
(
"create_time"
,
"createTime"
,
"TIMESTAMP"
,
false
),
createTime
(
"create_time"
,
"createTime"
,
"TIMESTAMP"
,
false
),
...
...
ch-dao/src/main/java/com/wwdz/ch/db/domain/OperateLogExample.java
View file @
776c2a3a
...
@@ -280,6 +280,138 @@ public class OperateLogExample {
...
@@ -280,6 +280,138 @@ public class OperateLogExample {
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
public
Criteria
andItemIdIsNull
()
{
addCriterion
(
"item_id is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andItemIdIsNotNull
()
{
addCriterion
(
"item_id is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andItemIdEqualTo
(
Long
value
)
{
addCriterion
(
"item_id ="
,
value
,
"itemId"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table operate_log
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andItemIdEqualToColumn
(
OperateLog
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"item_id = "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andItemIdNotEqualTo
(
Long
value
)
{
addCriterion
(
"item_id <>"
,
value
,
"itemId"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table operate_log
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andItemIdNotEqualToColumn
(
OperateLog
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"item_id <> "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andItemIdGreaterThan
(
Long
value
)
{
addCriterion
(
"item_id >"
,
value
,
"itemId"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table operate_log
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andItemIdGreaterThanColumn
(
OperateLog
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"item_id > "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andItemIdGreaterThanOrEqualTo
(
Long
value
)
{
addCriterion
(
"item_id >="
,
value
,
"itemId"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table operate_log
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andItemIdGreaterThanOrEqualToColumn
(
OperateLog
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"item_id >= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andItemIdLessThan
(
Long
value
)
{
addCriterion
(
"item_id <"
,
value
,
"itemId"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table operate_log
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andItemIdLessThanColumn
(
OperateLog
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"item_id < "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andItemIdLessThanOrEqualTo
(
Long
value
)
{
addCriterion
(
"item_id <="
,
value
,
"itemId"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table operate_log
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andItemIdLessThanOrEqualToColumn
(
OperateLog
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"item_id <= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andItemIdIn
(
List
<
Long
>
values
)
{
addCriterion
(
"item_id in"
,
values
,
"itemId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andItemIdNotIn
(
List
<
Long
>
values
)
{
addCriterion
(
"item_id not in"
,
values
,
"itemId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andItemIdBetween
(
Long
value1
,
Long
value2
)
{
addCriterion
(
"item_id between"
,
value1
,
value2
,
"itemId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andItemIdNotBetween
(
Long
value1
,
Long
value2
)
{
addCriterion
(
"item_id not between"
,
value1
,
value2
,
"itemId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andDescriptionIsNull
()
{
public
Criteria
andDescriptionIsNull
()
{
addCriterion
(
"description is null"
);
addCriterion
(
"description is null"
);
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
...
...
ch-dao/src/main/java/com/wwdz/ch/db/manager/ItemManager.java
View file @
776c2a3a
...
@@ -8,6 +8,8 @@ import java.util.List;
...
@@ -8,6 +8,8 @@ import java.util.List;
public
interface
ItemManager
{
public
interface
ItemManager
{
Item
findOne
(
CoinRequestDto
coinRequestDto
);
List
<
Item
>
findList
(
CoinRequestDto
coinRequestDto
);
List
<
Item
>
findList
(
CoinRequestDto
coinRequestDto
);
Item
findDetails
(
Long
id
);
Item
findDetails
(
Long
id
);
...
...
ch-dao/src/main/java/com/wwdz/ch/db/manager/impl/ItemManagerImpl.java
View file @
776c2a3a
...
@@ -19,6 +19,15 @@ public class ItemManagerImpl implements ItemManager {
...
@@ -19,6 +19,15 @@ public class ItemManagerImpl implements ItemManager {
@Autowired
@Autowired
ItemMapper
itemMapper
;
ItemMapper
itemMapper
;
@Override
public
Item
findOne
(
CoinRequestDto
coinRequestDto
)
{
ItemExample
example
=
new
ItemExample
();
ItemExample
.
Criteria
criteria
=
example
.
createCriteria
();
criteria
.
andIsDeletedEqualTo
(
false
);
criteria
.
andIsSettedEqualTo
(
0
);
return
itemMapper
.
selectOneByExample
(
example
);
}
@Override
@Override
public
List
<
Item
>
findList
(
CoinRequestDto
coinRequestDto
)
{
public
List
<
Item
>
findList
(
CoinRequestDto
coinRequestDto
)
{
ItemExample
example
=
new
ItemExample
();
ItemExample
example
=
new
ItemExample
();
...
@@ -46,6 +55,7 @@ public class ItemManagerImpl implements ItemManager {
...
@@ -46,6 +55,7 @@ public class ItemManagerImpl implements ItemManager {
ItemExample
example
=
new
ItemExample
();
ItemExample
example
=
new
ItemExample
();
ItemExample
.
Criteria
criteria
=
example
.
createCriteria
();
ItemExample
.
Criteria
criteria
=
example
.
createCriteria
();
criteria
.
andIdEqualTo
(
item
.
getId
());
criteria
.
andIdEqualTo
(
item
.
getId
());
item
.
setIsSetted
(
1
);
item
.
setUpdateTime
(
new
Date
());
item
.
setUpdateTime
(
new
Date
());
int
num
=
itemMapper
.
updateByExampleSelective
(
item
,
example
);
int
num
=
itemMapper
.
updateByExampleSelective
(
item
,
example
);
return
num
>
0
;
return
num
>
0
;
...
...
ch-dao/src/main/resources/com/wwdz/ch/db/dao/ItemMapper.xml
View file @
776c2a3a
...
@@ -17,6 +17,7 @@
...
@@ -17,6 +17,7 @@
<result
column=
"is_deleted"
jdbcType=
"BIT"
property=
"isDeleted"
/>
<result
column=
"is_deleted"
jdbcType=
"BIT"
property=
"isDeleted"
/>
<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"
/>
</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"
/>
...
@@ -83,7 +84,7 @@
...
@@ -83,7 +84,7 @@
</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
source_type, update_time, is_deleted, bid_time, remark
, is_setted
</sql>
</sql>
<sql
id=
"Blob_Column_List"
>
<sql
id=
"Blob_Column_List"
>
extra, images, detail
extra, images, detail
...
@@ -139,7 +140,8 @@
...
@@ -139,7 +140,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, extra, images, detail
source_type, update_time, is_deleted, bid_time, remark, is_setted, extra, images,
detail
</otherwise>
</otherwise>
</choose>
</choose>
from item
from item
...
@@ -173,7 +175,8 @@
...
@@ -173,7 +175,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, extra, images, detail
source_type, update_time, is_deleted, bid_time, remark, is_setted, extra, images,
detail
</otherwise>
</otherwise>
</choose>
</choose>
from item
from item
...
@@ -197,14 +200,16 @@
...
@@ -197,14 +200,16 @@
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, extra,
bid_time, remark, is_setted,
images, detail)
extra, images, detail
)
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}, #{extra,jdbcType=LONGVARCHAR},
#{bidTime,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR}, #{isSetted,jdbcType=INTEGER},
#{images,jdbcType=LONGVARCHAR}, #{detail,jdbcType=LONGVARCHAR})
#{extra,jdbcType=LONGVARCHAR}, #{images,jdbcType=LONGVARCHAR}, #{detail,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"
>
...
@@ -254,6 +259,9 @@
...
@@ -254,6 +259,9 @@
<if
test=
"remark != null"
>
<if
test=
"remark != null"
>
remark,
remark,
</if>
</if>
<if
test=
"isSetted != null"
>
is_setted,
</if>
<if
test=
"extra != null"
>
<if
test=
"extra != null"
>
extra,
extra,
</if>
</if>
...
@@ -307,6 +315,9 @@
...
@@ -307,6 +315,9 @@
<if
test=
"remark != null"
>
<if
test=
"remark != null"
>
#{remark,jdbcType=VARCHAR},
#{remark,jdbcType=VARCHAR},
</if>
</if>
<if
test=
"isSetted != null"
>
#{isSetted,jdbcType=INTEGER},
</if>
<if
test=
"extra != null"
>
<if
test=
"extra != null"
>
#{extra,jdbcType=LONGVARCHAR},
#{extra,jdbcType=LONGVARCHAR},
</if>
</if>
...
@@ -372,6 +383,9 @@
...
@@ -372,6 +383,9 @@
<if
test=
"record.remark != null"
>
<if
test=
"record.remark != null"
>
remark = #{record.remark,jdbcType=VARCHAR},
remark = #{record.remark,jdbcType=VARCHAR},
</if>
</if>
<if
test=
"record.isSetted != null"
>
is_setted = #{record.isSetted,jdbcType=INTEGER},
</if>
<if
test=
"record.extra != null"
>
<if
test=
"record.extra != null"
>
extra = #{record.extra,jdbcType=LONGVARCHAR},
extra = #{record.extra,jdbcType=LONGVARCHAR},
</if>
</if>
...
@@ -403,6 +417,7 @@
...
@@ -403,6 +417,7 @@
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},
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}
...
@@ -426,7 +441,8 @@
...
@@ -426,7 +441,8 @@
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
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}
<if
test=
"_parameter != null"
>
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
</if>
...
@@ -476,6 +492,9 @@
...
@@ -476,6 +492,9 @@
<if
test=
"remark != null"
>
<if
test=
"remark != null"
>
remark = #{remark,jdbcType=VARCHAR},
remark = #{remark,jdbcType=VARCHAR},
</if>
</if>
<if
test=
"isSetted != null"
>
is_setted = #{isSetted,jdbcType=INTEGER},
</if>
<if
test=
"extra != null"
>
<if
test=
"extra != null"
>
extra = #{extra,jdbcType=LONGVARCHAR},
extra = #{extra,jdbcType=LONGVARCHAR},
</if>
</if>
...
@@ -504,6 +523,7 @@
...
@@ -504,6 +523,7 @@
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},
extra = #{extra,jdbcType=LONGVARCHAR},
extra = #{extra,jdbcType=LONGVARCHAR},
images = #{images,jdbcType=LONGVARCHAR},
images = #{images,jdbcType=LONGVARCHAR},
detail = #{detail,jdbcType=LONGVARCHAR}
detail = #{detail,jdbcType=LONGVARCHAR}
...
@@ -524,7 +544,8 @@
...
@@ -524,7 +544,8 @@
update_time = #{updateTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP},
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}
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"
>
...
@@ -581,7 +602,8 @@
...
@@ -581,7 +602,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, extra, images, detail
source_type, update_time, is_deleted, bid_time, remark, is_setted, extra, images,
detail
</otherwise>
</otherwise>
</choose>
</choose>
from item
from item
...
@@ -593,13 +615,5 @@
...
@@ -593,13 +615,5 @@
</if>
</if>
limit 1
limit 1
</select>
</select>
<update
id=
"logicalDeleteByPrimaryKey"
parameterType=
"java.lang.Long"
>
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
@project https://github.com/itfsw/mybatis-generator-plugin
-->
update item set is_deleted = 1
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>
</mapper>
\ No newline at end of file
ch-dao/src/main/resources/com/wwdz/ch/db/dao/OperateLogMapper.xml
View file @
776c2a3a
...
@@ -3,6 +3,7 @@
...
@@ -3,6 +3,7 @@
<mapper
namespace=
"com.wwdz.ch.db.dao.OperateLogMapper"
>
<mapper
namespace=
"com.wwdz.ch.db.dao.OperateLogMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.wwdz.ch.db.domain.OperateLog"
>
<resultMap
id=
"BaseResultMap"
type=
"com.wwdz.ch.db.domain.OperateLog"
>
<id
column=
"id"
jdbcType=
"INTEGER"
property=
"id"
/>
<id
column=
"id"
jdbcType=
"INTEGER"
property=
"id"
/>
<result
column=
"item_id"
jdbcType=
"BIGINT"
property=
"itemId"
/>
<result
column=
"description"
jdbcType=
"VARCHAR"
property=
"description"
/>
<result
column=
"description"
jdbcType=
"VARCHAR"
property=
"description"
/>
<result
column=
"type"
jdbcType=
"INTEGER"
property=
"type"
/>
<result
column=
"type"
jdbcType=
"INTEGER"
property=
"type"
/>
<result
column=
"create_time"
jdbcType=
"TIMESTAMP"
property=
"createTime"
/>
<result
column=
"create_time"
jdbcType=
"TIMESTAMP"
property=
"createTime"
/>
...
@@ -71,7 +72,7 @@
...
@@ -71,7 +72,7 @@
</where>
</where>
</sql>
</sql>
<sql
id=
"Base_Column_List"
>
<sql
id=
"Base_Column_List"
>
id, description, `type`, create_time, operater_code, operater_name
id,
item_id,
description, `type`, create_time, operater_code, operater_name
</sql>
</sql>
<sql
id=
"Blob_Column_List"
>
<sql
id=
"Blob_Column_List"
>
param
param
...
@@ -126,7 +127,8 @@
...
@@ -126,7 +127,8 @@
</foreach>
</foreach>
</when>
</when>
<otherwise>
<otherwise>
id, description, `type`, create_time, operater_code, operater_name, param
id, item_id, description, `type`, create_time, operater_code, operater_name, param
</otherwise>
</otherwise>
</choose>
</choose>
from operate_log
from operate_log
...
@@ -159,7 +161,8 @@
...
@@ -159,7 +161,8 @@
</foreach>
</foreach>
</when>
</when>
<otherwise>
<otherwise>
id, description, `type`, create_time, operater_code, operater_name, param
id, item_id, description, `type`, create_time, operater_code, operater_name, param
</otherwise>
</otherwise>
</choose>
</choose>
from operate_log
from operate_log
...
@@ -179,12 +182,12 @@
...
@@ -179,12 +182,12 @@
<selectKey
keyProperty=
"id"
order=
"AFTER"
resultType=
"java.lang.Integer"
>
<selectKey
keyProperty=
"id"
order=
"AFTER"
resultType=
"java.lang.Integer"
>
SELECT LAST_INSERT_ID()
SELECT LAST_INSERT_ID()
</selectKey>
</selectKey>
insert into operate_log (
description, `type`, create_time
,
insert into operate_log (
item_id, description, `type`
,
operater_code, operater_name, param
create_time, operater_code, operater_name,
)
param
)
values (#{
description,jdbcType=VARCHAR}, #{type,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP
},
values (#{
itemId,jdbcType=BIGINT}, #{description,jdbcType=VARCHAR}, #{type,jdbcType=INTEGER
},
#{
operaterCode,jdbcType=INTEGER}, #{operaterName,jdbcType=VARCHAR}, #{param,jdbcType=LONGVARCHAR}
#{
createTime,jdbcType=TIMESTAMP}, #{operaterCode,jdbcType=INTEGER}, #{operaterName,jdbcType=VARCHAR},
)
#{param,jdbcType=LONGVARCHAR}
)
</insert>
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.wwdz.ch.db.domain.OperateLog"
>
<insert
id=
"insertSelective"
parameterType=
"com.wwdz.ch.db.domain.OperateLog"
>
<selectKey
keyProperty=
"id"
order=
"AFTER"
resultType=
"java.lang.Integer"
>
<selectKey
keyProperty=
"id"
order=
"AFTER"
resultType=
"java.lang.Integer"
>
...
@@ -192,6 +195,9 @@
...
@@ -192,6 +195,9 @@
</selectKey>
</selectKey>
insert into operate_log
insert into operate_log
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"itemId != null"
>
item_id,
</if>
<if
test=
"description != null"
>
<if
test=
"description != null"
>
description,
description,
</if>
</if>
...
@@ -212,6 +218,9 @@
...
@@ -212,6 +218,9 @@
</if>
</if>
</trim>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"itemId != null"
>
#{itemId,jdbcType=BIGINT},
</if>
<if
test=
"description != null"
>
<if
test=
"description != null"
>
#{description,jdbcType=VARCHAR},
#{description,jdbcType=VARCHAR},
</if>
</if>
...
@@ -244,6 +253,9 @@
...
@@ -244,6 +253,9 @@
<if
test=
"record.id != null"
>
<if
test=
"record.id != null"
>
id = #{record.id,jdbcType=INTEGER},
id = #{record.id,jdbcType=INTEGER},
</if>
</if>
<if
test=
"record.itemId != null"
>
item_id = #{record.itemId,jdbcType=BIGINT},
</if>
<if
test=
"record.description != null"
>
<if
test=
"record.description != null"
>
description = #{record.description,jdbcType=VARCHAR},
description = #{record.description,jdbcType=VARCHAR},
</if>
</if>
...
@@ -270,6 +282,7 @@
...
@@ -270,6 +282,7 @@
<update
id=
"updateByExampleWithBLOBs"
parameterType=
"map"
>
<update
id=
"updateByExampleWithBLOBs"
parameterType=
"map"
>
update operate_log
update operate_log
set id = #{record.id,jdbcType=INTEGER},
set id = #{record.id,jdbcType=INTEGER},
item_id = #{record.itemId,jdbcType=BIGINT},
description = #{record.description,jdbcType=VARCHAR},
description = #{record.description,jdbcType=VARCHAR},
`type` = #{record.type,jdbcType=INTEGER},
`type` = #{record.type,jdbcType=INTEGER},
create_time = #{record.createTime,jdbcType=TIMESTAMP},
create_time = #{record.createTime,jdbcType=TIMESTAMP},
...
@@ -283,6 +296,7 @@
...
@@ -283,6 +296,7 @@
<update
id=
"updateByExample"
parameterType=
"map"
>
<update
id=
"updateByExample"
parameterType=
"map"
>
update operate_log
update operate_log
set id = #{record.id,jdbcType=INTEGER},
set id = #{record.id,jdbcType=INTEGER},
item_id = #{record.itemId,jdbcType=BIGINT},
description = #{record.description,jdbcType=VARCHAR},
description = #{record.description,jdbcType=VARCHAR},
`type` = #{record.type,jdbcType=INTEGER},
`type` = #{record.type,jdbcType=INTEGER},
create_time = #{record.createTime,jdbcType=TIMESTAMP},
create_time = #{record.createTime,jdbcType=TIMESTAMP},
...
@@ -295,6 +309,9 @@
...
@@ -295,6 +309,9 @@
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.wwdz.ch.db.domain.OperateLog"
>
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.wwdz.ch.db.domain.OperateLog"
>
update operate_log
update operate_log
<set>
<set>
<if
test=
"itemId != null"
>
item_id = #{itemId,jdbcType=BIGINT},
</if>
<if
test=
"description != null"
>
<if
test=
"description != null"
>
description = #{description,jdbcType=VARCHAR},
description = #{description,jdbcType=VARCHAR},
</if>
</if>
...
@@ -318,7 +335,8 @@
...
@@ -318,7 +335,8 @@
</update>
</update>
<update
id=
"updateByPrimaryKeyWithBLOBs"
parameterType=
"com.wwdz.ch.db.domain.OperateLog"
>
<update
id=
"updateByPrimaryKeyWithBLOBs"
parameterType=
"com.wwdz.ch.db.domain.OperateLog"
>
update operate_log
update operate_log
set description = #{description,jdbcType=VARCHAR},
set item_id = #{itemId,jdbcType=BIGINT},
description = #{description,jdbcType=VARCHAR},
`type` = #{type,jdbcType=INTEGER},
`type` = #{type,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
create_time = #{createTime,jdbcType=TIMESTAMP},
operater_code = #{operaterCode,jdbcType=INTEGER},
operater_code = #{operaterCode,jdbcType=INTEGER},
...
@@ -328,7 +346,8 @@
...
@@ -328,7 +346,8 @@
</update>
</update>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.wwdz.ch.db.domain.OperateLog"
>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.wwdz.ch.db.domain.OperateLog"
>
update operate_log
update operate_log
set description = #{description,jdbcType=VARCHAR},
set item_id = #{itemId,jdbcType=BIGINT},
description = #{description,jdbcType=VARCHAR},
`type` = #{type,jdbcType=INTEGER},
`type` = #{type,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
create_time = #{createTime,jdbcType=TIMESTAMP},
operater_code = #{operaterCode,jdbcType=INTEGER},
operater_code = #{operaterCode,jdbcType=INTEGER},
...
@@ -388,7 +407,8 @@
...
@@ -388,7 +407,8 @@
</foreach>
</foreach>
</when>
</when>
<otherwise>
<otherwise>
id, description, `type`, create_time, operater_code, operater_name, param
id, item_id, description, `type`, create_time, operater_code, operater_name, param
</otherwise>
</otherwise>
</choose>
</choose>
from operate_log
from operate_log
...
...
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