use of com.itrus.portal.db.AppService in project portal by ixinportal.
the class CertificationChargingServiceImplTest method testOne.
@Test
public void testOne() {
try {
cacheCustomer.initChargeRule();
String appid = "d2371e070dd544";
String appserviceId = "111111111";
ApplicationInfo applicationInfo = CertificationChargingService.getApplicationInfoByAppId(appid);
AppService appService = CertificationChargingService.getAppServiceByAppServiceId(appserviceId);
boolean flag = CertificationChargingService.checkTransInfo(appid, appserviceId, applicationInfo, appService);
Map<String, Object> retMap = new HashMap<String, Object>();
if (flag) {
retMap = CertificationChargingService.charging(appid, appserviceId, "测试交易表名1", 1L, applicationInfo, appService, 1L, "11");
Integer retCode = (Integer) retMap.get("retCode");
synchronized (SUCCESS_COUNT) {
// 给SUCCESS_COUNT加上同步锁,避免计数不准确
if (retCode == 1) {
SUCCESS_COUNT = SUCCESS_COUNT + 1;
} else {
System.out.println("失败:" + retMap.get("retMsg"));
}
}
}
} catch (Exception e) {
System.out.println("出现异常:" + e.getMessage());
}
}
use of com.itrus.portal.db.AppService in project portal by ixinportal.
the class CertificationChargingServiceImplTest method test.
public void test() {
cacheCustomer.initChargeRule();
String appid = "d2371e070dd544";
String appserviceId = "111111111";
ApplicationInfo applicationInfo = CertificationChargingService.getApplicationInfoByAppId(appid);
AppService appService = CertificationChargingService.getAppServiceByAppServiceId(appserviceId);
boolean flag = CertificationChargingService.checkTransInfo(appid, appserviceId, applicationInfo, appService);
System.out.println(flag);
Map<String, Object> retMap = new HashMap<String, Object>();
if (flag) {
retMap = CertificationChargingService.charging(appid, appserviceId, "测试交易表名1", 1L, applicationInfo, appService, 1L, "11");
}
}
use of com.itrus.portal.db.AppService in project portal by ixinportal.
the class StoreCharingServiceTest method storeChargingTest.
@Test
public void storeChargingTest() {
try {
cacheCustomer.initChargeRule();
String appid = "8356e077dc6f45";
String appserviceId = "cz0001";
ApplicationInfo applicationInfo = CertificationChargingService.getApplicationInfoByAppId(appid);
AppService appService = CertificationChargingService.getAppServiceByAppServiceId(appserviceId);
Map<String, Object> retMap = new HashMap<String, Object>();
// retMap = storeChargingService.storeCharging("11", 11L, applicationInfo, appService, 11L, "", 0, 1, true);
System.out.println(retMap);
} catch (Exception e) {
System.out.println("出现异常:" + e.getMessage());
}
}
Aggregations