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
98785a80
Commit
98785a80
authored
Feb 24, 2020
by
qwmqiuwenmin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
6f50a3af
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
76 additions
and
7 deletions
+76
-7
StaffDTO.java
...src/main/java/com/gic/haoban/manage/api/dto/StaffDTO.java
+10
-0
TabHaobanStaff.java
.../com/gic/haoban/manage/service/entity/TabHaobanStaff.java
+11
-0
StaffApiServiceImpl.java
.../manage/service/service/out/impl/StaffApiServiceImpl.java
+35
-4
StaffMapper.xml
...manage3-service/src/main/resources/mapper/StaffMapper.xml
+14
-3
LoginController.java
...com/gic/haoban/manage/web/controller/LoginController.java
+6
-0
No files found.
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/dto/StaffDTO.java
View file @
98785a80
...
...
@@ -51,6 +51,8 @@ public class StaffDTO implements Serializable{
private
int
clerkType
;
private
Integer
syncPostionFlag
;
private
Integer
superManagerFlag
;
private
static
final
long
serialVersionUID
=
1L
;
...
...
@@ -241,5 +243,13 @@ public class StaffDTO implements Serializable{
this
.
syncPostionFlag
=
syncPostionFlag
;
}
public
Integer
getSuperManagerFlag
()
{
return
superManagerFlag
;
}
public
void
setSuperManagerFlag
(
Integer
superManagerFlag
)
{
this
.
superManagerFlag
=
superManagerFlag
;
}
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/entity/TabHaobanStaff.java
View file @
98785a80
...
...
@@ -37,6 +37,8 @@ public class TabHaobanStaff implements Serializable {
private
Integer
sort
;
private
Integer
syncPostionFlag
;
private
Integer
superManagerFlag
;
private
static
final
long
serialVersionUID
=
1L
;
...
...
@@ -175,6 +177,14 @@ public class TabHaobanStaff implements Serializable {
public
void
setSyncPostionFlag
(
Integer
syncPostionFlag
)
{
this
.
syncPostionFlag
=
syncPostionFlag
;
}
public
Integer
getSuperManagerFlag
()
{
return
superManagerFlag
;
}
public
void
setSuperManagerFlag
(
Integer
superManagerFlag
)
{
this
.
superManagerFlag
=
superManagerFlag
;
}
}
\ No newline at end of file
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/StaffApiServiceImpl.java
View file @
98785a80
...
...
@@ -23,6 +23,7 @@ import com.gic.haoban.base.api.common.BasePageInfo;
import
com.gic.haoban.common.utils.HaobanResponse
;
import
com.gic.haoban.common.utils.PageUtil
;
import
com.gic.haoban.common.utils.UuidUtil
;
import
com.gic.haoban.manage.api.dto.DepartmentDTO
;
import
com.gic.haoban.manage.api.dto.StaffDTO
;
import
com.gic.haoban.manage.api.dto.StaffDepartmentRelatedDTO
;
import
com.gic.haoban.manage.api.dto.WxEnterpriseDTO
;
...
...
@@ -217,11 +218,41 @@ public class StaffApiServiceImpl implements StaffApiService {
TabHaobanStaff
staff
=
staffService
.
selectByUserId
(
userId
);
if
(
staff
==
null
)
{
TabHaobanStaff
tab
=
new
TabHaobanStaff
();
staffService
.
add
(
tab
);
WxEnterpriseDTO
enterpriseDTO
=
wxEnterpriseService
.
selectById
(
staff
.
getWxEnterpriseId
());
TabHaobanWxApplication
application
=
wxApplicationService
.
selectByWxEnterpriseIdAndApplicationType
(
staff
.
getWxEnterpriseId
(),
1
);
if
(
enterpriseDTO
!=
null
)
{
if
(
application
!=
null
)
{
Date
now
=
new
Date
();
UserDTO
user
=
qywxUserApiService
.
getWorkWxUser
(
enterpriseDTO
.
getCorpid
(),
application
.
getSiteId
(),
userId
);
TabHaobanStaff
tab
=
new
TabHaobanStaff
();
tab
.
setWxUserId
(
userId
);
tab
.
setCreateTime
(
now
);
tab
.
setUpdateTime
(
now
);
tab
.
setStatusFlag
(
1
);
tab
.
setWxEnterpriseId
(
wxEnterpriseId
);
tab
.
setPhoneNumber
(
user
.
getMobile
());
//tab.setSex(user.getGender());
staffService
.
add
(
tab
);
Integer
[]
departmentId
=
user
.
getDepartment
();
for
(
Integer
integer
:
departmentId
)
{
TabHaobanDepartment
tabDepartment
=
departmentService
.
getByWxId
(
integer
.
toString
(),
wxEnterpriseId
);
if
(
tabDepartment
!=
null
){
TabHaobanStaffDepartmentRelated
tabStaff
=
staffDepartmentRelatedService
.
getDepartmentIdAndStaffId
(
tabDepartment
.
getDepartmentId
(),
staff
.
getStaffId
());
if
(
tabStaff
!=
null
){
StaffDepartmentRelatedDTO
dto
=
new
StaffDepartmentRelatedDTO
();
dto
.
setPhoneNumber
(
user
.
getMobile
());
dto
.
setWxUserId
(
userId
);
dto
.
setWxEnterpriseId
(
wxEnterpriseId
);
dto
.
setStatusFlag
(
1
);
dto
.
setDepartmentId
(
tabDepartment
.
getDepartmentId
());
staffDepartmentRelatedService
.
add
(
dto
);
}
}
}
}
}
StaffDepartmentRelatedDTO
dto
=
new
StaffDepartmentRelatedDTO
();
staffDepartmentRelatedService
.
add
(
dto
);
}
...
...
haoban-manage3-service/src/main/resources/mapper/StaffMapper.xml
View file @
98785a80
...
...
@@ -16,13 +16,14 @@
<result
column=
"sort"
property=
"sort"
jdbcType=
"INTEGER"
/>
<result
column=
"extend_postion"
property=
"extendPostion"
jdbcType=
"VARCHAR"
/>
<result
column=
"sync_postion_flag"
property=
"syncPostionFlag"
jdbcType=
"INTEGER"
/>
<result
column=
"super_manager_flag"
property=
"superManagerFlag"
jdbcType=
"INTEGER"
/>
<result
column=
"status_flag"
property=
"statusFlag"
jdbcType=
"INTEGER"
/>
<result
column=
"create_time"
property=
"createTime"
jdbcType=
"TIMESTAMP"
/>
<result
column=
"update_time"
property=
"updateTime"
jdbcType=
"TIMESTAMP"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
staff_id, wx_user_id, phone_number, staff_name, nation_code, nick_name, sex, postion,
active_flag, extend_postion, status_flag, create_time, update_time,wx_enterprise_id,head_img,sort,sync_postion_flag
active_flag, extend_postion, status_flag, create_time, update_time,wx_enterprise_id,head_img,sort,sync_postion_flag
,super_manager_flag
</sql>
<select
id=
"selectByPrimaryKey"
resultMap=
"BaseResultMap"
parameterType=
"java.lang.String"
>
select
...
...
@@ -39,12 +40,12 @@
staff_name, nation_code, nick_name,
sex, postion, active_flag,
extend_postion, status_flag, create_time,
update_time,wx_enterprise_id,head_img,sort,sync_postion_flag)
update_time,wx_enterprise_id,head_img,sort,sync_postion_flag
,super_manager_flag
)
values (#{staffId,jdbcType=VARCHAR}, #{wxUserId,jdbcType=VARCHAR}, #{phoneNumber,jdbcType=VARCHAR},
#{staffName,jdbcType=VARCHAR}, #{nationCode,jdbcType=VARCHAR}, #{nickName,jdbcType=VARCHAR},
#{sex,jdbcType=INTEGER}, #{postion,jdbcType=VARCHAR}, #{activeFlag,jdbcType=INTEGER},
#{extendPostion,jdbcType=VARCHAR}, #{statusFlag,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP},
#{updateTime,jdbcType=TIMESTAMP},#{wxEnterpriseId},#{headImg},#{sort},#{syncPostionFlag})
#{updateTime,jdbcType=TIMESTAMP},#{wxEnterpriseId},#{headImg},#{sort},#{syncPostionFlag}
,#{superManagerFlag}
)
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.gic.haoban.manage.service.entity.TabHaobanStaff"
>
insert into tab_haoban_staff
...
...
@@ -100,6 +101,9 @@
<if
test=
"syncPostionFlag != null"
>
sync_postion_flag,
</if>
<if
test=
"superManagerFlag != null"
>
super_manager_flag,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"staffId != null"
>
...
...
@@ -153,6 +157,9 @@
<if
test=
"syncPostionFlag != null"
>
#{syncPostionFlag},
</if>
<if
test=
"superManagerFlag != null"
>
superManagerFlag,
</if>
</trim>
</insert>
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.gic.haoban.manage.service.entity.TabHaobanStaff"
>
...
...
@@ -206,6 +213,9 @@
<if
test=
"syncPostionFlag != null"
>
sync_postion_flag = #{syncPostionFlag,jdbcType=INTEGER},
</if>
<if
test=
"superManagerFlag != null"
>
super_manager_flag = #{superManagerFlag,jdbcType=INTEGER},
</if>
</set>
where staff_id = #{staffId,jdbcType=VARCHAR}
</update>
...
...
@@ -227,6 +237,7 @@
update_time = #{updateTime,jdbcType=TIMESTAMP},
sort = #{sort},
sync_postion_flag = #{syncPostionFlag,jdbcType=INTEGER},
super_manager_flag = #{superManagerFlag,jdbcType=INTEGER}
where staff_id = #{staffId,jdbcType=VARCHAR}
</update>
...
...
haoban-manage3-web/src/main/java/com/gic/haoban/manage/web/controller/LoginController.java
View file @
98785a80
...
...
@@ -67,6 +67,12 @@ public class LoginController extends WebBaseController{
}
@RequestMapping
(
"get-login-info"
)
public
HaobanResponse
getLoginInfo
(){
LoginVO
loginVO
=
(
LoginVO
)
AuthRequestUtil
.
getSessionUser
();
return
resultResponse
(
HaoBanErrCode
.
ERR_1
,
loginVO
);
}
@RequestMapping
(
"get-login-qrcode"
)
public
HaobanResponse
getLoginQrcode
()
throws
UnsupportedEncodingException
{
String
corpid
=
config
.
getCorpid
();
...
...
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