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
0998f554
Commit
0998f554
authored
Mar 18, 2020
by
huangZW
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
111
parent
f714a8dd
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
112 additions
and
70 deletions
+112
-70
AuditApiService.java
...va/com/gic/haoban/manage/api/service/AuditApiService.java
+3
-0
TabHaobanAuditMapper.java
...aoban/manage/service/dao/mapper/TabHaobanAuditMapper.java
+3
-11
TabHaobanAudit.java
.../com/gic/haoban/manage/service/entity/TabHaobanAudit.java
+39
-8
AuditApiServiceImpl.java
.../manage/service/service/out/impl/AuditApiServiceImpl.java
+13
-0
TabHaobanAuditMapper.xml
...ervice/src/main/resources/mapper/TabHaobanAuditMapper.xml
+54
-51
No files found.
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/service/AuditApiService.java
View file @
0998f554
...
...
@@ -12,4 +12,7 @@ public interface AuditApiService {
Page
<
AuditDTO
>
page
(
Integer
auditType
,
String
search
,
String
enterpriseId
,
Integer
auditStatus
,
BasePageInfo
pageInfo
);
void
audit
(
String
auditId
);
void
refuse
(
String
auditId
,
String
auditReason
);
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/dao/mapper/AuditMapper.java
→
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/dao/mapper/
TabHaoban
AuditMapper.java
View file @
0998f554
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
);
public
interface
TabHaoban
AuditMapper
{
int
deleteByPrimaryKey
(
String
auditId
);
int
insert
(
TabHaobanAudit
record
);
int
insertSelective
(
TabHaobanAudit
record
);
TabHaobanAudit
selectByPrimaryKey
(
Integer
auditId
);
TabHaobanAudit
selectByPrimaryKey
(
String
auditId
);
int
updateByPrimaryKeySelective
(
TabHaobanAudit
record
);
int
updateByPrimaryKey
(
TabHaobanAudit
record
);
Page
<
TabHaobanAudit
>
page
(
Integer
auditType
,
List
<
String
>
storeIds
,
List
<
String
>
staffIds
,
String
enterpriseId
,
Integer
auditStatus
);
}
\ No newline at end of file
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/entity/TabHaobanAudit.java
View file @
0998f554
...
...
@@ -4,13 +4,13 @@ import java.io.Serializable;
import
java.util.Date
;
public
class
TabHaobanAudit
implements
Serializable
{
private
Integer
auditId
;
private
String
auditId
;
private
Integer
auditType
;
private
String
commitName
;
private
Integer
commitStaffId
;
private
String
commitStaffId
;
private
String
commitStaffName
;
...
...
@@ -34,14 +34,20 @@ public class TabHaobanAudit implements Serializable {
private
String
auditReason
;
private
Date
createTime
;
private
Date
updateTime
;
private
Integer
statusFlag
;
private
static
final
long
serialVersionUID
=
1L
;
public
Integer
getAuditId
()
{
public
String
getAuditId
()
{
return
auditId
;
}
public
void
setAuditId
(
Integer
auditId
)
{
this
.
auditId
=
auditId
;
public
void
setAuditId
(
String
auditId
)
{
this
.
auditId
=
auditId
==
null
?
null
:
auditId
.
trim
()
;
}
public
Integer
getAuditType
()
{
...
...
@@ -60,12 +66,12 @@ public class TabHaobanAudit implements Serializable {
this
.
commitName
=
commitName
==
null
?
null
:
commitName
.
trim
();
}
public
Integer
getCommitStaffId
()
{
public
String
getCommitStaffId
()
{
return
commitStaffId
;
}
public
void
setCommitStaffId
(
Integer
commitStaffId
)
{
this
.
commitStaffId
=
commitStaffId
;
public
void
setCommitStaffId
(
String
commitStaffId
)
{
this
.
commitStaffId
=
commitStaffId
==
null
?
null
:
commitStaffId
.
trim
()
;
}
public
String
getCommitStaffName
()
{
...
...
@@ -155,4 +161,28 @@ public class TabHaobanAudit implements Serializable {
public
void
setAuditReason
(
String
auditReason
)
{
this
.
auditReason
=
auditReason
==
null
?
null
:
auditReason
.
trim
();
}
public
Date
getCreateTime
()
{
return
createTime
;
}
public
void
setCreateTime
(
Date
createTime
)
{
this
.
createTime
=
createTime
;
}
public
Date
getUpdateTime
()
{
return
updateTime
;
}
public
void
setUpdateTime
(
Date
updateTime
)
{
this
.
updateTime
=
updateTime
;
}
public
Integer
getStatusFlag
()
{
return
statusFlag
;
}
public
void
setStatusFlag
(
Integer
statusFlag
)
{
this
.
statusFlag
=
statusFlag
;
}
}
\ No newline at end of file
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/AuditApiServiceImpl.java
View file @
0998f554
...
...
@@ -30,4 +30,17 @@ public class AuditApiServiceImpl implements AuditApiService{
com
.
github
.
pagehelper
.
Page
<
TabHaobanAudit
>
page
=
auditMapper
.
page
(
auditType
,
storeIds
,
staffIds
,
enterpriseId
,
auditStatus
);
return
PageUtil
.
changePageHelperToCurrentPage
(
page
,
AuditDTO
.
class
);
}
@Override
public
void
audit
(
String
auditId
)
{
TabHaobanAudit
tab
=
new
TabHaobanAudit
();
tab
.
setAuditId
(
auditId
);
tab
.
setAuditStatus
(
1
);
tab
.
set
auditMapper
.
updateByPrimaryKeySelective
(
tab
);
}
@Override
public
void
refuse
(
String
auditId
,
String
auditReason
)
{
// TODO Auto-generated method stub
}
}
haoban-manage3-service/src/main/resources/mapper/AuditMapper.xml
→
haoban-manage3-service/src/main/resources/mapper/
TabHaoban
AuditMapper.xml
View file @
0998f554
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper
namespace=
"com.gic.haoban.manage.service.dao.mapper.AuditMapper"
>
<mapper
namespace=
"com.gic.haoban.manage.service.dao.mapper.
TabHaoban
AuditMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.gic.haoban.manage.service.entity.TabHaobanAudit"
>
<id
column=
"audit_id"
property=
"auditId"
jdbcType=
"
INTEGE
R"
/>
<id
column=
"audit_id"
property=
"auditId"
jdbcType=
"
VARCHA
R"
/>
<result
column=
"audit_type"
property=
"auditType"
jdbcType=
"INTEGER"
/>
<result
column=
"commit_name"
property=
"commitName"
jdbcType=
"VARCHAR"
/>
<result
column=
"commit_staff_id"
property=
"commitStaffId"
jdbcType=
"
INTEGE
R"
/>
<result
column=
"commit_staff_id"
property=
"commitStaffId"
jdbcType=
"
VARCHA
R"
/>
<result
column=
"commit_staff_name"
property=
"commitStaffName"
jdbcType=
"VARCHAR"
/>
<result
column=
"commit_staff_img"
property=
"commitStaffImg"
jdbcType=
"VARCHAR"
/>
<result
column=
"commit_store_id"
property=
"commitStoreId"
jdbcType=
"VARCHAR"
/>
...
...
@@ -17,34 +17,39 @@
<result
column=
"audit_name"
property=
"auditName"
jdbcType=
"VARCHAR"
/>
<result
column=
"audit_status"
property=
"auditStatus"
jdbcType=
"INTEGER"
/>
<result
column=
"audit_reason"
property=
"auditReason"
jdbcType=
"VARCHAR"
/>
<result
column=
"create_time"
property=
"createTime"
jdbcType=
"TIMESTAMP"
/>
<result
column=
"update_time"
property=
"updateTime"
jdbcType=
"TIMESTAMP"
/>
<result
column=
"status_flag"
property=
"statusFlag"
jdbcType=
"INTEGER"
/>
</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, old_value, new_value, commit_time, enterprise_id,
audit_name, audit_status, audit_reason
audit_name, audit_status, audit_reason
, create_time, update_time, status_flag
</sql>
<select
id=
"selectByPrimaryKey"
resultMap=
"BaseResultMap"
parameterType=
"java.lang.
Integer
"
>
<select
id=
"selectByPrimaryKey"
resultMap=
"BaseResultMap"
parameterType=
"java.lang.
String
"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_haoban_audit
where audit_id = #{auditId,jdbcType=
INTEGE
R}
where audit_id = #{auditId,jdbcType=
VARCHA
R}
</select>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.
Integer
"
>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.
String
"
>
delete from tab_haoban_audit
where audit_id = #{auditId,jdbcType=
INTEGE
R}
where audit_id = #{auditId,jdbcType=
VARCHA
R}
</delete>
<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, old_value,
new_value, commit_time, enterprise_id,
audit_name, audit_status, audit_reason
audit_name, audit_status, audit_reason,
create_time, update_time, status_flag
)
values (#{auditId,jdbcType=
INTEGE
R}, #{auditType,jdbcType=INTEGER}, #{commitName,jdbcType=VARCHAR},
#{commitStaffId,jdbcType=
INTEGE
R}, #{commitStaffName,jdbcType=VARCHAR}, #{commitStaffImg,jdbcType=VARCHAR},
values (#{auditId,jdbcType=
VARCHA
R}, #{auditType,jdbcType=INTEGER}, #{commitName,jdbcType=VARCHAR},
#{commitStaffId,jdbcType=
VARCHA
R}, #{commitStaffName,jdbcType=VARCHAR}, #{commitStaffImg,jdbcType=VARCHAR},
#{commitStoreId,jdbcType=VARCHAR}, #{changeField,jdbcType=VARCHAR}, #{oldValue,jdbcType=VARCHAR},
#{newValue,jdbcType=VARCHAR}, #{commitTime,jdbcType=TIMESTAMP}, #{enterpriseId,jdbcType=VARCHAR},
#{auditName,jdbcType=VARCHAR}, #{auditStatus,jdbcType=INTEGER}, #{auditReason,jdbcType=VARCHAR}
#{auditName,jdbcType=VARCHAR}, #{auditStatus,jdbcType=INTEGER}, #{auditReason,jdbcType=VARCHAR},
#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, #{statusFlag,jdbcType=INTEGER}
)
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.gic.haoban.manage.service.entity.TabHaobanAudit"
>
...
...
@@ -95,10 +100,19 @@
<if
test=
"auditReason != null"
>
audit_reason,
</if>
<if
test=
"createTime != null"
>
create_time,
</if>
<if
test=
"updateTime != null"
>
update_time,
</if>
<if
test=
"statusFlag != null"
>
status_flag,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"auditId != null"
>
#{auditId,jdbcType=
INTEGE
R},
#{auditId,jdbcType=
VARCHA
R},
</if>
<if
test=
"auditType != null"
>
#{auditType,jdbcType=INTEGER},
...
...
@@ -107,7 +121,7 @@
#{commitName,jdbcType=VARCHAR},
</if>
<if
test=
"commitStaffId != null"
>
#{commitStaffId,jdbcType=
INTEGE
R},
#{commitStaffId,jdbcType=
VARCHA
R},
</if>
<if
test=
"commitStaffName != null"
>
#{commitStaffName,jdbcType=VARCHAR},
...
...
@@ -142,6 +156,15 @@
<if
test=
"auditReason != null"
>
#{auditReason,jdbcType=VARCHAR},
</if>
<if
test=
"createTime != null"
>
#{createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"updateTime != null"
>
#{updateTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"statusFlag != null"
>
#{statusFlag,jdbcType=INTEGER},
</if>
</trim>
</insert>
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.gic.haoban.manage.service.entity.TabHaobanAudit"
>
...
...
@@ -154,7 +177,7 @@
commit_name = #{commitName,jdbcType=VARCHAR},
</if>
<if
test=
"commitStaffId != null"
>
commit_staff_id = #{commitStaffId,jdbcType=
INTEGE
R},
commit_staff_id = #{commitStaffId,jdbcType=
VARCHA
R},
</if>
<if
test=
"commitStaffName != null"
>
commit_staff_name = #{commitStaffName,jdbcType=VARCHAR},
...
...
@@ -189,14 +212,23 @@
<if
test=
"auditReason != null"
>
audit_reason = #{auditReason,jdbcType=VARCHAR},
</if>
<if
test=
"createTime != null"
>
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"updateTime != null"
>
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"statusFlag != null"
>
status_flag = #{statusFlag,jdbcType=INTEGER},
</if>
</set>
where audit_id = #{auditId,jdbcType=
INTEGE
R}
where audit_id = #{auditId,jdbcType=
VARCHA
R}
</update>
<update
id=
"updateByPrimaryKey"
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=
INTEGE
R},
commit_staff_id = #{commitStaffId,jdbcType=
VARCHA
R},
commit_staff_name = #{commitStaffName,jdbcType=VARCHAR},
commit_staff_img = #{commitStaffImg,jdbcType=VARCHAR},
commit_store_id = #{commitStoreId,jdbcType=VARCHAR},
...
...
@@ -207,38 +239,10 @@
enterprise_id = #{enterpriseId,jdbcType=VARCHAR},
audit_name = #{auditName,jdbcType=VARCHAR},
audit_status = #{auditStatus,jdbcType=INTEGER},
audit_reason = #{auditReason,jdbcType=VARCHAR}
where audit_id = #{auditId,jdbcType=INTEGER}
audit_reason = #{auditReason,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP},
status_flag = #{statusFlag,jdbcType=INTEGER}
where audit_id = #{auditId,jdbcType=VARCHAR}
</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