Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
T
tianjin-cement
Project
Project
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
竹天卫
tianjin-cement
Commits
03f25c1d
Commit
03f25c1d
authored
Oct 28, 2020
by
竹天卫
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
12312312321
parent
b2da2b36
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
34 additions
and
8 deletions
+34
-8
SysApprovalController.java
.../sc/cement/business/controller/SysApprovalController.java
+26
-0
WeiXinService.java
...n/wise/sc/cement/business/service/impl/WeiXinService.java
+6
-6
application.yml
cement-business/src/main/resources/application.yml
+2
-2
No files found.
cement-business/src/main/java/cn/wise/sc/cement/business/controller/SysApprovalController.java
View file @
03f25c1d
...
...
@@ -5,6 +5,7 @@ import cn.wise.sc.cement.business.entity.SysGroup;
import
cn.wise.sc.cement.business.model.BaseResponse
;
import
cn.wise.sc.cement.business.model.PageQuery
;
import
cn.wise.sc.cement.business.service.ISysApprovalService
;
import
cn.wise.sc.cement.business.service.ISysDictionaryService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.slf4j.Logger
;
...
...
@@ -29,6 +30,8 @@ public class SysApprovalController {
@Autowired
private
ISysApprovalService
approvalService
;
@Autowired
private
ISysDictionaryService
dictionaryService
;
@ApiOperation
(
value
=
"审批分页列表"
)
@GetMapping
(
"/getPage"
)
...
...
@@ -78,5 +81,28 @@ public class SysApprovalController {
return
BaseResponse
.
errorMsg
(
"失败!"
);
}
@ApiOperation
(
value
=
"删除审批"
)
@PostMapping
(
"/delete/{id}"
)
public
BaseResponse
delete
(
@PathVariable
Integer
id
)
{
try
{
approvalService
.
removeById
(
id
);
return
BaseResponse
.
okData
(
"删除成功"
);
}
catch
(
Exception
e
)
{
log
.
debug
(
"删除审批{}"
,
e
);
}
return
BaseResponse
.
errorMsg
(
"失败!"
);
}
@ApiOperation
(
value
=
"获取审批流程列表"
)
@GetMapping
(
"/getSampleFormList"
)
public
BaseResponse
getSampleFormList
()
{
try
{
return
dictionaryService
.
getContent
(
"审批流程"
);
}
catch
(
Exception
e
)
{
log
.
debug
(
"获取审批流程列表{}"
,
e
);
}
return
BaseResponse
.
errorMsg
(
"失败!"
);
}
}
cement-business/src/main/java/cn/wise/sc/cement/business/service/impl/WeiXinService.java
View file @
03f25c1d
...
...
@@ -47,7 +47,7 @@ public class WeiXinService {
System
.
out
.
println
(
"==================code==================="
);
System
.
out
.
println
(
code
);
try
{
/*
String accessToken = null;
String
accessToken
=
null
;
if
(
type
.
equals
(
"PC"
))
{
accessToken
=
getAccessToken
();
}
else
if
(
type
.
equals
(
"APP"
))
{
...
...
@@ -64,10 +64,10 @@ public class WeiXinService {
String
UserId
=
jsonObject
.
getString
(
"UserId"
);
System
.
out
.
println
(
"==================UserId==================="
);
System
.
out
.
println
(
UserId
);
JSONObject userJson = getUser(accessToken, UserId);
*/
JSONObject
userJson
=
getUser
(
accessToken
,
UserId
);
QueryWrapper
<
SysUser
>
wrapper
=
new
QueryWrapper
<>();
//
wrapper.eq("phone", userJson.get("mobile"));
wrapper
.
eq
(
"phone"
,
code
);
//暂时用手机号代替code
wrapper
.
eq
(
"phone"
,
userJson
.
get
(
"mobile"
));
//
wrapper.eq("phone", code); //暂时用手机号代替code
SysUser
sysUser
=
userService
.
getOne
(
wrapper
);
if
(
sysUser
==
null
)
{
return
BaseResponse
.
errorMsg
(
"非系统用户不允许登录!"
);
...
...
@@ -83,8 +83,8 @@ public class WeiXinService {
sysUser
.
getName
(),
sysUser
.
getPhone
());
System
.
out
.
println
(
token
);
redisUtil
.
setString
(
sysUser
.
getId
().
toString
(),
token
,
3600
);
//
sysUser.setWxId(UserId);
//
userService.updateById(sysUser);
sysUser
.
setWxId
(
UserId
);
userService
.
updateById
(
sysUser
);
return
BaseResponse
.
okData
(
token
);
}
catch
(
Exception
e
)
{
return
BaseResponse
.
errorMsg
(
e
.
getMessage
());
...
...
cement-business/src/main/resources/application.yml
View file @
03f25c1d
...
...
@@ -7,8 +7,8 @@ spring:
active
:
dev
datasource
:
# 192.168.110.85 admin!@#123
url
:
jdbc:mysql://192.168.110.85:3306/sinoma_tcdri?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=UTF-8&useSSL=false
#
url: jdbc:mysql://81.68.92.175:3306/sinoma_tcdri?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=UTF-8&useSSL=false
#
url: jdbc:mysql://192.168.110.85:3306/sinoma_tcdri?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=UTF-8&useSSL=false
url
:
jdbc:mysql://81.68.92.175:3306/sinoma_tcdri?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=UTF-8&useSSL=false
username
:
root
password
:
admin!@#123
driverClassName
:
com.mysql.cj.jdbc.Driver
...
...
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