---添加事件监听测试
This commit is contained in:
@ -33,7 +33,7 @@ public class UpdateLngBBankDto implements Serializable {
|
||||
/**
|
||||
* 助记码(自动生成,4位,0001……)
|
||||
*/
|
||||
@LogField(name="助记码(自动生成,4位,0001……)",index=1)
|
||||
@LogField(name="助记码",index=1)
|
||||
@ApiModelProperty("助记码(自动生成,4位,0001……)")
|
||||
private String code;
|
||||
|
||||
|
||||
@ -0,0 +1,34 @@
|
||||
package com.xjrsoft.module;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import com.pictc.listener.ListenerParameterContext;
|
||||
import com.pictc.listener.ListenerR;
|
||||
import com.pictc.listener.PEventListener;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
@Slf4j
|
||||
@Component
|
||||
public class ListenerDemo {
|
||||
|
||||
@PEventListener("#source == 'lng_upload_file'")
|
||||
public ListenerR<Long> add(ListenerParameterContext context){
|
||||
log.info("表名:{}",context.getSource());
|
||||
Map<String,Object> data = (Map<String, Object>) context.getData();
|
||||
log.info("数据:{}",data);
|
||||
return ListenerR.success(1L);
|
||||
}
|
||||
|
||||
|
||||
@PEventListener
|
||||
public ListenerR<Long> add2(ListenerParameterContext context){
|
||||
Map<String,Object> data = (Map<String, Object>) context.getData();
|
||||
log.info("表名:{}",context.getSource());
|
||||
log.info("数据:{}",data);
|
||||
return ListenerR.success(1L);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user