|
|
|
@ -29,6 +29,7 @@ import au.com.royalpay.payment.manage.mappers.system.ClientMapper;
|
|
|
|
|
import au.com.royalpay.payment.manage.mappers.system.ClientRateMapper;
|
|
|
|
|
import au.com.royalpay.payment.manage.mappers.system.ClientsContractMapper;
|
|
|
|
|
import au.com.royalpay.payment.manage.mappers.system.CommoditiesMapper;
|
|
|
|
|
import au.com.royalpay.payment.manage.mappers.system.MailSendMapper;
|
|
|
|
|
import au.com.royalpay.payment.manage.mappers.system.ManagerMapper;
|
|
|
|
|
import au.com.royalpay.payment.manage.mappers.system.OrgMapper;
|
|
|
|
|
import au.com.royalpay.payment.manage.mappers.system.SysWxMerchantApplyMapper;
|
|
|
|
@ -266,6 +267,8 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
|
|
|
|
|
private MongoTemplate mongoTemplate;
|
|
|
|
|
@Resource
|
|
|
|
|
private MailGunService mailGunService;
|
|
|
|
|
@Resource
|
|
|
|
|
private MailSendMapper mailSendMapper;
|
|
|
|
|
|
|
|
|
|
private static final String SOURCE_AGREE_FILE = "source_agree_file";
|
|
|
|
|
private static final String CLIENT_BANK_FILE = "client_bank_file";
|
|
|
|
@ -935,6 +938,37 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public void newCheckEmailStatus() {
|
|
|
|
|
List<JSONObject> clients = clientMapper.listClientsWithEmailNotVerify();
|
|
|
|
|
for (JSONObject client : clients) {
|
|
|
|
|
try {
|
|
|
|
|
String emailId = client.getString("approve_email_id");
|
|
|
|
|
JSONObject status = mailSendMapper.find(emailId,client.getString("contact_email"));
|
|
|
|
|
if (status!=null) {
|
|
|
|
|
int statusNo = status.getIntValue("status");
|
|
|
|
|
logger.debug("get mail status:" + emailId + "--" + statusNo);
|
|
|
|
|
int mailStatus = 3;
|
|
|
|
|
switch (statusNo) {
|
|
|
|
|
case 1:
|
|
|
|
|
mailStatus = 1;
|
|
|
|
|
break;
|
|
|
|
|
case 2:
|
|
|
|
|
mailStatus = 2;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
updateClientApproveEmailStatus(mailStatus, null, client.getString("client_moniker"));
|
|
|
|
|
} else {
|
|
|
|
|
logger.debug("get mail status:" + emailId + "-- none");
|
|
|
|
|
// updateClientApproveEmailStatus(client.getIntValue("client_id"), 0);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
logger.error("check email status failed", e);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public void switchPermission(JSONObject manager, String clientMoniker, String permissionKey, boolean allow) {
|
|
|
|
|
JSONObject client = getClientInfoByMoniker(clientMoniker);
|
|
|
|
|