|
|
@@ -266,14 +266,19 @@ public class CmsAccountServiceImpl extends ServiceImpl<AccountMapper, Account> i
|
|
|
Map<String, Object> map = Jsons.toMap(accountData);
|
|
|
Account insert = new Account();
|
|
|
insert.setGoodsId(goodsId);
|
|
|
- if (map.keySet().size() >= 6) {
|
|
|
+ if (map.keySet().size() >= 5) {
|
|
|
String account = map.get("0").toString();
|
|
|
String password = map.get("1").toString();
|
|
|
String friend = map.get("2").toString();
|
|
|
String work = map.get("3").toString();
|
|
|
String parents = map.get("4").toString();
|
|
|
- String country = map.get("5").toString();
|
|
|
- String secret = String.format(Constant.NEW_APPID_SECRET, friend, work, parents, country);
|
|
|
+ String secret;
|
|
|
+ if (map.keySet().size() == 6) {
|
|
|
+ String country = map.get("5").toString();
|
|
|
+ secret = String.format(Constant.NEW_APPID_SECRET, friend, work, parents, country);
|
|
|
+ } else {
|
|
|
+ secret = String.format(Constant.NEW_APPID_NO_COUNTRY_SECRET, friend, work, parents);
|
|
|
+ }
|
|
|
insert.setAccount(account);
|
|
|
insert.setPassword(password);
|
|
|
insert.setSecret(secret);
|