master
luoyang 6 years ago
parent f80f532c01
commit 72c7ae90f6

@ -5,6 +5,7 @@ import au.com.royalpay.payment.manage.merchants.beans.BankAccountInfo;
import au.com.royalpay.payment.manage.merchants.beans.ClientAuthFilesInfo;
import au.com.royalpay.payment.manage.merchants.beans.ClientRegisterInfo;
import au.com.royalpay.payment.manage.merchants.beans.PartnerQuery;
import au.com.royalpay.payment.manage.product.beans.ProductBean;
import au.com.royalpay.payment.manage.signin.beans.ChangePwdBean;
import com.alibaba.fastjson.JSONObject;
@ -64,6 +65,13 @@ public interface ManageAppService {
List<JSONObject> getBdPrizeList(JSONObject device);
String getPrizeRulesUrl(JSONObject device);
JSONObject getPrizeRulesUrl(JSONObject device);
JSONObject listProduct(JSONObject device, ProductBean productBean);
void saveProduct(JSONObject device, ProductBean productBean);
void updateProduct(JSONObject device, ProductBean productBean);
void deleteProduct(JSONObject device, String commodity_id);
}

@ -16,6 +16,8 @@ import au.com.royalpay.payment.manage.merchants.beans.ClientAuthFilesInfo;
import au.com.royalpay.payment.manage.merchants.beans.ClientRegisterInfo;
import au.com.royalpay.payment.manage.merchants.beans.PartnerQuery;
import au.com.royalpay.payment.manage.merchants.core.ClientManager;
import au.com.royalpay.payment.manage.product.beans.ProductBean;
import au.com.royalpay.payment.manage.product.core.ClientProduct;
import au.com.royalpay.payment.manage.signin.beans.ChangePwdBean;
import au.com.royalpay.payment.manage.signin.core.ManagerAccountsService;
import au.com.royalpay.payment.manage.signin.core.SignInAccountService;
@ -63,6 +65,8 @@ public class ManageAppServiceImp implements ManageAppService {
private BDPrizeService bdPrizeService;
@Resource
private FinancialBDConfigMapper financialBDConfigMapper;
@Resource
private ClientProduct clientProduct;
@Override
@ -374,14 +378,48 @@ public class ManageAppServiceImp implements ManageAppService {
}
@Override
public String getPrizeRulesUrl(JSONObject device) {
public JSONObject getPrizeRulesUrl(JSONObject device) {
String clientType = device.getString("client_type");
manageDeviceSupport.findRegister(clientType);
JSONObject manager = managerMapper.findById(device.getString("manager_id"));
JSONObject result = new JSONObject();
if (manager.getIntValue("org_id") == 1) {
return "http://192.168.0.49:9002/app/rules/bd";
result.put("url", "http://192.168.0.49:9002/app/rules/bd");
} else {
return "http://192.168.0.49:9002/app/rules/org";
result.put("url", "http://192.168.0.49:9002/app/rules/org");
}
return result;
}
@Override
public JSONObject listProduct(JSONObject device, ProductBean productBean) {
String clientType = device.getString("client_type");
manageDeviceSupport.findRegister(clientType);
JSONObject manager = managerMapper.findById(device.getString("manager_id"));
return clientProduct.listAllProduct(manager, productBean);
}
@Override
public void saveProduct(JSONObject device, ProductBean productBean) {
String clientType = device.getString("client_type");
manageDeviceSupport.findRegister(clientType);
JSONObject manager = managerMapper.findById(device.getString("manager_id"));
clientProduct.saveProduct(manager, productBean);
}
@Override
public void updateProduct(JSONObject device, ProductBean productBean) {
String clientType = device.getString("client_type");
manageDeviceSupport.findRegister(clientType);
JSONObject manager = managerMapper.findById(device.getString("manager_id"));
clientProduct.updateProduct(manager, productBean);
}
@Override
public void deleteProduct(JSONObject device, String commodity_id) {
String clientType = device.getString("client_type");
manageDeviceSupport.findRegister(clientType);
JSONObject manager = managerMapper.findById(device.getString("manager_id"));
clientProduct.deleteProduct(manager, commodity_id);
}
}

@ -7,6 +7,7 @@ import au.com.royalpay.payment.manage.merchants.beans.ClientAuthFilesInfo;
import au.com.royalpay.payment.manage.merchants.beans.ClientRegisterInfo;
import au.com.royalpay.payment.manage.merchants.beans.PartnerQuery;
import au.com.royalpay.payment.manage.permission.manager.ManagerMapping;
import au.com.royalpay.payment.manage.product.beans.ProductBean;
import au.com.royalpay.payment.manage.signin.beans.ChangePwdBean;
import au.com.royalpay.payment.tools.CommonConsts;
import au.com.royalpay.payment.tools.connections.attachment.core.AttachmentClient;
@ -169,8 +170,28 @@ public class ManageAppController {
}
@RequestMapping(value = "/prize/rules", method = RequestMethod.GET)
public String getPrizeRulesUrl(@ModelAttribute(CommonConsts.MANAGER_DEVICE) JSONObject device) {
public JSONObject getPrizeRulesUrl(@ModelAttribute(CommonConsts.MANAGER_DEVICE) JSONObject device) {
return manageAppService.getPrizeRulesUrl(device);
}
@RequestMapping(value = "/product/list", method = RequestMethod.GET)
public JSONObject listProduct(@ModelAttribute(CommonConsts.MANAGER_DEVICE) JSONObject device, ProductBean productBean) {
return manageAppService.listProduct(device, productBean);
}
@RequestMapping(value = "/product/save", method = RequestMethod.POST)
public void saveProduct(@ModelAttribute(CommonConsts.MANAGER_DEVICE) JSONObject device, ProductBean productBean) {
manageAppService.saveProduct(device, productBean);
}
@RequestMapping(value = "/product/update", method = RequestMethod.PUT)
public void updateProduct(@ModelAttribute(CommonConsts.MANAGER_DEVICE) JSONObject device, ProductBean productBean) {
manageAppService.updateProduct(device, productBean);
}
@RequestMapping(value = "/product/delete/{commodity_id}", method = RequestMethod.PUT)
public void deleteProduct(@ModelAttribute(CommonConsts.MANAGER_DEVICE) JSONObject device, @PathVariable String commodity_id) {
manageAppService.deleteProduct(device, commodity_id);
}
}

@ -2,7 +2,8 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="au.com.royalpay.payment.manage.mappers.financial.FinancialPartnerCommissionMapper">
<select id="getOrgPrizeList" resultType="com.alibaba.fastjson.JSONObject">
SELECT *
SELECT record_id,org_id,`year`,`month`,SUM(gross_amount) gross_amount,SUM(total_charge) total_charge,
SUM(royalpay_charge) royalpay_charge,SUM(org_charge) org_charge,SUM(net_charge) net_charge,SUM(share_charge) share_charge
FROM financial_partner_commission
WHERE org_id = #{org_id}
GROUP BY `year`,`month`

@ -40,7 +40,7 @@
</style>
<body ng-app="bdRulesApp" ng-controller="bdRulesCtrl">
<div class="box box-info">
<div class="box box-info" style="margin: 25px">
<div class="box-body">
<h4>BD分级提成费率速查表</h4>
<div class="table-responsive">

@ -22,7 +22,7 @@
</style>
<body>
<div>
<div style="margin: 25px">
<section class="content">
<div class="box box-info">
<div class="box-body container">

Loading…
Cancel
Save