fix: default orgid=1 when manager org is null

master
yixian 4 years ago
parent 054dc420c3
commit 024c59c54c

@ -789,10 +789,9 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
partner.put("ali_sub_merchant_id", registery.getClientMoniker());
partner.put("credential_code", RandomStringUtils.random(32, true, true));
partner.put("creator", manager.getString("manager_id"));
int orgId = manager.getIntValue("org_id");
int orgId = manager.getInteger("org_id") == null ? 1 : manager.getIntValue("org_id");
partner.put("org_id", orgId);
JSONObject org = orgMapper.findOne(orgId);
Assert.notNull(orgId, "Merchant Org shall not be null");
if (StringUtils.isNotEmpty(registery.getLogoId())) {
partner.put("logo_url", attachmentClient.getFileUrl(registery.getLogoId()));
partner.put("logo_thumbnail", attachmentClient.getThumbnail(registery.getLogoId(), 600).getString("url"));

Loading…
Cancel
Save