Bläddra i källkod

Merge branch 'master' of http://git.ycjcjy.com/state_grid/invoice_fill_service

[baozhangchao] 2 år sedan
förälder
incheckning
4f761284a9

+ 12
- 0
pom.xml Visa fil

@@ -40,6 +40,18 @@
40 40
 			<scope>test</scope>
41 41
 		</dependency>
42 42
 
43
+		<dependency>
44
+			<groupId>com.alibaba</groupId>
45
+			<artifactId>fastjson</artifactId>
46
+			<version>1.2.83</version>
47
+		</dependency>
48
+
49
+		<dependency>
50
+			<groupId>com.github.binarywang</groupId>
51
+			<artifactId>weixin-java-mp</artifactId>
52
+			<version>4.3.0</version>
53
+		</dependency>
54
+
43 55
 		<dependency>
44 56
 			<groupId>com.baomidou</groupId>
45 57
 			<artifactId>mybatis-plus-boot-starter</artifactId>

+ 0
- 55
src/main/java/com/njyunzhi/invoice/common/Constants.java Visa fil

@@ -1,62 +1,7 @@
1 1
 package com.njyunzhi.invoice.common;
2 2
 
3 3
 public class Constants {
4
-    // 超级管理员ID
5
-    public final static String ADMIN_ID = "1";
6
-    // 平台账户ID
7
-    public final static String SYSTEM_ACC_ID = "system";
8
-
9 4
     public final static int STATUS_DELETE = -1;
10 5
     public final static int STATUS_READY = 0;
11 6
     public final static int STATUS_NORMAL = 1;
12
-
13
-    // 客户端类型
14
-    public final static String CLIENT_WORKER = "worker";    // 农机手
15
-    public final static String CLIENT_FARMER = "farmer";    // 农户
16
-
17
-    // 资源类型
18
-    public final static String TARGET_MACHINERY = "machinery";  // 农机
19
-    public final static String TARGET_NEWS = "news";    // 资讯
20
-
21
-    // 账户收支类型
22
-    public final static int ACCOUNT_INCOME = 1; // 收入
23
-    public final static int ACCOUNT_EXPEND = -1; // 支出
24
-
25
-    // 账户消费类型
26
-    public final static String ACCOUNT_ORDER_PAY = "order_pay"; // 订单支付
27
-    public final static String ACCOUNT_ORDER_REFUND = "order_refund"; // 订单退款
28
-    public final static String ACCOUNT_WITHDRAW = "withdraw"; // 提现
29
-
30
-    // 审批状态
31
-    public final static int AUDIT_READY = 0;    // 待审批
32
-    public final static int AUDIT_AGREE = 1;    // 审批通过
33
-    public final static int AUDIT_DISAGREE = 2;    // 审批不通过
34
-
35
-    // 订单状态
36
-    public final static int ORDER_CANCEL = 9;  // 待支付
37
-
38
-    // 支付状态
39
-    public final static int PAY_READY = 0;  // 待支付
40
-    public final static int PAY_PAID = 1;  // 已支付
41
-    public final static int PAY_FAIL = 2;  // 支付失败
42
-    public final static int PAY_REFUNDING = 3;  // 退款申请中
43
-    public final static int PAY_PROCESSING = 4;  // 支付中
44
-    public final static int PAY_REFUND = -1;  // 已退款
45
-
46
-    // 是否调度
47
-    public final static int DISPATCH_READY = 0; // 待调度
48
-    public final static int DISPATCH_DONE = 1; // 已调度
49
-
50
-    // 工作状态
51
-    public final static int WORK_READY = 0;   // 预备中
52
-    public final static int WORK_DOING = 1;   // 工作中
53
-    public final static int WORK_PAUSE = 2;   // 暂停
54
-    public final static int WORK_DONE = 3;   // 已完成
55
-
56
-    // 消息类型
57
-    public final static String MESSAGE_SMS = "sms"; // 短信
58
-    public final static String MESSAGE_MINIAPP = "miniapp"; // 小程序
59
-
60
-    public final static String MESSAGE_ORDER_NOTIFY = "order_notify";   // 订单通知
61
-    public final static String MESSAGE_ORDER_EXPIRE = "order_expire";   // 订单超时
62 7
 }

