Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
8
8timerapiv200
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
8timerv2
8timerapiv200
Commits
79cd0c2d
Commit
79cd0c2d
authored
Apr 29, 2020
by
东州 翁
Committed by
chenzg
Jul 05, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增企业一个字段endtime
parent
ca697b84
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
4 deletions
+14
-4
src/main/java/cn/timer/api/controller/LoginController.java
+14
-4
No files found.
src/main/java/cn/timer/api/controller/LoginController.java
View file @
79cd0c2d
package
cn
.
timer
.
api
.
controller
;
package
cn
.
timer
.
api
.
controller
;
import
java.io.IOException
;
import
java.io.IOException
;
import
java.text.DateFormat
;
import
java.text.SimpleDateFormat
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.Calendar
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.List
;
import
java.util.stream.Stream
;
import
java.util.stream.Stream
;
...
@@ -18,6 +21,7 @@ import org.springframework.web.bind.annotation.RequestBody;
...
@@ -18,6 +21,7 @@ import org.springframework.web.bind.annotation.RequestBody;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.RestController
;
import
com.alibaba.druid.sql.visitor.functions.Now
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper
;
import
com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper
;
...
@@ -35,6 +39,7 @@ import cn.timer.api.bean.zzgl.ZzglAuth;
...
@@ -35,6 +39,7 @@ import cn.timer.api.bean.zzgl.ZzglAuth;
import
cn.timer.api.bean.zzgl.ZzglBmgwM
;
import
cn.timer.api.bean.zzgl.ZzglBmgwM
;
import
cn.timer.api.config.annotation.CurrentUser
;
import
cn.timer.api.config.annotation.CurrentUser
;
import
cn.timer.api.config.annotation.UserBean
;
import
cn.timer.api.config.annotation.UserBean
;
import
cn.timer.api.config.enuminterface.YgEnumInterface
;
import
cn.timer.api.config.enums.CommonEnum
;
import
cn.timer.api.config.enums.CommonEnum
;
import
cn.timer.api.dao.qyzx.QyzxEmpEntAssoMapper
;
import
cn.timer.api.dao.qyzx.QyzxEmpEntAssoMapper
;
import
cn.timer.api.dao.qyzx.QyzxEmpLoginMapper
;
import
cn.timer.api.dao.qyzx.QyzxEmpLoginMapper
;
...
@@ -431,10 +436,14 @@ public class LoginController {
...
@@ -431,10 +436,14 @@ public class LoginController {
return
ResultUtil
.
error
(
"已注册过企业"
);
return
ResultUtil
.
error
(
"已注册过企业"
);
}
}
}
}
//增加一个月试用期
Calendar
cal
=
Calendar
.
getInstance
();
cal
.
setTime
(
new
Date
());
cal
.
add
(
Calendar
.
MONTH
,
1
);
cal
.
getTime
();
// 企业信息
// 企业信息
QyzxEntInfoM
qyzxEntInfoM
=
QyzxEntInfoM
.
builder
().
name
(
name
).
registerTime
(
DateUtil
.
date
())
QyzxEntInfoM
qyzxEntInfoM
=
QyzxEntInfoM
.
builder
().
name
(
name
).
registerTime
(
DateUtil
.
date
())
.
endTime
(
DateUtil
.
offsetDay
(
new
Date
(),
offset
)).
level
(
CommonEnum
.
LEVEL_PROBATION
.
getType
())
.
endTime
(
DateUtil
.
offsetDay
(
new
Date
(),
offset
)).
level
(
CommonEnum
.
LEVEL_PROBATION
.
getType
())
.
endTime
(
cal
.
getTime
())
.
build
();
.
build
();
boolean
b1
=
qyzxEntInfoM
.
insert
();
boolean
b1
=
qyzxEntInfoM
.
insert
();
if
(!
b1
)
{
if
(!
b1
)
{
...
@@ -476,7 +485,7 @@ public class LoginController {
...
@@ -476,7 +485,7 @@ public class LoginController {
TransactionAspectSupport
.
currentTransactionStatus
().
setRollbackOnly
();
TransactionAspectSupport
.
currentTransactionStatus
().
setRollbackOnly
();
return
ResultUtil
.
error
(
"注册企业失败4"
);
return
ResultUtil
.
error
(
"注册企业失败4"
);
}
}
return
ResultUtil
.
success
(
"注册企业成功"
);
return
ResultUtil
.
success
(
"注册企业成功"
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
TransactionAspectSupport
.
currentTransactionStatus
().
setRollbackOnly
();
TransactionAspectSupport
.
currentTransactionStatus
().
setRollbackOnly
();
...
@@ -530,10 +539,11 @@ public class LoginController {
...
@@ -530,10 +539,11 @@ public class LoginController {
QysDto
ctrl
=
qys
.
get
(
0
);
QysDto
ctrl
=
qys
.
get
(
0
);
if
(
qyzxEmpLogin1
.
getOrgId
()
!=
null
)
{
if
(
qyzxEmpLogin1
.
getOrgId
()
!=
null
)
{
Stream
<
QysDto
>
s
=
qys
.
stream
()
Stream
<
QysDto
>
s
=
qys
.
stream
()
.
filter
(
item
->
item
.
getStatus
()
==
1
&&
qyzxEmpLogin1
.
getOrgId
().
equals
(
item
.
getId
()));
.
filter
(
item
->
"1"
.
equals
(
item
.
getStatus
().
toString
())
&&
qyzxEmpLogin1
.
getOrgId
().
equals
(
item
.
getId
()));
if
(
s
!=
null
)
{
if
(
s
!=
null
)
{
ctrl
=
s
.
findFirst
().
get
();
ctrl
=
s
.
findFirst
().
get
();
}
}
}
}
if
(
ctrl
.
getStatus
()
==
null
||
ctrl
.
getStatus
().
equals
(
0
))
{
if
(
ctrl
.
getStatus
()
==
null
||
ctrl
.
getStatus
().
equals
(
0
))
{
return
ResultUtil
.
error
(
"帐号被禁用"
);
return
ResultUtil
.
error
(
"帐号被禁用"
);
...
...
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