Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
haoban-manage3.0
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
haoban3.0
haoban-manage3.0
Commits
3cb6cdb9
Commit
3cb6cdb9
authored
Mar 18, 2020
by
huangZW
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
111
parent
31226bbe
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
300 additions
and
78 deletions
+300
-78
AuditDTO.java
...src/main/java/com/gic/haoban/manage/api/dto/AuditDTO.java
+159
-0
AuditApiService.java
...va/com/gic/haoban/manage/api/service/AuditApiService.java
+15
-0
AuditMapper.java
...com/gic/haoban/manage/service/dao/mapper/AuditMapper.java
+8
-2
TabHaobanAudit.java
.../com/gic/haoban/manage/service/entity/TabHaobanAudit.java
+20
-21
AuditApiServiceImpl.java
.../manage/service/service/out/impl/AuditApiServiceImpl.java
+33
-0
DictApiServiceImpl.java
...n/manage/service/service/out/impl/DictApiServiceImpl.java
+1
-1
dubbo-haoban-manage-service.xml
...ervice/src/main/resources/dubbo-haoban-manage-service.xml
+1
-0
AuditMapper.xml
...manage3-service/src/main/resources/mapper/AuditMapper.xml
+63
-54
No files found.
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/dto/AuditDTO.java
0 → 100644
View file @
3cb6cdb9
package
com
.
gic
.
haoban
.
manage
.
api
.
dto
;
import
java.io.Serializable
;
import
java.util.Date
;
public
class
AuditDTO
implements
Serializable
{
private
Integer
auditId
;
private
Integer
auditType
;
private
String
commitName
;
private
Integer
commitStaffId
;
private
String
commitStaffName
;
private
String
commitStaffImg
;
private
String
commitStoreId
;
private
String
changeField
;
private
Date
commitTime
;
private
String
enterpriseId
;
private
String
auditName
;
private
Integer
auditStatus
;
private
String
auditReason
;
private
String
oldValue
;
private
String
newValue
;
private
static
final
long
serialVersionUID
=
1L
;
public
Integer
getAuditId
()
{
return
auditId
;
}
public
void
setAuditId
(
Integer
auditId
)
{
this
.
auditId
=
auditId
;
}
public
Integer
getAuditType
()
{
return
auditType
;
}
public
void
setAuditType
(
Integer
auditType
)
{
this
.
auditType
=
auditType
;
}
public
String
getCommitName
()
{
return
commitName
;
}
public
void
setCommitName
(
String
commitName
)
{
this
.
commitName
=
commitName
==
null
?
null
:
commitName
.
trim
();
}
public
Integer
getCommitStaffId
()
{
return
commitStaffId
;
}
public
void
setCommitStaffId
(
Integer
commitStaffId
)
{
this
.
commitStaffId
=
commitStaffId
;
}
public
String
getCommitStaffName
()
{
return
commitStaffName
;
}
public
void
setCommitStaffName
(
String
commitStaffName
)
{
this
.
commitStaffName
=
commitStaffName
==
null
?
null
:
commitStaffName
.
trim
();
}
public
String
getCommitStaffImg
()
{
return
commitStaffImg
;
}
public
void
setCommitStaffImg
(
String
commitStaffImg
)
{
this
.
commitStaffImg
=
commitStaffImg
==
null
?
null
:
commitStaffImg
.
trim
();
}
public
String
getCommitStoreId
()
{
return
commitStoreId
;
}
public
void
setCommitStoreId
(
String
commitStoreId
)
{
this
.
commitStoreId
=
commitStoreId
==
null
?
null
:
commitStoreId
.
trim
();
}
public
String
getChangeField
()
{
return
changeField
;
}
public
void
setChangeField
(
String
changeField
)
{
this
.
changeField
=
changeField
==
null
?
null
:
changeField
.
trim
();
}
public
Date
getCommitTime
()
{
return
commitTime
;
}
public
void
setCommitTime
(
Date
commitTime
)
{
this
.
commitTime
=
commitTime
;
}
public
String
getEnterpriseId
()
{
return
enterpriseId
;
}
public
void
setEnterpriseId
(
String
enterpriseId
)
{
this
.
enterpriseId
=
enterpriseId
==
null
?
null
:
enterpriseId
.
trim
();
}
public
String
getAuditName
()
{
return
auditName
;
}
public
void
setAuditName
(
String
auditName
)
{
this
.
auditName
=
auditName
==
null
?
null
:
auditName
.
trim
();
}
public
Integer
getAuditStatus
()
{
return
auditStatus
;
}
public
void
setAuditStatus
(
Integer
auditStatus
)
{
this
.
auditStatus
=
auditStatus
;
}
public
String
getAuditReason
()
{
return
auditReason
;
}
public
void
setAuditReason
(
String
auditReason
)
{
this
.
auditReason
=
auditReason
==
null
?
null
:
auditReason
.
trim
();
}
public
String
getOldValue
()
{
return
oldValue
;
}
public
void
setOldValue
(
String
oldValue
)
{
this
.
oldValue
=
oldValue
==
null
?
null
:
oldValue
.
trim
();
}
public
String
getNewValue
()
{
return
newValue
;
}
public
void
setNewValue
(
String
newValue
)
{
this
.
newValue
=
newValue
==
null
?
null
:
newValue
.
trim
();
}
}
\ No newline at end of file
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/service/AuditApiService.java
0 → 100644
View file @
3cb6cdb9
package
com
.
gic
.
haoban
.
manage
.
api
.
service
;
import
com.gic.api.base.commons.Page
;
import
com.gic.haoban.base.api.common.BasePageInfo
;
import
com.gic.haoban.manage.api.dto.AuditDTO
;
/**
* Created by tgs on 2020/2/9.
*/
public
interface
AuditApiService
{
Page
<
AuditDTO
>
page
(
Integer
auditType
,
String
search
,
String
enterpriseId
,
BasePageInfo
pageInfo
);
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/dao/mapper/AuditMapper.java
View file @
3cb6cdb9
package
com
.
gic
.
haoban
.
manage
.
service
.
dao
.
mapper
;
import
java.util.List
;
import
com.gic.haoban.manage.api.dto.AuditDTO
;
import
com.gic.haoban.manage.service.entity.TabHaobanAudit
;
import
com.github.pagehelper.Page
;
public
interface
AuditMapper
{
int
deleteByPrimaryKey
(
Integer
auditId
);
...
...
@@ -13,7 +17,8 @@ public interface AuditMapper {
int
updateByPrimaryKeySelective
(
TabHaobanAudit
record
);
int
updateByPrimaryKeyWithBLOBs
(
TabHaobanAudit
record
);
int
updateByPrimaryKey
(
TabHaobanAudit
record
);
Page
<
TabHaobanAudit
>
page
(
Integer
auditType
,
List
<
String
>
storeIds
,
List
<
String
>
staffIds
,
String
enterpriseId
);
}
\ No newline at end of file
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/entity/TabHaobanAudit.java
View file @
3cb6cdb9
...
...
@@ -20,6 +20,10 @@ public class TabHaobanAudit implements Serializable {
private
String
changeField
;
private
String
oldValue
;
private
String
newValue
;
private
Date
commitTime
;
private
String
enterpriseId
;
...
...
@@ -30,10 +34,6 @@ public class TabHaobanAudit implements Serializable {
private
String
auditReason
;
private
String
oldValue
;
private
String
newValue
;
private
static
final
long
serialVersionUID
=
1L
;
public
Integer
getAuditId
()
{
...
...
@@ -100,6 +100,22 @@ public class TabHaobanAudit implements Serializable {
this
.
changeField
=
changeField
==
null
?
null
:
changeField
.
trim
();
}
public
String
getOldValue
()
{
return
oldValue
;
}
public
void
setOldValue
(
String
oldValue
)
{
this
.
oldValue
=
oldValue
==
null
?
null
:
oldValue
.
trim
();
}
public
String
getNewValue
()
{
return
newValue
;
}
public
void
setNewValue
(
String
newValue
)
{
this
.
newValue
=
newValue
==
null
?
null
:
newValue
.
trim
();
}
public
Date
getCommitTime
()
{
return
commitTime
;
}
...
...
@@ -139,20 +155,4 @@ public class TabHaobanAudit implements Serializable {
public
void
setAuditReason
(
String
auditReason
)
{
this
.
auditReason
=
auditReason
==
null
?
null
:
auditReason
.
trim
();
}
public
String
getOldValue
()
{
return
oldValue
;
}
public
void
setOldValue
(
String
oldValue
)
{
this
.
oldValue
=
oldValue
==
null
?
null
:
oldValue
.
trim
();
}
public
String
getNewValue
()
{
return
newValue
;
}
public
void
setNewValue
(
String
newValue
)
{
this
.
newValue
=
newValue
==
null
?
null
:
newValue
.
trim
();
}
}
\ No newline at end of file
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/AuditApiServiceImpl.java
0 → 100644
View file @
3cb6cdb9
package
com
.
gic
.
haoban
.
manage
.
service
.
service
.
out
.
impl
;
import
java.util.ArrayList
;
import
java.util.List
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
com.gic.api.base.commons.Page
;
import
com.gic.haoban.base.api.common.BasePageInfo
;
import
com.gic.haoban.common.utils.PageUtil
;
import
com.gic.haoban.manage.api.dto.AuditDTO
;
import
com.gic.haoban.manage.api.service.AuditApiService
;
import
com.gic.haoban.manage.service.dao.mapper.AuditMapper
;
import
com.gic.haoban.manage.service.entity.TabHaobanAudit
;
import
com.github.pagehelper.PageHelper
;
/**
* Created by tgs on 2020/2/9.
*/
public
class
AuditApiServiceImpl
implements
AuditApiService
{
@Autowired
private
AuditMapper
auditMapper
;
@Override
public
Page
<
AuditDTO
>
page
(
Integer
auditType
,
String
search
,
String
enterpriseId
,
BasePageInfo
pageInfo
)
{
//TODO 通过search模糊查找storeIds,和staffIds
List
<
String
>
storeIds
=
new
ArrayList
<>();
List
<
String
>
staffIds
=
new
ArrayList
<>();
PageHelper
.
startPage
(
pageInfo
.
getPageNum
(),
pageInfo
.
getPageSize
());
com
.
github
.
pagehelper
.
Page
<
TabHaobanAudit
>
page
=
auditMapper
.
page
(
auditType
,
storeIds
,
staffIds
,
enterpriseId
);
return
PageUtil
.
changePageHelperToCurrentPage
(
page
,
AuditDTO
.
class
);
}
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/DictServiceImpl.java
→
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/Dict
Api
ServiceImpl.java
View file @
3cb6cdb9
...
...
@@ -18,7 +18,7 @@ import com.github.pagehelper.PageHelper;
/**
* Created by tgs on 2020/2/9.
*/
public
class
DictServiceImpl
implements
DictApiService
{
public
class
Dict
Api
ServiceImpl
implements
DictApiService
{
@Autowired
private
DictMapper
dictMapper
;
@Override
...
...
haoban-manage3-service/src/main/resources/dubbo-haoban-manage-service.xml
View file @
3cb6cdb9
...
...
@@ -35,6 +35,7 @@
<dubbo:service
interface=
"com.gic.haoban.manage.api.service.ApplicationSettingApiService"
ref=
"applicationSettingApiServiceImpl"
timeout=
"10000"
/>
<dubbo:service
interface=
"com.gic.haoban.manage.api.service.AuditSettingApiService"
ref=
"auditSettingApiServiceImpl"
timeout=
"10000"
/>
<dubbo:service
interface=
"com.gic.haoban.manage.api.service.DictApiService"
ref=
"dictApiServiceImpl"
timeout=
"10000"
/>
<dubbo:service
interface=
"com.gic.haoban.manage.api.service.AuditApiService"
ref=
"auditApiServiceImpl"
timeout=
"10000"
/>
<dubbo:reference
interface=
"com.gic.enterprise.api.service.DepartmentService"
id=
"gicDepartmentService"
/>
...
...
haoban-manage3-service/src/main/resources/mapper/AuditMapper.xml
View file @
3cb6cdb9
...
...
@@ -10,29 +10,22 @@
<result
column=
"commit_staff_img"
property=
"commitStaffImg"
jdbcType=
"VARCHAR"
/>
<result
column=
"commit_store_id"
property=
"commitStoreId"
jdbcType=
"VARCHAR"
/>
<result
column=
"change_field"
property=
"changeField"
jdbcType=
"VARCHAR"
/>
<result
column=
"old_value"
property=
"oldValue"
jdbcType=
"VARCHAR"
/>
<result
column=
"new_value"
property=
"newValue"
jdbcType=
"VARCHAR"
/>
<result
column=
"commit_time"
property=
"commitTime"
jdbcType=
"TIMESTAMP"
/>
<result
column=
"enterprise_id"
property=
"enterpriseId"
jdbcType=
"VARCHAR"
/>
<result
column=
"audit_name"
property=
"auditName"
jdbcType=
"VARCHAR"
/>
<result
column=
"audit_status"
property=
"auditStatus"
jdbcType=
"INTEGER"
/>
<result
column=
"audit_reason"
property=
"auditReason"
jdbcType=
"VARCHAR"
/>
</resultMap>
<resultMap
id=
"ResultMapWithBLOBs"
type=
"com.gic.haoban.manage.service.entity.TabHaobanAudit"
extends=
"BaseResultMap"
>
<result
column=
"old_value"
property=
"oldValue"
jdbcType=
"LONGVARCHAR"
/>
<result
column=
"new_value"
property=
"newValue"
jdbcType=
"LONGVARCHAR"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
audit_id, audit_type, commit_name, commit_staff_id, commit_staff_name, commit_staff_img,
commit_store_id, change_field, commit_time, enterprise_id, audit_name, audit_status,
audit_reason
</sql>
<sql
id=
"Blob_Column_List"
>
old_value, new_value
commit_store_id, change_field, old_value, new_value, commit_time, enterprise_id,
audit_name, audit_status, audit_reason
</sql>
<select
id=
"selectByPrimaryKey"
resultMap=
"
ResultMapWithBLOBs
"
parameterType=
"java.lang.Integer"
>
<select
id=
"selectByPrimaryKey"
resultMap=
"
BaseResultMap
"
parameterType=
"java.lang.Integer"
>
select
<include
refid=
"Base_Column_List"
/>
,
<include
refid=
"Blob_Column_List"
/>
from tab_haoban_audit
where audit_id = #{auditId,jdbcType=INTEGER}
</select>
...
...
@@ -43,15 +36,15 @@
<insert
id=
"insert"
parameterType=
"com.gic.haoban.manage.service.entity.TabHaobanAudit"
>
insert into tab_haoban_audit (audit_id, audit_type, commit_name,
commit_staff_id, commit_staff_name, commit_staff_img,
commit_store_id, change_field,
commit_tim
e,
enterprise_id, audit_name, audit_status
,
audit_
reason, old_value, new_value
commit_store_id, change_field,
old_valu
e,
new_value, commit_time, enterprise_id
,
audit_
name, audit_status, audit_reason
)
values (#{auditId,jdbcType=INTEGER}, #{auditType,jdbcType=INTEGER}, #{commitName,jdbcType=VARCHAR},
#{commitStaffId,jdbcType=INTEGER}, #{commitStaffName,jdbcType=VARCHAR}, #{commitStaffImg,jdbcType=VARCHAR},
#{commitStoreId,jdbcType=VARCHAR}, #{changeField,jdbcType=VARCHAR}, #{
commitTime,jdbcType=TIMESTAMP
},
#{
enterpriseId,jdbcType=VARCHAR}, #{auditName,jdbcType=VARCHAR}, #{auditStatus,jdbcType=INTEGE
R},
#{audit
Reason,jdbcType=VARCHAR}, #{oldValue,jdbcType=LONGVARCHAR}, #{newValue,jdbcType=LONG
VARCHAR}
#{commitStoreId,jdbcType=VARCHAR}, #{changeField,jdbcType=VARCHAR}, #{
oldValue,jdbcType=VARCHAR
},
#{
newValue,jdbcType=VARCHAR}, #{commitTime,jdbcType=TIMESTAMP}, #{enterpriseId,jdbcType=VARCHA
R},
#{audit
Name,jdbcType=VARCHAR}, #{auditStatus,jdbcType=INTEGER}, #{auditReason,jdbcType=
VARCHAR}
)
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.gic.haoban.manage.service.entity.TabHaobanAudit"
>
...
...
@@ -81,6 +74,12 @@
<if
test=
"changeField != null"
>
change_field,
</if>
<if
test=
"oldValue != null"
>
old_value,
</if>
<if
test=
"newValue != null"
>
new_value,
</if>
<if
test=
"commitTime != null"
>
commit_time,
</if>
...
...
@@ -96,12 +95,6 @@
<if
test=
"auditReason != null"
>
audit_reason,
</if>
<if
test=
"oldValue != null"
>
old_value,
</if>
<if
test=
"newValue != null"
>
new_value,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"auditId != null"
>
...
...
@@ -128,6 +121,12 @@
<if
test=
"changeField != null"
>
#{changeField,jdbcType=VARCHAR},
</if>
<if
test=
"oldValue != null"
>
#{oldValue,jdbcType=VARCHAR},
</if>
<if
test=
"newValue != null"
>
#{newValue,jdbcType=VARCHAR},
</if>
<if
test=
"commitTime != null"
>
#{commitTime,jdbcType=TIMESTAMP},
</if>
...
...
@@ -143,12 +142,6 @@
<if
test=
"auditReason != null"
>
#{auditReason,jdbcType=VARCHAR},
</if>
<if
test=
"oldValue != null"
>
#{oldValue,jdbcType=LONGVARCHAR},
</if>
<if
test=
"newValue != null"
>
#{newValue,jdbcType=LONGVARCHAR},
</if>
</trim>
</insert>
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.gic.haoban.manage.service.entity.TabHaobanAudit"
>
...
...
@@ -175,6 +168,12 @@
<if
test=
"changeField != null"
>
change_field = #{changeField,jdbcType=VARCHAR},
</if>
<if
test=
"oldValue != null"
>
old_value = #{oldValue,jdbcType=VARCHAR},
</if>
<if
test=
"newValue != null"
>
new_value = #{newValue,jdbcType=VARCHAR},
</if>
<if
test=
"commitTime != null"
>
commit_time = #{commitTime,jdbcType=TIMESTAMP},
</if>
...
...
@@ -190,33 +189,9 @@
<if
test=
"auditReason != null"
>
audit_reason = #{auditReason,jdbcType=VARCHAR},
</if>
<if
test=
"oldValue != null"
>
old_value = #{oldValue,jdbcType=LONGVARCHAR},
</if>
<if
test=
"newValue != null"
>
new_value = #{newValue,jdbcType=LONGVARCHAR},
</if>
</set>
where audit_id = #{auditId,jdbcType=INTEGER}
</update>
<update
id=
"updateByPrimaryKeyWithBLOBs"
parameterType=
"com.gic.haoban.manage.service.entity.TabHaobanAudit"
>
update tab_haoban_audit
set audit_type = #{auditType,jdbcType=INTEGER},
commit_name = #{commitName,jdbcType=VARCHAR},
commit_staff_id = #{commitStaffId,jdbcType=INTEGER},
commit_staff_name = #{commitStaffName,jdbcType=VARCHAR},
commit_staff_img = #{commitStaffImg,jdbcType=VARCHAR},
commit_store_id = #{commitStoreId,jdbcType=VARCHAR},
change_field = #{changeField,jdbcType=VARCHAR},
commit_time = #{commitTime,jdbcType=TIMESTAMP},
enterprise_id = #{enterpriseId,jdbcType=VARCHAR},
audit_name = #{auditName,jdbcType=VARCHAR},
audit_status = #{auditStatus,jdbcType=INTEGER},
audit_reason = #{auditReason,jdbcType=VARCHAR},
old_value = #{oldValue,jdbcType=LONGVARCHAR},
new_value = #{newValue,jdbcType=LONGVARCHAR}
where audit_id = #{auditId,jdbcType=INTEGER}
</update>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.gic.haoban.manage.service.entity.TabHaobanAudit"
>
update tab_haoban_audit
set audit_type = #{auditType,jdbcType=INTEGER},
...
...
@@ -226,6 +201,8 @@
commit_staff_img = #{commitStaffImg,jdbcType=VARCHAR},
commit_store_id = #{commitStoreId,jdbcType=VARCHAR},
change_field = #{changeField,jdbcType=VARCHAR},
old_value = #{oldValue,jdbcType=VARCHAR},
new_value = #{newValue,jdbcType=VARCHAR},
commit_time = #{commitTime,jdbcType=TIMESTAMP},
enterprise_id = #{enterpriseId,jdbcType=VARCHAR},
audit_name = #{auditName,jdbcType=VARCHAR},
...
...
@@ -233,4 +210,35 @@
audit_reason = #{auditReason,jdbcType=VARCHAR}
where audit_id = #{auditId,jdbcType=INTEGER}
</update>
<sql
id=
"storeSql"
>
<if
test=
"null != storeIds and storeIds.size gt 0"
>
and commit_store_id in
<foreach
collection=
"storeIds"
index=
"index"
item=
"item"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
</if>
</sql>
<sql
id=
"staffSql"
>
<if
test=
"null != staffIds and staffIds.size gt 0"
>
and commit_staff_id in
<foreach
collection=
"staffIds"
index=
"index"
item=
"item"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
</if>
</sql>
<select
id=
"page"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_haoban_audit
where 1=1
<if
test =
"audit_type != null"
>
and audit_type = #{auditType,jdbcType=INTEGER}
</if>
<if
test =
"audit_status != null"
>
and audit_status = #{auditStatus,jdbcType=INTEGER}
</if>
<include
refid=
"storeSql"
/>
<include
refid=
"staffSql"
/>
</select>
</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