Commit 869119f6 by guojuxing

计费中心:开票、续订设置操作日志调整

parent 6c83161e
......@@ -12,6 +12,9 @@ import javax.validation.constraints.NotNull;
import com.ctrip.framework.apollo.Config;
import com.ctrip.framework.apollo.ConfigService;
import com.gic.enterprise.constant.billing.AutoRechargeEnum;
import com.gic.enterprise.dto.BillingAccountDTO;
import com.gic.redis.data.util.RedisUtil;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -114,10 +117,18 @@ public class BillingAccountController {
@RequestMapping("/set-auto-recharge")
public RestResponse setAutoRecharge(@NotBlank(message = "指定套餐包不能为空") String smsCode,
@NotNull(message = "自动续订条件不能为空") Integer preNumber) {
ServiceResponse<BillingAccountDTO> billingAccountResponse = billingAccountApiService
.getByEnterpriseId(UserDetailUtils.getUserDetail().getEnterpriseId());
String operationTypeStr = "开启";
if (billingAccountResponse.isSuccess()) {
if (billingAccountResponse.getResult().getAutoRecharge().intValue() != AutoRechargeEnum.NO_AUTO.getCode()) {
operationTypeStr = "修改";
}
}
return OperationResultUtils.operationResult(
billingAccountApiService.setAutoRecharge(smsCode, preNumber,
UserDetailUtils.getUserDetail().getEnterpriseId()),
"自动续订短信套餐包配置", UserDetailUtils.getUserDetail().getEnterpriseInfo().getEnterpriseName());
operationTypeStr + "自动续充设置", "资源监控");
}
/**
......@@ -131,7 +142,7 @@ public class BillingAccountController {
public RestResponse closeAutoRechargeConfig() {
return OperationResultUtils.operationResult(
billingAccountApiService.closeAutoRechargeConfig(UserDetailUtils.getUserDetail().getEnterpriseId()),
"关闭自动续订短信套餐包配置", UserDetailUtils.getUserDetail().getEnterpriseInfo().getEnterpriseName());
"关闭自动续充设置", "资源监控");
}
/**
......
......@@ -156,7 +156,7 @@ public class BillingPayInfoController {
if (invoice.isSuccess()) {
ServiceResponse updateInvoiceStatus = billingPayInfoApiService.updateInvoiceStatus(serialNumbers);
if (updateInvoiceStatus.isSuccess()) {
LogUtils.createLog("开票", serialNumbers);
LogUtils.createLog("申请开票", "发票管理");
return RestResponse.success();
} else {
return EnterpriseRestResponse.failure(updateInvoiceStatus);
......
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