+ 100
- 0
src/main/java/com/njyunzhi/invoice/common/HttpUtils.java Visa fil

@@ -0,0 +1,100 @@
1
+package com.njyunzhi.invoice.common;
2
+
3
+import org.springframework.http.*;
4
+import org.springframework.stereotype.Component;
5
+import org.springframework.web.client.RestTemplate;
6
+
7
+import java.io.UnsupportedEncodingException;
8
+import java.net.URLDecoder;
9
+import java.util.*;
10
+
11
+@Component
12
+public class HttpUtils {
13
+
14
+    public byte[] download(String url) {
15
+        RestTemplate restTemplate = new RestTemplate();
16
+        HttpHeaders headers = new HttpHeaders();
17
+        HttpEntity<String> entity = new HttpEntity<String>(headers);
18
+        Map<String, Object> urlAndParams = parseURL(url);
19
+        String formatURL = (String) urlAndParams.get("url");
20
+        Map<String, String> params = (Map<String, String>) urlAndParams.get("params");
21
+
22
+        ResponseEntity<byte[]> resp = restTemplate.exchange(formatURL, HttpMethod.GET, entity, byte[].class, params);
23
+        return resp.getBody();
24
+    }
25
+
26
+    public String get(String url) throws Exception {
27
+        RestTemplate restTemplate = new RestTemplate();
28
+        HttpHeaders headers = new HttpHeaders();
29
+        headers.setAccept(Arrays.asList(MediaType.APPLICATION_JSON));
30
+        HttpEntity<String> entity = new HttpEntity<String>(headers);
31
+
32
+        Map<String, Object> urlAndParams = parseURL(url);
33
+        String formatURL = (String) urlAndParams.get("url");
34
+        Map<String, String> params = (Map<String, String>) urlAndParams.get("params");
35
+
36
+        ResponseEntity<String> resp = restTemplate.exchange(formatURL, HttpMethod.GET, entity, String.class, params);
37
+        return resp.getBody();
38
+    }
39
+
40
+    public String post(String url, Map<String, String> header, String body) throws Exception {
41
+        RestTemplate restTemplate = new RestTemplate();
42
+        HttpHeaders headers = new HttpHeaders();
43
+        MediaType type = MediaType.parseMediaType("application/json; charset=UTF-8");
44
+        headers.setContentType(type);
45
+        headers.setAccept(Arrays.asList(MediaType.APPLICATION_JSON));
46
+        headers.setAll(header);
47
+        HttpEntity<String> entity = new HttpEntity<String>(body, headers);
48
+
49
+        Map<String, Object> urlAndParams = parseURL(url);
50
+        String formatURL = (String) urlAndParams.get("url");
51
+        Map<String, String> params = (Map<String, String>) urlAndParams.get("params");
52
+
53
+        ResponseEntity<String> resp = restTemplate.exchange(formatURL, HttpMethod.POST, entity, String.class, params);
54
+        return resp.getBody();
55
+    }
56
+
57
+    // RestTemplate 不能正常的处理 querystring, 必须按照约定的方式处理
58
+    private Map<String, Object> parseURL(String url) {
59
+        Map<String, Object> res = new HashMap<>();
60
+
61
+        String[] parts = url.split("\\?");
62
+        String baseURL = parts[0];
63
+
64
+        if (parts.length < 2) {
65
+            res.put("url", baseURL);
66
+            res.put("params", new HashMap<>());
67
+            return res;
68
+        }
69
+
70
+
71
+        String[] fields = parts[1].split("&");
72
+        Map<String, String> params = new HashMap<>();
73
+        List<String> searchList = new ArrayList<>();
74
+        for (String field : fields) {
75
+            String[] pairs = field.split("=");
76
+            if (2 != pairs.length) {
77
+                continue;
78
+            }
79
+
80
+            try {
81
+                String key = URLDecoder.decode(pairs[0].trim(), "UTF-8");
82
+                String val = URLDecoder.decode(pairs[1].trim(), "UTF-8");
83
+
84
+                // 转化为 "foo={foo}" 这种字符串
85
+                searchList.add(String.format("%s={%s}", key, key));
86
+                // 把 foo 对应的值存储起来
87
+                params.put(key, val);
88
+            } catch (UnsupportedEncodingException e) {
89
+                e.printStackTrace();
90
+            }
91
+        }
92
+
93
+        // url 格式类似 http://foo.org/bar?name={name}
94
+        String formatURL = baseURL + "?" + String.join("&", searchList);
95
+        res.put("url", formatURL);
96
+        res.put("params", params);
97
+
98
+        return res;
99
+    }
100
+}

