🎨 #1571 对微信模版消息行业信息不一致的变态问题尽可能的进行优化

This commit is contained in:
Binary Wang
2020-05-23 21:09:58 +08:00
parent bcefec0f4b
commit 4eb1d1d71a
4 changed files with 31 additions and 17 deletions

View File

@@ -41,9 +41,9 @@ public enum WxMpTemplateIndustryEnum {
*/
BANK("金融业", "银行", 7),
/**
* 金融业 - 基金|理财|信托
* 金融业 - 证券|基金|理财|信托(实际是这个)
*/
FUND("金融业", "基金|理财|信托", 8),
FUND("金融业", "证券基金理财信托", 8),
/**
* 金融业 - 保险
*/
@@ -93,9 +93,9 @@ public enum WxMpTemplateIndustryEnum {
*/
MUSEUM("政府与公共事业", "博物馆", 20),
/**
* 政府与公共事业 - 公共事业|非盈利机构
* 政府与公共事业 - 公共事业非盈利机构
*/
PUBLIC_WORKS_NONPROFIT("政府与公共事业", "公共事业|非盈利机构", 21),
PUBLIC_WORKS_NONPROFIT("政府与公共事业", "公共事业非盈利机构", 21),
/**
* 医药护理 - 医药医疗
*/
@@ -125,7 +125,7 @@ public enum WxMpTemplateIndustryEnum {
*/
THE_PLANE_RELATED("交通工具", "飞机相关", 28),
/**
* 房地产 - 建筑
* 房地产 - 房地产|建筑(实际上是这个)
*/
ARCHITECTURE("房地产", "建筑", 29),
/**
@@ -153,9 +153,9 @@ public enum WxMpTemplateIndustryEnum {
*/
AUTHENTICATION("商业服务", "认证", 35),
/**
* 商业服务 - 会计|审计
* 商业服务 - 审计
*/
AUDIT("商业服务", "会计|审计", 36),
AUDIT("商业服务", "审计", 36),
/**
* 文体娱乐 - 传媒
*/

View File

@@ -29,6 +29,11 @@ public class WxMpIndustryGsonAdapter implements JsonSerializer<WxMpTemplateIndus
private WxMpTemplateIndustryEnum convertFromJson(JsonObject json) {
String secondClass = GsonHelper.getString(json, "second_class");
final WxMpTemplateIndustryEnum industryEnum = WxMpTemplateIndustryEnum.findBySecondary(secondClass);
if (industryEnum != null) {
return industryEnum;
}
if (secondClass.contains("|")) {
secondClass = secondClass.split("\\|")[1];
}