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
cd895823
Commit
cd895823
authored
Oct 13, 2022
by
墨竹
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:审核增加企业id查询
parent
d0b0eeb5
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
57 additions
and
25 deletions
+57
-25
AuditApiService.java
...va/com/gic/haoban/manage/api/service/AuditApiService.java
+3
-3
TabHaobanAuditMapper.java
...aoban/manage/service/dao/mapper/TabHaobanAuditMapper.java
+25
-6
AuditApiServiceImpl.java
.../manage/service/service/out/impl/AuditApiServiceImpl.java
+6
-7
StaffClerkRelationApiServiceImpl.java
...ce/service/out/impl/StaffClerkRelationApiServiceImpl.java
+2
-1
TabHaobanAuditMapper.xml
...ervice/src/main/resources/mapper/TabHaobanAuditMapper.xml
+12
-0
WxStaffController.java
...m/gic/haoban/manage/web/controller/WxStaffController.java
+9
-8
No files found.
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/service/AuditApiService.java
View file @
cd895823
...
...
@@ -29,7 +29,7 @@ public interface AuditApiService {
void
insert
(
AuditDTO
audit
);
Page
<
AuditDTO
>
listByStaffId
(
String
staffId
,
Integer
auditType
,
Integer
auditStatus
,
BasePageInfo
pageInfo
);
Page
<
AuditDTO
>
listByStaffId
(
String
staffId
,
Integer
auditType
,
Integer
auditStatus
,
String
enterpriseId
,
BasePageInfo
pageInfo
);
Page
<
AuditDTO
>
pageStoreListByParams
(
List
<
String
>
storeIds
,
BasePageInfo
pageInfo
,
Integer
auditType
,
Integer
auditStatus
,
String
wxEnterpriseId
,
String
enterpriseId
);
...
...
@@ -40,9 +40,9 @@ public interface AuditApiService {
List
<
BatchAuditLogDTO
>
listBatchLog
(
String
batchId
);
AuditDTO
findByBindRelatedIdAndAuditType
(
String
relatedId
,
int
auditType
);
AuditDTO
findByBindRelatedIdAndAuditType
(
String
clerkId
,
int
auditType
,
String
wxEnterpriseId
,
String
enterpriseId
);
boolean
judgeHavePhoneNumberOrCode
(
String
enterpriseId
,
String
clerkCode
,
String
phoneNumber
);
boolean
judgeHavePhoneNumberOrCode
(
String
enterpriseId
,
String
clerkCode
,
String
phoneNumber
,
String
wxEnterpriseId
);
int
getAuditCount
(
String
wxEnterpriseId
,
String
enterpriseId
,
String
clerkId
)
;
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/dao/mapper/TabHaobanAuditMapper.java
View file @
cd895823
...
...
@@ -14,13 +14,23 @@ public interface TabHaobanAuditMapper {
int
updateByPrimaryKeySelective
(
TabHaobanAudit
record
);
Page
<
TabHaobanAudit
>
page
(
@Param
(
"wxEnterpriseId"
)
String
wxEnterpriseId
,
@Param
(
"auditType"
)
Integer
auditType
,
@Param
(
"storeIds"
)
List
<
String
>
storeIds
,
@Param
(
"searchParams"
)
String
search
,
@Param
(
"enterpriseId"
)
String
enterpriseId
,
@Param
(
"auditStatus"
)
Integer
auditStatus
,
@Param
(
"auditFlag"
)
Integer
auditFlag
);
Page
<
TabHaobanAudit
>
page
(
@Param
(
"wxEnterpriseId"
)
String
wxEnterpriseId
,
@Param
(
"auditType"
)
Integer
auditType
,
@Param
(
"storeIds"
)
List
<
String
>
storeIds
,
@Param
(
"searchParams"
)
String
search
,
@Param
(
"enterpriseId"
)
String
enterpriseId
,
@Param
(
"auditStatus"
)
Integer
auditStatus
,
@Param
(
"auditFlag"
)
Integer
auditFlag
);
List
<
TabHaobanAudit
>
listByStoreId
(
String
storeId
);
TabHaobanAudit
findByStoreIdAndChangeField
(
@Param
(
"storeId"
)
String
storeId
,
@Param
(
"changeField"
)
String
changeField
);
TabHaobanAudit
findByStoreIdAndChangeField
(
@Param
(
"storeId"
)
String
storeId
,
@Param
(
"changeField"
)
String
changeField
);
com
.
github
.
pagehelper
.
Page
listByStaffId
(
@Param
(
"staffId"
)
String
staffId
,
@Param
(
"auditType"
)
Integer
auditType
,
@Param
(
"auditStatus"
)
Integer
auditStatus
);
com
.
github
.
pagehelper
.
Page
listByStaffId
(
@Param
(
"staffId"
)
String
staffId
,
@Param
(
"auditType"
)
Integer
auditType
,
@Param
(
"auditStatus"
)
Integer
auditStatus
,
@Param
(
"enterpriseId"
)
String
enterpriseId
);
com
.
github
.
pagehelper
.
Page
pageStoreListByParams
(
@Param
(
"storeIds"
)
List
<
String
>
storeIds
,
@Param
(
"auditType"
)
Integer
auditType
,
...
...
@@ -28,9 +38,17 @@ public interface TabHaobanAuditMapper {
@Param
(
"wxEnterpriseId"
)
String
wxEnterpriseId
,
@Param
(
"enterpriseId"
)
String
enterpriseId
);
TabHaobanAudit
findByBindRelatedIdAndAuditType
(
@Param
(
"relatedId"
)
String
relatedId
,
@Param
(
"auditType"
)
int
auditType
);
TabHaobanAudit
findByBindRelatedIdAndAuditType
(
@Param
(
"relatedId"
)
String
relatedId
,
@Param
(
"auditType"
)
int
auditType
,
@Param
(
"wxEnterpriseId"
)
String
wxEnterpriseId
,
@Param
(
"enterpriseId"
)
String
enterpriseId
);
List
<
TabHaobanAudit
>
judgeHavePhoneNumberOrCode
(
@Param
(
"enterpriseId"
)
String
enterpriseId
,
@Param
(
"clerkCode"
)
String
clerkCode
,
@Param
(
"phoneNumber"
)
String
phoneNumber
);
List
<
TabHaobanAudit
>
judgeHavePhoneNumberOrCode
(
@Param
(
"enterpriseId"
)
String
enterpriseId
,
@Param
(
"clerkCode"
)
String
clerkCode
,
@Param
(
"phoneNumber"
)
String
phoneNumber
,
@Param
(
"wxEnterpriseId"
)
String
wxEnterpriseId
);
int
getAuditCount
(
@Param
(
"wxEnterpriseId"
)
String
wxEnterpriseId
,
@Param
(
"enterpriseId"
)
String
enterpriseId
,
@Param
(
"storeIds"
)
List
<
String
>
storeIds
);
int
getAuditCount
(
@Param
(
"wxEnterpriseId"
)
String
wxEnterpriseId
,
@Param
(
"enterpriseId"
)
String
enterpriseId
,
@Param
(
"storeIds"
)
List
<
String
>
storeIds
);
}
\ No newline at end of file
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/AuditApiServiceImpl.java
View file @
cd895823
...
...
@@ -396,9 +396,9 @@ public class AuditApiServiceImpl implements AuditApiService {
}
@Override
public
Page
<
AuditDTO
>
listByStaffId
(
String
staffId
,
Integer
auditType
,
Integer
auditStatus
,
BasePageInfo
pageInfo
)
{
public
Page
<
AuditDTO
>
listByStaffId
(
String
staffId
,
Integer
auditType
,
Integer
auditStatus
,
String
enterpriseId
,
BasePageInfo
pageInfo
)
{
PageHelper
.
startPage
(
pageInfo
.
getPageNum
(),
pageInfo
.
getPageSize
());
return
PageUtil
.
changePageHelperToCurrentPage
(
auditMapper
.
listByStaffId
(
staffId
,
auditType
,
auditStatus
),
AuditDTO
.
class
);
return
PageUtil
.
changePageHelperToCurrentPage
(
auditMapper
.
listByStaffId
(
staffId
,
auditType
,
auditStatus
,
enterpriseId
),
AuditDTO
.
class
);
}
@Override
...
...
@@ -443,16 +443,15 @@ public class AuditApiServiceImpl implements AuditApiService {
}
@Override
public
AuditDTO
findByBindRelatedIdAndAuditType
(
String
relatedId
,
int
auditType
)
{
TabHaobanAudit
tab
=
auditMapper
.
findByBindRelatedIdAndAuditType
(
relatedId
,
auditType
);
public
AuditDTO
findByBindRelatedIdAndAuditType
(
String
relatedId
,
int
auditType
,
String
wxEnterpriseId
,
String
enterpriseId
)
{
TabHaobanAudit
tab
=
auditMapper
.
findByBindRelatedIdAndAuditType
(
relatedId
,
auditType
,
wxEnterpriseId
,
enterpriseId
);
return
EntityUtil
.
changeEntityByJSON
(
AuditDTO
.
class
,
tab
);
}
@Override
public
boolean
judgeHavePhoneNumberOrCode
(
String
enterpriseId
,
String
clerkCode
,
String
phoneNumber
)
{
List
<
TabHaobanAudit
>
list
=
auditMapper
.
judgeHavePhoneNumberOrCode
(
enterpriseId
,
clerkCode
,
phoneNumber
);
String
clerkCode
,
String
phoneNumber
,
String
wxEnterpriseId
)
{
List
<
TabHaobanAudit
>
list
=
auditMapper
.
judgeHavePhoneNumberOrCode
(
enterpriseId
,
clerkCode
,
phoneNumber
,
wxEnterpriseId
);
return
!
CollectionUtil
.
isEmpty
(
list
);
}
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/StaffClerkRelationApiServiceImpl.java
View file @
cd895823
...
...
@@ -165,6 +165,7 @@ public class StaffClerkRelationApiServiceImpl implements StaffClerkRelationApiSe
logger
.
info
(
"开始绑定clerk:{}"
,
JSONObject
.
toJSONString
(
staffClerkRelationDTO
));
String
clerkId
=
staffClerkRelationDTO
.
getClerkId
();
String
wxEnterpriseId
=
staffClerkRelationDTO
.
getWxEnterpriseId
();
String
enterpriseId
=
staffClerkRelationDTO
.
getEnterpriseId
();
String
staffId
=
staffClerkRelationDTO
.
getStaffId
();
Integer
manageFlag
=
staffClerkRelationDTO
.
getManageFlag
();
if
(
manageFlag
!=
null
&&
manageFlag
==
1
)
{
...
...
@@ -179,7 +180,7 @@ public class StaffClerkRelationApiServiceImpl implements StaffClerkRelationApiSe
}
}
AuditDTO
auditDTO
=
auditApiService
.
findByBindRelatedIdAndAuditType
(
clerkId
,
AuditType
.
CLERK_BIND
.
getCode
());
AuditDTO
auditDTO
=
auditApiService
.
findByBindRelatedIdAndAuditType
(
clerkId
,
AuditType
.
CLERK_BIND
.
getCode
()
,
wxEnterpriseId
,
enterpriseId
);
if
(
null
!=
auditDTO
)
{
return
ServiceResponse
.
failure
(
"4"
,
"该导购已经被被申请绑定,请审核处理后再绑定"
);
}
...
...
haoban-manage3-service/src/main/resources/mapper/TabHaobanAuditMapper.xml
View file @
cd895823
...
...
@@ -198,6 +198,9 @@
<if
test=
"auditStatus != null"
>
and audit_status = #{auditStatus}
</if>
<if
test=
"enterpriseId != null"
>
and enterprise_id = #{enterpriseId}
</if>
order by create_time desc
</select>
...
...
@@ -236,6 +239,12 @@
and related_Id = #{relatedId}
and audit_type = #{auditType}
and audit_status = 0
<if
test=
"wxEnterpriseId != null"
>
and wx_enterprise_id = #{wxEnterpriseId}
</if>
<if
test=
"enterpriseId != null"
>
and enterprise_id = #{enterpriseId}
</if>
</select>
<select
id=
"judgeHavePhoneNumberOrCode"
resultMap=
"BaseResultMap"
>
...
...
@@ -252,6 +261,9 @@
or old_value like concat ('%',#{phoneNumber},'%')
</if>
)
<if
test=
"wxEnterpriseId != null"
>
and wx_enterprise_id = #{wxEnterpriseId}
</if>
</select>
<select
id=
"getAuditCount"
resultType=
"int"
>
...
...
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/controller/
Clerk
Controller.java
→
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/controller/
WxStaff
Controller.java
View file @
cd895823
...
...
@@ -55,8 +55,8 @@ import java.util.*;
import
java.util.stream.Collectors
;
@RestController
public
class
Clerk
Controller
extends
WebBaseController
{
private
static
final
Logger
logger
=
LoggerFactory
.
getLogger
(
Clerk
Controller
.
class
);
public
class
WxStaff
Controller
extends
WebBaseController
{
private
static
final
Logger
logger
=
LoggerFactory
.
getLogger
(
WxStaff
Controller
.
class
);
@Autowired
private
ClerkService
clerkService
;
...
...
@@ -335,7 +335,7 @@ public class ClerkController extends WebBaseController {
return
resultResponse
(
HaoBanErrCode
.
ERR_10009
);
}
String
enterpriseId
=
store
.
getEnterpriseId
();
boolean
b
=
auditApiService
.
judgeHavePhoneNumberOrCode
(
enterpriseId
,
clerkCode
,
phoneNumber
);
boolean
b
=
auditApiService
.
judgeHavePhoneNumberOrCode
(
enterpriseId
,
clerkCode
,
phoneNumber
,
wxEnterpriseId
);
if
(
b
)
{
//待审核中存在code或该手机号
return
resultResponse
(
HaoBanErrCode
.
ERR_10021
);
...
...
@@ -347,7 +347,7 @@ public class ClerkController extends WebBaseController {
}
AuditSettingDTO
dto
=
auditSettingApiService
.
findSettingByWxEnterpriseId
(
wxEnterpriseId
);
if
(
dto
.
getAuditFlag
()
==
1
&&
dto
.
getClerkChangeFlag
()
==
1
)
{
AuditDTO
auditDTO
=
auditApiService
.
findByBindRelatedIdAndAuditType
(
clerkCode
,
AuditType
.
CLERK_ADD
.
getCode
());
AuditDTO
auditDTO
=
auditApiService
.
findByBindRelatedIdAndAuditType
(
clerkCode
,
AuditType
.
CLERK_ADD
.
getCode
()
,
wxEnterpriseId
,
enterpriseId
);
if
(
auditDTO
!=
null
)
{
logger
.
info
(
"已经存在了审核记录,待审核{}"
,
clerkCode
);
return
resultResponse
(
HaoBanErrCode
.
ERR_10018
);
...
...
@@ -421,7 +421,7 @@ public class ClerkController extends WebBaseController {
//删除店员
@HttpLimit
@RequestMapping
(
"/staff-del"
)
public
HaobanResponse
staffDel
(
String
wxEnterpriseId
,
String
storeId
,
Integer
version
,
String
clerkIds
,
String
staffId
)
{
public
HaobanResponse
staffDel
(
String
wxEnterpriseId
,
String
storeId
,
String
clerkIds
,
String
staffId
)
{
if
(
StringUtils
.
isAnyBlank
(
clerkIds
))
{
return
resultResponse
(
HaoBanErrCode
.
ERR_2
);
}
...
...
@@ -435,7 +435,7 @@ public class ClerkController extends WebBaseController {
//需要审核
String
[]
clerkIdArr
=
clerkIds
.
split
(
","
);
for
(
String
clerkId
:
clerkIdArr
)
{
AuditDTO
auditDTO
=
auditApiService
.
findByBindRelatedIdAndAuditType
(
clerkId
,
AuditType
.
CLERK_DEL
.
getCode
());
AuditDTO
auditDTO
=
auditApiService
.
findByBindRelatedIdAndAuditType
(
clerkId
,
AuditType
.
CLERK_DEL
.
getCode
()
,
wxEnterpriseId
,
store
.
getEnterpriseId
()
);
if
(
auditDTO
!=
null
)
{
logger
.
info
(
"已经存在了审核记录,待审核{}"
,
clerkId
);
continue
;
...
...
@@ -843,6 +843,8 @@ public class ClerkController extends WebBaseController {
@HttpLimit
@RequestMapping
(
"bind-staff"
)
public
HaobanResponse
bindStaff
(
String
clerkId
,
String
staffId
,
Integer
auditType
,
Integer
manageFlag
)
{
WellDoneLoginDTO
loginUser
=
this
.
getLoginUser
();
String
wxEnterpriseId
=
loginUser
.
getWxEnterpriseId
();
if
(
StringUtils
.
isAnyBlank
(
clerkId
,
staffId
))
{
return
resultResponse
(
HaoBanErrCode
.
ERR_2
);
}
...
...
@@ -857,7 +859,7 @@ public class ClerkController extends WebBaseController {
if
(
staff
==
null
)
{
return
resultResponse
(
HaoBanErrCode
.
ERR_10006
);
}
AuditDTO
auditDTO
=
auditApiService
.
findByBindRelatedIdAndAuditType
(
clerkId
,
AuditType
.
CLERK_BIND
.
getCode
());
AuditDTO
auditDTO
=
auditApiService
.
findByBindRelatedIdAndAuditType
(
clerkId
,
AuditType
.
CLERK_BIND
.
getCode
()
,
wxEnterpriseId
,
clerk
.
getEnterpriseId
()
);
if
(
auditDTO
!=
null
)
{
return
resultResponse
(
HaoBanErrCode
.
ERR_10018
);
}
...
...
@@ -879,7 +881,6 @@ public class ClerkController extends WebBaseController {
String
clerkCode
=
clerk
.
getClerkCode
();
String
enterpriseId
=
clerk
.
getEnterpriseId
();
String
wxEnterpriseId
=
staff
.
getWxEnterpriseId
();
String
wxUserId
=
staff
.
getWxUserId
();
StaffClerkRelationDTO
staffClerkRelation
=
staffClerkRelationApiService
.
getByCodeAndEnterpriseId
(
clerkCode
,
enterpriseId
);
...
...
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