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
eb3fec3a
Commit
eb3fec3a
authored
Apr 14, 2020
by
qwmqiuwenmin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
373d979c
Show whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
398 additions
and
31 deletions
+398
-31
ClerkMainStoreRelatedDTO.java
...m/gic/haoban/manage/api/dto/ClerkMainStoreRelatedDTO.java
+91
-0
ClerkMainStoreRelatedApiService.java
...n/manage/api/service/ClerkMainStoreRelatedApiService.java
+11
-0
TabHaobanClerkMainStoreRelatedMapper.java
...vice/dao/mapper/TabHaobanClerkMainStoreRelatedMapper.java
+5
-0
TabHaobanClerkMainStoreRelated.java
...manage/service/entity/TabHaobanClerkMainStoreRelated.java
+11
-10
ClerkMainStoreRelatedService.java
.../manage/service/service/ClerkMainStoreRelatedService.java
+13
-0
ClerkMainStoreRelatedServiceImpl.java
...ervice/service/impl/ClerkMainStoreRelatedServiceImpl.java
+45
-0
ClerkMainStoreRelatedApiServiceImpl.java
...service/out/impl/ClerkMainStoreRelatedApiServiceImpl.java
+34
-0
TabHaobanClerkMainStoreRelatedMapper.xml
...resources/mapper/TabHaobanClerkMainStoreRelatedMapper.xml
+32
-21
pom.xml
haoban-manage3-wx/pom.xml
+6
-0
ClerkController.java
...com/gic/haoban/manage/web/controller/ClerkController.java
+95
-0
StoreController.java
...com/gic/haoban/manage/web/controller/StoreController.java
+19
-0
WebBaseController.java
...m/gic/haoban/manage/web/controller/WebBaseController.java
+8
-0
HaoBanErrCode.java
...java/com/gic/haoban/manage/web/errCode/HaoBanErrCode.java
+5
-0
StoreDetailVO.java
...main/java/com/gic/haoban/manage/web/vo/StoreDetailVO.java
+12
-0
StoreVO.java
...x/src/main/java/com/gic/haoban/manage/web/vo/StoreVO.java
+7
-0
dubbo-haoban-manage-wx.xml
...ge3-wx/src/main/webapp/WEB-INF/dubbo-haoban-manage-wx.xml
+4
-0
No files found.
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/dto/ClerkMainStoreRelatedDTO.java
0 → 100644
View file @
eb3fec3a
package
com
.
gic
.
haoban
.
manage
.
api
.
dto
;
import
java.io.Serializable
;
import
java.util.Date
;
public
class
ClerkMainStoreRelatedDTO
implements
Serializable
{
private
String
clerkMainStoreRelatedId
;
private
String
staffId
;
private
String
wxEnterpriseId
;
private
String
storeId
;
private
Integer
mainStoreFlag
;
private
Integer
statusFlag
;
private
Date
createTime
;
private
Date
updateTime
;
private
static
final
long
serialVersionUID
=
1L
;
public
String
getClerkMainStoreRelatedId
()
{
return
clerkMainStoreRelatedId
;
}
public
void
setClerkMainStoreRelatedId
(
String
clerkMainStoreRelatedId
)
{
this
.
clerkMainStoreRelatedId
=
clerkMainStoreRelatedId
==
null
?
null
:
clerkMainStoreRelatedId
.
trim
();
}
public
String
getStaffId
()
{
return
staffId
;
}
public
void
setStaffId
(
String
staffId
)
{
this
.
staffId
=
staffId
;
}
public
String
getWxEnterpriseId
()
{
return
wxEnterpriseId
;
}
public
void
setWxEnterpriseId
(
String
wxEnterpriseId
)
{
this
.
wxEnterpriseId
=
wxEnterpriseId
;
}
public
String
getStoreId
()
{
return
storeId
;
}
public
void
setStoreId
(
String
storeId
)
{
this
.
storeId
=
storeId
==
null
?
null
:
storeId
.
trim
();
}
public
Integer
getMainStoreFlag
()
{
return
mainStoreFlag
;
}
public
void
setMainStoreFlag
(
Integer
mainStoreFlag
)
{
this
.
mainStoreFlag
=
mainStoreFlag
;
}
public
Integer
getStatusFlag
()
{
return
statusFlag
;
}
public
void
setStatusFlag
(
Integer
statusFlag
)
{
this
.
statusFlag
=
statusFlag
;
}
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
;
}
}
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/service/ClerkMainStoreRelatedApiService.java
0 → 100644
View file @
eb3fec3a
package
com
.
gic
.
haoban
.
manage
.
api
.
service
;
import
com.gic.haoban.manage.api.dto.ClerkMainStoreRelatedDTO
;
public
interface
ClerkMainStoreRelatedApiService
{
void
setMainStore
(
String
staffId
,
String
storeId
,
String
wxEnterpriseId
);
ClerkMainStoreRelatedDTO
getWxEnterpriseIdAndStaffId
(
String
wxEnterpriseId
,
String
staffId
);
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/dao/mapper/TabHaobanClerkMainStoreRelatedMapper.java
View file @
eb3fec3a
package
com
.
gic
.
haoban
.
manage
.
service
.
dao
.
mapper
;
package
com
.
gic
.
haoban
.
manage
.
service
.
dao
.
mapper
;
import
org.apache.ibatis.annotations.Param
;
import
com.gic.haoban.manage.service.entity.TabHaobanClerkMainStoreRelated
;
import
com.gic.haoban.manage.service.entity.TabHaobanClerkMainStoreRelated
;
public
interface
TabHaobanClerkMainStoreRelatedMapper
{
public
interface
TabHaobanClerkMainStoreRelatedMapper
{
...
@@ -14,4 +16,6 @@ public interface TabHaobanClerkMainStoreRelatedMapper {
...
@@ -14,4 +16,6 @@ public interface TabHaobanClerkMainStoreRelatedMapper {
int
updateByPrimaryKeySelective
(
TabHaobanClerkMainStoreRelated
record
);
int
updateByPrimaryKeySelective
(
TabHaobanClerkMainStoreRelated
record
);
int
updateByPrimaryKey
(
TabHaobanClerkMainStoreRelated
record
);
int
updateByPrimaryKey
(
TabHaobanClerkMainStoreRelated
record
);
TabHaobanClerkMainStoreRelated
selectByWxEnterpriseIdAndStoreId
(
@Param
(
"staffId"
)
String
staffId
,
@Param
(
"wxEnterpriseId"
)
String
wxEnterpriseId
);
}
}
\ No newline at end of file
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/entity/TabHaobanClerkMainStoreRelated.java
View file @
eb3fec3a
...
@@ -6,9 +6,9 @@ import java.util.Date;
...
@@ -6,9 +6,9 @@ import java.util.Date;
public
class
TabHaobanClerkMainStoreRelated
implements
Serializable
{
public
class
TabHaobanClerkMainStoreRelated
implements
Serializable
{
private
String
clerkMainStoreRelatedId
;
private
String
clerkMainStoreRelatedId
;
private
String
clerk
Id
;
private
String
staff
Id
;
private
String
e
nterpriseId
;
private
String
wxE
nterpriseId
;
private
String
storeId
;
private
String
storeId
;
...
@@ -30,20 +30,21 @@ public class TabHaobanClerkMainStoreRelated implements Serializable {
...
@@ -30,20 +30,21 @@ public class TabHaobanClerkMainStoreRelated implements Serializable {
this
.
clerkMainStoreRelatedId
=
clerkMainStoreRelatedId
==
null
?
null
:
clerkMainStoreRelatedId
.
trim
();
this
.
clerkMainStoreRelatedId
=
clerkMainStoreRelatedId
==
null
?
null
:
clerkMainStoreRelatedId
.
trim
();
}
}
public
String
getClerkId
()
{
return
clerkId
;
public
String
getStaffId
()
{
return
staffId
;
}
}
public
void
setClerkId
(
String
clerk
Id
)
{
public
void
setStaffId
(
String
staff
Id
)
{
this
.
clerkId
=
clerkId
==
null
?
null
:
clerkId
.
trim
()
;
this
.
staffId
=
staffId
;
}
}
public
String
get
EnterpriseId
()
{
public
String
getWx
EnterpriseId
()
{
return
e
nterpriseId
;
return
wxE
nterpriseId
;
}
}
public
void
setEnterpriseId
(
String
e
nterpriseId
)
{
public
void
setWxEnterpriseId
(
String
wxE
nterpriseId
)
{
this
.
enterpriseId
=
enterpriseId
==
null
?
null
:
enterpriseId
.
trim
()
;
this
.
wxEnterpriseId
=
wxEnterpriseId
;
}
}
public
String
getStoreId
()
{
public
String
getStoreId
()
{
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/ClerkMainStoreRelatedService.java
0 → 100644
View file @
eb3fec3a
package
com
.
gic
.
haoban
.
manage
.
service
.
service
;
import
com.gic.haoban.manage.service.entity.TabHaobanClerkMainStoreRelated
;
public
interface
ClerkMainStoreRelatedService
{
void
setMainStore
(
String
staffId
,
String
storeId
,
String
wxEnterpriseId
);
TabHaobanClerkMainStoreRelated
selectByWxEnterpriseIdAndStoreId
(
String
staffId
,
String
wxEnterpriseId
);
void
update
(
TabHaobanClerkMainStoreRelated
r
);
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/impl/ClerkMainStoreRelatedServiceImpl.java
0 → 100644
View file @
eb3fec3a
package
com
.
gic
.
haoban
.
manage
.
service
.
service
.
impl
;
import
java.util.Date
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
com.gic.haoban.manage.service.dao.mapper.TabHaobanClerkMainStoreRelatedMapper
;
import
com.gic.haoban.manage.service.entity.TabHaobanClerkMainStoreRelated
;
import
com.gic.haoban.manage.service.service.ClerkMainStoreRelatedService
;
@Service
public
class
ClerkMainStoreRelatedServiceImpl
implements
ClerkMainStoreRelatedService
{
@Autowired
private
TabHaobanClerkMainStoreRelatedMapper
mapper
;
@Override
public
void
setMainStore
(
String
staffId
,
String
storeId
,
String
wxEnterpriseId
)
{
String
uuId
=
com
.
gic
.
haoban
.
common
.
utils
.
StringUtil
.
randomUUID
();
Date
now
=
new
Date
();
TabHaobanClerkMainStoreRelated
t
=
new
TabHaobanClerkMainStoreRelated
();
t
.
setStaffId
(
staffId
);
t
.
setWxEnterpriseId
(
wxEnterpriseId
);
t
.
setStoreId
(
storeId
);
t
.
setCreateTime
(
now
);
t
.
setUpdateTime
(
now
);
t
.
setStatusFlag
(
1
);
t
.
setClerkMainStoreRelatedId
(
uuId
);
mapper
.
insert
(
t
);
}
@Override
public
TabHaobanClerkMainStoreRelated
selectByWxEnterpriseIdAndStoreId
(
String
staffId
,
String
wxEnterpriseId
)
{
return
mapper
.
selectByWxEnterpriseIdAndStoreId
(
staffId
,
wxEnterpriseId
);
}
@Override
public
void
update
(
TabHaobanClerkMainStoreRelated
r
)
{
r
.
setUpdateTime
(
new
Date
());
mapper
.
updateByPrimaryKeySelective
(
r
);
}
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/ClerkMainStoreRelatedApiServiceImpl.java
0 → 100644
View file @
eb3fec3a
package
com
.
gic
.
haoban
.
manage
.
service
.
service
.
out
.
impl
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
com.gic.commons.util.EntityUtil
;
import
com.gic.haoban.manage.api.dto.ClerkMainStoreRelatedDTO
;
import
com.gic.haoban.manage.api.service.ClerkMainStoreRelatedApiService
;
import
com.gic.haoban.manage.service.entity.TabHaobanClerkMainStoreRelated
;
import
com.gic.haoban.manage.service.service.ClerkMainStoreRelatedService
;
@Service
public
class
ClerkMainStoreRelatedApiServiceImpl
implements
ClerkMainStoreRelatedApiService
{
@Autowired
ClerkMainStoreRelatedService
clerkMainStoreRelatedService
;
@Override
public
void
setMainStore
(
String
staffId
,
String
storeId
,
String
wxEnterpriseId
)
{
TabHaobanClerkMainStoreRelated
r
=
clerkMainStoreRelatedService
.
selectByWxEnterpriseIdAndStoreId
(
staffId
,
wxEnterpriseId
);
if
(
r
!=
null
){
r
.
setStoreId
(
storeId
);
clerkMainStoreRelatedService
.
update
(
r
);
}
else
{
clerkMainStoreRelatedService
.
setMainStore
(
staffId
,
storeId
,
wxEnterpriseId
);
}
}
@Override
public
ClerkMainStoreRelatedDTO
getWxEnterpriseIdAndStaffId
(
String
wxEnterpriseId
,
String
staffId
)
{
return
EntityUtil
.
changeEntityByJSON
(
ClerkMainStoreRelatedDTO
.
class
,
clerkMainStoreRelatedService
.
selectByWxEnterpriseIdAndStoreId
(
staffId
,
wxEnterpriseId
));
}
}
haoban-manage3-service/src/main/resources/mapper/TabHaobanClerkMainStoreRelatedMapper.xml
View file @
eb3fec3a
...
@@ -3,8 +3,8 @@
...
@@ -3,8 +3,8 @@
<mapper
namespace=
"com.gic.haoban.manage.service.dao.mapper.TabHaobanClerkMainStoreRelatedMapper"
>
<mapper
namespace=
"com.gic.haoban.manage.service.dao.mapper.TabHaobanClerkMainStoreRelatedMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.gic.haoban.manage.service.entity.TabHaobanClerkMainStoreRelated"
>
<resultMap
id=
"BaseResultMap"
type=
"com.gic.haoban.manage.service.entity.TabHaobanClerkMainStoreRelated"
>
<id
column=
"clerk_main_store_related_id"
property=
"clerkMainStoreRelatedId"
jdbcType=
"VARCHAR"
/>
<id
column=
"clerk_main_store_related_id"
property=
"clerkMainStoreRelatedId"
jdbcType=
"VARCHAR"
/>
<result
column=
"
clerk_id"
property=
"clerk
Id"
jdbcType=
"VARCHAR"
/>
<result
column=
"
staff_id"
property=
"staff
Id"
jdbcType=
"VARCHAR"
/>
<result
column=
"
enterprise_id"
property=
"e
nterpriseId"
jdbcType=
"VARCHAR"
/>
<result
column=
"
wx_enterprise_id"
property=
"wxE
nterpriseId"
jdbcType=
"VARCHAR"
/>
<result
column=
"store_id"
property=
"storeId"
jdbcType=
"VARCHAR"
/>
<result
column=
"store_id"
property=
"storeId"
jdbcType=
"VARCHAR"
/>
<result
column=
"main_store_flag"
property=
"mainStoreFlag"
jdbcType=
"INTEGER"
/>
<result
column=
"main_store_flag"
property=
"mainStoreFlag"
jdbcType=
"INTEGER"
/>
<result
column=
"status_flag"
property=
"statusFlag"
jdbcType=
"INTEGER"
/>
<result
column=
"status_flag"
property=
"statusFlag"
jdbcType=
"INTEGER"
/>
...
@@ -12,7 +12,7 @@
...
@@ -12,7 +12,7 @@
<result
column=
"update_time"
property=
"updateTime"
jdbcType=
"TIMESTAMP"
/>
<result
column=
"update_time"
property=
"updateTime"
jdbcType=
"TIMESTAMP"
/>
</resultMap>
</resultMap>
<sql
id=
"Base_Column_List"
>
<sql
id=
"Base_Column_List"
>
clerk_main_store_related_id,
clerk_id,
enterprise_id, store_id, main_store_flag,
clerk_main_store_related_id,
staff_id, wx_
enterprise_id, store_id, main_store_flag,
status_flag, create_time, update_time
status_flag, create_time, update_time
</sql>
</sql>
<select
id=
"selectByPrimaryKey"
resultMap=
"BaseResultMap"
parameterType=
"java.lang.String"
>
<select
id=
"selectByPrimaryKey"
resultMap=
"BaseResultMap"
parameterType=
"java.lang.String"
>
...
@@ -26,12 +26,12 @@
...
@@ -26,12 +26,12 @@
where clerk_main_store_related_id = #{clerkMainStoreRelatedId,jdbcType=VARCHAR}
where clerk_main_store_related_id = #{clerkMainStoreRelatedId,jdbcType=VARCHAR}
</delete>
</delete>
<insert
id=
"insert"
parameterType=
"com.gic.haoban.manage.service.entity.TabHaobanClerkMainStoreRelated"
>
<insert
id=
"insert"
parameterType=
"com.gic.haoban.manage.service.entity.TabHaobanClerkMainStoreRelated"
>
insert into tab_haoban_clerk_main_store_related (clerk_main_store_related_id,
clerk
_id,
insert into tab_haoban_clerk_main_store_related (clerk_main_store_related_id,
staff
_id,
enterprise_id, store_id, main_store_flag,
wx_
enterprise_id, store_id, main_store_flag,
status_flag, create_time, update_time
status_flag, create_time, update_time
)
)
values (#{clerkMainStoreRelatedId,jdbcType=VARCHAR}, #{
clerk
Id,jdbcType=VARCHAR},
values (#{clerkMainStoreRelatedId,jdbcType=VARCHAR}, #{
staff
Id,jdbcType=VARCHAR},
#{
e
nterpriseId,jdbcType=VARCHAR}, #{storeId,jdbcType=VARCHAR}, #{mainStoreFlag,jdbcType=INTEGER},
#{
wxE
nterpriseId,jdbcType=VARCHAR}, #{storeId,jdbcType=VARCHAR}, #{mainStoreFlag,jdbcType=INTEGER},
#{statusFlag,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}
#{statusFlag,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}
)
)
</insert>
</insert>
...
@@ -41,11 +41,11 @@
...
@@ -41,11 +41,11 @@
<if
test=
"clerkMainStoreRelatedId != null"
>
<if
test=
"clerkMainStoreRelatedId != null"
>
clerk_main_store_related_id,
clerk_main_store_related_id,
</if>
</if>
<if
test=
"
clerk
Id != null"
>
<if
test=
"
staff
Id != null"
>
clerk
_id,
staff
_id,
</if>
</if>
<if
test=
"
e
nterpriseId != null"
>
<if
test=
"
wxE
nterpriseId != null"
>
enterprise_id,
wx_
enterprise_id,
</if>
</if>
<if
test=
"storeId != null"
>
<if
test=
"storeId != null"
>
store_id,
store_id,
...
@@ -67,11 +67,11 @@
...
@@ -67,11 +67,11 @@
<if
test=
"clerkMainStoreRelatedId != null"
>
<if
test=
"clerkMainStoreRelatedId != null"
>
#{clerkMainStoreRelatedId,jdbcType=VARCHAR},
#{clerkMainStoreRelatedId,jdbcType=VARCHAR},
</if>
</if>
<if
test=
"
clerk
Id != null"
>
<if
test=
"
staff
Id != null"
>
#{
clerk
Id,jdbcType=VARCHAR},
#{
staff
Id,jdbcType=VARCHAR},
</if>
</if>
<if
test=
"
e
nterpriseId != null"
>
<if
test=
"
wxE
nterpriseId != null"
>
#{
e
nterpriseId,jdbcType=VARCHAR},
#{
wxE
nterpriseId,jdbcType=VARCHAR},
</if>
</if>
<if
test=
"storeId != null"
>
<if
test=
"storeId != null"
>
#{storeId,jdbcType=VARCHAR},
#{storeId,jdbcType=VARCHAR},
...
@@ -93,11 +93,11 @@
...
@@ -93,11 +93,11 @@
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.gic.haoban.manage.service.entity.TabHaobanClerkMainStoreRelated"
>
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.gic.haoban.manage.service.entity.TabHaobanClerkMainStoreRelated"
>
update tab_haoban_clerk_main_store_related
update tab_haoban_clerk_main_store_related
<set
>
<set
>
<if
test=
"
clerk
Id != null"
>
<if
test=
"
staff
Id != null"
>
clerk_id = #{clerk
Id,jdbcType=VARCHAR},
staff_id = #{staff
Id,jdbcType=VARCHAR},
</if>
</if>
<if
test=
"
e
nterpriseId != null"
>
<if
test=
"
wxE
nterpriseId != null"
>
enterprise_id = #{e
nterpriseId,jdbcType=VARCHAR},
wx_enterprise_id = #{wxE
nterpriseId,jdbcType=VARCHAR},
</if>
</if>
<if
test=
"storeId != null"
>
<if
test=
"storeId != null"
>
store_id = #{storeId,jdbcType=VARCHAR},
store_id = #{storeId,jdbcType=VARCHAR},
...
@@ -119,8 +119,8 @@
...
@@ -119,8 +119,8 @@
</update>
</update>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.gic.haoban.manage.service.entity.TabHaobanClerkMainStoreRelated"
>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.gic.haoban.manage.service.entity.TabHaobanClerkMainStoreRelated"
>
update tab_haoban_clerk_main_store_related
update tab_haoban_clerk_main_store_related
set
clerk_id = #{clerk
Id,jdbcType=VARCHAR},
set
staff_id = #{staff
Id,jdbcType=VARCHAR},
enterprise_id = #{e
nterpriseId,jdbcType=VARCHAR},
wx_enterprise_id = #{wxE
nterpriseId,jdbcType=VARCHAR},
store_id = #{storeId,jdbcType=VARCHAR},
store_id = #{storeId,jdbcType=VARCHAR},
main_store_flag = #{mainStoreFlag,jdbcType=INTEGER},
main_store_flag = #{mainStoreFlag,jdbcType=INTEGER},
status_flag = #{statusFlag,jdbcType=INTEGER},
status_flag = #{statusFlag,jdbcType=INTEGER},
...
@@ -128,4 +128,14 @@
...
@@ -128,4 +128,14 @@
update_time = #{updateTime,jdbcType=TIMESTAMP}
update_time = #{updateTime,jdbcType=TIMESTAMP}
where clerk_main_store_related_id = #{clerkMainStoreRelatedId,jdbcType=VARCHAR}
where clerk_main_store_related_id = #{clerkMainStoreRelatedId,jdbcType=VARCHAR}
</update>
</update>
<select
id=
"selectByWxEnterpriseIdAndStoreId"
resultMap=
"BaseResultMap"
parameterType=
"java.lang.String"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_haoban_clerk_main_store_related
where staff_id = #{staffId,jdbcType=VARCHAR}
and wx_enterprise_id = #{wxEnterpriseId}
and status_flag = 1
limit 1
</select>
</mapper>
</mapper>
\ No newline at end of file
haoban-manage3-wx/pom.xml
View file @
eb3fec3a
...
@@ -220,6 +220,12 @@
...
@@ -220,6 +220,12 @@
<artifactId>
gic-quartz-api
</artifactId>
<artifactId>
gic-quartz-api
</artifactId>
<version>
${gic-quartz-api}
</version>
<version>
${gic-quartz-api}
</version>
</dependency>
</dependency>
<dependency>
<groupId>
com.gic
</groupId>
<artifactId>
haoban-app-customer-api
</artifactId>
<version>
${haoban-app-customer-api}
</version>
</dependency>
</dependencies>
</dependencies>
<build>
<build>
...
...
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/controller/ClerkController.java
View file @
eb3fec3a
...
@@ -19,14 +19,19 @@ import com.alibaba.csp.sentinel.util.StringUtil;
...
@@ -19,14 +19,19 @@ import com.alibaba.csp.sentinel.util.StringUtil;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
com.gic.clerk.api.dto.ClerkDTO
;
import
com.gic.clerk.api.dto.ClerkDTO
;
import
com.gic.clerk.api.service.ClerkService
;
import
com.gic.clerk.api.service.ClerkService
;
import
com.gic.commons.util.DateUtil
;
import
com.gic.commons.util.EntityUtil
;
import
com.gic.commons.util.EntityUtil
;
import
com.gic.enterprise.api.dto.StoreDTO
;
import
com.gic.enterprise.api.dto.StoreDTO
;
import
com.gic.enterprise.api.service.StoreService
;
import
com.gic.enterprise.api.service.StoreService
;
import
com.gic.haoban.app.customer.service.api.service.DistributeApiService
;
import
com.gic.haoban.base.api.common.ServiceResponse
;
import
com.gic.haoban.common.utils.HaobanResponse
;
import
com.gic.haoban.common.utils.HaobanResponse
;
import
com.gic.haoban.communicate.api.service.SyncHaobanToGicServiceApi
;
import
com.gic.haoban.manage.api.dto.DepartmentDTO
;
import
com.gic.haoban.manage.api.dto.DepartmentDTO
;
import
com.gic.haoban.manage.api.dto.StaffDTO
;
import
com.gic.haoban.manage.api.dto.StaffDTO
;
import
com.gic.haoban.manage.api.dto.StaffDepartmentRelatedDTO
;
import
com.gic.haoban.manage.api.dto.StaffDepartmentRelatedDTO
;
import
com.gic.haoban.manage.api.service.BindApiService
;
import
com.gic.haoban.manage.api.service.BindApiService
;
import
com.gic.haoban.manage.api.service.ClerkMainStoreRelatedApiService
;
import
com.gic.haoban.manage.api.service.DepartmentApiService
;
import
com.gic.haoban.manage.api.service.DepartmentApiService
;
import
com.gic.haoban.manage.api.service.StaffApiService
;
import
com.gic.haoban.manage.api.service.StaffApiService
;
import
com.gic.haoban.manage.api.service.StaffDepartmentRelatedApiService
;
import
com.gic.haoban.manage.api.service.StaffDepartmentRelatedApiService
;
...
@@ -35,6 +40,7 @@ import com.gic.haoban.manage.web.errCode.HaoBanErrCode;
...
@@ -35,6 +40,7 @@ import com.gic.haoban.manage.web.errCode.HaoBanErrCode;
import
com.gic.haoban.manage.web.interceptor.WebInterceptor
;
import
com.gic.haoban.manage.web.interceptor.WebInterceptor
;
import
com.gic.haoban.manage.web.vo.ClerkVo
;
import
com.gic.haoban.manage.web.vo.ClerkVo
;
import
com.gic.haoban.manage.web.vo.StoreVO
;
import
com.gic.haoban.manage.web.vo.StoreVO
;
import
com.gic.redis.data.util.RedisUtil
;
@RestController
@RestController
public
class
ClerkController
extends
WebBaseController
{
public
class
ClerkController
extends
WebBaseController
{
...
@@ -52,6 +58,12 @@ public class ClerkController extends WebBaseController{
...
@@ -52,6 +58,12 @@ public class ClerkController extends WebBaseController{
private
DepartmentApiService
departmentApiService
;
private
DepartmentApiService
departmentApiService
;
@Autowired
@Autowired
private
BindApiService
bindApiService
;
private
BindApiService
bindApiService
;
@Autowired
private
SyncHaobanToGicServiceApi
syncHaobanToGicServiceApi
;
@Autowired
private
ClerkMainStoreRelatedApiService
clerkMainStoreRelatedApiService
;
@Autowired
private
DistributeApiService
distributeApiService
;
//导购列表
//导购列表
@RequestMapping
(
"/clerk-list"
)
@RequestMapping
(
"/clerk-list"
)
...
@@ -212,4 +224,87 @@ public class ClerkController extends WebBaseController{
...
@@ -212,4 +224,87 @@ public class ClerkController extends WebBaseController{
return
resultResponse
(
HaoBanErrCode
.
ERR_1
);
return
resultResponse
(
HaoBanErrCode
.
ERR_1
);
}
}
//新增店员
@RequestMapping
(
"/satff-add"
)
public
HaobanResponse
staffAdd
(
StaffDTO
staffDTO
,
String
storeId
,
String
clerkCode
)
{
String
wxEnterpriseId
=
staffDTO
.
getWxEnterpriseId
();
String
staffName
=
staffDTO
.
getStaffName
();
String
phoneNumber
=
staffDTO
.
getPhoneNumber
();
String
nationcode
=
staffDTO
.
getNationCode
();
String
postion
=
staffDTO
.
getPostion
();
Integer
sex
=
staffDTO
.
getSex
();
staffDTO
.
setWxEnterpriseId
(
wxEnterpriseId
);
if
(
StringUtils
.
isBlank
(
staffName
))
{
return
resultResponse
(
HaoBanErrCode
.
ERR_10004
);
}
StaffDTO
staff
=
staffApiService
.
selectByNationcodeAndPhoneNumber
(
wxEnterpriseId
,
nationcode
,
phoneNumber
);
if
(
staff
!=
null
)
{
return
resultResponse
(
HaoBanErrCode
.
ERR_10005
);
}
syncHaobanToGicServiceApi
.
syncClerkToGicClerkAdd
(
storeId
,
clerkCode
,
sex
,
staffName
,
phoneNumber
,
nationcode
,
postion
);
return
resultResponse
(
HaoBanErrCode
.
ERR_1
);
}
//删除店员
@RequestMapping
(
"/staff-del"
)
public
HaobanResponse
staffDel
(
String
staffDepartmentRelatedId
,
String
storeId
)
{
DepartmentDTO
departmentDTO
=
departmentApiService
.
selectByRelatedId
(
storeId
);
if
(
departmentDTO
==
null
){
return
resultResponse
(
HaoBanErrCode
.
ERR_10006
);
}
StaffDepartmentRelatedDTO
related
=
staffDepartmentRelatedApiService
.
getByStaffDepartmentRelatedId
(
staffDepartmentRelatedId
);
if
(
related
==
null
){
return
resultResponse
(
HaoBanErrCode
.
ERR_10006
);
}
if
(
StringUtils
.
isBlank
(
related
.
getClerkCode
())){
staffApiService
.
del
(
staffDepartmentRelatedId
);
}
else
{
ClerkDTO
clerk
=
clerkService
.
getClerkByClerkCode
(
departmentDTO
.
getEnterpriseId
(),
related
.
getClerkCode
());
if
(
clerk
!=
null
&&
distributeApiService
.
getClerkMemberCount
(
departmentDTO
.
getEnterpriseId
(),
clerk
.
getClerkId
(),
storeId
)
==
0
){
syncHaobanToGicServiceApi
.
delGicClerk
(
clerk
.
getClerkId
());
}
}
return
resultResponse
(
HaoBanErrCode
.
ERR_1
);
}
//设置主导购
@RequestMapping
(
"/set-main-store"
)
public
HaobanResponse
setMainStore
(
String
staffId
,
String
storeId
,
String
wxEnterpriseId
,
String
staffDepartmentRelatedId
)
{
StaffDTO
staff
=
staffApiService
.
selectById
(
staffId
);
String
yyyyMM
=
DateUtil
.
dateToStr
(
new
Date
(),
"yyyyMM"
);
if
(
staff
==
null
){
return
resultResponse
(
HaoBanErrCode
.
ERR_10006
);
}
String
key
=
"haoban_set_main_store_"
+
yyyyMM
+
staffId
;
Object
hasSet
=
RedisUtil
.
getCache
(
key
);
if
(
hasSet
==
null
){
RedisUtil
.
setCache
(
key
,
true
,
31
*
24
*
60
*
60
l
);
clerkMainStoreRelatedApiService
.
setMainStore
(
staffId
,
storeId
,
wxEnterpriseId
);
}
else
{
return
resultResponse
(
HaoBanErrCode
.
ERR_10007
);
}
return
resultResponse
(
HaoBanErrCode
.
ERR_1
);
}
//刷新微信好友
@RequestMapping
(
"/fresh-wx-friend"
)
public
HaobanResponse
freshWxFrend
(
String
staffId
,
String
storeId
,
String
wxEnterpriseId
,
String
staffDepartmentRelatedId
,
String
wxUserId
)
{
StaffDTO
staff
=
staffApiService
.
selectById
(
staffId
);
String
yyyyMM
=
DateUtil
.
dateToStr
(
new
Date
(),
"yyyyMM"
);
if
(
staff
==
null
){
return
resultResponse
(
HaoBanErrCode
.
ERR_10006
);
}
String
key
=
"haoban_set_main_store_"
+
yyyyMM
+
staffId
;
Object
hasSet
=
RedisUtil
.
getCache
(
key
);
if
(
hasSet
==
null
){
RedisUtil
.
setCache
(
key
,
true
,
31
*
24
*
60
*
60
l
);
clerkMainStoreRelatedApiService
.
setMainStore
(
staffId
,
storeId
,
wxEnterpriseId
);
}
else
{
return
resultResponse
(
HaoBanErrCode
.
ERR_10007
);
}
return
resultResponse
(
HaoBanErrCode
.
ERR_1
);
}
}
}
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/controller/StoreController.java
View file @
eb3fec3a
...
@@ -36,12 +36,14 @@ import com.gic.haoban.data.api.dto.HaobanDataDTO;
...
@@ -36,12 +36,14 @@ import com.gic.haoban.data.api.dto.HaobanDataDTO;
import
com.gic.haoban.data.api.service.HaobanDataApiService
;
import
com.gic.haoban.data.api.service.HaobanDataApiService
;
import
com.gic.haoban.manage.api.dto.AuditDTO
;
import
com.gic.haoban.manage.api.dto.AuditDTO
;
import
com.gic.haoban.manage.api.dto.AuditSettingDTO
;
import
com.gic.haoban.manage.api.dto.AuditSettingDTO
;
import
com.gic.haoban.manage.api.dto.ClerkMainStoreRelatedDTO
;
import
com.gic.haoban.manage.api.dto.DepartmentDTO
;
import
com.gic.haoban.manage.api.dto.DepartmentDTO
;
import
com.gic.haoban.manage.api.dto.EnterpriseDetailDTO
;
import
com.gic.haoban.manage.api.dto.EnterpriseDetailDTO
;
import
com.gic.haoban.manage.api.dto.StaffDepartmentRelatedDTO
;
import
com.gic.haoban.manage.api.dto.StaffDepartmentRelatedDTO
;
import
com.gic.haoban.manage.api.enums.StoreFieldEnum
;
import
com.gic.haoban.manage.api.enums.StoreFieldEnum
;
import
com.gic.haoban.manage.api.service.AuditApiService
;
import
com.gic.haoban.manage.api.service.AuditApiService
;
import
com.gic.haoban.manage.api.service.AuditSettingApiService
;
import
com.gic.haoban.manage.api.service.AuditSettingApiService
;
import
com.gic.haoban.manage.api.service.ClerkMainStoreRelatedApiService
;
import
com.gic.haoban.manage.api.service.DepartmentApiService
;
import
com.gic.haoban.manage.api.service.DepartmentApiService
;
import
com.gic.haoban.manage.api.service.StaffApiService
;
import
com.gic.haoban.manage.api.service.StaffApiService
;
import
com.gic.haoban.manage.api.service.StaffDepartmentRelatedApiService
;
import
com.gic.haoban.manage.api.service.StaffDepartmentRelatedApiService
;
...
@@ -73,6 +75,8 @@ public class StoreController extends WebBaseController{
...
@@ -73,6 +75,8 @@ public class StoreController extends WebBaseController{
private
AuditApiService
auditApiService
;
private
AuditApiService
auditApiService
;
@Autowired
@Autowired
private
AuditSettingApiService
auditSettingApiService
;
private
AuditSettingApiService
auditSettingApiService
;
@Autowired
private
ClerkMainStoreRelatedApiService
clerkMainStoreRelatedApiService
;
//门店列表
//门店列表
@RequestMapping
(
"/store-list"
)
@RequestMapping
(
"/store-list"
)
public
HaobanResponse
storeList
(
String
staffId
,
String
wxEnterpriseId
)
{
public
HaobanResponse
storeList
(
String
staffId
,
String
wxEnterpriseId
)
{
...
@@ -121,6 +125,8 @@ public class StoreController extends WebBaseController{
...
@@ -121,6 +125,8 @@ public class StoreController extends WebBaseController{
}
}
}
}
}
}
ClerkMainStoreRelatedDTO
mainStore
=
clerkMainStoreRelatedApiService
.
getWxEnterpriseIdAndStaffId
(
wxEnterpriseId
,
staffId
);
//3、判断是否是店长
//3、判断是否是店长
for
(
StoreVO
VO
:
resultList
){
for
(
StoreVO
VO
:
resultList
){
//查gic门店
//查gic门店
...
@@ -149,6 +155,12 @@ public class StoreController extends WebBaseController{
...
@@ -149,6 +155,12 @@ public class StoreController extends WebBaseController{
if
(
CollectionUtil
.
isNotEmpty
(
imgList
)){
if
(
CollectionUtil
.
isNotEmpty
(
imgList
)){
VO
.
setStoreImg
(
imgList
.
get
(
0
).
getQcloudImageUrl
());;
VO
.
setStoreImg
(
imgList
.
get
(
0
).
getQcloudImageUrl
());;
}
}
if
(
mainStore
!=
null
&&
mainStore
.
getStoreId
().
equals
(
VO
.
getStoreId
())){
VO
.
setMainStoreFlag
(
1
);
}
else
{
VO
.
setMainStoreFlag
(
0
);
}
}
}
if
(
CollectionUtils
.
isNotEmpty
(
resultList
)){
if
(
CollectionUtils
.
isNotEmpty
(
resultList
)){
Map
<
Integer
,
StoreVO
>
map
=
com
.
gic
.
commons
.
util
.
CollectionUtil
.
toMap
(
resultList
,
"clerkType"
);
Map
<
Integer
,
StoreVO
>
map
=
com
.
gic
.
commons
.
util
.
CollectionUtil
.
toMap
(
resultList
,
"clerkType"
);
...
@@ -312,6 +324,13 @@ public class StoreController extends WebBaseController{
...
@@ -312,6 +324,13 @@ public class StoreController extends WebBaseController{
if
(
vo
.
getStoreArea
()
==
null
||
vo
.
getStoreArea
()==-
1
){
if
(
vo
.
getStoreArea
()
==
null
||
vo
.
getStoreArea
()==-
1
){
vo
.
setStoreArea
(-
1
d
);
vo
.
setStoreArea
(-
1
d
);
}
}
ClerkMainStoreRelatedDTO
mainStore
=
clerkMainStoreRelatedApiService
.
getWxEnterpriseIdAndStaffId
(
staffDepartmentRelatedDTO
.
getWxEnterpriseId
(),
staffDepartmentRelatedDTO
.
getStaffId
());
if
(
mainStore
!=
null
&&
mainStore
.
getStoreId
().
equals
(
storeId
)){
vo
.
setMainStoreFlag
(
1
);
}
else
{
vo
.
setMainStoreFlag
(
0
);
}
return
resultResponse
(
HaoBanErrCode
.
ERR_1
,
vo
);
return
resultResponse
(
HaoBanErrCode
.
ERR_1
,
vo
);
}
}
...
...
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/controller/WebBaseController.java
View file @
eb3fec3a
...
@@ -36,6 +36,14 @@ public class WebBaseController {
...
@@ -36,6 +36,14 @@ public class WebBaseController {
return
resultResponse
(
errCode
,
null
,
null
);
return
resultResponse
(
errCode
,
null
,
null
);
}
}
public
HaobanResponse
resultResponse
(
HaoBanErrCode
errCode
,
String
message
,
Object
data
,
String
detailError
)
{
HaobanResponse
response
=
new
HaobanResponse
();
response
.
setMessage
(
message
);
response
.
setDetailError
(
detailError
);
response
.
setErrorCode
(
errCode
.
getCode
());
return
response
;
}
/**
/**
* 获取登陆信息
* 获取登陆信息
*
*
...
...
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/errCode/HaoBanErrCode.java
View file @
eb3fec3a
...
@@ -186,6 +186,11 @@ public enum HaoBanErrCode {
...
@@ -186,6 +186,11 @@ public enum HaoBanErrCode {
ERR_600001
(
600001
,
"成员不存在,请联系管理员后台授权通讯录权限"
),
ERR_600001
(
600001
,
"成员不存在,请联系管理员后台授权通讯录权限"
),
ERR_600002
(
600002
,
"无手机号"
),
ERR_600002
(
600002
,
"无手机号"
),
ERR_10004
(
10004
,
"成员名称不能为空"
),
ERR_10005
(
10005
,
"成员已存在"
),
ERR_10006
(
10006
,
"成员不存在"
),
ERR_10007
(
10007
,
"本月已经设置过主导购"
),
ERR_DEFINE
(-
888
,
"自定义错误"
),
ERR_DEFINE
(-
888
,
"自定义错误"
),
ERR_OTHER
(-
999
,
"未知错误code"
);
ERR_OTHER
(-
999
,
"未知错误code"
);
...
...
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/vo/StoreDetailVO.java
View file @
eb3fec3a
...
@@ -43,6 +43,8 @@ public class StoreDetailVO implements Serializable {
...
@@ -43,6 +43,8 @@ public class StoreDetailVO implements Serializable {
private
Integer
auditFlag
=
0
;
private
Integer
auditFlag
=
0
;
private
Integer
MainStoreFlag
;
public
Integer
getAuditFlag
()
{
public
Integer
getAuditFlag
()
{
return
auditFlag
;
return
auditFlag
;
}
}
...
@@ -230,4 +232,14 @@ public class StoreDetailVO implements Serializable {
...
@@ -230,4 +232,14 @@ public class StoreDetailVO implements Serializable {
this
.
storeArea
=
storeArea
;
this
.
storeArea
=
storeArea
;
}
}
public
Integer
getMainStoreFlag
()
{
return
MainStoreFlag
;
}
public
void
setMainStoreFlag
(
Integer
mainStoreFlag
)
{
MainStoreFlag
=
mainStoreFlag
;
}
}
}
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/vo/StoreVO.java
View file @
eb3fec3a
...
@@ -24,6 +24,7 @@ public class StoreVO implements Serializable {
...
@@ -24,6 +24,7 @@ public class StoreVO implements Serializable {
private
int
clerkType
;
private
int
clerkType
;
private
String
wxEnterpriseRelatedId
;
private
String
wxEnterpriseRelatedId
;
private
Date
createTime
;
private
Date
createTime
;
private
Integer
mainStoreFlag
;
public
Date
getCreateTime
()
{
public
Date
getCreateTime
()
{
return
createTime
;
return
createTime
;
...
@@ -110,6 +111,12 @@ public class StoreVO implements Serializable {
...
@@ -110,6 +111,12 @@ public class StoreVO implements Serializable {
public
void
setWxEnterpriseRelatedId
(
String
wxEnterpriseRelatedId
)
{
public
void
setWxEnterpriseRelatedId
(
String
wxEnterpriseRelatedId
)
{
this
.
wxEnterpriseRelatedId
=
wxEnterpriseRelatedId
;
this
.
wxEnterpriseRelatedId
=
wxEnterpriseRelatedId
;
}
}
public
Integer
getMainStoreFlag
()
{
return
mainStoreFlag
;
}
public
void
setMainStoreFlag
(
Integer
mainStoreFlag
)
{
this
.
mainStoreFlag
=
mainStoreFlag
;
}
}
}
haoban-manage3-wx/src/main/webapp/WEB-INF/dubbo-haoban-manage-wx.xml
View file @
eb3fec3a
...
@@ -36,6 +36,10 @@
...
@@ -36,6 +36,10 @@
<dubbo:reference
interface=
"com.gic.haoban.manage.api.service.ApplicationSettingApiService"
id=
"applicationSettingApiService"
/>
<dubbo:reference
interface=
"com.gic.haoban.manage.api.service.ApplicationSettingApiService"
id=
"applicationSettingApiService"
/>
<dubbo:reference
interface=
"com.gic.haoban.manage.api.service.MemberUnionidRelatedApiService"
id=
"memberUnionidRelatedApiService"
/>
<dubbo:reference
interface=
"com.gic.haoban.manage.api.service.MemberUnionidRelatedApiService"
id=
"memberUnionidRelatedApiService"
/>
<dubbo:reference
interface=
"com.gic.haoban.manage.api.service.ClerkMainStoreRelatedApiService"
id=
"clerkMainStoreRelatedApiService"
/>
<dubbo:reference
interface=
"com.gic.haoban.app.customer.service.api.service.DistributeApiService"
id=
"distributeApiService"
/>
<dubbo:reference
interface=
"com.gic.haoban.communicate.api.service.valid.ValidationCodeService"
id=
"validationCodeService"
/>
<dubbo:reference
interface=
"com.gic.haoban.communicate.api.service.valid.ValidationCodeService"
id=
"validationCodeService"
/>
...
...
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