|
|
@ -262,6 +262,27 @@ public class RetailAppServiceImp implements RetailAppService {
|
|
|
|
return res;
|
|
|
|
return res;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
|
|
|
public List<JSONObject> getTransactionCommonWeekData(JSONObject device, AppQueryBean appQueryBean) {
|
|
|
|
|
|
|
|
String clientType = device.getString("client_type");
|
|
|
|
|
|
|
|
deviceSupport.findRegister(clientType);
|
|
|
|
|
|
|
|
int client_id = device.getIntValue("client_id");
|
|
|
|
|
|
|
|
JSONObject client = clientManager.getClientInfo(client_id);
|
|
|
|
|
|
|
|
String timezone = client.getString("timezone");
|
|
|
|
|
|
|
|
if (timezone != null && !timezone.isEmpty()) {
|
|
|
|
|
|
|
|
appQueryBean.setTimezone(timezone);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
JSONObject params = appQueryBean.toParams();
|
|
|
|
|
|
|
|
setAllClientIds(params, client_id);
|
|
|
|
|
|
|
|
params.put("client_id", client_id);
|
|
|
|
|
|
|
|
List<JSONObject> res = transactionAnalysisMapper.getWeekClientTransaction(params);
|
|
|
|
|
|
|
|
res.forEach(r -> {
|
|
|
|
|
|
|
|
r.put("date",r.getDate("date").toString());
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
res.remove(res.size() - 1);
|
|
|
|
|
|
|
|
return res;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public JSONObject getTradeCommonDate(JSONObject device, AppQueryBean appQueryBean) {
|
|
|
|
public JSONObject getTradeCommonDate(JSONObject device, AppQueryBean appQueryBean) {
|
|
|
|
String clientType = device.getString("client_type");
|
|
|
|
String clientType = device.getString("client_type");
|
|
|
@ -302,7 +323,7 @@ public class RetailAppServiceImp implements RetailAppService {
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public JSONObject getQrcode(JSONObject device, QRCodeConfig config, int client_id) {
|
|
|
|
public JSONObject getQrcode(JSONObject device, QRCodeConfig config, int client_id) {
|
|
|
|
JSONObject client = merchantInfoProvider.getClientInfo(client_id);
|
|
|
|
JSONObject client = merchantInfoProvider.getClientInfo(client_id);
|
|
|
|
String url = PlatformEnvironment.getEnv().concatUrl("/api/payment/v1.0/partners/" + client.getString("client_moniker"));
|
|
|
|
String url = PlatformEnvironment.getEnv().concatUrl("/api/v1.0/payment/partners/" + client.getString("client_moniker"));
|
|
|
|
if (config.isCNY()) {
|
|
|
|
if (config.isCNY()) {
|
|
|
|
url += "_CNY";
|
|
|
|
url += "_CNY";
|
|
|
|
}
|
|
|
|
}
|
|
|
|