|
|
|
@ -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);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|