|
|
@ -1,6 +1,7 @@
|
|
|
|
package au.com.royalpay.payment.manage.appclient.core.impls;
|
|
|
|
package au.com.royalpay.payment.manage.appclient.core.impls;
|
|
|
|
|
|
|
|
|
|
|
|
import au.com.royalpay.payment.core.PaymentApi;
|
|
|
|
import au.com.royalpay.payment.core.PaymentApi;
|
|
|
|
|
|
|
|
import au.com.royalpay.payment.manage.activities.app_index.core.AppActService;
|
|
|
|
import au.com.royalpay.payment.manage.analysis.mappers.CustomerAndOrdersStatisticsMapper;
|
|
|
|
import au.com.royalpay.payment.manage.analysis.mappers.CustomerAndOrdersStatisticsMapper;
|
|
|
|
import au.com.royalpay.payment.manage.analysis.mappers.TransactionAnalysisMapper;
|
|
|
|
import au.com.royalpay.payment.manage.analysis.mappers.TransactionAnalysisMapper;
|
|
|
|
import au.com.royalpay.payment.manage.appclient.beans.AppClientBean;
|
|
|
|
import au.com.royalpay.payment.manage.appclient.beans.AppClientBean;
|
|
|
@ -29,7 +30,6 @@ import au.com.royalpay.payment.manage.pushMessage.bean.AppManagerMessageBuilder;
|
|
|
|
import au.com.royalpay.payment.manage.signin.beans.ChangePwdBean;
|
|
|
|
import au.com.royalpay.payment.manage.signin.beans.ChangePwdBean;
|
|
|
|
import au.com.royalpay.payment.manage.signin.core.SignInAccountService;
|
|
|
|
import au.com.royalpay.payment.manage.signin.core.SignInAccountService;
|
|
|
|
import au.com.royalpay.payment.manage.signin.core.impls.SignInAccountServiceImpl;
|
|
|
|
import au.com.royalpay.payment.manage.signin.core.impls.SignInAccountServiceImpl;
|
|
|
|
import au.com.royalpay.payment.manage.system.core.ClientContractService;
|
|
|
|
|
|
|
|
import au.com.royalpay.payment.manage.tradelog.beans.TradeLogQuery;
|
|
|
|
import au.com.royalpay.payment.manage.tradelog.beans.TradeLogQuery;
|
|
|
|
import au.com.royalpay.payment.tools.cms.RoyalPayCMSSupport;
|
|
|
|
import au.com.royalpay.payment.tools.cms.RoyalPayCMSSupport;
|
|
|
|
import au.com.royalpay.payment.tools.device.DeviceSupport;
|
|
|
|
import au.com.royalpay.payment.tools.device.DeviceSupport;
|
|
|
@ -37,7 +37,6 @@ import au.com.royalpay.payment.tools.device.message.AppMessage;
|
|
|
|
import au.com.royalpay.payment.tools.device.message.AppMsgSender;
|
|
|
|
import au.com.royalpay.payment.tools.device.message.AppMsgSender;
|
|
|
|
import au.com.royalpay.payment.tools.device.support.DeviceRegister;
|
|
|
|
import au.com.royalpay.payment.tools.device.support.DeviceRegister;
|
|
|
|
import au.com.royalpay.payment.tools.env.PlatformEnvironment;
|
|
|
|
import au.com.royalpay.payment.tools.env.PlatformEnvironment;
|
|
|
|
import au.com.royalpay.payment.tools.env.SysConfigManager;
|
|
|
|
|
|
|
|
import au.com.royalpay.payment.tools.exceptions.BadRequestException;
|
|
|
|
import au.com.royalpay.payment.tools.exceptions.BadRequestException;
|
|
|
|
import au.com.royalpay.payment.tools.exceptions.ForbiddenException;
|
|
|
|
import au.com.royalpay.payment.tools.exceptions.ForbiddenException;
|
|
|
|
import au.com.royalpay.payment.tools.exceptions.ServerErrorException;
|
|
|
|
import au.com.royalpay.payment.tools.exceptions.ServerErrorException;
|
|
|
@ -138,11 +137,9 @@ public class RetailAppServiceImp implements RetailAppService {
|
|
|
|
@Resource
|
|
|
|
@Resource
|
|
|
|
private ClientDeviceTokenMapper clientDeviceTokenMapper;
|
|
|
|
private ClientDeviceTokenMapper clientDeviceTokenMapper;
|
|
|
|
@Resource
|
|
|
|
@Resource
|
|
|
|
private ClientContractService clientContractService;
|
|
|
|
|
|
|
|
@Resource
|
|
|
|
|
|
|
|
private SysConfigManager sysConfigManager;
|
|
|
|
|
|
|
|
@Resource
|
|
|
|
|
|
|
|
private NoticePartnerMapper noticePartnerMapper;
|
|
|
|
private NoticePartnerMapper noticePartnerMapper;
|
|
|
|
|
|
|
|
@Resource
|
|
|
|
|
|
|
|
private AppActService appActService;
|
|
|
|
|
|
|
|
|
|
|
|
private Map<String, AppMsgSender> senderMap = new HashMap<>();
|
|
|
|
private Map<String, AppMsgSender> senderMap = new HashMap<>();
|
|
|
|
|
|
|
|
|
|
|
@ -875,24 +872,41 @@ public class RetailAppServiceImp implements RetailAppService {
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public List<JSONObject> getLatestNotice(int client_id) {
|
|
|
|
public List<JSONObject> getLatestNotice(int client_id) {
|
|
|
|
JSONObject notice = new JSONObject();
|
|
|
|
JSONObject notice = new JSONObject();
|
|
|
|
JSONObject lastNotice = noticeManage.getLatestWindowNotice(client_id);
|
|
|
|
JSONObject latestNotice = noticeManage.getLatestWindowNotice(client_id);
|
|
|
|
if(lastNotice!=null){
|
|
|
|
if (latestNotice != null) {
|
|
|
|
lastNotice.put("id",lastNotice.getString("notice_id"));
|
|
|
|
latestNotice.put("id", latestNotice.getString("notice_id"));
|
|
|
|
lastNotice.remove("notice_id");
|
|
|
|
latestNotice.remove("notice_id");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
notice.put("data",lastNotice);
|
|
|
|
notice.put("data", latestNotice);
|
|
|
|
JSONObject unReadParams = new JSONObject();
|
|
|
|
JSONObject unReadParams = new JSONObject();
|
|
|
|
unReadParams.put("client_id",client_id);
|
|
|
|
unReadParams.put("client_id", client_id);
|
|
|
|
unReadParams.put("status",0);
|
|
|
|
unReadParams.put("status", 0);
|
|
|
|
int counts = noticePartnerMapper.countNoticePartner(unReadParams);
|
|
|
|
int counts = noticePartnerMapper.countNoticePartner(unReadParams);
|
|
|
|
notice.put("unReadCounts",counts);
|
|
|
|
notice.put("unReadCounts", counts);
|
|
|
|
notice.put("type","notice");
|
|
|
|
notice.put("type", "notice");
|
|
|
|
List<JSONObject> result = new ArrayList<>();
|
|
|
|
List<JSONObject> result = new ArrayList<>();
|
|
|
|
result.add(notice);
|
|
|
|
result.add(notice);
|
|
|
|
|
|
|
|
|
|
|
|
return result;
|
|
|
|
JSONObject latestAct = appActService.getLatestWindowNotice();
|
|
|
|
}
|
|
|
|
if (latestAct != null) {
|
|
|
|
|
|
|
|
latestAct.put("id", latestAct.getString("act_id"));
|
|
|
|
|
|
|
|
if (latestAct.getIntValue("show_type") == 0) {
|
|
|
|
|
|
|
|
latestAct.put("url", latestAct.getString("act_url"));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
latestAct.put("title", latestAct.getString("act_name"));
|
|
|
|
|
|
|
|
latestAct.put("img", latestAct.getString("window_img"));
|
|
|
|
|
|
|
|
latestAct.remove("act_id");
|
|
|
|
|
|
|
|
latestAct.remove("act_name");
|
|
|
|
|
|
|
|
latestAct.remove("window_img");
|
|
|
|
|
|
|
|
latestAct.remove("act_url");
|
|
|
|
|
|
|
|
JSONObject act = new JSONObject();
|
|
|
|
|
|
|
|
act.put("data", latestAct);
|
|
|
|
|
|
|
|
act.put("type", "act");
|
|
|
|
|
|
|
|
result.add(act);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return result;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public void changeAccountPassword(JSONObject device, ChangePwdBean change, String account_id) {
|
|
|
|
public void changeAccountPassword(JSONObject device, ChangePwdBean change, String account_id) {
|
|
|
|