Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cloud-platform
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
youjj
cloud-platform
Commits
310cc9ae
Commit
310cc9ae
authored
Dec 21, 2019
by
libin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
身份变更
parent
aa57e0b5
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
115 additions
and
6 deletions
+115
-6
IdentityLevel.java
...aoqi/security/admin/constant/enumerate/IdentityLevel.java
+56
-0
StaffChangeStatusEnum.java
...urity/admin/constant/enumerate/StaffChangeStatusEnum.java
+47
-0
AppUserPositionTempBiz.java
...ub/wxiaoqi/security/admin/biz/AppUserPositionTempBiz.java
+6
-2
ServiceTest.java
xx-order/xx-order-server/src/test/java/ServiceTest.java
+6
-4
No files found.
ace-modules/ace-admin-api/src/main/java/com/github/wxiaoqi/security/admin/constant/enumerate/IdentityLevel.java
0 → 100644
View file @
310cc9ae
package
com
.
github
.
wxiaoqi
.
security
.
admin
.
constant
.
enumerate
;
import
java.util.Arrays
;
import
java.util.List
;
/**
* @author libin
* @version 1.0
* @description 身份等级
* @data 2019/12/21 16:51
*/
public
enum
IdentityLevel
{
HEADQUARTERS_SHAREHOLDER
(
1
,
"总部股东"
),
BRANCH_SHAREHOLDER
(
2
,
"分公司股东"
),
PARTNER
(
3
,
"合伙人"
),
STAFF
(
4
,
"员工"
),
DEPUTY
(
5
,
"代理人"
),
COMMON_USER
(
0
,
"普通用户"
);
private
int
level
;
private
String
name
;
/**
* 股东
*/
private
static
List
<
Integer
>
shareholeders
;
/**
* 员工
*/
private
static
List
<
Integer
>
employees
;
static
{
shareholeders
=
Arrays
.
asList
(
HEADQUARTERS_SHAREHOLDER
.
getLevel
(),
BRANCH_SHAREHOLDER
.
getLevel
());
employees
=
Arrays
.
asList
(
PARTNER
.
getLevel
(),
STAFF
.
getLevel
(),
DEPUTY
.
getLevel
(),
COMMON_USER
.
getLevel
());
}
IdentityLevel
(
int
level
,
String
name
)
{
this
.
level
=
level
;
this
.
name
=
name
;
}
public
int
getLevel
()
{
return
level
;
}
public
void
setLevel
(
int
level
)
{
this
.
level
=
level
;
}
public
String
getName
()
{
return
name
;
}
public
void
setName
(
String
name
)
{
this
.
name
=
name
;
}
}
ace-modules/ace-admin-api/src/main/java/com/github/wxiaoqi/security/admin/constant/enumerate/StaffChangeStatusEnum.java
0 → 100644
View file @
310cc9ae
package
com
.
github
.
wxiaoqi
.
security
.
admin
.
constant
.
enumerate
;
import
java.util.Arrays
;
import
java.util.List
;
/**
* @author libin
* @version 1.0
* @description 员工变更状态
* @data 2019/12/21 18:14
*/
public
enum
StaffChangeStatusEnum
{
INDUCTION
(
1
,
"入职"
),
JOB_CHANGE
(
2
,
"职位变更"
),
IDENTITY_CHANE
(
3
,
"身份变更"
),
COMPANY_CHANGE
(
4
,
"公司所属变更"
),
JOB_SEPARATION
(
5
,
"离职(状态更改)"
),
REINSTATED
(
6
,
"复职(状态更改)"
);
private
int
code
;
private
String
desc
;
public
static
List
<
Integer
>
needChangePostionsStatus
;
static
{
needChangePostionsStatus
=
Arrays
.
asList
(
INDUCTION
.
getCode
(),
IDENTITY_CHANE
.
getCode
(),
JOB_SEPARATION
.
getCode
(),
REINSTATED
.
getCode
());
}
StaffChangeStatusEnum
(
int
code
,
String
desc
)
{
this
.
code
=
code
;
this
.
desc
=
desc
;
}
public
int
getCode
()
{
return
code
;
}
public
void
setCode
(
int
code
)
{
this
.
code
=
code
;
}
public
String
getDesc
()
{
return
desc
;
}
public
void
setDesc
(
String
desc
)
{
this
.
desc
=
desc
;
}
}
ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/admin/biz/AppUserPositionTempBiz.java
View file @
310cc9ae
package
com
.
github
.
wxiaoqi
.
security
.
admin
.
biz
;
package
com
.
github
.
wxiaoqi
.
security
.
admin
.
biz
;
import
com.github.wxiaoqi.security.admin.constant.enumerate.StaffChangeStatusEnum
;
import
com.github.wxiaoqi.security.admin.dto.AppUserPositionChangeRecordDTO
;
import
com.github.wxiaoqi.security.admin.dto.AppUserPositionChangeRecordDTO
;
import
com.github.wxiaoqi.security.admin.dto.AppUserPositionTempDTO
;
import
com.github.wxiaoqi.security.admin.dto.AppUserPositionTempDTO
;
import
com.github.wxiaoqi.security.admin.dto.AppUserPositionTempFindDTO
;
import
com.github.wxiaoqi.security.admin.dto.AppUserPositionTempFindDTO
;
...
@@ -26,7 +27,6 @@ import org.springframework.transaction.annotation.Transactional;
...
@@ -26,7 +27,6 @@ import org.springframework.transaction.annotation.Transactional;
import
tk.mybatis.mapper.entity.Example
;
import
tk.mybatis.mapper.entity.Example
;
import
java.sql.Timestamp
;
import
java.sql.Timestamp
;
import
java.time.Instant
;
import
java.util.*
;
import
java.util.*
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
...
@@ -120,7 +120,6 @@ public class AppUserPositionTempBiz extends BaseBiz<AppUserPositionTempMapper, A
...
@@ -120,7 +120,6 @@ public class AppUserPositionTempBiz extends BaseBiz<AppUserPositionTempMapper, A
return
ObjectRestResponse
.
succ
();
return
ObjectRestResponse
.
succ
();
}
}
public
void
updateAppuserPostionStatusById
(
Integer
id
,
int
status
)
{
public
void
updateAppuserPostionStatusById
(
Integer
id
,
int
status
)
{
AppUserPositionTemp
appUserPositionTemp
=
new
AppUserPositionTemp
();
AppUserPositionTemp
appUserPositionTemp
=
new
AppUserPositionTemp
();
appUserPositionTemp
.
setId
(
id
);
appUserPositionTemp
.
setId
(
id
);
...
@@ -414,6 +413,11 @@ public class AppUserPositionTempBiz extends BaseBiz<AppUserPositionTempMapper, A
...
@@ -414,6 +413,11 @@ public class AppUserPositionTempBiz extends BaseBiz<AppUserPositionTempMapper, A
if
(
appUserDetail
!=
null
)
{
if
(
appUserDetail
!=
null
)
{
loginBiz
.
updateUserPosition
(
appUserDetail
.
getId
(),
appUserPositionTempDTO
.
getPositionId
());
loginBiz
.
updateUserPosition
(
appUserDetail
.
getId
(),
appUserPositionTempDTO
.
getPositionId
());
}
}
if
(
StaffChangeStatusEnum
.
needChangePostionsStatus
.
contains
(
changeStatus
)){
}
return
ObjectRestResponse
.
succ
();
return
ObjectRestResponse
.
succ
();
}
}
...
...
xx-order/xx-order-server/src/test/java/ServiceTest.java
View file @
310cc9ae
...
@@ -15,6 +15,8 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
...
@@ -15,6 +15,8 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import
java.text.ParseException
;
import
java.text.ParseException
;
import
java.text.SimpleDateFormat
;
import
java.text.SimpleDateFormat
;
import
java.time.LocalDate
;
import
java.time.format.DateTimeFormatter
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.Map
;
import
java.util.Map
;
...
@@ -125,13 +127,13 @@ public class ServiceTest {
...
@@ -125,13 +127,13 @@ public class ServiceTest {
public
void
testOrderReceivedStatisticsJobHandler
(){
public
void
testOrderReceivedStatisticsJobHandler
(){
cn
.
hutool
.
core
.
date
.
DateTime
dateTime
=
DateUtil
.
parse
(
"2019-11-29"
,
"yyyy-MM-dd"
);
cn
.
hutool
.
core
.
date
.
DateTime
dateTime
=
DateUtil
.
parse
(
"2019-11-29"
,
"yyyy-MM-dd"
);
// cn.hutool.core.date.DateTime offset = DateUtil.offset(dateTime, DateField.DAY_OF_MONTH, 1);
// cn.hutool.core.date.DateTime offset = DateUtil.offset(dateTime, DateField.DAY_OF_MONTH, 1);
orderReceivedStatisticsJobHandler
.
execute
(
"2019-11-15"
);
//
orderReceivedStatisticsJobHandler.execute("2019-11-15");
/*
LocalDate startLocalDate = LocalDate.of(2019, 10, 01);
LocalDate
startLocalDate
=
LocalDate
.
of
(
2019
,
10
,
01
);
LocalDate endLocalDate = LocalDate.of(2019,12,
19
);
LocalDate
endLocalDate
=
LocalDate
.
of
(
2019
,
12
,
20
);
while
(
startLocalDate
.
isBefore
(
endLocalDate
)){
while
(
startLocalDate
.
isBefore
(
endLocalDate
)){
String
dateStr
=
startLocalDate
.
format
(
DateTimeFormatter
.
ofPattern
(
"yyyy-MM-dd"
));
String
dateStr
=
startLocalDate
.
format
(
DateTimeFormatter
.
ofPattern
(
"yyyy-MM-dd"
));
startLocalDate
=
startLocalDate
.
plusDays
(
1
);
startLocalDate
=
startLocalDate
.
plusDays
(
1
);
orderReceivedStatisticsJobHandler
.
execute
(
dateStr
);
orderReceivedStatisticsJobHandler
.
execute
(
dateStr
);
}
*/
}
}
}
}
}
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