Commit 18a8b739 by guojuxing

pom规范

parent e90f9d77
......@@ -58,7 +58,6 @@ public class BillingAccountServiceImpl implements BillingAccountService{
account.addAndGet(totalFee);
TabBillingAccount tabBillingAccount = tabBillingAccountMapper.selectByEnterpriseId(enterpriseId);
// double newTotal = new BigDecimal(tabBillingAccount.getAccountBalance().toString()).add(new BigDecimal(totalFee + "")).doubleValue();
double newTotal = tabBillingAccount.getAccountBalance() + totalFee;
logger.info("商户:{}, 充值/退款前余额:{}, 充值/退款金额:{}, 充值/退款后余额:{}", enterpriseId, tabBillingAccount.getAccountBalance(), totalFee, newTotal);
UserDTO user = userApiService.getUserByEnterpriseId(enterpriseId).getResult();
......
......@@ -659,7 +659,7 @@ public class EnterpriseApiServiceImpl implements EnterpriseApiService {
LOGGER.warn("exception", e);
}
}
return null;
return ServiceResponse.success();
}
@Override
......
......@@ -144,35 +144,6 @@ public class SmsRecordApiServiceImpl implements SmsRecordApiService {
@Override
public ServiceResponse<Void> run(String arg) {
/*// 缓存中计费
GicMQClient client = GICMQClientUtil.getClientInstance();
try {
logger.info("国内短信缓存扣费:{}", arg);
SmsRecordDTO smsRecordDTO = JSON.parseObject(arg, SmsRecordDTO.class);
// 判断是扣套餐包还是扣余额
RAtomicLong smsCount = billingEnterpriseSmsPackageService.getTotalSmsInPackageByEnterpriseId(smsRecordDTO.getEnterpriseId());
smsRecordDTO.setCacheStatus(0);
smsRecordDTO.setDatabaseStatus(0);
// 缓存扣费 0套餐包 4余额
Integer fee = accountStandardService.queryUnitFee(smsRecordDTO.getEnterpriseId(), AccountStandardEnum.SMS.getCode());
int deductType = deduct(smsCount, smsRecordDTO.getEnterpriseId(), fee);
smsRecordDTO.setPayType(deductType);
smsRecordDTO.setFee((double)fee/1000);
Long smsRecordId = billingSmsRecordService.saveSmsRecord(smsRecordDTO);
smsRecordDTO.setSmsRecordId(smsRecordId);
billingSmsRecordService.updateCacheStatus(smsRecordDTO.getSmsRecordId());
smsRecordDTO.setCacheStatus(1);
// 队列
client.sendMessage("smsDbMq", JSON.toJSONString(smsRecordDTO));
} catch (Exception e) {
logger.warn("调用mq失败", e);
}
*/
return ServiceResponse.success();
}
......@@ -184,7 +155,6 @@ public class SmsRecordApiServiceImpl implements SmsRecordApiService {
这里不能改成 decrementAndGet自减, 否则会出现减到0的情况
*/
boolean smsCountDeduct = rSmsCount.compareAndSet(smsCount, smsCount - 1);
// rSmsCount.decrementAndGet();
if (!smsCountDeduct) {
// 设置失败 重新计算
return deduct(rSmsCount, enterpriseId, fee);
......
......@@ -15,7 +15,7 @@ import com.gic.enterprise.entity.TabBillingPayInfo;
import com.gic.enterprise.entity.TabEnterprise;
import com.gic.enterprise.error.ErrorCode;
import com.gic.enterprise.service.*;
import com.gic.enterprise.service.outer.impl.payComplete.PayCompleteHandler;
import com.gic.enterprise.service.outer.impl.paycomplete.PayCompleteHandler;
import com.gic.enterprise.utils.CreateRandomUtils;
import com.gic.finance.dto.TransferAccountsApprovalDTO;
import com.gic.finance.service.TransferAccountsApprovalApiService;
......
......@@ -17,7 +17,7 @@ import com.gic.enterprise.entity.TabBillingPayInfo;
import com.gic.enterprise.error.ErrorCode;
import com.gic.enterprise.service.BillingPayInfoService;
import com.gic.enterprise.service.EnterpriseApiService;
import com.gic.enterprise.service.outer.impl.payComplete.PayCompleteHandler;
import com.gic.enterprise.service.outer.impl.paycomplete.PayCompleteHandler;
import com.gic.enterprise.utils.CreateRandomUtils;
import com.gic.log.api.dto.SystemSetLogDTO;
import com.gic.log.api.service.LogApiService;
......
package com.gic.enterprise.service.outer.impl.payComplete;
package com.gic.enterprise.service.outer.impl.paycomplete;
import com.gic.enterprise.dto.ApprovalCallBackDTO;
import com.gic.enterprise.entity.TabBillingPayInfo;
......
package com.gic.enterprise.service.outer.impl.payComplete;
package com.gic.enterprise.service.outer.impl.paycomplete;
import com.gic.api.base.commons.ServiceResponse;
import com.gic.auth.dto.UserDTO;
......
package com.gic.enterprise.service.outer.impl.payComplete;
package com.gic.enterprise.service.outer.impl.paycomplete;
import com.gic.api.base.commons.ServiceResponse;
import com.gic.auth.dto.UserDTO;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment