|
|
|
@ -1050,13 +1050,17 @@ public class RetailAppServiceImp implements RetailAppService {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public JSONObject getCashbackCleanInfo(JSONObject device) {
|
|
|
|
|
public JSONObject getCashbackCleanInfo(JSONObject device,String client_id) {
|
|
|
|
|
String clientType = device.getString("client_type");
|
|
|
|
|
deviceSupport.findRegister(clientType);
|
|
|
|
|
JSONObject res = clientManager.getBankAccountByClientId(device.getIntValue("client_id"));
|
|
|
|
|
JSONObject rate = merchantInfoProvider.clientCurrentRate(device.getIntValue("client_id"), new Date(), "Wechat");
|
|
|
|
|
JSONArray clientIds = clientManager.getAllClientIds(device.getIntValue("client_id"));
|
|
|
|
|
if (!clientIds.contains(client_id)) {
|
|
|
|
|
throw new ForbiddenException("partner has no permission");
|
|
|
|
|
}
|
|
|
|
|
JSONObject res = clientManager.getBankAccountByClientId(Integer.parseInt(client_id));
|
|
|
|
|
JSONObject rate = merchantInfoProvider.clientCurrentRate(Integer.parseInt(client_id), new Date(), "Wechat");
|
|
|
|
|
if (rate.getInteger("clean_days") == null) {
|
|
|
|
|
JSONObject client = clientManager.getClientInfo(device.getIntValue("client_id"));
|
|
|
|
|
JSONObject client = clientManager.getClientInfo(Integer.parseInt(client_id));
|
|
|
|
|
rate.put("clean_days", client.getIntValue("clean_days"));
|
|
|
|
|
}
|
|
|
|
|
res.put("clean_days", rate.getIntValue("clean_days"));
|
|
|
|
|