Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
entrance_api
Project
Project
Details
Activity
Releases
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
王琮
entrance_api
Commits
a636dada
Commit
a636dada
authored
Dec 06, 2022
by
盖献康
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/dev' into dev
parents
caa2f764
70e531cc
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
96 additions
and
7 deletions
+96
-7
AepPushController.java
...rcisoft/integration/aep/Controller/AepPushController.java
+33
-0
SysUserRepositorys.java
.../java/org/rcisoft/sys/sysuser/dao/SysUserRepositorys.java
+5
-0
CyWxMiniServiceImpl.java
...org/rcisoft/tencent/service/impl/CyWxMiniServiceImpl.java
+2
-2
SysUserRepositorys.xml
src/main/resources/mapper/SysUserRepositorys.xml
+53
-3
VisitPersonRepositorys.xml
src/main/resources/mapper/VisitPersonRepositorys.xml
+3
-2
No files found.
src/main/java/org/rcisoft/integration/aep/Controller/AepPushController.java
0 → 100644
View file @
a636dada
package
org
.
rcisoft
.
integration
.
aep
.
Controller
;
import
com.alibaba.fastjson.JSONObject
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.extern.slf4j.Slf4j
;
import
org.rcisoft.core.anno.CyOpeLogAnno
;
import
org.rcisoft.core.operlog.enums.CyLogTypeEnum
;
import
org.rcisoft.integration.jieLink.dto.JieLinkResultDto
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
@Slf4j
@RestController
@RequestMapping
(
"/aep"
)
public
class
AepPushController
{
/**
* 门磁推送数据接口
* @param data
* @return
*/
@ApiOperation
(
value
=
"AEP平台集成"
,
notes
=
"门磁数据订阅"
)
@PostMapping
(
value
=
"/pushData"
)
public
JieLinkResultDto
pushData
(
@RequestBody
JSONObject
data
)
{
JieLinkResultDto
result
=
new
JieLinkResultDto
();
log
.
info
(
data
.
toJSONString
());
return
result
;
}
}
src/main/java/org/rcisoft/sys/sysuser/dao/SysUserRepositorys.java
View file @
a636dada
...
@@ -65,5 +65,10 @@ public interface SysUserRepositorys extends CyBaseMapper<SysUser> {
...
@@ -65,5 +65,10 @@ public interface SysUserRepositorys extends CyBaseMapper<SysUser> {
List
<
UserDto
>
selectByOpenid
(
String
wxOpenid
);
List
<
UserDto
>
selectByOpenid
(
String
wxOpenid
);
List
<
UserDto
>
selectByPhone
(
String
phone
);
List
<
UserDto
>
selectByPhone
(
String
phone
);
//微信根据手机号查询用户
List
<
UserDto
>
selectByPhoneWx
(
String
phone
);
//微信根据openid查询用户
List
<
UserDto
>
selectByOpenidWx
(
String
wxOpenid
);
}
}
src/main/java/org/rcisoft/tencent/service/impl/CyWxMiniServiceImpl.java
View file @
a636dada
...
@@ -119,7 +119,7 @@ public class CyWxMiniServiceImpl implements CyWxMiniService {
...
@@ -119,7 +119,7 @@ public class CyWxMiniServiceImpl implements CyWxMiniService {
}
}
// 2. 未登录
// 2. 未登录
//2.1.1 根据 open_id 数据库数据查询
//2.1.1 根据 open_id 数据库数据查询
List
<
UserDto
>
sysUsers
=
repositorys
.
selectByOpenid
(
wxOpenid
);
List
<
UserDto
>
sysUsers
=
repositorys
.
selectByOpenid
Wx
(
wxOpenid
);
if
(
CollectionUtils
.
isNotEmpty
(
sysUsers
)){
if
(
CollectionUtils
.
isNotEmpty
(
sysUsers
)){
if
(!
sysUsers
.
get
(
0
).
getUserType
().
equals
(
userType
)){
if
(!
sysUsers
.
get
(
0
).
getUserType
().
equals
(
userType
)){
String
errMsg
=
sysUsers
.
get
(
0
).
getUserType
().
equals
(
"0"
)?
"该手机号未内部员工账号"
:
"该手机号为外部访客账号"
;
String
errMsg
=
sysUsers
.
get
(
0
).
getUserType
().
equals
(
"0"
)?
"该手机号未内部员工账号"
:
"该手机号为外部访客账号"
;
...
@@ -156,7 +156,7 @@ public class CyWxMiniServiceImpl implements CyWxMiniService {
...
@@ -156,7 +156,7 @@ public class CyWxMiniServiceImpl implements CyWxMiniService {
}
}
String
phone
=
res
.
get
(
CyWxMiniCons
.
PHONE_STR
).
toString
();
String
phone
=
res
.
get
(
CyWxMiniCons
.
PHONE_STR
).
toString
();
log
.
error
(
"phone---------------------"
+
phone
);
log
.
error
(
"phone---------------------"
+
phone
);
List
<
UserDto
>
sysUsers
=
repositorys
.
selectByPhone
(
phone
);
List
<
UserDto
>
sysUsers
=
repositorys
.
selectByPhone
Wx
(
phone
);
//2.1 手机号已存在
//2.1 手机号已存在
if
(
CollectionUtils
.
isNotEmpty
(
sysUsers
))
if
(
CollectionUtils
.
isNotEmpty
(
sysUsers
))
...
...
src/main/resources/mapper/SysUserRepositorys.xml
View file @
a636dada
...
@@ -71,6 +71,40 @@
...
@@ -71,6 +71,40 @@
<result
column=
"update_date"
jdbcType=
"TIMESTAMP"
property=
"updateDate"
/>
<result
column=
"update_date"
jdbcType=
"TIMESTAMP"
property=
"updateDate"
/>
<result
column=
"create_date"
jdbcType=
"TIMESTAMP"
property=
"createDate"
/>
<result
column=
"create_date"
jdbcType=
"TIMESTAMP"
property=
"createDate"
/>
</resultMap>
</resultMap>
<!-- wx小程序查询使用-->
<resultMap
id=
"UserDtoMap"
type=
"org.rcisoft.tencent.dto.UserDto"
>
<id
column=
"business_id"
jdbcType=
"INTEGER"
property=
"businessId"
/>
<result
column=
"position"
jdbcType=
"VARCHAR"
property=
"position"
/>
<result
column=
"position_label"
jdbcType=
"VARCHAR"
property=
"positionLabel"
/>
<result
column=
"username"
jdbcType=
"VARCHAR"
property=
"username"
/>
<result
column=
"password"
jdbcType=
"VARCHAR"
property=
"password"
/>
<result
column=
"nick_name"
jdbcType=
"VARCHAR"
property=
"nickName"
/>
<result
column=
"user_type"
jdbcType=
"VARCHAR"
property=
"userType"
/>
<result
column=
"name"
jdbcType=
"VARCHAR"
property=
"name"
/>
<result
column=
"email"
jdbcType=
"VARCHAR"
property=
"email"
/>
<result
column=
"phone"
jdbcType=
"VARCHAR"
property=
"phone"
/>
<result
column=
"sex"
jdbcType=
"VARCHAR"
property=
"sex"
/>
<result
column=
"id_number"
jdbcType=
"VARCHAR"
property=
"idNumber"
/>
<result
column=
"avatar"
jdbcType=
"VARCHAR"
property=
"avatar"
/>
<result
column=
"loginIp"
jdbcType=
"VARCHAR"
property=
"loginIp"
/>
<result
column=
"loginDate"
jdbcType=
"TIMESTAMP"
property=
"loginDate"
/>
<result
column=
"dept_id"
jdbcType=
"VARCHAR"
property=
"deptId"
/>
<result
column=
"dept_name"
jdbcType=
"VARCHAR"
property=
"deptName"
/>
<result
column=
"identity"
jdbcType=
"VARCHAR"
property=
"identity"
/>
<result
column=
"wx_openid"
jdbcType=
"VARCHAR"
property=
"wxOpenid"
/>
<result
column=
"wx_address"
jdbcType=
"VARCHAR"
property=
"wxAddress"
/>
<result
column=
"wx_head"
jdbcType=
"VARCHAR"
property=
"wxHead"
/>
<result
column=
"wx_sex"
jdbcType=
"VARCHAR"
property=
"wxSex"
/>
<result
column=
"wx_nick_name"
jdbcType=
"VARCHAR"
property=
"wxNickName"
/>
<result
column=
"remarks"
jdbcType=
"VARCHAR"
property=
"remarks"
/>
<result
column=
"del_flag"
jdbcType=
"VARCHAR"
property=
"delFlag"
/>
<result
column=
"flag"
jdbcType=
"VARCHAR"
property=
"flag"
/>
<result
column=
"create_by"
jdbcType=
"VARCHAR"
property=
"createBy"
/>
<result
column=
"update_by"
jdbcType=
"VARCHAR"
property=
"updateBy"
/>
<result
column=
"update_date"
jdbcType=
"TIMESTAMP"
property=
"updateDate"
/>
<result
column=
"create_date"
jdbcType=
"TIMESTAMP"
property=
"createDate"
/>
</resultMap>
<!--<cache type="${corePackag!}.util.RedisCache"/>-->
<!--<cache type="${corePackag!}.util.RedisCache"/>-->
<select
id=
"querySysUsers"
resultMap=
"BaseResultMap"
>
<select
id=
"querySysUsers"
resultMap=
"BaseResultMap"
>
select *
select *
...
@@ -101,7 +135,7 @@
...
@@ -101,7 +135,7 @@
and su.position in(${entity.position})
and su.position in(${entity.position})
</if>
</if>
<if
test=
"entity.blacklistFlag == 1 || entity.blacklistFlag == 0"
>
<if
test=
"entity.blacklistFlag == 1 || entity.blacklistFlag == 0"
>
and blacklist_flag = #{entity.blacklistFlag}
and
su.
blacklist_flag = #{entity.blacklistFlag}
</if>
</if>
<if
test=
"entity.deptId !=null and entity.deptId != '' "
>
<if
test=
"entity.deptId !=null and entity.deptId != '' "
>
and su.dept_id in(${entity.deptId})
and su.dept_id in(${entity.deptId})
...
@@ -109,10 +143,10 @@
...
@@ -109,10 +143,10 @@
<if
test=
"entity.phone !=null and entity.phone != '' "
>
<if
test=
"entity.phone !=null and entity.phone != '' "
>
and su.phone like concat ("%",#{entity.phone},"%")
and su.phone like concat ("%",#{entity.phone},"%")
</if>
</if>
<if
test=
"entity.beginTime != null"
>
<!-- 开始时间检索 -->
<if
test=
"entity.beginTime != null
and entity.beginTime !=''
"
>
<!-- 开始时间检索 -->
and date_format(su.create_date,'%Y-%m-%d')
>
= date_format(#{entity.beginTime},'%Y-%m-%d')
and date_format(su.create_date,'%Y-%m-%d')
>
= date_format(#{entity.beginTime},'%Y-%m-%d')
</if>
</if>
<if
test=
"entity.endTime != null"
>
<!-- 结束时间检索 -->
<if
test=
"entity.endTime != null
and entity.endTime !=''
"
>
<!-- 结束时间检索 -->
and date_format(su.create_date,'%Y-%m-%d')
<
= date_format(#{entity.endTime},'%Y-%m-%d')
and date_format(su.create_date,'%Y-%m-%d')
<
= date_format(#{entity.endTime},'%Y-%m-%d')
</if>
</if>
...
@@ -366,10 +400,26 @@
...
@@ -366,10 +400,26 @@
where wx_openid = #{openid}
where wx_openid = #{openid}
and del_flag = 0
and del_flag = 0
</select>
</select>
<select
id=
"selectByOpenidWx"
resultMap=
"UserDtoMap"
>
select su.* ,sd.dept_name dept_name
from sys_user su
left join sys_dept sd on su.dept_id = sd.business_id
where su.wx_openid = #{openid}
and su.del_flag = 0
</select>
<select
id=
"selectByPhone"
resultMap=
"DtoMap"
>
<select
id=
"selectByPhone"
resultMap=
"DtoMap"
>
select *
select *
from sys_user
from sys_user
where phone = #{phone}
where phone = #{phone}
and del_flag = 0
and del_flag = 0
</select>
</select>
<select
id=
"selectByPhoneWx"
resultMap=
"UserDtoMap"
>
select su.* ,sd.dept_name dept_name
from sys_user su
left join sys_dept sd on su.dept_id = sd.business_id
where su.phone = #{phone}
and su.del_flag = 0
</select>
</mapper>
</mapper>
src/main/resources/mapper/VisitPersonRepositorys.xml
View file @
a636dada
...
@@ -112,7 +112,7 @@
...
@@ -112,7 +112,7 @@
and su.position in(${entity.position})
and su.position in(${entity.position})
</if>
</if>
<if
test=
"entity.blacklistFlag == 1 || entity.blacklistFlag == 0"
>
<if
test=
"entity.blacklistFlag == 1 || entity.blacklistFlag == 0"
>
and blacklist_flag = #{entity.blacklistFlag}
and
su.
blacklist_flag = #{entity.blacklistFlag}
</if>
</if>
<if
test=
"entity.deptId !=null and entity.deptId != '' "
>
<if
test=
"entity.deptId !=null and entity.deptId != '' "
>
and su.dept_id in(${entity.deptId})
and su.dept_id in(${entity.deptId})
...
@@ -142,7 +142,8 @@
...
@@ -142,7 +142,8 @@
order BY su.first_date desc
order BY su.first_date desc
</if>
</if>
<if
test=
"entity.sort == '2'.toString() "
>
<!-- 排序-->
<if
test=
"entity.sort == '2'.toString() "
>
<!-- 排序-->
order BY su.name desc
-- order BY su.name desc
order BY F_GET_PYJM(su.name)
</if>
</if>
<if
test=
"entity.sort == '3'.toString() "
>
<!-- 排序-->
<if
test=
"entity.sort == '3'.toString() "
>
<!-- 排序-->
order BY su.last_date desc
order BY su.last_date desc
...
...
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