eason.qian 7 years ago
parent c9234149f1
commit 08d0fcb4c2

@ -94,7 +94,7 @@ public interface RetailAppService {
void drawDeposits(JSONObject device, BigDecimal draw_amount, String client_id); void drawDeposits(JSONObject device, BigDecimal draw_amount, String client_id);
JSONObject getCashbackCleanInfo(JSONObject device); JSONObject getCashbackCleanInfo(JSONObject device,String client_id);
void sendMassageByCode(JSONObject params); void sendMassageByCode(JSONObject params);

@ -1050,13 +1050,17 @@ public class RetailAppServiceImp implements RetailAppService {
} }
@Override @Override
public JSONObject getCashbackCleanInfo(JSONObject device) { public JSONObject getCashbackCleanInfo(JSONObject device,String client_id) {
String clientType = device.getString("client_type"); String clientType = device.getString("client_type");
deviceSupport.findRegister(clientType); deviceSupport.findRegister(clientType);
JSONObject res = clientManager.getBankAccountByClientId(device.getIntValue("client_id")); JSONArray clientIds = clientManager.getAllClientIds(device.getIntValue("client_id"));
JSONObject rate = merchantInfoProvider.clientCurrentRate(device.getIntValue("client_id"), new Date(), "Wechat"); 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) { 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")); rate.put("clean_days", client.getIntValue("clean_days"));
} }
res.put("clean_days", rate.getIntValue("clean_days")); res.put("clean_days", rate.getIntValue("clean_days"));

@ -236,8 +236,11 @@ public class RetailAppController {
} }
@RequestMapping(value = "/cash_back/clean_info", method = RequestMethod.GET) @RequestMapping(value = "/cash_back/clean_info", method = RequestMethod.GET)
public JSONObject getCashbackCleanInfo(@ModelAttribute(CommonConsts.RETAIL_DEVICE) JSONObject device) { public JSONObject getCashbackCleanInfo(@ModelAttribute(CommonConsts.RETAIL_DEVICE) JSONObject device,@RequestParam(value = "client_id",required = false) String client_id) {
return retailAppService.getCashbackCleanInfo(device); if (client_id==null){
client_id=device.getString("client_id");
}
return retailAppService.getCashbackCleanInfo(device,client_id);
} }
@RequestMapping(value = "/partner_signin_app_qrcode/{codeId}", method = RequestMethod.GET) @RequestMapping(value = "/partner_signin_app_qrcode/{codeId}", method = RequestMethod.GET)

Loading…
Cancel
Save