AOP is used in Project-RC
2025-08-05
check merchant status
Background: we have various service plans available to merchants, so we need to check the merchant's service plan in some operations.
The merchant's status is as follows:
Annotation Design: we can get the merchant by the currently logged in user, which allows us to check the status normally, but sometimes we want to check additional information set up in the service plan.
check campaign status
Background: each campaign has its own life cycle, like start date, end date, status(enable and disable), so we need to check whether the campaign can be operated.
Annotation Design: we need to get the campaign ID through the annotation content.
save user action log
@OperationLog(module="Campaign", action="Update", dataId="#id", dataRef="#campaignConfig.name", remarks="some remarks")
public void updateCampaignConfig(@PathVariable("id") Long id, @RequestBody Config campaignConfig)
@OperationLog(module="'Campaign'", dataId="#id", dataRef="#response.name")
public CampaignVo getCampaign(@PathVariable("id") Long id)All attributes have a default empty value.
All attributes support SpEL expression.
The SpEL expression should support getting value from all method parameters and the request/response/result object.
Allow to disable operation log.