QywxProperties.java 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  1. package cn.tonyandmoney.tuon.qywx;
  2. import org.springframework.boot.context.properties.ConfigurationProperties;
  3. import java.util.HashMap;
  4. import java.util.Map;
  5. /**
  6. * 企业微信登录视频
  7. */
  8. @ConfigurationProperties(prefix = "qywx")
  9. public class QywxProperties {
  10. private String corpid;
  11. private String corpSecret;
  12. private String host="https://qyapi.weixin.qq.com";
  13. private String accessTokenPath="/cgi-bin/gettoken?corpid={corpid}&corpsecret={corpsecret}";
  14. private String userInfoPath="/cgi-bin/user/getuserinfo?access_token={access_token}&code={code}";
  15. private String userGetPath="/cgi-bin/user/get?access_token={access_token}&userid={userid}";
  16. private String sendMsgPath="/cgi-bin/message/send?access_token={access_token}";
  17. //消息接收的Token-EncodingAESKey
  18. private String token="xwKMrU6J";
  19. private String encodingAESKey="uiSDpQAl9yJHtv5iOS9Nr25oKyrIeRcD30DQHECR3zV";
  20. private String agentId="1000002";
  21. /**
  22. * 每当用户登录的时候,给用户发送消息
  23. */
  24. private String welcome="欢迎访问应用!";
  25. public void setAgentId(String agentId) {
  26. this.agentId = agentId;
  27. }
  28. public String getAgentId() {
  29. return agentId;
  30. }
  31. public void setWelcome(String welcome) {
  32. this.welcome = welcome;
  33. }
  34. public String getWelcome() {
  35. return welcome;
  36. }
  37. public void setSendMsgPath(String sendMsgPath) {
  38. this.sendMsgPath = sendMsgPath;
  39. }
  40. public String getSendMsgPath() {
  41. return sendMsgPath;
  42. }
  43. public void setEncodingAESKey(String encodingAESKey) {
  44. this.encodingAESKey = encodingAESKey;
  45. }
  46. public void setToken(String token) {
  47. this.token = token;
  48. }
  49. public String getEncodingAESKey() {
  50. return encodingAESKey;
  51. }
  52. public String getToken() {
  53. return token;
  54. }
  55. public String getHost() {
  56. return host;
  57. }
  58. public void setHost(String host) {
  59. this.host = host;
  60. }
  61. public String getAccessTokenPath() {
  62. return accessTokenPath;
  63. }
  64. public void setAccessTokenPath(String accessTokenPath) {
  65. this.accessTokenPath = accessTokenPath;
  66. }
  67. public String getUserInfoPath() {
  68. return userInfoPath;
  69. }
  70. public void setUserInfoPath(String userInfoPath) {
  71. this.userInfoPath = userInfoPath;
  72. }
  73. public String getUserGetPath() {
  74. return userGetPath;
  75. }
  76. public void setUserGetPath(String userGetPath) {
  77. this.userGetPath = userGetPath;
  78. }
  79. public String getCorpid() {
  80. return corpid;
  81. }
  82. public void setCorpid(String corpid) {
  83. this.corpid = corpid;
  84. }
  85. public String getCorpSecret() {
  86. return corpSecret;
  87. }
  88. public void setCorpSecret(String corpSecret) {
  89. this.corpSecret = corpSecret;
  90. }
  91. }