feat: 操作日志统一英语
This commit is contained in:
@@ -1,12 +1,13 @@
|
||||
package org.wfc.system.api.domain;
|
||||
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.wfc.common.core.annotation.Excel;
|
||||
import org.wfc.common.core.annotation.Excel.ColumnType;
|
||||
import org.wfc.common.core.utils.MessageUtils;
|
||||
import org.wfc.common.core.web.domain.BaseEntity;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 操作日志记录表 oper_log
|
||||
*
|
||||
@@ -104,7 +105,7 @@ public class SysOperLog extends BaseEntity
|
||||
if (title == null || title.isEmpty()) {
|
||||
this.title=title;
|
||||
}
|
||||
this.title = MessageUtils.message(title);
|
||||
this.title = MessageUtils.messageEnUS(title);
|
||||
}
|
||||
|
||||
public Integer getBusinessType()
|
||||
|
||||
@@ -6,6 +6,8 @@ import org.springframework.context.MessageSource;
|
||||
import org.springframework.context.NoSuchMessageException;
|
||||
import org.springframework.context.i18n.LocaleContextHolder;
|
||||
|
||||
import java.util.Locale;
|
||||
|
||||
/**
|
||||
* 获取i18n资源文件
|
||||
*
|
||||
@@ -30,4 +32,13 @@ public class MessageUtils {
|
||||
return code;
|
||||
}
|
||||
}
|
||||
|
||||
public static String messageEnUS(String code, Object... args) {
|
||||
try {
|
||||
Locale locale = new Locale("en", "US");
|
||||
return MESSAGE_SOURCE.getMessage(code, args, locale);
|
||||
} catch (NoSuchMessageException e) {
|
||||
return code;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -53,19 +53,19 @@ public class UBillRuleController extends BaseController {
|
||||
return success(uBillRuleService.getById(id));
|
||||
}
|
||||
|
||||
@Log(title = "Billing Rule", businessType = BusinessType.INSERT)
|
||||
@Log(title = "menu.billing.rule.management", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody UBillRule uBillRule) {
|
||||
return toAjax(uBillRuleService.save(uBillRule));
|
||||
}
|
||||
|
||||
@Log(title = "Billing Rule", businessType = BusinessType.UPDATE)
|
||||
@Log(title = "menu.billing.rule.management", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody UBillRule uBillRule) {
|
||||
return toAjax(uBillRuleService.updateById(uBillRule));
|
||||
}
|
||||
|
||||
@Log(title = "Billing Rule", businessType = BusinessType.DELETE)
|
||||
@Log(title = "menu.billing.rule.management", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids) {
|
||||
return toAjax(uBillRuleService.removeByIds(CollUtil.newArrayList(ids)));
|
||||
|
||||
@@ -59,19 +59,19 @@ public class UPackageController extends BaseController {
|
||||
return success(uPackageService.getById(id));
|
||||
}
|
||||
|
||||
@Log(title = "Package Managementt", businessType = BusinessType.INSERT)
|
||||
@Log(title = "menu.billing.package.management", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody UPackage uPackage) {
|
||||
return toAjax(uPackageService.save(uPackage));
|
||||
}
|
||||
|
||||
@Log(title = "Package Managementt", businessType = BusinessType.UPDATE)
|
||||
@Log(title = "menu.billing.package.management", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody UPackage uPackage) {
|
||||
return toAjax(uPackageService.updateById(uPackage));
|
||||
}
|
||||
|
||||
@Log(title = "Package Managementt", businessType = BusinessType.DELETE)
|
||||
@Log(title = "menu.billing.package.management", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids) {
|
||||
return toAjax(uPackageService.removeByIds(CollUtil.newArrayList(ids)));
|
||||
|
||||
@@ -53,19 +53,19 @@ public class URateLimitController extends BaseController {
|
||||
return success(uRateLimitService.getById(id));
|
||||
}
|
||||
|
||||
@Log(title = "Rate Limit", businessType = BusinessType.INSERT)
|
||||
@Log(title = "menu.billing.ratelimit.management", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody URateLimit uRateLimit) {
|
||||
return toAjax(uRateLimitService.save(uRateLimit));
|
||||
}
|
||||
|
||||
@Log(title = "Rate Limit", businessType = BusinessType.UPDATE)
|
||||
@Log(title = "menu.billing.ratelimit.management", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody URateLimit uRateLimit) {
|
||||
return toAjax(uRateLimitService.updateById(uRateLimit));
|
||||
}
|
||||
|
||||
@Log(title = "Rate Limit", businessType = BusinessType.DELETE)
|
||||
@Log(title = "menu.billing.ratelimit.management", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids) {
|
||||
return toAjax(uRateLimitService.removeByIds(CollUtil.newArrayList(ids)));
|
||||
|
||||
Reference in New Issue
Block a user