+ 40
- 0
src/main/java/com/njyunzhi/invoice/common/WxMpUtil.java Visa fil

@@ -0,0 +1,40 @@
1
+package com.njyunzhi.invoice.common;
2
+
3
+import com.njyunzhi.invoice.config.WxMpConfig;
4
+import me.chanjar.weixin.mp.api.WxMpService;
5
+import me.chanjar.weixin.mp.api.impl.WxMpServiceImpl;
6
+import me.chanjar.weixin.mp.config.impl.WxMpDefaultConfigImpl;
7
+import org.springframework.beans.factory.annotation.Autowired;
8
+import org.springframework.boot.context.properties.EnableConfigurationProperties;
9
+import org.springframework.context.annotation.Configuration;
10
+
11
+@Configuration
12
+@EnableConfigurationProperties(WxMpConfig.class)
13
+public class WxMpUtil {
14
+
15
+    WxMpConfig wxMpConfig;
16
+    WxMpService mpService;
17
+
18
+//    @Autowired
19
+//    WxMpUtil (WxMpConfig wxMpConfig) {
20
+//        this.wxMpConfig = wxMpConfig;
21
+//        initMpService();
22
+//    }
23
+
24
+    void initMpService() {
25
+        WxMpConfig.MpConfig config = wxMpConfig.getConfig();
26
+        WxMpDefaultConfigImpl configStorage = new WxMpDefaultConfigImpl();
27
+
28
+        configStorage.setAppId(config.getAppId());
29
+        configStorage.setSecret(config.getSecret());
30
+        configStorage.setToken(config.getToken());
31
+        configStorage.setAesKey(config.getAesKey());
32
+
33
+        mpService = new WxMpServiceImpl();
34
+        mpService.setWxMpConfigStorage(configStorage);
35
+    }
36
+
37
+    public WxMpService getMpService() {
38
+        return mpService;
39
+    }
40
+}

+ 70
- 0
src/main/java/com/njyunzhi/invoice/config/WxMpConfig.java Visa fil

@@ -0,0 +1,70 @@
1
+package com.njyunzhi.invoice.config;
2
+
3
+import lombok.Data;
4
+import org.springframework.boot.context.properties.ConfigurationProperties;
5
+
6
+@Data
7
+@ConfigurationProperties(prefix = "wx.mp")
8
+public class WxMpConfig {
9
+
10
+    /**
11
+     * 是否使用redis存储access token
12
+     */
13
+    private boolean useRedis;
14
+
15
+    /**
16
+     * redis 配置
17
+     */
18
+    private RedisConfig redisConfig;
19
+
20
+    @Data
21
+    public static class RedisConfig {
22
+        /**
23
+         * redis服务器 主机地址
24
+         */
25
+        private String host;
26
+
27
+        /**
28
+         * redis服务器 端口号
29
+         */
30
+        private Integer port;
31
+
32
+        /**
33
+         * redis服务器 密码
34
+         */
35
+        private String password;
36
+
37
+        /**
38
+         * redis 服务连接超时时间
39
+         */
40
+        private Integer timeout;
41
+    }
42
+
43
+    /**
44
+     * 多个公众号配置信息
45
+     */
46
+    private MpConfig config;
47
+
48
+    @Data
49
+    public static class MpConfig {
50
+        /**
51
+         * 设置微信公众号的appid
52
+         */
53
+        private String appId;
54
+
55
+        /**
56
+         * 设置微信公众号的app secret
57
+         */
58
+        private String secret;
59
+
60
+        /**
61
+         * 设置微信公众号的token
62
+         */
63
+        private String token;
64
+
65
+        /**
66
+         * 设置微信公众号的EncodingAESKey
67
+         */
68
+        private String aesKey;
69
+    }
70
+}

+ 67
- 5
src/main/java/com/njyunzhi/invoice/controller/LoginController.java Visa fil

@@ -1,18 +1,18 @@
1 1
 package com.njyunzhi.invoice.controller;
