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

Commit a9f4d981 authored by jiangxiulong's avatar jiangxiulong

5跳飞船音乐节

parent 2cf669ea
......@@ -46,7 +46,7 @@ public class SweetAppletUsersVo implements Serializable, Cloneable {
private String countryCode;
/**
* 1草莓 2五百里 3mdsk 4正在
* 1草莓 2五百里 3mdsk 4正在 5跳飞船音乐节
*/
private Integer type;
......
......@@ -148,6 +148,9 @@ liquidnet:
mdsk:
appid: wxc278ddf30f515188
secret: 21c0daa5d7d323f86c70c29db3c0613b
airship:
appid: wxefc896f987d72d32
secret: 24c80a734c1fdb316a31a5be1f3606d5
umeng:
ios:
appkey: 54fe819bfd98c546b50004f0
......
......@@ -151,6 +151,9 @@ liquidnet:
mdsk:
appid: wxc278ddf30f515188
secret: 21c0daa5d7d323f86c70c29db3c0613b
airship:
appid: wxefc896f987d72d32
secret: 24c80a734c1fdb316a31a5be1f3606d5
umeng:
ios:
appkey: 54fe819bfd98c546b50004f0
......
......@@ -45,7 +45,7 @@ public class SweetAppletSubMsg implements Serializable {
private String targetId;
/**
* 1草莓 2五百里 3mdsk 4正在
* 1草莓 2五百里 3mdsk 4正在 5跳飞船音乐节
*/
private Integer appletType;
......
......@@ -60,7 +60,7 @@ public class SweetAppletUsers implements Serializable {
private String countryCode;
/**
* 1草莓 2五百里 3mdsk 4正在
* 1草莓 2五百里 3mdsk 4正在 5跳飞船音乐节
*/
private Integer type;
......
......@@ -7,7 +7,7 @@ CREATE TABLE `sweet_applet_sub_msg`
`open_id` varchar(255) NOT NULL DEFAULT '' COMMENT 'open_id',
`template_id` varchar(255) NOT NULL DEFAULT '' COMMENT 'template_id',
`target_id` varchar(255) NOT NULL DEFAULT '' COMMENT '目标id 显示是演出id',
`applet_type` tinyint NOT NULL DEFAULT 0 COMMENT '1草莓 2五百里 3mdsk 4正在',
`applet_type` tinyint NOT NULL DEFAULT 0 COMMENT '1草莓 2五百里 3mdsk 4正在 5跳飞船音乐节',
`activity_type` tinyint NOT NULL DEFAULT 0 COMMENT '活动类型',
`is_push` tinyint NOT NULL DEFAULT 1 COMMENT '是否推送 1未推送 2已推送',
`created_at` datetime NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
......
......@@ -452,7 +452,7 @@ CREATE TABLE `sweet_applet_users`
`phone_number` varchar(200) NOT NULL DEFAULT '' COMMENT '手机号',
`pure_phone_number` varchar(200) NOT NULL DEFAULT '' COMMENT '手机号',
`country_code` varchar(200) NOT NULL DEFAULT '' COMMENT '地区码',
`type` tinyint NOT NULL DEFAULT 0 COMMENT '1草莓 2五百里 3mdsk 4正在',
`type` tinyint NOT NULL DEFAULT 0 COMMENT '1草莓 2五百里 3mdsk 4正在 5跳飞船音乐节',
`created_at` datetime NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`updated_at` datetime NULL DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间',
PRIMARY KEY (`mid`),
......
......@@ -19,8 +19,6 @@ import javax.annotation.PostConstruct;
@Configuration
@Slf4j
public class WechatMaConfigure {
private static String appletAppidZhengzai;
private static String appletSecretZhengzai;
private static String appletAppidStrawberry;
private static String appletSecretStrawberry;
......@@ -31,21 +29,16 @@ public class WechatMaConfigure {
private static String appletAppidMdsk;
private static String appletSecretMdsk;
@Value("${liquidnet.wechat.applet.zhengzai.appid}")
public void setAppletAppidZhengzai(String appletAppidZhengzai) {
WechatMaConfigure.appletAppidZhengzai = appletAppidZhengzai;
}
private static String appletAppidAirship;
private static String appletSecretAirship;
@Value("${liquidnet.wechat.applet.zhengzai.secret}")
public void setAppletSecretZhengzai(String appletSecretZhengzai) {
WechatMaConfigure.appletSecretZhengzai = appletSecretZhengzai;
}
private static String appletAppidZhengzai;
private static String appletSecretZhengzai;
@Value("${liquidnet.wechat.applet.strawberry.appid}")
public void setAppletAppidStrawberry(String appletAppidStrawberry) {
WechatMaConfigure.appletAppidStrawberry = appletAppidStrawberry;
}
@Value("${liquidnet.wechat.applet.strawberry.secret}")
public void setAppletSecretStrawberry(String appletSecretStrawberry) {
WechatMaConfigure.appletSecretStrawberry = appletSecretStrawberry;
......@@ -55,7 +48,6 @@ public class WechatMaConfigure {
public void setAppletAppidFive(String appletAppidFive) {
WechatMaConfigure.appletAppidFive = appletAppidFive;
}
@Value("${liquidnet.wechat.applet.five.secret}")
public void setAppletSecretFive(String appletSecretFive) {
WechatMaConfigure.appletSecretFive = appletSecretFive;
......@@ -65,18 +57,40 @@ public class WechatMaConfigure {
public void setAppletAppidMdsk(String appletAppidMdsk) {
WechatMaConfigure.appletAppidMdsk = appletAppidMdsk;
}
@Value("${liquidnet.wechat.applet.mdsk.secret}")
public void setAppletSecretMdsk(String appletSecretMdsk) {
WechatMaConfigure.appletSecretMdsk = appletSecretMdsk;
}
private WxMaService wxMaAppletZhengzaiService;
@Value("${liquidnet.wechat.applet.zhengzai.appid}")
public void setAppletAppidZhengzai(String appletAppidZhengzai) {
WechatMaConfigure.appletAppidZhengzai = appletAppidZhengzai;
}
@Value("${liquidnet.wechat.applet.zhengzai.secret}")
public void setAppletSecretZhengzai(String appletSecretZhengzai) {
WechatMaConfigure.appletSecretZhengzai = appletSecretZhengzai;
}
@Value("${liquidnet.wechat.applet.mdsk.appid}")
public void setAppletAppidAirship(String appletAppidAirship) {
WechatMaConfigure.appletAppidAirship = appletAppidAirship;
}
@Value("${liquidnet.wechat.applet.mdsk.secret}")
public void setAppletSecretAirship(String appletSecretAirship) {
WechatMaConfigure.appletSecretAirship = appletSecretAirship;
}
private WxMaService wxMaAppletStrawberryService;
private WxMaService wxMaAppletFiveService;
private WxMaService wxMaAppletMdskService;
private WxMaService wxMaAppletZhengzaiService;
private WxMaService wxMaAppletAirshipService;
private WxMaMessageRouter wxMaStrawberryMessageRouter;
private WxMaMessageRouter wxMaFiveMessageRouter;
private WxMaMessageRouter wxMaMdskMessageRouter;
private WxMaMessageRouter wxMaZhengzaiMessageRouter;
private WxMaMessageRouter wxMaAirshipMessageRouter;
@Autowired
private StringRedisTemplate stringRedisTemplate;
......@@ -88,24 +102,10 @@ public class WechatMaConfigure {
@PostConstruct
public void init() {
wxMaAppletZhengzaiService = new WxMaServiceImpl() {
{
RedisTemplateWxRedisOps redisTemplateWxRedisOps = new RedisTemplateWxRedisOps(stringRedisTemplate);
WxMaRedisBetterConfigImpl wxMaDefaultConfig = new WxMaRedisBetterConfigImpl(redisTemplateWxRedisOps, "sweet:accessToken:applet:zhengzai");
// WxMaDefaultConfigImpl wxMaDefaultConfig = new WxMaDefaultConfigImpl();
wxMaDefaultConfig.setAppid(appletAppidZhengzai);
wxMaDefaultConfig.setSecret(appletSecretZhengzai);
wxMaDefaultConfig.setMsgDataFormat("JSON");
this.setWxMaConfig(wxMaDefaultConfig);
}
};
wxMaAppletStrawberryService = new WxMaServiceImpl() {
{
RedisTemplateWxRedisOps redisTemplateWxRedisOps = new RedisTemplateWxRedisOps(stringRedisTemplate);
WxMaRedisBetterConfigImpl wxMaDefaultConfig = new WxMaRedisBetterConfigImpl(redisTemplateWxRedisOps, "sweet:accessToken:applet:strawberry");
// WxMaDefaultConfigImpl wxMaDefaultConfig = new WxMaDefaultConfigImpl();
wxMaDefaultConfig.setAppid(appletAppidStrawberry);
wxMaDefaultConfig.setSecret(appletSecretStrawberry);
wxMaDefaultConfig.setMsgDataFormat("JSON");
......@@ -117,7 +117,6 @@ public class WechatMaConfigure {
{
RedisTemplateWxRedisOps redisTemplateWxRedisOps = new RedisTemplateWxRedisOps(stringRedisTemplate);
WxMaRedisBetterConfigImpl wxMaDefaultConfig = new WxMaRedisBetterConfigImpl(redisTemplateWxRedisOps, "sweet:accessToken:applet:five");
// WxMaDefaultConfigImpl wxMaDefaultConfig = new WxMaDefaultConfigImpl();
wxMaDefaultConfig.setAppid(appletAppidFive);
wxMaDefaultConfig.setSecret(appletSecretFive);
wxMaDefaultConfig.setMsgDataFormat("JSON");
......@@ -129,7 +128,6 @@ public class WechatMaConfigure {
{
RedisTemplateWxRedisOps redisTemplateWxRedisOps = new RedisTemplateWxRedisOps(stringRedisTemplate);
WxMaRedisBetterConfigImpl wxMaDefaultConfig = new WxMaRedisBetterConfigImpl(redisTemplateWxRedisOps, "sweet:accessToken:applet:mdsk");
// WxMaDefaultConfigImpl wxMaDefaultConfig = new WxMaDefaultConfigImpl();
wxMaDefaultConfig.setAppid(appletAppidMdsk);
wxMaDefaultConfig.setSecret(appletSecretMdsk);
wxMaDefaultConfig.setMsgDataFormat("JSON");
......@@ -137,41 +135,80 @@ public class WechatMaConfigure {
this.setWxMaConfig(wxMaDefaultConfig);
}
};
wxMaAppletZhengzaiService = new WxMaServiceImpl() {
{
RedisTemplateWxRedisOps redisTemplateWxRedisOps = new RedisTemplateWxRedisOps(stringRedisTemplate);
WxMaRedisBetterConfigImpl wxMaDefaultConfig = new WxMaRedisBetterConfigImpl(redisTemplateWxRedisOps, "sweet:accessToken:applet:zhengzai");
// WxMaDefaultConfigImpl wxMaDefaultConfig = new WxMaDefaultConfigImpl();
wxMaDefaultConfig.setAppid(appletAppidZhengzai);
wxMaDefaultConfig.setSecret(appletSecretZhengzai);
wxMaDefaultConfig.setMsgDataFormat("JSON");
this.setWxMaConfig(wxMaDefaultConfig);
}
};
wxMaAppletAirshipService = new WxMaServiceImpl() {
{
RedisTemplateWxRedisOps redisTemplateWxRedisOps = new RedisTemplateWxRedisOps(stringRedisTemplate);
WxMaRedisBetterConfigImpl wxMaDefaultConfig = new WxMaRedisBetterConfigImpl(redisTemplateWxRedisOps, "sweet:accessToken:applet:airship");
wxMaDefaultConfig.setAppid(appletAppidAirship);
wxMaDefaultConfig.setSecret(appletSecretAirship);
wxMaDefaultConfig.setMsgDataFormat("JSON");
this.setWxMaConfig(wxMaDefaultConfig);
}
};
wxMaStrawberryMessageRouter = new WxMaMessageRouter(wxMaAppletStrawberryService);
wxMaFiveMessageRouter = new WxMaMessageRouter(wxMaAppletFiveService);
wxMaMdskMessageRouter = new WxMaMessageRouter(wxMaAppletMdskService);
wxMaZhengzaiMessageRouter = new WxMaMessageRouter(wxMaAppletZhengzaiService);
wxMaAirshipMessageRouter = new WxMaMessageRouter(wxMaAppletAirshipService);
}
public WxMaService getWxMaService(Integer anum) {
switch (anum) {
case 4:
return wxMaAppletZhengzaiService;
case 1:
return wxMaAppletStrawberryService;
case 2:
return wxMaAppletFiveService;
case 3:
return wxMaAppletMdskService;
case 4:
return wxMaAppletZhengzaiService;
case 5:
return wxMaAppletAirshipService;
}
return null;
}
public String getWxMaAppid(Integer anum) {
switch (anum) {
case 4:
return appletAppidZhengzai;
case 1:
return appletAppidStrawberry;
case 2:
return appletAppidFive;
case 3:
return appletAppidMdsk;
case 4:
return appletAppidZhengzai;
case 5:
return appletAppidAirship;
}
return "";
}
public WxMaMessageRouter getWxMaMessageRouter(Integer pnum) {
switch (pnum) {
case 1:
return wxMaStrawberryMessageRouter;
case 2:
return wxMaFiveMessageRouter;
case 3:
return wxMaMdskMessageRouter;
case 4:
return wxMaZhengzaiMessageRouter;
case 5:
return wxMaAirshipMessageRouter;
}
return null;
}
......
......@@ -59,7 +59,7 @@ public class SweetAppletSubMsgController {
@ApiImplicitParam(type = "form", dataType = "String", name = "openId", value = "openId", required = true),
@ApiImplicitParam(type = "form", dataType = "String", name = "templateId", value = "templateId 多个用英文逗号分割", required = true),
@ApiImplicitParam(type = "form", dataType = "String", name = "targetId", value = "演出id", required = true),
@ApiImplicitParam(type = "form", dataType = "String", name = "appletType", value = "1草莓 2五百里 3mdsk 4正在", required = true),
@ApiImplicitParam(type = "form", dataType = "String", name = "appletType", value = "1草莓 2五百里 3mdsk 4正在 5跳飞船音乐节", required = true),
@ApiImplicitParam(type = "form", dataType = "String", name = "activityType", value = "活动类型", required = true),
})
public ResponseDto<Boolean> create(
......
......@@ -28,7 +28,7 @@ public class SweetWechatLoginController {
@ApiImplicitParam(type = "query", dataType = "String", name = "code", value = "微信code", required = true),
@ApiImplicitParam(type = "query", dataType = "String", name = "encryptedData", value = "encryptedData", required = true),
@ApiImplicitParam(type = "query", dataType = "String", name = "iv", value = "iv", required = true),
@ApiImplicitParam(type = "query", dataType = "Integer", name = "type", value = "1草莓 2五百里 3mdsk 4正在"),
@ApiImplicitParam(type = "query", dataType = "Integer", name = "type", value = "1草莓 2五百里 3mdsk 4正在 5跳飞船音乐节"),
})
public ResponseDto userInfo(
@RequestParam() String code,
......@@ -43,7 +43,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正在", required = true)
@ApiImplicitParam(type = "query", dataType = "Integer", name = "type", value = "1草莓 2五百里 3mdsk 4正在 5跳飞船音乐节", required = true)
})
public ResponseDto<String> wxaCode2Session(@RequestParam String jsCode, @RequestParam Integer type) {
return sweetLoginService.wxaCode2Session(jsCode, type);
......@@ -53,7 +53,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正在", required = true)
@ApiImplicitParam(type = "query", dataType = "Integer", name = "type", value = "1草莓 2五百里 3mdsk 4正在 5跳飞船音乐节", 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