├── buycycle
├── logs
│ └── .gitkeep
├── stopBuycycle.bat
├── startBuycycle.bat
├── lib
│ └── com4j-x86.dll
└── config
│ ├── bootstrap.yml
│ ├── application.yaml
│ └── logback.xml
├── frontend
├── public
│ ├── favicon.ico
│ └── index.html
├── babel.config.js
├── src
│ ├── assets
│ │ ├── buycycle.png
│ │ └── buycycle.svg
│ ├── plugins
│ │ └── vuetify.js
│ ├── components
│ │ ├── EBest.vue
│ │ ├── TestBox.vue
│ │ ├── EBestResTable.vue
│ │ ├── EBestTab.vue
│ │ ├── Hello.vue
│ │ └── EBestTable.vue
│ ├── main.js
│ └── App.vue
├── .gitignore
├── vue.config.js
├── README.md
└── package.json
├── src
├── main
│ ├── java
│ │ └── name
│ │ │ └── buycycle
│ │ │ ├── vendor
│ │ │ └── ebest
│ │ │ │ ├── event
│ │ │ │ ├── IXAType.java
│ │ │ │ ├── xaobject
│ │ │ │ │ ├── XAObjectException.java
│ │ │ │ │ ├── vo
│ │ │ │ │ │ └── XAObject.java
│ │ │ │ │ └── XAObjectHelper.java
│ │ │ │ ├── XARealResponseEvent.java
│ │ │ │ ├── vo
│ │ │ │ │ ├── req
│ │ │ │ │ │ ├── RequestHeader.java
│ │ │ │ │ │ ├── RequestBody.java
│ │ │ │ │ │ └── Request.java
│ │ │ │ │ └── res
│ │ │ │ │ │ └── Response.java
│ │ │ │ ├── com4j
│ │ │ │ │ ├── ClassFactory.java
│ │ │ │ │ ├── _IXARealEvents.java
│ │ │ │ │ ├── _IXAQueryEvents.java
│ │ │ │ │ ├── IXAReal.java
│ │ │ │ │ └── IXAQuery.java
│ │ │ │ ├── handler
│ │ │ │ │ ├── XASessionEventHandler.java
│ │ │ │ │ ├── XARealEventHandler.java
│ │ │ │ │ └── XAQueryEventHandler.java
│ │ │ │ ├── XAQueryRequest.java
│ │ │ │ └── XARealSubscribe.java
│ │ │ │ ├── exception
│ │ │ │ ├── ConnectFailException.java
│ │ │ │ └── RequestTimeOutException.java
│ │ │ │ ├── manage
│ │ │ │ ├── Manager.java
│ │ │ │ ├── XAQueryManager.java
│ │ │ │ ├── command
│ │ │ │ │ ├── XARealSubscribeCommand.java
│ │ │ │ │ └── BlockingCommand.java
│ │ │ │ ├── AbstractManager.java
│ │ │ │ ├── XARealSubscribeManager.java
│ │ │ │ └── XASessionManager.java
│ │ │ │ ├── message
│ │ │ │ ├── MessageException.java
│ │ │ │ ├── ResDataRepository.java
│ │ │ │ ├── MessageHelper.java
│ │ │ │ ├── ResFileData.java
│ │ │ │ └── ResFileReader.java
│ │ │ │ ├── session
│ │ │ │ ├── com4j
│ │ │ │ │ ├── ClassFactory.java
│ │ │ │ │ ├── XA_MESSAGE_ID.java
│ │ │ │ │ ├── XA_SERVER_TYPE.java
│ │ │ │ │ ├── _IXASessionEvents.java
│ │ │ │ │ └── IXASession.java
│ │ │ │ └── XASession.java
│ │ │ │ └── config
│ │ │ │ └── vo
│ │ │ │ ├── User.java
│ │ │ │ └── Connect.java
│ │ │ ├── service
│ │ │ └── ebest
│ │ │ │ ├── vo
│ │ │ │ ├── TableHeaderItem.java
│ │ │ │ └── ResDesc.java
│ │ │ │ └── EBestDescription.java
│ │ │ ├── configuration
│ │ │ └── ebest
│ │ │ │ ├── XASessionConfigure.java
│ │ │ │ ├── vo
│ │ │ │ └── EBestConfig.java
│ │ │ │ ├── XARealWebSocketConfigure.java
│ │ │ │ └── EBestInitialization.java
│ │ │ ├── control
│ │ │ ├── rvo
│ │ │ │ ├── ResTable.java
│ │ │ │ └── TableHeader.java
│ │ │ ├── XASessionChecker.java
│ │ │ ├── XARealWebSocketHandler.java
│ │ │ └── EBestController.java
│ │ │ └── BuyCycleApplication.java
│ └── resources
│ │ ├── bootstrap.yml
│ │ ├── banner.txt
│ │ └── application.yaml
└── test
│ └── java
│ └── name
│ └── buycycle
│ └── BuycycleApplicationTests.java
├── .gitignore
├── LICENSE
├── .github
└── workflows
│ └── maven-publish.yml
├── README.md
└── pom.xml
/buycycle/logs/.gitkeep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/buycycle/stopBuycycle.bat:
--------------------------------------------------------------------------------
1 | curl -X POST http://localhost:7771/actuator/shutdown
--------------------------------------------------------------------------------
/buycycle/startBuycycle.bat:
--------------------------------------------------------------------------------
1 | java -Djava.library.path=./lib -jar ./lib/buycycle-1.0.8.jar
--------------------------------------------------------------------------------
/buycycle/lib/com4j-x86.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/malchooni/buycycle/HEAD/buycycle/lib/com4j-x86.dll
--------------------------------------------------------------------------------
/frontend/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/malchooni/buycycle/HEAD/frontend/public/favicon.ico
--------------------------------------------------------------------------------
/frontend/babel.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | presets: [
3 | '@vue/cli-plugin-babel/preset'
4 | ]
5 | }
6 |
--------------------------------------------------------------------------------
/frontend/src/assets/buycycle.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/malchooni/buycycle/HEAD/frontend/src/assets/buycycle.png
--------------------------------------------------------------------------------
/frontend/src/plugins/vuetify.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue';
2 | import Vuetify from 'vuetify/lib/framework';
3 |
4 | Vue.use(Vuetify);
5 |
6 | export default new Vuetify({
7 | });
8 |
--------------------------------------------------------------------------------
/src/main/java/name/buycycle/vendor/ebest/event/IXAType.java:
--------------------------------------------------------------------------------
1 | package name.buycycle.vendor.ebest.event;
2 |
3 | /**
4 | * ixa interface
5 | *
6 | * @author : ijyoon
7 | * @date : 2021/03/24
8 | */
9 | public interface IXAType {
10 |
11 | }
12 |
--------------------------------------------------------------------------------
/src/main/java/name/buycycle/vendor/ebest/exception/ConnectFailException.java:
--------------------------------------------------------------------------------
1 | package name.buycycle.vendor.ebest.exception;
2 |
3 | public class ConnectFailException extends Exception {
4 |
5 | public ConnectFailException() {
6 | super("해당서버에 연결할 수 없습니다.");
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/frontend/src/components/EBest.vue:
--------------------------------------------------------------------------------
1 |
2 |
11 | * The value of this constant is -1 12 | *
13 | */ 14 | XA_FAILED(-1), 15 | /** 16 | *17 | * The value of this constant is 0 18 | *
19 | */ 20 | XA_SUCCESS(0), 21 | ; 22 | 23 | private final int value; 24 | 25 | XA_MESSAGE_ID(int value) { 26 | this.value = value; 27 | } 28 | 29 | public int comEnumValue() { 30 | return value; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /src/main/java/name/buycycle/service/ebest/vo/ResDesc.java: -------------------------------------------------------------------------------- 1 | package name.buycycle.service.ebest.vo; 2 | 3 | import java.util.List; 4 | import java.util.Map; 5 | 6 | /** 7 | * res 상세 8 | */ 9 | public class ResDesc { 10 | 11 | private Map11 | * The value of this constant is -1 12 | *
13 | */ 14 | XA_NOSELECTED_SERVER(-1), 15 | /** 16 | *17 | * The value of this constant is 0 18 | *
19 | */ 20 | XA_REAL_SERVER(0), 21 | /** 22 | *23 | * The value of this constant is 1 24 | *
25 | */ 26 | XA_SIMUL_SERVER(1), 27 | ; 28 | 29 | private final int value; 30 | 31 | XA_SERVER_TYPE(int value) { 32 | this.value = value; 33 | } 34 | 35 | public int comEnumValue() { 36 | return value; 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /src/main/java/name/buycycle/vendor/ebest/event/xaobject/vo/XAObject.java: -------------------------------------------------------------------------------- 1 | package name.buycycle.vendor.ebest.event.xaobject.vo; 2 | 3 | import com4j.EventCookie; 4 | import name.buycycle.vendor.ebest.event.IXAType; 5 | 6 | /** 7 | * xing 인터페이스 객체 8 | * 9 | * @author : ijyoon 10 | * @date : 2021/03/24 11 | */ 12 | public class XAObject { 13 | 14 | private IXAType ixaType; 15 | private EventCookie eventCookie; 16 | 17 | public15 | * method OnLogIn 16 | *
17 | * 18 | * @param szCode Mandatory java.lang.String parameter. 19 | * @param szMsg Mandatory java.lang.String parameter. 20 | */ 21 | 22 | @DISPID(1) 23 | public void login( 24 | String szCode, 25 | String szMsg) { 26 | throw new UnsupportedOperationException(); 27 | } 28 | 29 | 30 | /** 31 | *32 | * method OnLogOut 33 | *
34 | */ 35 | 36 | @DISPID(2) 37 | public void logout() { 38 | throw new UnsupportedOperationException(); 39 | } 40 | 41 | 42 | /** 43 | *44 | * method OnDisConnect 45 | *
46 | */ 47 | 48 | @DISPID(3) 49 | public void disconnect() { 50 | throw new UnsupportedOperationException(); 51 | } 52 | 53 | // Properties: 54 | } 55 | -------------------------------------------------------------------------------- /src/main/java/name/buycycle/vendor/ebest/event/com4j/_IXARealEvents.java: -------------------------------------------------------------------------------- 1 | package name.buycycle.vendor.ebest.event.com4j; 2 | 3 | import com4j.DISPID; 4 | import com4j.IID; 5 | 6 | /** 7 | * _IXARealEvents Interface 8 | */ 9 | @IID("{16602768-2C96-4D93-984B-E36E7E35BFBE}") 10 | public abstract class _IXARealEvents { 11 | // Methods: 12 | 13 | /** 14 | *15 | * method ReceiveRealData 16 | *
17 | * 18 | * @param szTrCode Mandatory java.lang.String parameter. 19 | */ 20 | 21 | @DISPID(1) 22 | public void receiveRealData( 23 | String szTrCode) { 24 | throw new UnsupportedOperationException(); 25 | } 26 | 27 | 28 | /** 29 | *30 | * method RecieveLinkData 31 | *
32 | * 33 | * @param szLinkName Mandatory java.lang.String parameter. 34 | * @param szData Mandatory java.lang.String parameter. 35 | * @param szFiller Mandatory java.lang.String parameter. 36 | */ 37 | 38 | @DISPID(2) 39 | public void recieveLinkData( 40 | String szLinkName, 41 | String szData, 42 | String szFiller) { 43 | throw new UnsupportedOperationException(); 44 | } 45 | 46 | // Properties: 47 | } 48 | -------------------------------------------------------------------------------- /src/main/java/name/buycycle/vendor/ebest/config/vo/Connect.java: -------------------------------------------------------------------------------- 1 | package name.buycycle.vendor.ebest.config.vo; 2 | 3 | /** 4 | * ebest connet value object 5 | * 6 | * @author : ijyoon 7 | * @date : 2021/03/24 8 | */ 9 | public class Connect { 10 | 11 | private String szServerIP; 12 | private int nServerPort; 13 | private int connectTimeOut; 14 | private int requestReadTimeOut; 15 | 16 | public String getSzServerIP() { 17 | return szServerIP; 18 | } 19 | 20 | public void setSzServerIP(String szServerIP) { 21 | this.szServerIP = szServerIP; 22 | } 23 | 24 | public int getnServerPort() { 25 | return nServerPort; 26 | } 27 | 28 | public void setnServerPort(int nServerPort) { 29 | this.nServerPort = nServerPort; 30 | } 31 | 32 | public int getConnectTimeOut() { 33 | return connectTimeOut; 34 | } 35 | 36 | public void setConnectTimeOut(int connectTimeOut) { 37 | this.connectTimeOut = connectTimeOut; 38 | } 39 | 40 | public int getRequestReadTimeOut() { 41 | return requestReadTimeOut; 42 | } 43 | 44 | public void setRequestReadTimeOut(int requestReadTimeOut) { 45 | this.requestReadTimeOut = requestReadTimeOut; 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /src/main/java/name/buycycle/configuration/ebest/vo/EBestConfig.java: -------------------------------------------------------------------------------- 1 | package name.buycycle.configuration.ebest.vo; 2 | 3 | import name.buycycle.vendor.ebest.config.vo.Connect; 4 | import name.buycycle.vendor.ebest.config.vo.User; 5 | import org.springframework.boot.context.properties.ConfigurationProperties; 6 | import org.springframework.boot.context.properties.ConstructorBinding; 7 | import org.springframework.context.annotation.Configuration; 8 | 9 | /** 10 | * ebest config value object 11 | */ 12 | @Configuration 13 | @ConfigurationProperties(prefix = "ebest") 14 | @ConstructorBinding 15 | public class EBestConfig { 16 | 17 | private String resRootPath; 18 | private Connect connect; 19 | private User user; 20 | 21 | public String getResRootPath() { 22 | return resRootPath; 23 | } 24 | 25 | public void setResRootPath(String resRootPath) { 26 | this.resRootPath = resRootPath; 27 | } 28 | 29 | public Connect getConnect() { 30 | return connect; 31 | } 32 | 33 | public void setConnect(Connect connect) { 34 | this.connect = connect; 35 | } 36 | 37 | public User getUser() { 38 | return user; 39 | } 40 | 41 | public void setUser(User user) { 42 | this.user = user; 43 | } 44 | } -------------------------------------------------------------------------------- /src/main/java/name/buycycle/BuyCycleApplication.java: -------------------------------------------------------------------------------- 1 | package name.buycycle; 2 | 3 | import org.slf4j.Logger; 4 | import org.slf4j.LoggerFactory; 5 | import org.springframework.boot.autoconfigure.SpringBootApplication; 6 | import org.springframework.boot.builder.SpringApplicationBuilder; 7 | import org.springframework.boot.context.ApplicationPidFileWriter; 8 | import org.springframework.cloud.netflix.eureka.EnableEurekaClient; 9 | 10 | /** 11 | * welcome to buycycle https://buycycle.name 12 | * 13 | * @author : ijyoon 14 | * @date : 2021/03/24 15 | */ 16 | @EnableEurekaClient 17 | @SpringBootApplication 18 | public class BuyCycleApplication { 19 | 20 | private static Logger logger = LoggerFactory.getLogger(BuyCycleApplication.class.getName()); 21 | 22 | public static void main(String[] args) { 23 | SpringApplicationBuilder app = new SpringApplicationBuilder( 24 | name.buycycle.BuyCycleApplication.class); 25 | app.build().addListeners(new ApplicationPidFileWriter("./buycycle.pid")); 26 | app.run(args); 27 | if (logger.isInfoEnabled()) { 28 | logger.info("======================"); 29 | logger.info(" Buycycle started... "); 30 | logger.info("======================"); 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/main/java/name/buycycle/configuration/ebest/XARealWebSocketConfigure.java: -------------------------------------------------------------------------------- 1 | package name.buycycle.configuration.ebest; 2 | 3 | import name.buycycle.control.XARealWebSocketHandler; 4 | import name.buycycle.control.XASessionChecker; 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.context.annotation.Configuration; 7 | import org.springframework.web.socket.config.annotation.EnableWebSocket; 8 | import org.springframework.web.socket.config.annotation.WebSocketConfigurer; 9 | import org.springframework.web.socket.config.annotation.WebSocketHandlerRegistry; 10 | 11 | /** 12 | * 실시간 요청 응답 웹소켓 환경설정 13 | */ 14 | @Configuration 15 | @EnableWebSocket 16 | public class XARealWebSocketConfigure implements WebSocketConfigurer { 17 | 18 | @Autowired 19 | private XASessionChecker xaSessionChecker; 20 | 21 | @Autowired 22 | private XARealWebSocketHandler xaRealWebSocketHandler; 23 | 24 | @Override 25 | public void registerWebSocketHandlers(WebSocketHandlerRegistry webSocketHandlerRegistry) { 26 | webSocketHandlerRegistry 27 | .addHandler(xaRealWebSocketHandler, "/ebest/realtime") 28 | .addInterceptors(xaSessionChecker) 29 | .setAllowedOrigins("*"); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /frontend/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "buycycle.name", 3 | "version": "1.0.8", 4 | "private": true, 5 | "scripts": { 6 | "serve": "vue-cli-service serve", 7 | "build": "vue-cli-service build", 8 | "lint": "vue-cli-service lint" 9 | }, 10 | "dependencies": { 11 | "axios": "^0.21.1", 12 | "core-js": "^3.6.5", 13 | "vue": "^2.6.11", 14 | "vuetify": "^2.2.11" 15 | }, 16 | "devDependencies": { 17 | "@vue/cli-plugin-babel": "~4.5.0", 18 | "@vue/cli-plugin-eslint": "~4.5.0", 19 | "@vue/cli-service": "~4.5.0", 20 | "babel-eslint": "^10.1.0", 21 | "eslint": "^6.7.2", 22 | "eslint-plugin-vue": "^6.2.2", 23 | "sass": "^1.19.0", 24 | "sass-loader": "^8.0.0", 25 | "vue-cli-plugin-vuetify": "~2.0.8", 26 | "vue-template-compiler": "^2.6.11", 27 | "vuetify-loader": "^1.3.0" 28 | }, 29 | "eslintConfig": { 30 | "root": true, 31 | "env": { 32 | "node": true 33 | }, 34 | "extends": [ 35 | "plugin:vue/essential", 36 | "eslint:recommended" 37 | ], 38 | "parserOptions": { 39 | "parser": "babel-eslint" 40 | }, 41 | "rules": {} 42 | }, 43 | "browserslist": [ 44 | "> 1%", 45 | "last 2 versions", 46 | "not dead" 47 | ] 48 | } 49 | -------------------------------------------------------------------------------- /src/main/java/name/buycycle/vendor/ebest/manage/XAQueryManager.java: -------------------------------------------------------------------------------- 1 | package name.buycycle.vendor.ebest.manage; 2 | 3 | import name.buycycle.configuration.ebest.vo.EBestConfig; 4 | import name.buycycle.vendor.ebest.event.XAQueryRequest; 5 | import name.buycycle.vendor.ebest.event.vo.req.Request; 6 | import name.buycycle.vendor.ebest.event.vo.res.Response; 7 | import org.slf4j.Logger; 8 | import org.slf4j.LoggerFactory; 9 | 10 | public class XAQueryManager implements Manager { 11 | 12 | private static final XAQueryManager instance = new XAQueryManager(); 13 | 14 | public static XAQueryManager getInstance() { 15 | return instance; 16 | } 17 | 18 | private EBestConfig eBestConfig; 19 | private XAQueryRequest xaQueryRequest; 20 | 21 | private XAQueryManager() { 22 | } 23 | 24 | @Override 25 | public void setEBestConfig(EBestConfig eBestConfig) { 26 | this.eBestConfig = eBestConfig; 27 | } 28 | 29 | @Override 30 | public void initialize() { 31 | if (eBestConfig == null) { 32 | throw new NullPointerException("EBestConfig is null."); 33 | } 34 | this.xaQueryRequest = new XAQueryRequest(this.eBestConfig); 35 | } 36 | 37 | public Response requestQuery(Request request) { 38 | return this.xaQueryRequest.requestQuery(request); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /src/main/java/name/buycycle/vendor/ebest/event/vo/res/Response.java: -------------------------------------------------------------------------------- 1 | package name.buycycle.vendor.ebest.event.vo.res; 2 | 3 | import java.util.LinkedHashMap; 4 | import java.util.LinkedList; 5 | import java.util.List; 6 | import java.util.Map; 7 | 8 | /** 9 | * json 응답 10 | * 11 | * @author : ijyoon 12 | * @date : 2021/03/24 13 | */ 14 | public class Response { 15 | 16 | private Map