2 2
 
3 3
 import cn.dev33.satoken.stp.StpUtil;
4
-import com.njyunzhi.invoice.common.BaseController;
5
-import com.njyunzhi.invoice.common.EncryptUtils;
6
-import com.njyunzhi.invoice.common.ResponseBean;
7
-import com.njyunzhi.invoice.common.StringUtils;
4
+import cn.hutool.json.JSONObject;
5
+import cn.hutool.json.JSONUtil;
6
+import com.njyunzhi.invoice.common.*;
8 7
 import com.njyunzhi.invoice.entity.SysUser;
9
-import com.njyunzhi.invoice.service.ISysUserService;
8
+import com.njyunzhi.invoice.entity.TaPerson;
10 9
 import com.njyunzhi.invoice.vo.ChangePassword;
11 10
 import com.njyunzhi.invoice.vo.LoginParm;
12 11
 import io.swagger.annotations.Api;
13 12
 import io.swagger.annotations.ApiOperation;
14 13
 import io.swagger.annotations.ApiParam;
15 14
 import org.springframework.beans.factory.annotation.Autowired;
15
+import org.springframework.beans.factory.annotation.Value;
16 16
 import org.springframework.web.bind.annotation.*;
17 17
 
18 18
 import java.util.HashMap;
@@ -24,6 +24,16 @@ import java.util.Map;
24 24
 @RequestMapping("/")
