记得上下班打卡 | git大法好,push需谨慎

Commit 9b358925 authored by 姜秀龙's avatar 姜秀龙

feat(sweet): maOpenId 支持 DouDou/mootoo/wenque 三个新小程序

WechatMaConfigure 增加 type 8/9/10,配置中心写入 appid 与 secret。
Co-authored-by: 's avatarCursor <cursoragent@cursor.com>
parent 55b0fda4
......@@ -219,6 +219,15 @@ liquidnet:
modern:
appid: wxe3a093ce7278d5b1
secret: 14d531f87dffd3cbbd668ae9f475f1ff
doudou:
appid: wxa4b24c3ed55e4e18
secret: 49fcc65986606b6ff2d8d2f765586c2b
mootoo:
appid: wxe86ab49478ec3ee9
secret: f26158c5dff7f273e4f95818edb92bf2
wenque:
appid: wxacbe59cb64cb3ed4
secret: fc6b4ce7cf4c0576400bcb5a3d524e6a
umeng:
ios:
appkey: 54fe819bfd98c546b50004f0
......
......@@ -218,6 +218,15 @@ liquidnet:
modern:
appid: wxe3a093ce7278d5b1
secret: 14d531f87dffd3cbbd668ae9f475f1ff
doudou:
appid: wxa4b24c3ed55e4e18
secret: 49fcc65986606b6ff2d8d2f765586c2b
mootoo:
appid: wxe86ab49478ec3ee9
secret: f26158c5dff7f273e4f95818edb92bf2
wenque:
appid: wxacbe59cb64cb3ed4
secret: fc6b4ce7cf4c0576400bcb5a3d524e6a
umeng:
ios:
appkey: 54fe819bfd98c546b50004f0
......
......@@ -215,6 +215,15 @@ liquidnet:
modern:
appid: wxe3a093ce7278d5b1
secret: 14d531f87dffd3cbbd668ae9f475f1ff
doudou:
appid: wxa4b24c3ed55e4e18
secret: 49fcc65986606b6ff2d8d2f765586c2b
mootoo:
appid: wxe86ab49478ec3ee9
secret: f26158c5dff7f273e4f95818edb92bf2
wenque:
appid: wxacbe59cb64cb3ed4
secret: fc6b4ce7cf4c0576400bcb5a3d524e6a
umeng:
ios:
appkey: 54fe819bfd98c546b50004f0
......
......@@ -215,6 +215,15 @@ liquidnet:
modern:
appid: wxe3a093ce7278d5b1
secret: 14d531f87dffd3cbbd668ae9f475f1ff
doudou:
appid: wxa4b24c3ed55e4e18
secret: 49fcc65986606b6ff2d8d2f765586c2b
mootoo:
appid: wxe86ab49478ec3ee9
secret: f26158c5dff7f273e4f95818edb92bf2
wenque:
appid: wxacbe59cb64cb3ed4
secret: fc6b4ce7cf4c0576400bcb5a3d524e6a
umeng:
ios:
appkey: 54fe819bfd98c546b50004f0
......
......@@ -41,6 +41,15 @@ public class WechatMaConfigure {
private static String appletAppidModern;
private static String appletSecretModern;
private static String appletAppidDoudou;
private static String appletSecretDoudou;
private static String appletAppidMootoo;
private static String appletSecretMootoo;
private static String appletAppidWenque;
private static String appletSecretWenque;
@Value("${liquidnet.wechat.applet.strawberry.appid}")
public void setAppletAppidStrawberry(String appletAppidStrawberry) {
WechatMaConfigure.appletAppidStrawberry = appletAppidStrawberry;
......@@ -104,6 +113,33 @@ public class WechatMaConfigure {
WechatMaConfigure.appletSecretModern = appletSecretModern;
}
@Value("${liquidnet.wechat.applet.doudou.appid}")
public void setAppletAppidDoudou(String appletAppidDoudou) {
WechatMaConfigure.appletAppidDoudou = appletAppidDoudou;
}
@Value("${liquidnet.wechat.applet.doudou.secret}")
public void setAppletSecretDoudou(String appletSecretDoudou) {
WechatMaConfigure.appletSecretDoudou = appletSecretDoudou;
}
@Value("${liquidnet.wechat.applet.mootoo.appid}")
public void setAppletAppidMootoo(String appletAppidMootoo) {
WechatMaConfigure.appletAppidMootoo = appletAppidMootoo;
}
@Value("${liquidnet.wechat.applet.mootoo.secret}")
public void setAppletSecretMootoo(String appletSecretMootoo) {
WechatMaConfigure.appletSecretMootoo = appletSecretMootoo;
}
@Value("${liquidnet.wechat.applet.wenque.appid}")
public void setAppletAppidWenque(String appletAppidWenque) {
WechatMaConfigure.appletAppidWenque = appletAppidWenque;
}
@Value("${liquidnet.wechat.applet.wenque.secret}")
public void setAppletSecretWenque(String appletSecretWenque) {
WechatMaConfigure.appletSecretWenque = appletSecretWenque;
}
private WxMaService wxMaAppletStrawberryService;
private WxMaService wxMaAppletFiveService;
private WxMaService wxMaAppletMdskService;
......@@ -111,6 +147,9 @@ public class WechatMaConfigure {
private WxMaService wxMaAppletAirshipService;
private WxMaService wxMaAppletSmileService;
private WxMaService wxMaAppletModernService;
private WxMaService wxMaAppletDoudouService;
private WxMaService wxMaAppletMootooService;
private WxMaService wxMaAppletWenqueService;
private WxMaMessageRouter wxMaStrawberryMessageRouter;
private WxMaMessageRouter wxMaFiveMessageRouter;
......@@ -119,6 +158,9 @@ public class WechatMaConfigure {
private WxMaMessageRouter wxMaAirshipMessageRouter;
private WxMaMessageRouter wxMaSmileMessageRouter;
private WxMaMessageRouter wxMaModernMessageRouter;
private WxMaMessageRouter wxMaDoudouMessageRouter;
private WxMaMessageRouter wxMaMootooMessageRouter;
private WxMaMessageRouter wxMaWenqueMessageRouter;
@Autowired
private StringRedisTemplate stringRedisTemplate;
......@@ -208,6 +250,39 @@ public class WechatMaConfigure {
this.setWxMaConfig(wxMaDefaultConfig);
}
};
wxMaAppletDoudouService = new WxMaServiceImpl() {
{
RedisTemplateWxRedisOps redisTemplateWxRedisOps = new RedisTemplateWxRedisOps(stringRedisTemplate);
WxMaRedisBetterConfigImpl wxMaDefaultConfig = new WxMaRedisBetterConfigImpl(redisTemplateWxRedisOps, "sweet:accessToken:applet:doudou");
wxMaDefaultConfig.setAppid(appletAppidDoudou);
wxMaDefaultConfig.setSecret(appletSecretDoudou);
wxMaDefaultConfig.setMsgDataFormat("JSON");
this.setWxMaConfig(wxMaDefaultConfig);
}
};
wxMaAppletMootooService = new WxMaServiceImpl() {
{
RedisTemplateWxRedisOps redisTemplateWxRedisOps = new RedisTemplateWxRedisOps(stringRedisTemplate);
WxMaRedisBetterConfigImpl wxMaDefaultConfig = new WxMaRedisBetterConfigImpl(redisTemplateWxRedisOps, "sweet:accessToken:applet:mootoo");
wxMaDefaultConfig.setAppid(appletAppidMootoo);
wxMaDefaultConfig.setSecret(appletSecretMootoo);
wxMaDefaultConfig.setMsgDataFormat("JSON");
this.setWxMaConfig(wxMaDefaultConfig);
}
};
wxMaAppletWenqueService = new WxMaServiceImpl() {
{
RedisTemplateWxRedisOps redisTemplateWxRedisOps = new RedisTemplateWxRedisOps(stringRedisTemplate);
WxMaRedisBetterConfigImpl wxMaDefaultConfig = new WxMaRedisBetterConfigImpl(redisTemplateWxRedisOps, "sweet:accessToken:applet:wenque");
wxMaDefaultConfig.setAppid(appletAppidWenque);
wxMaDefaultConfig.setSecret(appletSecretWenque);
wxMaDefaultConfig.setMsgDataFormat("JSON");
this.setWxMaConfig(wxMaDefaultConfig);
}
};
wxMaStrawberryMessageRouter = new WxMaMessageRouter(wxMaAppletStrawberryService);
wxMaFiveMessageRouter = new WxMaMessageRouter(wxMaAppletFiveService);
wxMaMdskMessageRouter = new WxMaMessageRouter(wxMaAppletMdskService);
......@@ -215,6 +290,9 @@ public class WechatMaConfigure {
wxMaAirshipMessageRouter = new WxMaMessageRouter(wxMaAppletAirshipService);
wxMaSmileMessageRouter = new WxMaMessageRouter(wxMaAppletSmileService);
wxMaModernMessageRouter = new WxMaMessageRouter(wxMaAppletModernService);
wxMaDoudouMessageRouter = new WxMaMessageRouter(wxMaAppletDoudouService);
wxMaMootooMessageRouter = new WxMaMessageRouter(wxMaAppletMootooService);
wxMaWenqueMessageRouter = new WxMaMessageRouter(wxMaAppletWenqueService);
}
public WxMaService getWxMaService(Integer anum) {
......@@ -233,6 +311,12 @@ public class WechatMaConfigure {
return wxMaAppletSmileService;
case 7:
return wxMaAppletModernService;
case 8:
return wxMaAppletDoudouService;
case 9:
return wxMaAppletMootooService;
case 10:
return wxMaAppletWenqueService;
}
return null;
}
......@@ -253,6 +337,12 @@ public class WechatMaConfigure {
return appletAppidSmile;
case 7:
return appletAppidModern;
case 8:
return appletAppidDoudou;
case 9:
return appletAppidMootoo;
case 10:
return appletAppidWenque;
}
return "";
}
......@@ -273,6 +363,12 @@ public class WechatMaConfigure {
return wxMaSmileMessageRouter;
case 7:
return wxMaModernMessageRouter;
case 8:
return wxMaDoudouMessageRouter;
case 9:
return wxMaMootooMessageRouter;
case 10:
return wxMaWenqueMessageRouter;
}
return null;
}
......
......@@ -32,7 +32,7 @@ public class SweetWechatLoginController {
@ApiImplicitParam(type = "query", dataType = "String", name = "code", value = "获取手机号的 code", required = true),
@ApiImplicitParam(type = "query", dataType = "String", name = "encryptedData", value = "encryptedData"),
@ApiImplicitParam(type = "query", dataType = "String", name = "iv", value = "iv"),
@ApiImplicitParam(type = "query", dataType = "Integer", name = "type", value = "1草莓 2五百里 3mdsk 4正在 5跳飞船音乐节 6小家伙", required = true),
@ApiImplicitParam(type = "query", dataType = "Integer", name = "type", value = "1草莓 2五百里 3mdsk 4正在 5跳飞船 6小家伙 7摩登 8DouDou 9mootoo 10wenque", required = true),
})
public ResponseDto userInfo(
@RequestParam(required = false) String userCode,
......@@ -48,7 +48,7 @@ public class SweetWechatLoginController {
@GetMapping(value = {"maOpenId"})
@ApiImplicitParams({
@ApiImplicitParam(type = "query", dataType = "String", name = "jsCode", value = "微信jsCode", required = true),
@ApiImplicitParam(type = "query", dataType = "Integer", name = "type", value = " 1草莓 2五百里 3mdsk 4正在 5跳飞船音乐节 6小家伙", required = true)
@ApiImplicitParam(type = "query", dataType = "Integer", name = "type", value = " 1草莓 2五百里 3mdsk 4正在 5跳飞船 6小家伙 7摩登 8DouDou 9mootoo 10wenque", required = true)
})
public ResponseDto<String> wxaCode2Session(@RequestParam String jsCode, @RequestParam Integer type) {
return sweetLoginService.wxaCode2Session(jsCode, type);
......@@ -58,7 +58,7 @@ public class SweetWechatLoginController {
@GetMapping(value = {"userInfoMa"})
@ApiImplicitParams({
@ApiImplicitParam(type = "query", dataType = "String", name = "jsCode", value = "微信jsCode", required = true),
@ApiImplicitParam(type = "query", dataType = "Integer", name = "type", value = " 1草莓 2五百里 3mdsk 4正在 5跳飞船音乐节 6小家伙", required = true)
@ApiImplicitParam(type = "query", dataType = "Integer", name = "type", value = " 1草莓 2五百里 3mdsk 4正在 5跳飞船 6小家伙 7摩登 8DouDou 9mootoo 10wenque", required = true)
})
public ResponseDto<AdamLoginInfoVo> userInfoMa(@RequestParam String jsCode, @RequestParam Integer type) {
return sweetLoginService.userInfoMa(jsCode, type);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment