You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
weaver-hrm-organization/src/com/engine/organization/service/impl/DemoServiceImpl.java

58 lines
2.1 KiB
Java

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

package com.engine.organization.service.impl;
import com.engine.core.impl.Service;
import com.engine.organization.entity.po.Demo;
import com.engine.organization.mapper.DemoMapper;
import com.engine.organization.service.DemoService;
import com.engine.organization.util.HrmI18nUtil;
import com.engine.organization.util.OrganizationAssert;
import com.engine.organization.util.db.MapperProxyFactory;
import java.util.List;
/**
* @Author weaver_cl
* @description:
* @Date 2022/4/27
* @Version V1.0
**/
//@WeaIocService
//@WeaIocReplaceComponent("demoService") //如不标注名称,则按类的全路径注入
public class DemoServiceImpl extends Service implements DemoService {
@Override
//@Log(operateType = OperateTypeEnum.ADD,operateDesc = "测试自定义日志")
public List<Demo> list(String name) {
OrganizationAssert.notNull(name, HrmI18nUtil.getI18nLabel(34721, "参数不能为空"));
List<Demo> demos = MapperProxyFactory.getProxy(DemoMapper.class).listAll();
////操作日志记录
//Method method = new Object() {
//}.getClass().getEnclosingMethod();
//LoggerContext loggerContext = LoggerContext.builder().operatorId(user.getUID()).operatorName(user.getLastname()).build();
//LogAspect logAspect = new LogAspect(DemoServiceImpl.class, method, loggerContext);
//logAspect.start();
return demos;
}
//这个是接口后置方法,大概的用法跟前置方法差不多,稍有差别
//注解名称为WeaReplaceAfter
//返回类型必须为String
//参数叫WeaAfterReplaceParam这个类前四个参数跟前置方法的那个相同不同的是多了一个叫data的String这个是那个接口执行完返回的报文
//@WeaReplaceAfter(value = "/api/bs/hrmorganization/scheme/updateForbiddenTagById",order = 1)
// public void after(WeaAfterReplaceParam weaAfterReplaceParam){
//
// String data = weaAfterReplaceParam.getData();//这个就是接口执行完的报文
// System.out.println(data);
// //日志记录
// }
}