25 25
 public class LoginController extends BaseController {
26 26
 
27
+    @Value("${yz.mp.openidAPI}")
28
+    String openidAPI;
29
+
30
+    @Autowired
31
+    WxMpUtil wxMpUtil;
32
+
33
+    @Autowired
34
+    HttpUtils httpUtils;
35
+
36
+
27 37
     @PostMapping("/admin/login")
28 38
     @ApiOperation(value="后台登录", notes = "后台登录", httpMethod = "POST", response = ResponseBean.class)
29 39
     public ResponseBean login(@ApiParam("登录参数") @RequestBody LoginParm loginParm) throws Exception {
@@ -74,4 +84,56 @@ public class LoginController extends BaseController {
74 84
     private boolean checkPassword(String src, String targ, String salt) {
75 85
         return EncryptUtils.md5(src, salt).equals(targ);
76 86
     }
87
+
88
+
89
+
90
+    @PostMapping("/h5/login")
91
+    @ApiOperation(value="H5端登录", notes = "H5端登录", httpMethod = "POST", response = ResponseBean.class)
92
+    public ResponseBean h5Login(@ApiParam("登录参数") @RequestParam String code) throws Exception {
93
+
94
+        if (StringUtils.isEmpty(code)) {
95
+            return ResponseBean.error("登录 CODE 不存在");
96
+        }
97
+
98
+        String openID;
99
+        if (!code.equals("123")) {
100
+            String body = httpUtils.get(String.format(openidAPI, code));
101
+            if (StringUtils.isEmpty(body)) {
102
+                return ResponseBean.error("登录系统失败, 请重试", ResponseBean.ERROR_UNAVAILABLE);
103
+            }
104
+
105
+            JSONObject jsonObject = JSONUtil.parseObj(body);
106
+            if (jsonObject.getInt("code") != ResponseBean.CODE_SUCCESS) {
107
+                return ResponseBean.error(jsonObject.getStr("message"), ResponseBean.ERROR_UNAVAILABLE);
108
+            }
109
+
110
+            openID = jsonObject.getStr("data");
111
+        } else {
112
+            openID = "123";
113
+        }
114
+
115
+        TaPerson taPerson = iTaPersonService.getExistBy("openid", openID, false, true);
116
+        if (null == taPerson) {
117
+            taPerson = new TaPerson();
118
+            taPerson.setOpenid(openID);
119
+            taPerson.setStatus(Constants.STATUS_NORMAL);
120
+            if (!iTaPersonService.save(taPerson)) {
121
+                return ResponseBean.error("登录系统失败, 请重试", ResponseBean.ERROR_UNAVAILABLE);
122
+            }
123
+        } else {
124
+            if (Constants.STATUS_NORMAL != taPerson.getStatus()) {
125
+                return ResponseBean.error("您的账户异常, 请联系管理人员", ResponseBean.ERROR_UNAVAILABLE);
126
+            }
127
+        }
128
+
129
+
130
+        StpUtil.login(taPerson.getPersonId(), "h5");
131
+        String tokenValue = StpUtil.getTokenValue();
132
+
133
+        Map<String, Object> result = new HashMap<>();
134
+        result.put("person", taPerson);
135
+        result.put("token", tokenValue);
136
+
137
+        return ResponseBean.success(result);
138
+    }
77 139
 }

+ 12
- 7
src/main/java/com/njyunzhi/invoice/controller/SysOrgController.java Visa fil

@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
5 5
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
6 6
 import com.njyunzhi.invoice.common.BaseController;
7 7
 import com.njyunzhi.invoice.common.ResponseBean;
8
+import com.njyunzhi.invoice.common.StringUtils;
8 9
 import io.swagger.annotations.Api;
9 10
 import io.swagger.annotations.ApiOperation;
10 11
 import io.swagger.annotations.ApiParam;
@@ -46,17 +47,21 @@ public class SysOrgController extends BaseController {
46 47
      * @param pageSize
47 48
      * @return
48 49
      */
49
-    @RequestMapping(value="/sysOrg",method= RequestMethod.GET)
50
+    @RequestMapping(value="/h5/org",method= RequestMethod.GET)
50 51
     @ApiOperation(value="列表", notes = "列表", httpMethod = "GET", response = ResponseBean.class)
51 52
     public ResponseBean sysOrgList(@ApiParam("页码") @RequestParam(value ="pageNum",defaultValue = "1") Integer pageNum,
52
-									 @ApiParam("单页数据量") @RequestParam(value ="pageSize",defaultValue = "10") Integer pageSize) throws Exception{
53
+                                   @ApiParam("单页数据量") @RequestParam(value ="pageSize",defaultValue = "10") Integer pageSize,
54
+                                   @ApiParam("是否系统内置") @RequestParam(value ="isSystem", required = false) Boolean isSystem,
55
+                                   @ApiParam("单位名称") @RequestParam(value ="name", required = false) String name) throws Exception{
53 56
 
54
-		    IPage<SysOrg> pg = new Page<>(pageNum, pageSize);
55
-            QueryWrapper<SysOrg> queryWrapper = new QueryWrapper<>();
56
-            queryWrapper.orderByDesc("create_date");
57
+        IPage<SysOrg> pg = new Page<>(pageNum, pageSize);
58
+        QueryWrapper<SysOrg> queryWrapper = new QueryWrapper<>();
59
+        queryWrapper.like(StringUtils.isEmpty(name),"name", "%"+name+"%");
60
+        queryWrapper.eq(isSystem != null,"is_system", isSystem);
61
+        queryWrapper.orderByDesc("create_date");
57 62
 
58
-            IPage<SysOrg> result = iSysOrgService.page(pg, queryWrapper);
59
-            return ResponseBean.success(result);
63
+        IPage<SysOrg> result = iSysOrgService.page(pg, queryWrapper);
64
+        return ResponseBean.success(result);
60 65
     }
61 66
 
62 67
     /**

+ 12
- 0
src/main/java/com/njyunzhi/invoice/controller/TaPersonController.java Visa fil

@@ -116,4 +116,16 @@ public class TaPersonController extends BaseController {
116 116
     public ResponseBean taPersonGet(@ApiParam("对象ID") @PathVariable Integer id) throws Exception{
117 117
         return ResponseBean.success(iTaPersonService.getById(id));
118 118
     }
119
+
120
+    /**
121
+     * 根据id查询对象
122
+     * @param id  实体ID
123
+     */
124
+    @RequestMapping(value="/h5/current",method= RequestMethod.GET)
125
+    @ApiOperation(value="获取当前人员", notes = "获取当前人员", httpMethod = "GET", response = ResponseBean.class)
126
+    public ResponseBean getCurrent() throws Exception{
127
+        TaPerson taPerson = currentPerson();
128
+
129
+        return ResponseBean.success(taPerson);
130
+    }
119 131
 }

+ 2
- 0
src/main/java/com/njyunzhi/invoice/entity/SysOrg.java Visa fil

@@ -48,5 +48,7 @@ public class SysOrg implements Serializable {
48 48
     @ApiModelProperty(value = "创建日期")
49 49
     private LocalDateTime createDate;
50 50
 
51
+    @ApiModelProperty(value = "是否系统内维护")
52
+    private Boolean isSystem;
51 53
 
52 54
 }

+ 1
- 1
src/main/java/com/njyunzhi/invoice/entity/TaPerson.java Visa fil

@@ -27,7 +27,7 @@ public class TaPerson implements Serializable {
27 27
     private static final long serialVersionUID = 1L;
28 28
 
29 29
     @ApiModelProperty(value = "人员ID")
30
-    @TableId(value = "person_id", type = IdType.INPUT)
30
+    @TableId(value = "person_id", type = IdType.ASSIGN_UUID)
31 31
     private String personId;
32 32
 
33 33
     @ApiModelProperty(value = "openid")

+ 1
- 2
src/main/java/com/njyunzhi/invoice/service/ITaPersonService.java Visa fil

@@ -1,7 +1,6 @@
1 1
 package com.njyunzhi.invoice.service;
2 2
 
3 3
 import com.njyunzhi.invoice.entity.TaPerson;
4
-import com.baomidou.mybatisplus.extension.service.IService;
5 4
 
6 5
 /**
7 6
  * <p>
@@ -11,6 +10,6 @@ import com.baomidou.mybatisplus.extension.service.IService;
11 10
  * @author yansen
12 11
  * @since 2022-07-04
13 12
  */
14
-public interface ITaPersonService extends IService<TaPerson> {
13
+public interface ITaPersonService extends IBaseService<TaPerson> {
15 14
 
16 15
 }

+ 1
- 2
src/main/java/com/njyunzhi/invoice/service/impl/TaPersonServiceImpl.java Visa fil

@@ -3,7 +3,6 @@ package com.njyunzhi.invoice.service.impl;
3 3
 import com.njyunzhi.invoice.entity.TaPerson;
4 4
 import com.njyunzhi.invoice.mapper.TaPersonMapper;
5 5
 import com.njyunzhi.invoice.service.ITaPersonService;
6
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
7 6
 import org.springframework.stereotype.Service;
8 7
 
9 8
 /**
@@ -15,6 +14,6 @@ import org.springframework.stereotype.Service;
15 14
  * @since 2022-07-04
16 15
  */
17 16
 @Service
18
-public class TaPersonServiceImpl extends ServiceImpl<TaPersonMapper, TaPerson> implements ITaPersonService {
17
+public class TaPersonServiceImpl extends BaseServiceImpl<TaPersonMapper, TaPerson> implements ITaPersonService {
19 18
 
20 19
 }

+ 11
- 5
src/main/resources/application-dev.yml Visa fil

@@ -10,8 +10,14 @@ spring:
10 10
     username: invoice_fill
11 11
     password: invoice_fill@ABCD1234
12 12
 
13
-###
14
-logging:
15
-  level:
16
-    root: info
17
-    springfox: info
13
+wx:
14
+  mp:
15
+    useRedis: false
16
+    redisConfig:
17
+      host: 127.0.0.1
18
+      port: 6379
19
+    configs:
20
+      - appId: 1111 # 第一个公众号的appid
21
+        secret: 1111 # 公众号的appsecret
22
+        token: 111 # 接口配置里的Token值
23
+        aesKey: 111 # 接口配置里的EncodingAESKey值

+ 13
- 1
src/main/resources/application.yml Visa fil

@@ -4,6 +4,19 @@ server:
4 4
   servlet:
5 5
     context-path: /api
6 6
 
7
+logging:
8
+  level:
9
+    root: info
10
+    springfox: info
11
+    org.springframework.web: INFO
12
+    com.github.binarywang.demo.wx.mp: DEBUG
13
+    me.chanjar.weixin: DEBUG
14
+
15
+###
16
+yz:
17
+  mp:
18
+    openidAPI: https://api.h5.njyunzhi.com/mp/openid?code=%s
19
+
7 20
 ###
8 21
 mybatis-plus:
9 22
   configuration:
@@ -11,7 +24,6 @@ mybatis-plus:
11 24
     call-setters-on-nulls: true
12 25
   mapper-locations: classpath:mapper/**/*.xml
13 26
 
14
-
15 27
 # Sa-Token配置
16 28
 sa-token:
17 29
   # jwt秘钥