Merge remote-tracking branch 'origin/develop' into develop

master
yixian 8 years ago
commit 86aa70508c

@ -720,17 +720,14 @@ public class RetailAppServiceImp implements RetailAppService {
} }
JSONObject managerMsg = new JSONObject(); JSONObject managerMsg = new JSONObject();
managerMsg.put("title", LocaleSupport.localeMessage("app.message.title.daily_notice")); managerMsg.put("title", LocaleSupport.localeMessage("app.message.title.daily_notice"));
managerMsg.put("body", trade_date + ": 总交易额 " managerMsg.put("body", trade_date + ": 总交易额 " + PlatformEnvironment.getEnv().getForeignCurrency() + total_amount + ", 订单数:" + total_orders
+ PlatformEnvironment.getEnv().getForeignCurrency() + total_amount + ", 订单数:" + total_orders + ", 付款人数:" + customers); + ", 付款人数:" + customers);
managerMsg.put("type", type); managerMsg.put("type", type);
managerMsg.put("data", tradeInfo); managerMsg.put("data", tradeInfo);
managerMsg.put("msgType", "daily_notice"); managerMsg.put("msgType", "daily_notice");
AppMessage appMessage = new AppManagerMessageBuilder(managerMsg).buildMessage(); AppMessage appMessage = new AppManagerMessageBuilder(managerMsg).buildMessage();
sender.sendMessage(appMessage, devToken); sender.sendMessage(appMessage, devToken);
log.put("status", 2); log.put("status", 2);
appMessageLogMapper.update(log); appMessageLogMapper.update(log);
} catch (Exception e) { } catch (Exception e) {
@ -845,9 +842,18 @@ public class RetailAppServiceImp implements RetailAppService {
res.put("customer_surcharge_rate", client.getBigDecimal("customer_surcharge_rate")); res.put("customer_surcharge_rate", client.getBigDecimal("customer_surcharge_rate"));
} }
res.put("max_customer_surcharge_rate", PlatformEnvironment.getEnv().getMaxCustomerSurchargeRate()); res.put("max_customer_surcharge_rate", PlatformEnvironment.getEnv().getMaxCustomerSurchargeRate());
channels.add(getChannel(clientId, now, "Wechat")); JSONObject wechat = getChannel(clientId, now, "Wechat");
channels.add(getChannel(clientId, now, "Alipay")); if (wechat.containsKey("channel")) {
channels.add(getChannel(clientId, now, "Bestpay")); channels.add(wechat);
}
JSONObject alipay = getChannel(clientId, now, "Alipay");
if (wechat.containsKey("channel")) {
channels.add(alipay);
}
JSONObject bestpay = getChannel(clientId, now, "Bestpay");
if (wechat.containsKey("channel")) {
channels.add(bestpay);
}
JSONObject jd = getChannel(clientId, now, "jd"); JSONObject jd = getChannel(clientId, now, "jd");
if (jd.containsKey("channel")) { if (jd.containsKey("channel")) {
channels.add(jd); channels.add(jd);

@ -1,20 +1,21 @@
package au.com.royalpay.payment.manage.notice.core.impls; package au.com.royalpay.payment.manage.notice.core.impls;
import au.com.royalpay.payment.manage.mappers.notice.NoticePartnerMapper; import java.util.Collections;
import au.com.royalpay.payment.manage.notice.core.NoticePartner; import java.util.Date;
import au.com.royalpay.payment.tools.utils.PageListUtils; import java.util.List;
import javax.annotation.Resource;
import org.springframework.stereotype.Service;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.github.miemiedev.mybatis.paginator.domain.Order; import com.github.miemiedev.mybatis.paginator.domain.Order;
import com.github.miemiedev.mybatis.paginator.domain.PageBounds; import com.github.miemiedev.mybatis.paginator.domain.PageBounds;
import com.github.miemiedev.mybatis.paginator.domain.PageList; import com.github.miemiedev.mybatis.paginator.domain.PageList;
import org.springframework.stereotype.Service; import au.com.royalpay.payment.manage.mappers.notice.NoticePartnerMapper;
import au.com.royalpay.payment.manage.notice.core.NoticePartner;
import java.util.Date; import au.com.royalpay.payment.tools.utils.PageListUtils;
import java.util.List;
import javax.annotation.Resource;
/** /**
* Created by yishuqian on 29/09/2016. * Created by yishuqian on 29/09/2016.
@ -39,6 +40,9 @@ public class NoticePartnerImpl implements NoticePartner {
PageList<JSONObject> partnerNotices =noticePartnerMapper.listNoticesByClientId(params, PageList<JSONObject> partnerNotices =noticePartnerMapper.listNoticesByClientId(params,
new PageBounds(params.getIntValue("page"), params.getIntValue("limit"), Order.formString("status.asc,send_time.desc"))); new PageBounds(params.getIntValue("page"), params.getIntValue("limit"), Order.formString("status.asc,send_time.desc")));
JSONObject res = PageListUtils.buildPageListResult(partnerNotices); JSONObject res = PageListUtils.buildPageListResult(partnerNotices);
if(partnerNotices.size()<1){
res.put("data", Collections.EMPTY_LIST);
}
res.put("unReadCounts",counts); res.put("unReadCounts",counts);
return res; return res;
} }

Loading…
Cancel
Save