访客预约小程序切换到公司主体的小程序
This commit is contained in:
@@ -55,8 +55,6 @@ public class VisitorApprovalController {
|
|||||||
@RequestParam(value = "timestamp", required = false) String timestamp,
|
@RequestParam(value = "timestamp", required = false) String timestamp,
|
||||||
@RequestParam(value = "nonce", required = false) String nonce,
|
@RequestParam(value = "nonce", required = false) String nonce,
|
||||||
@RequestBody String requestBody) {
|
@RequestBody String requestBody) {
|
||||||
System.out.println("----------------------------------");
|
|
||||||
|
|
||||||
// 异步处理,立即返回
|
// 异步处理,立即返回
|
||||||
visitorApprovalService.processApprovalAsync(msgSignature, timestamp, nonce, requestBody);
|
visitorApprovalService.processApprovalAsync(msgSignature, timestamp, nonce, requestBody);
|
||||||
return "success";
|
return "success";
|
||||||
|
|||||||
@@ -42,9 +42,9 @@ public class AppointmentService {
|
|||||||
log.info("查询用户最新预约记录, openid: {}", openid);
|
log.info("查询用户最新预约记录, openid: {}", openid);
|
||||||
VisitApplication result = visitApplicationMapper.selectLatestByOpenid(openid);
|
VisitApplication result = visitApplicationMapper.selectLatestByOpenid(openid);
|
||||||
if (result != null) {
|
if (result != null) {
|
||||||
log.info("找到预约记录, id: {}", result.getId());
|
log.info("找到用户最新预约记录, id: {}", result.getId());
|
||||||
} else {
|
} else {
|
||||||
log.info("未找到预约记录");
|
log.info("未找到用户最新预约记录");
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -81,17 +81,18 @@ public class WxApprovalService {
|
|||||||
// ---- 内部方法 ----
|
// ---- 内部方法 ----
|
||||||
private Map<String, Object> buildApplyData(VisitApplication record) {
|
private Map<String, Object> buildApplyData(VisitApplication record) {
|
||||||
List<Map<String, Object>> contents = new ArrayList<>();
|
List<Map<String, Object>> contents = new ArrayList<>();
|
||||||
contents.add(textControl("Text-1776786661954", record.getName()));
|
contents.add(textControl("Text-1778484376383", record.getName()));
|
||||||
contents.add(textControl("Text-1776786666351", record.getPhone()));
|
contents.add(textControl("Text-1778484403871", record.getPhone()));
|
||||||
contents.add(textControl("Text-1776786668098", record.getCompany()));
|
contents.add(textControl("Text-1778484415326", record.getCompany()));
|
||||||
contents.add(textControl("Text-1776786672408", record.getReason()));
|
contents.add(textControl("Text-1778484463818", record.getReason()));
|
||||||
|
contents.add(textControl("Text-1778484492597", record.getPlateNumber()));
|
||||||
String visitTime = record.getVisitDate();
|
String visitTime = record.getVisitDate();
|
||||||
if (record.getVisitTime() != null && !record.getVisitTime().isEmpty()) {
|
if (record.getVisitTime() != null && !record.getVisitTime().isEmpty()) {
|
||||||
visitTime = record.getVisitDate() + " " + record.getVisitTime();
|
visitTime = record.getVisitDate() + " " + record.getVisitTime();
|
||||||
}
|
}
|
||||||
contents.add(textControl("Text-1778132408837", visitTime));
|
contents.add(textControl("Text-1778484505176", visitTime));
|
||||||
contents.add(textControl("Text-1776786690968", record.getHostName()));
|
contents.add(textControl("Text-1778484515357", record.getHostName()));
|
||||||
contents.add(textControl("Text-1776786692400", record.getArea()));
|
contents.add(textControl("Text-1778484525261", record.getArea()));
|
||||||
return Map.of("contents", contents);
|
return Map.of("contents", contents);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -51,5 +51,6 @@ mybatis:
|
|||||||
type-aliases-package: com.example.mini_program.entity
|
type-aliases-package: com.example.mini_program.entity
|
||||||
configuration:
|
configuration:
|
||||||
map-underscore-to-camel-case: true
|
map-underscore-to-camel-case: true
|
||||||
|
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
|
||||||
|
|
||||||
# 企业微信配置
|
# 企业微信配置
|
||||||
@@ -0,0 +1,53 @@
|
|||||||
|
server:
|
||||||
|
port: 8091
|
||||||
|
ssl:
|
||||||
|
enabled: true
|
||||||
|
key-store: classpath:bmser.com.pfx
|
||||||
|
key-store-type: PKCS12
|
||||||
|
key-store-password: zl7cs0dp
|
||||||
|
protocol: TLS
|
||||||
|
enabled-protocols: TLSv1.2,TLSv1.3
|
||||||
|
|
||||||
|
spring:
|
||||||
|
application:
|
||||||
|
name: mini_program
|
||||||
|
datasource:
|
||||||
|
url: jdbc:mysql://127.0.0.1:3306/mini?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true
|
||||||
|
username: root
|
||||||
|
password: 271922abf
|
||||||
|
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||||
|
|
||||||
|
# 微信小程序配置
|
||||||
|
wx:
|
||||||
|
miniapp:
|
||||||
|
# 小程序的应用id,小程序开发管理
|
||||||
|
appid: wx4286144359eeafe5
|
||||||
|
secret: 5abacb8a93e864dabc13b09006aefdc1
|
||||||
|
subscribe-template-id: EF5CDtuZwrGbt8iyOoi-sY7J6hZamX0AbWPLoK-qnEw
|
||||||
|
env: develop # 环境版本: release(正式版), trial(体验版), develop(开发版)
|
||||||
|
token-type: stable # token类型: standard(标准版), stable(稳定版)
|
||||||
|
token-expire-buffer: 300 # token提前过期缓冲时间(秒)
|
||||||
|
corp: # 企业ID
|
||||||
|
corpid: wwe22ebc930200694e
|
||||||
|
# 应用Secret
|
||||||
|
corpsecret: _CgfvRdJRZ713k5lVey2_7Qdrb0JD3HkmR_mesn0144
|
||||||
|
# 访客预约审批模板ID
|
||||||
|
approval-template-id: C4ejArCjiUifaVKyMEEwpcssEbLxKjqMtn5SrHW2t
|
||||||
|
# 审批申请人用户ID(提交审批的企微用户)
|
||||||
|
creator-userid: ChengLiJuan
|
||||||
|
# 访客预约应用AgentId(用于发送应用消息)
|
||||||
|
agentid: 1000084
|
||||||
|
# 【访客预约】token
|
||||||
|
token: 3ZnkI0zGML7rL
|
||||||
|
# 【访客预约】EncodingAESKey
|
||||||
|
encodingAESKey: TLtEXX7Nfm3Tu5rx1bSAvbtNlMx9ud8qhTQQurXEfQH
|
||||||
|
|
||||||
|
# MyBatis配置
|
||||||
|
mybatis:
|
||||||
|
mapper-locations: classpath:mapper/*.xml
|
||||||
|
type-aliases-package: com.example.mini_program.entity
|
||||||
|
configuration:
|
||||||
|
map-underscore-to-camel-case: true
|
||||||
|
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
|
||||||
|
|
||||||
|
# 企业微信配置
|
||||||
Reference in New Issue
Block a user