入库单订阅
parent
97584f417e
commit
8080a6864d
|
|
@ -1,6 +1,7 @@
|
||||||
package com.njzscloud.dispose.config;
|
package com.njzscloud.dispose.config;
|
||||||
|
|
||||||
import com.njzscloud.common.security.util.SecurityUtil;
|
import com.njzscloud.common.security.util.SecurityUtil;
|
||||||
|
import com.njzscloud.dispose.wh.service.InOrderService;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import org.springframework.boot.context.event.ApplicationReadyEvent;
|
import org.springframework.boot.context.event.ApplicationReadyEvent;
|
||||||
import org.springframework.context.event.EventListener;
|
import org.springframework.context.event.EventListener;
|
||||||
|
|
@ -9,13 +10,22 @@ import org.springframework.stereotype.Component;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import static com.njzscloud.dispose.event.SysMittEvent.COERCE_LOGOUT;
|
import static com.njzscloud.dispose.event.SysMittEvent.COERCE_LOGOUT;
|
||||||
|
import static com.njzscloud.dispose.event.SysMittEvent.WH_IN_ORDER;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author lzq
|
||||||
|
*/
|
||||||
@Component
|
@Component
|
||||||
@RequiredArgsConstructor
|
@RequiredArgsConstructor
|
||||||
public class SpringReady {
|
public class SpringReady {
|
||||||
|
// 仓库管理 service
|
||||||
|
private final InOrderService inOrderService;
|
||||||
|
|
||||||
@EventListener(ApplicationReadyEvent.class)
|
@EventListener(ApplicationReadyEvent.class)
|
||||||
public void onApplicationReady() {
|
public void onApplicationReady() {
|
||||||
COERCE_LOGOUT.on((List<Long> ids) -> ids.forEach(SecurityUtil::removeToken));
|
COERCE_LOGOUT.on((List<Long> ids) -> ids.forEach(SecurityUtil::removeToken));
|
||||||
|
|
||||||
|
WH_IN_ORDER.on(inOrderService::add);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -4,8 +4,14 @@ import com.njzscloud.common.core.mitt.MittEvent;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author lqz
|
||||||
|
*/
|
||||||
public class SysMittEvent {
|
public class SysMittEvent {
|
||||||
public static MittEvent<List<Long>> COERCE_LOGOUT = () -> {
|
public static MittEvent<List<Long>> COERCE_LOGOUT = () -> {
|
||||||
};
|
};
|
||||||
|
|
||||||
|
public static MittEvent<Long> WH_IN_ORDER = () -> {
|
||||||
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue