list daily transactions bug

master
yixian 7 years ago
parent d603b882a7
commit 8b15199265

@ -859,6 +859,9 @@ public class RetailAppServiceImp implements RetailAppService {
}
Date to = DateUtils.addDays(date, 1);
List<JSONObject> transactions = transactionMapper.listDailyTransactions(date, to, devId, device.getIntValue("client_id"));
if (transactions.isEmpty()) {
throw new BadRequestException("No Transactions in date " + dateStr + " at " + timezone);
}
TimeZoneUtils.switchTimeZoneToString(transactions, timezone, "HH:mm:ss", Collections.singletonList("transaction_time"));
JSONObject res = new JSONObject();
res.put("transactions", transactions);
@ -1050,7 +1053,7 @@ public class RetailAppServiceImp implements RetailAppService {
}
@Override
public JSONObject getCashbackCleanInfo(JSONObject device,String client_id) {
public JSONObject getCashbackCleanInfo(JSONObject device, String client_id) {
String clientType = device.getString("client_type");
deviceSupport.findRegister(clientType);
JSONArray clientIds = clientManager.getAllClientIds(device.getIntValue("client_id"));
@ -1179,8 +1182,8 @@ public class RetailAppServiceImp implements RetailAppService {
deviceSupport.findRegister(clientType);
JSONObject res = royalPayCMSSupport.listArticles("app_ad", false, true, 1, 10);
JSONArray acts = res.getJSONArray("data");
if (acts.size()>0){
int selectNo = RandomUtils.nextInt(0,acts.size());
if (acts.size() > 0) {
int selectNo = RandomUtils.nextInt(0, acts.size());
return acts.getJSONObject(selectNo);
}
return null;

Loading…
Cancel
Save