|
|
|
@ -1,6 +1,8 @@
|
|
|
|
package au.com.royalpay.payment.manage.appclient.core.impls;
|
|
|
|
package au.com.royalpay.payment.manage.appclient.core.impls;
|
|
|
|
|
|
|
|
|
|
|
|
import au.com.royalpay.payment.manage.appclient.core.ManageAppService;
|
|
|
|
import au.com.royalpay.payment.manage.appclient.core.ManageAppService;
|
|
|
|
|
|
|
|
import au.com.royalpay.payment.manage.bdprize.core.BDPrizeService;
|
|
|
|
|
|
|
|
import au.com.royalpay.payment.manage.mappers.financial.FinancialBDConfigMapper;
|
|
|
|
import au.com.royalpay.payment.manage.mappers.financial.FinancialBDPrizeLogMapper;
|
|
|
|
import au.com.royalpay.payment.manage.mappers.financial.FinancialBDPrizeLogMapper;
|
|
|
|
import au.com.royalpay.payment.manage.mappers.financial.FinancialBDPrizeRecordMapper;
|
|
|
|
import au.com.royalpay.payment.manage.mappers.financial.FinancialBDPrizeRecordMapper;
|
|
|
|
import au.com.royalpay.payment.manage.mappers.financial.FinancialPartnerCommissionMapper;
|
|
|
|
import au.com.royalpay.payment.manage.mappers.financial.FinancialPartnerCommissionMapper;
|
|
|
|
@ -22,6 +24,7 @@ import au.com.royalpay.payment.tools.exceptions.ForbiddenException;
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
|
import com.github.miemiedev.mybatis.paginator.domain.PageBounds;
|
|
|
|
import com.github.miemiedev.mybatis.paginator.domain.PageBounds;
|
|
|
|
import org.apache.commons.lang3.time.DateFormatUtils;
|
|
|
|
import org.apache.commons.lang3.time.DateFormatUtils;
|
|
|
|
|
|
|
|
import org.apache.ibatis.annotations.Param;
|
|
|
|
import org.springframework.cache.annotation.Cacheable;
|
|
|
|
import org.springframework.cache.annotation.Cacheable;
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
|
|
|
|
|
|
@ -54,6 +57,10 @@ public class ManageAppServiceImp implements ManageAppService {
|
|
|
|
private FinancialBDPrizeLogMapper financialBDPrizeLogMapper;
|
|
|
|
private FinancialBDPrizeLogMapper financialBDPrizeLogMapper;
|
|
|
|
@Resource
|
|
|
|
@Resource
|
|
|
|
private FinancialPartnerCommissionMapper financialPartnerCommissionMapper;
|
|
|
|
private FinancialPartnerCommissionMapper financialPartnerCommissionMapper;
|
|
|
|
|
|
|
|
@Resource
|
|
|
|
|
|
|
|
private BDPrizeService bdPrizeService;
|
|
|
|
|
|
|
|
@Resource
|
|
|
|
|
|
|
|
private FinancialBDConfigMapper financialBDConfigMapper;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
@ -225,4 +232,28 @@ public class ManageAppServiceImp implements ManageAppService {
|
|
|
|
total.put("date", DateFormatUtils.format(monthCal.getTime(), "yyyy-MM"));
|
|
|
|
total.put("date", DateFormatUtils.format(monthCal.getTime(), "yyyy-MM"));
|
|
|
|
return total;
|
|
|
|
return total;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
|
|
|
public List<JSONObject> getOrgPrizeList(JSONObject device) {
|
|
|
|
|
|
|
|
String clientType = device.getString("client_type");
|
|
|
|
|
|
|
|
manageDeviceSupport.findRegister(clientType);
|
|
|
|
|
|
|
|
JSONObject manager = managerMapper.findById(device.getString("manager_id"));
|
|
|
|
|
|
|
|
List<JSONObject> getOrgPrizeList = financialPartnerCommissionMapper.getOrgPrizeList(manager.getString("org_id"));
|
|
|
|
|
|
|
|
return getOrgPrizeList;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
|
|
|
public List<JSONObject> getBdConfigRates(JSONObject device) {
|
|
|
|
|
|
|
|
String clientType = device.getString("client_type");
|
|
|
|
|
|
|
|
manageDeviceSupport.findRegister(clientType);
|
|
|
|
|
|
|
|
return bdPrizeService.getRateConfig();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
|
|
|
public JSONObject getBdConfigKpi(JSONObject device) {
|
|
|
|
|
|
|
|
String clientType = device.getString("client_type");
|
|
|
|
|
|
|
|
manageDeviceSupport.findRegister(clientType);
|
|
|
|
|
|
|
|
JSONObject manager = managerMapper.findById(device.getString("manager_id"));
|
|
|
|
|
|
|
|
return financialBDConfigMapper.getBDConfigById(manager.getString("manager_id"));
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|