package com.lantone.security.aop;

import com.lantone.security.facade.base.HospitalSetFacade;
import com.lantone.security.client.MessageService;
import org.aspectj.lang.annotation.After;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Pointcut;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * @Description: 组织机构参数配置信息变更统一处理切面
 * @author: rengb
 * @time: 2021/8/26 10:43
 */
@Aspect
@Component
public class HospitalSetAspect {

    @Autowired
    private MessageService messageService;

    @Pointcut("execution(public * com.lantone.security.web.HospitalSetManagementController.addHospitalSet(..))" +
            "||execution(public * com.lantone.security.web.HospitalSetManagementController.updateHospitalSet(..))" +
            "||execution(public * com.lantone.security.web.HospitalSetManagementController.deleteHospitalSet(..))")
    public void basicInfoChange() {
    }

    @After("basicInfoChange()")
    public void aspectAfter() {
        messageService.redisRefresh("initHospitalSetMap");
    }

}