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
b17c7c0b
Commit
b17c7c0b
authored
May 26, 2020
by
fudahua
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/developer' into developer
parents
3711bd72
f459ac60
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
103 additions
and
15 deletions
+103
-15
MaidianLogDTO.java
...ain/java/com/gic/haoban/manage/api/dto/MaidianLogDTO.java
+20
-0
TabHaobanMaidianLog.java
...gic/haoban/manage/service/entity/TabHaobanMaidianLog.java
+21
-0
BindApiServiceImpl.java
...n/manage/service/service/out/impl/BindApiServiceImpl.java
+4
-5
MaidianDictApiServiceImpl.java
...e/service/service/out/impl/MaidianDictApiServiceImpl.java
+3
-3
MessageApiServiceImpl.java
...anage/service/service/out/impl/MessageApiServiceImpl.java
+21
-0
StaffDepartmentRelatedApiServiceImpl.java
...ervice/out/impl/StaffDepartmentRelatedApiServiceImpl.java
+1
-2
TabHaobanMaidianLogMapper.xml
...e/src/main/resources/mapper/TabHaobanMaidianLogMapper.xml
+17
-3
ClerkController.java
...com/gic/haoban/manage/web/controller/ClerkController.java
+1
-2
MaidianLogController.java
...ic/haoban/manage/web/controller/MaidianLogController.java
+15
-0
No files found.
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/dto/MaidianLogDTO.java
View file @
b17c7c0b
...
...
@@ -51,6 +51,10 @@ public class MaidianLogDTO implements Serializable{
private
String
storeId
;
private
String
clerkCode
;
private
String
clerkId
;
private
String
enterpriseId
;
private
Date
createTime
;
...
...
@@ -257,6 +261,22 @@ public class MaidianLogDTO implements Serializable{
public
void
setClerkCode
(
String
clerkCode
)
{
this
.
clerkCode
=
clerkCode
;
}
public
String
getClerkId
()
{
return
clerkId
;
}
public
void
setClerkId
(
String
clerkId
)
{
this
.
clerkId
=
clerkId
;
}
public
String
getEnterpriseId
()
{
return
enterpriseId
;
}
public
void
setEnterpriseId
(
String
enterpriseId
)
{
this
.
enterpriseId
=
enterpriseId
;
}
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/entity/TabHaobanMaidianLog.java
View file @
b17c7c0b
...
...
@@ -53,6 +53,10 @@ public class TabHaobanMaidianLog implements Serializable {
private
Date
createTime
;
private
Date
updateTime
;
private
String
clerkId
;
private
String
enterpriseId
;
private
static
final
long
serialVersionUID
=
1L
;
...
...
@@ -255,6 +259,22 @@ public class TabHaobanMaidianLog implements Serializable {
public
void
setClerkCode
(
String
clerkCode
)
{
this
.
clerkCode
=
clerkCode
;
}
public
String
getClerkId
()
{
return
clerkId
;
}
public
void
setClerkId
(
String
clerkId
)
{
this
.
clerkId
=
clerkId
;
}
public
String
getEnterpriseId
()
{
return
enterpriseId
;
}
public
void
setEnterpriseId
(
String
enterpriseId
)
{
this
.
enterpriseId
=
enterpriseId
;
}
}
\ No newline at end of file
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/BindApiServiceImpl.java
View file @
b17c7c0b
...
...
@@ -11,7 +11,6 @@ import org.springframework.beans.factory.annotation.Autowired;
import
cn.hutool.core.collection.CollectionUtil
;
import
com.alibaba.csp.sentinel.util.StringUtil
;
import
com.alibaba.fastjson.JSONObject
;
import
com.gic.clerk.api.dto.ClerkDTO
;
import
com.gic.clerk.api.service.ClerkService
;
...
...
@@ -157,7 +156,7 @@ public class BindApiServiceImpl implements BindApiService {
clerkService
.
updateClerk
(
clerkDTO
);
}
//发送消息
if
(
StringUtil
.
isNotBlank
(
fromClerkCode
)){
if
(
StringUtil
s
.
isNotBlank
(
fromClerkCode
)){
//发送消息
ClerkDTO
leader
=
clerkService
.
getClerkLeaderByStoreId
(
storeId
);
String
clerkId
=
leader
.
getClerkId
();
...
...
@@ -221,7 +220,7 @@ public class BindApiServiceImpl implements BindApiService {
clerkService
.
updateClerk
(
clerkDTO
);
}
//发送消息
if
(
StringUtil
.
isNotBlank
(
sendClerkCode
)){
if
(
StringUtil
s
.
isNotBlank
(
sendClerkCode
)){
//发送消息
ClerkDTO
leader
=
clerkService
.
getClerkLeaderByStoreId
(
storeId
);
String
clerkId
=
leader
.
getClerkId
();
...
...
@@ -266,7 +265,7 @@ public class BindApiServiceImpl implements BindApiService {
clerkService
.
updateClerk
(
clerkDTO
);
}
//发送消息
if
(
StringUtil
.
isNotBlank
(
fromClerkCode
)){
if
(
StringUtil
s
.
isNotBlank
(
fromClerkCode
)){
//发送消息
ClerkDTO
leader
=
clerkService
.
getClerkLeaderByStoreId
(
storeId
);
String
clerkId
=
leader
.
getClerkId
();
...
...
@@ -328,7 +327,7 @@ public class BindApiServiceImpl implements BindApiService {
}
//发送消息
if
(
StringUtil
.
isNotBlank
(
fromClerkCode
)){
if
(
StringUtil
s
.
isNotBlank
(
fromClerkCode
)){
//发送消息
ClerkDTO
leader
=
clerkService
.
getClerkLeaderByStoreId
(
storeId
);
String
clerkId
=
leader
.
getClerkId
();
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/MaidianDictApiServiceImpl.java
View file @
b17c7c0b
package
com
.
gic
.
haoban
.
manage
.
service
.
service
.
out
.
impl
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
cn.hutool.core.collection.CollectionUtil
;
import
com.alibaba.csp.sentinel.util.StringUtil
;
import
com.gic.commons.util.EntityUtil
;
import
com.gic.haoban.common.utils.UuidUtil
;
import
com.gic.haoban.manage.api.dto.MaidianDictDTO
;
...
...
@@ -32,7 +32,7 @@ public class MaidianDictApiServiceImpl implements MaidianDictApiService{
@Override
public
void
saveModule
(
MaidianDictModuleDTO
dto
)
{
TabHaobanMaidianDictModule
tab
=
EntityUtil
.
changeEntityByJSON
(
TabHaobanMaidianDictModule
.
class
,
dto
);
if
(
StringUtil
.
isEmpty
(
tab
.
getModuleId
())){
if
(
StringUtil
s
.
isEmpty
(
tab
.
getModuleId
())){
//新增
tab
.
setCreateTime
(
new
Date
());
tab
.
setUpdateTime
(
new
Date
());
...
...
@@ -48,7 +48,7 @@ public class MaidianDictApiServiceImpl implements MaidianDictApiService{
@Override
public
void
savePage
(
MaidianDictDTO
dto
)
{
TabHaobanMaidianDict
tab
=
EntityUtil
.
changeEntityByJSON
(
TabHaobanMaidianDict
.
class
,
dto
);
if
(
StringUtil
.
isEmpty
(
tab
.
getDictId
())){
if
(
StringUtil
s
.
isEmpty
(
tab
.
getDictId
())){
//新增
tab
.
setCreateTime
(
new
Date
());
tab
.
setUpdateTime
(
new
Date
());
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/MessageApiServiceImpl.java
View file @
b17c7c0b
...
...
@@ -5,6 +5,8 @@ import com.gic.commons.util.EntityUtil;
import
com.gic.commons.util.GICMQClientUtil
;
import
com.gic.commons.util.GlobalInfo
;
import
com.gic.commons.util.GlobalVar
;
import
com.gic.enterprise.api.dto.StoreDTO
;
import
com.gic.enterprise.api.service.StoreService
;
import
com.gic.haoban.app.customer.service.api.service.InnerApiService
;
import
com.gic.haoban.base.api.common.Constant
;
import
com.gic.haoban.base.api.common.ServiceResponse
;
...
...
@@ -76,6 +78,9 @@ public class MessageApiServiceImpl implements MessageApiService {
private
InnerApiService
innerApiService
;
private
final
String
CONTACT_APP
=
"contactSuiteId"
;
@Autowired
private
StoreService
storeService
;
@Override
public
void
gicMessageReceive
(
GicMessageDTO
gicMessageDTO
)
{
...
...
@@ -137,6 +142,14 @@ public class MessageApiServiceImpl implements MessageApiService {
}
departmentDTO
.
setWxEnterpriseId
(
enterprise
.
getWxEnterpriseId
());
if
(
dto
.
getChangeType
()
==
GicEditType
.
ADD
.
getCode
()){
Integer
isStore
=
departmentDTO
.
getIsStore
();
if
(
isStore
==
1
){
//不是线上门店 不新增
StoreDTO
store
=
storeService
.
getStore
(
departmentDTO
.
getRelatedId
());
if
(
store
==
null
||
store
.
getStatus
()
!=
2
){
return
;
}
}
ServiceResponse
response
=
this
.
departmentApiService
.
add
(
departmentDTO
);
GicClerkDTO
gicClerkDTO
=
dto
.
getGicClerkDTO
();
if
(
gicClerkDTO
!=
null
){
...
...
@@ -147,6 +160,14 @@ public class MessageApiServiceImpl implements MessageApiService {
}
else
if
(
dto
.
getChangeType
()
==
GicEditType
.
UPDATE
.
getCode
()){
TabHaobanDepartment
department
=
this
.
departmentService
.
selectByRelatedId
(
dto
.
getId
());
if
(
department
==
null
){
Integer
isStore
=
departmentDTO
.
getIsStore
();
if
(
isStore
==
1
){
//不是线上门店 不新增
StoreDTO
store
=
storeService
.
getStore
(
departmentDTO
.
getRelatedId
());
if
(
store
==
null
||
store
.
getStatus
()
!=
2
){
return
;
}
}
ServiceResponse
response
=
this
.
departmentApiService
.
add
(
departmentDTO
);
log
.
info
(
"添加结果:{}"
,
JSON
.
toJSONString
(
response
));
}
else
{
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/StaffDepartmentRelatedApiServiceImpl.java
View file @
b17c7c0b
...
...
@@ -15,7 +15,6 @@ import org.springframework.beans.factory.annotation.Autowired;
import
cn.hutool.core.collection.CollectionUtil
;
import
com.alibaba.csp.sentinel.util.StringUtil
;
import
com.alibaba.fastjson.JSONObject
;
import
com.gic.clerk.api.dto.ClerkDTO
;
import
com.gic.clerk.api.service.ClerkService
;
...
...
@@ -141,7 +140,7 @@ public class StaffDepartmentRelatedApiServiceImpl implements StaffDepartmentRela
return
map
;
}
String
clerkCode
=
clerkDTO
.
getClerkCode
();
if
(
StringUtil
.
isEmpty
(
clerkCode
)
){
if
(
StringUtil
s
.
isEmpty
(
clerkCode
)
){
return
map
;
}
String
enterpriseId
=
clerkDTO
.
getEnterpriseId
();
...
...
haoban-manage3-service/src/main/resources/mapper/TabHaobanMaidianLogMapper.xml
View file @
b17c7c0b
...
...
@@ -23,6 +23,8 @@
<result
column=
"stay_time"
property=
"stayTime"
jdbcType=
"INTEGER"
/>
<result
column=
"track_sign"
property=
"trackSign"
jdbcType=
"VARCHAR"
/>
<result
column=
"store_id"
property=
"storeId"
jdbcType=
"VARCHAR"
/>
<result
column=
"clerk_id"
property=
"clerkId"
jdbcType=
"VARCHAR"
/>
<result
column=
"enterprise_id"
property=
"enterpriseId"
jdbcType=
"VARCHAR"
/>
<result
column=
"clerk_code"
property=
"clerkCode"
jdbcType=
"VARCHAR"
/>
<result
column=
"store_status"
property=
"storeStatus"
jdbcType=
"INTEGER"
/>
<result
column=
"create_time"
property=
"createTime"
jdbcType=
"TIMESTAMP"
/>
...
...
@@ -31,7 +33,7 @@
<sql
id=
"Base_Column_List"
>
maidian_id, staff_id, wx_enterprise_id, phone_number, device_date, options, event,
url, context, scene, platform, model, brand, hbversion, system, sdk_version, version,
system_info, stay_time, create_time, update_time,track_sign,store_id,,store_status,clerk_code
system_info, stay_time, create_time, update_time,track_sign,store_id,,store_status,clerk_code
,clerk_id,enterprise_id
</sql>
<select
id=
"selectByPrimaryKey"
resultMap=
"BaseResultMap"
parameterType=
"java.lang.Integer"
>
select
...
...
@@ -50,7 +52,7 @@
scene, platform, model,
brand, hbversion, system,
sdk_version, version, system_info,
stay_time, create_time, update_time,track_sign,store_status,clerk_code,store_id
stay_time, create_time, update_time,track_sign,store_status,clerk_code,store_id
,clerk_id,enterprise_id
)
values (#{maidianId,jdbcType=INTEGER}, #{staffId,jdbcType=VARCHAR}, #{wxEnterpriseId,jdbcType=VARCHAR},
#{phoneNumber,jdbcType=VARCHAR}, #{deviceDate,jdbcType=TIMESTAMP}, #{options,jdbcType=VARCHAR},
...
...
@@ -59,7 +61,7 @@
#{brand,jdbcType=VARCHAR}, #{hbversion,jdbcType=VARCHAR}, #{system,jdbcType=VARCHAR},
#{sdkVersion,jdbcType=VARCHAR}, #{version,jdbcType=VARCHAR}, #{systemInfo,jdbcType=VARCHAR},
#{stayTime,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP},#{trackSign},
#{storeStatus},#{clerkCode},#{storeId}
#{storeStatus},#{clerkCode},#{storeId}
,#{clerkId},#{enterpriseId}
)
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.gic.haoban.manage.service.entity.TabHaobanMaidianLog"
>
...
...
@@ -131,6 +133,12 @@
<if
test=
"trackSign != null"
>
track_sign,
</if>
<if
test=
"clerkId != null"
>
clerk_id,
</if>
<if
test=
"enterpriseId != null"
>
enterprise_id,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"maidianId != null"
>
...
...
@@ -199,6 +207,12 @@
<if
test=
"trackSign != null"
>
#{trackSign},
</if>
<if
test=
"clerkId != null"
>
#{clerkId},
</if>
<if
test=
"enterpriseId != null"
>
#{enterpriseId},
</if>
</trim>
</insert>
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.gic.haoban.manage.service.entity.TabHaobanMaidianLog"
>
...
...
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/controller/ClerkController.java
View file @
b17c7c0b
...
...
@@ -15,7 +15,6 @@ import org.springframework.web.bind.annotation.RestController;
import
cn.hutool.core.collection.CollectionUtil
;
import
com.alibaba.csp.sentinel.util.StringUtil
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
...
...
@@ -198,7 +197,7 @@ public class ClerkController extends WebBaseController{
storeClerkCode
=
clerkDTO
.
getClerkCode
();
}
}
if
(
StringUtil
.
isNotBlank
(
storeClerkCode
)){
if
(
StringUtil
s
.
isNotBlank
(
storeClerkCode
)){
for
(
StaffDTO
dto
:
resultlist
){
if
(
storeClerkCode
.
equals
(
dto
.
getClerkCode
())){
dto
.
setClerkType
(
1
);
...
...
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/controller/MaidianLogController.java
View file @
b17c7c0b
...
...
@@ -8,6 +8,9 @@ import org.springframework.web.bind.annotation.RequestMapping;
import
org.springframework.web.bind.annotation.RestController
;
import
com.alibaba.fastjson.JSON
;
import
com.gic.clerk.api.service.ClerkService
;
import
com.gic.enterprise.api.dto.StoreDTO
;
import
com.gic.enterprise.api.service.StoreService
;
import
com.gic.haoban.common.utils.HaobanResponse
;
import
com.gic.haoban.manage.api.dto.MaidianLogDTO
;
import
com.gic.haoban.manage.api.service.MaidianLogApiService
;
...
...
@@ -18,6 +21,10 @@ public class MaidianLogController extends WebBaseController{
@Autowired
private
MaidianLogApiService
maidianLogApiService
;
@Autowired
private
ClerkService
clerkService
;
@Autowired
private
StoreService
storeService
;
@RequestMapping
(
"save-maidian-log"
)
public
HaobanResponse
saveUserLoginLog
(
String
maidianLogStr
)
{
...
...
@@ -30,6 +37,14 @@ public class MaidianLogController extends WebBaseController{
if
(
StringUtils
.
isNotBlank
(
options
)
&&
options
.
length
()
>
2000
){
maidianLogDTO
.
setOptions
(
options
.
substring
(
0
,
1999
));
}
StoreDTO
store
=
storeService
.
getStore
(
maidianLogDTO
.
getStoreId
());
if
(
store
!=
null
){
com
.
gic
.
clerk
.
api
.
dto
.
ClerkDTO
clerkDTO
=
clerkService
.
getClerkByClerkCode
(
store
.
getEnterpriseId
(),
maidianLogDTO
.
getClerkCode
());
maidianLogDTO
.
setEnterpriseId
(
store
.
getEnterpriseId
());
if
(
clerkDTO
!=
null
){
maidianLogDTO
.
setClerkId
(
clerkDTO
.
getClerkId
());
}
}
maidianLogApiService
.
insert
(
maidianLogDTO
);
}
return
resultResponse
(
HaoBanErrCode
.
ERR_1
);
...
...
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