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
290a3763
Commit
290a3763
authored
Nov 23, 2020
by
竹天卫
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
正式部署代码
parent
87d5da31
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
26 additions
and
34 deletions
+26
-34
pom.xml
cement-business/pom.xml
+4
-7
WeiXinController.java
.../wise/sc/cement/business/controller/WeiXinController.java
+4
-4
EntrustServiceImpl.java
...e/sc/cement/business/service/impl/EntrustServiceImpl.java
+1
-1
EquipmentServiceImpl.java
...sc/cement/business/service/impl/EquipmentServiceImpl.java
+1
-1
PlanConsumablesPurchaseServiceImpl.java
...ness/service/impl/PlanConsumablesPurchaseServiceImpl.java
+2
-2
StandardServiceImpl.java
.../sc/cement/business/service/impl/StandardServiceImpl.java
+1
-1
WeiXinService.java
...n/wise/sc/cement/business/service/impl/WeiXinService.java
+3
-8
WeiXinUtil.java
...va/cn/wise/sc/cement/business/util/weixin/WeiXinUtil.java
+5
-5
application.yml
cement-business/src/main/resources/application.yml
+2
-2
fastdfs-client.properties
cement-business/src/main/resources/fastdfs-client.properties
+1
-1
pom.xml
pom.xml
+2
-2
No files found.
cement-business/pom.xml
View file @
290a3763
...
...
@@ -204,13 +204,10 @@
<filtering>
true
</filtering>
<includes>
<include>
*.xlsx
</include>
<include>
*.properties
</include>
<include>
*.xml
</include>
<include>
*
</include>
</includes>
<excludes>
<exclude>
*.yml
</exclude>
</excludes>
</resource>
<resource>
<directory>
src/main/resources/templates
</directory>
<filtering>
true
</filtering>
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/controller/WeiXinController.java
View file @
290a3763
...
...
@@ -36,9 +36,9 @@ public class WeiXinController {
log
.
debug
(
"============================================="
);
try
{
//测试服务器
return
weiXinService
.
getTestToken
(
code
);
//
return weiXinService.getTestToken(code);
//正式服务器
//
return weiXinService.getToken(code, "APP");
return
weiXinService
.
getToken
(
code
,
"APP"
);
}
catch
(
Exception
e
)
{
log
.
debug
(
"获取登录token{}"
,
e
);
}
...
...
@@ -50,9 +50,9 @@ public class WeiXinController {
public
BaseResponse
getPCToken
(
String
code
)
{
try
{
//测试服务器
return
weiXinService
.
getTestToken
(
code
);
//
return weiXinService.getTestToken(code);
//正式服务器
//
return weiXinService.getToken(code, "PC");
return
weiXinService
.
getToken
(
code
,
"PC"
);
}
catch
(
Exception
e
)
{
log
.
debug
(
"获取登录token{}"
,
e
);
}
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/service/impl/EntrustServiceImpl.java
View file @
290a3763
...
...
@@ -127,7 +127,7 @@ public class EntrustServiceImpl extends ServiceImpl<EntrustMapper, Entrust> impl
private
EntityEnclosureMapper
entityEnclosureMapper
;
@Value
(
"${weixin.systemUrl}"
)
private
static
String
systemUrl
;
private
String
systemUrl
;
/**
* 委托分页
*
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/service/impl/EquipmentServiceImpl.java
View file @
290a3763
...
...
@@ -66,7 +66,7 @@ public class EquipmentServiceImpl extends ServiceImpl<EquipmentMapper, Equipment
@Autowired
private
WeiXinService
weiXinService
;
@Value
(
"${weixin.systemUrl}"
)
private
static
String
systemUrl
;
private
String
systemUrl
;
/**
* 设备分页查询
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/service/impl/PlanConsumablesPurchaseServiceImpl.java
View file @
290a3763
...
...
@@ -236,9 +236,9 @@ public class PlanConsumablesPurchaseServiceImpl extends ServiceImpl<PlanConsumab
log
.
debug
(
"没有找到数据!"
);
}
Map
<
String
,
Object
>
beanParams
=
new
HashMap
<>();
records
.
add
(
records
.
get
(
0
));
//
records.add(records.get(0));
beanParams
.
put
(
"list"
,
records
);
beanParams
.
put
(
"fileNo"
,
""
);
beanParams
.
put
(
"fileNo"
,
"
41-4051-2001
"
);
beanParams
.
put
(
"year"
,
DateUtil
.
year
(
DateUtil
.
date
())
+
""
);
WordUtil
.
writeWordReport
(
"消耗品采购计划.docx"
,
"消耗品采购计划.ftl"
,
beanParams
,
response
,
FileExt
.
DOC
);
}
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/service/impl/StandardServiceImpl.java
View file @
290a3763
...
...
@@ -76,7 +76,7 @@ public class StandardServiceImpl extends ServiceImpl<StandardMapper, Standard> i
@Autowired
private
WeiXinService
weiXinService
;
@Value
(
"${weixin.systemUrl}"
)
private
static
String
systemUrl
;
private
String
systemUrl
;
/**
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/service/impl/WeiXinService.java
View file @
290a3763
...
...
@@ -35,15 +35,11 @@ public class WeiXinService {
RedisUtil
redisUtil
;
@Value
(
"${weixin.corpId}"
)
private
static
String
corpId
;
private
String
corpId
;
@Value
(
"${weixin.agentId}"
)
private
static
int
agentId
;
private
int
agentId
;
@Value
(
"${weixin.agentSecret}"
)
private
static
String
agentSecret
;
private
String
agentSecret
;
final
static
String
ACCESS_TOKEN
=
"ACCESS_TOKEN"
;
final
static
String
JSAPITICKET
=
"JSAPITICKET"
;
...
...
@@ -154,7 +150,6 @@ public class WeiXinService {
public
String
getToken
()
{
String
accessToken
;
if
(!
redisUtil
.
existsKey
(
ACCESS_TOKEN
))
{
String
param
=
"corpid=%s&corpsecret=%s"
;
param
=
String
.
format
(
param
,
corpId
,
agentSecret
);
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/util/weixin/WeiXinUtil.java
View file @
290a3763
...
...
@@ -34,11 +34,11 @@ public class WeiXinUtil {
public
final
static
String
jsapi_ticket_url
=
"https://qyapi.weixin.qq.com/cgi-bin/get_jsapi_ticket?access_token=ACCESSTOKEN"
;
@Value
(
"${weixin.corpId}"
)
private
static
String
corpId
;
private
String
corpId
;
@Value
(
"${weixin.agentId}"
)
private
static
int
agentId
;
private
int
agentId
;
@Value
(
"${weixin.agentSecret}"
)
private
static
String
agentSecret
;
private
String
agentSecret
;
...
...
@@ -368,7 +368,7 @@ public class WeiXinUtil {
String
nonceStr
=
UUID
.
randomUUID
().
toString
();
// 必填,生成签名的随机串
//System.out.println("nonceStr:"+nonceStr);
String
accessToken
=
WeiXinUtil
.
getAccessToken
(
corpId
,
agentSecret
).
getToken
();
String
accessToken
=
WeiXinUtil
.
getAccessToken
(
Global
.
corpId
,
Global
.
agentSecret
).
getToken
();
String
jsapi_ticket
=
getJsapiTicket
(
accessToken
);
// 必填,生成签名的H5应用调用企业微信JS接口的临时票据
//System.out.println("jsapi_ticket:"+jsapi_ticket);
String
timestamp
=
Long
.
toString
(
System
.
currentTimeMillis
()
/
1000
);
// 必填,生成签名的时间戳
...
...
@@ -392,7 +392,7 @@ public class WeiXinUtil {
}
catch
(
UnsupportedEncodingException
e
)
{
e
.
printStackTrace
();
}
ret
.
put
(
"appId"
,
corpId
);
ret
.
put
(
"appId"
,
Global
.
corpId
);
ret
.
put
(
"timestamp"
,
timestamp
);
ret
.
put
(
"nonceStr"
,
nonceStr
);
ret
.
put
(
"signature"
,
signature
);
...
...
cement-business/src/main/resources/application.yml
View file @
290a3763
...
...
@@ -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://47.93.148.213: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://47.93.148.213:3306/sinoma_tcdri?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=UTF-8&useSSL=false
username
:
root
password
:
admin!@#123
driverClassName
:
com.mysql.cj.jdbc.Driver
...
...
cement-business/src/main/resources/fastdfs-client.properties
View file @
290a3763
...
...
@@ -4,7 +4,7 @@ fastdfs.charset=UTF-8
fastdfs.http.tracker_http_port
=
8888
fastdfs.http.anti_steal_token
=
no
fastdfs.http.secret_key
=
FastDFS1234567890
fastdfs.tracker_servers
=
192.168.110.85
:22122
fastdfs.tracker_servers
=
localhost
:22122
#fastdfs.tracker_servers=localhost:22122
pom.xml
View file @
290a3763
...
...
@@ -34,11 +34,11 @@
<version>
2.0.6.RELEASE
</version>
</dependency>
<!-- https://mvnrepository.com/artifact/com.artofsolving/jodconverter -->
<dependency>
<!--
<dependency>
<groupId>com.artofsolving</groupId>
<artifactId>jodconverter</artifactId>
<version>2.2.1</version>
</dependency>
</dependency>
-->
<dependency>
<groupId>
com.alibaba
</groupId>
<artifactId>
fastjson
</artifactId>
...
...
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