@@ -0,0 +1,2232 @@
+package org.eddy.solver;%0A%0Aimport com.alibaba.fastjson.JSONObject;%0Aimport org.eddy.config.StockSolverConfig;%0Aimport org.eddy.entity.StockWantBuy;%0Aimport org.eddy.entity.pojo.HttpMessage;%0Aimport org.eddy.service.StockWantBuyService;%0Aimport org.eddy.swing.entity.SwingValidateContext;%0Aimport org.eddy.swing.entity.exception.SwingException;%0Aimport org.eddy.swing.solver.define.SwingFlowSolver;%0Aimport org.eddy.util.MarkdownUtil;%0Aimport org.springframework.beans.factory.annotation.Autowired;%0Aimport org.springframework.stereotype.Component;%0A%0Aimport java.util.stream.Collectors;%0A%0A/**%0A * Created by Justice-love on 2017/3/4.%0A */%0A@Component(%22buyInImSolver%22)%0Apublic class BuyInImSolver implements SwingFlowSolver %7B%0A%0A    @Autowired%0A    private StockWantBuyService stockWantBuyService;%0A%0A    @Autowired%0A    private StockSolverConfig config;%0A%0A    @Override%0A    public void solve(SwingValidateContext context) throws SwingException %7B%0A        StockWantBuy stockWantBu = new StockWantBuy();%0A        stockWantBu.setName(context.getStock().getName());%0A        stockWantBu.setStockCode(context.getStock().getStockCode());%0A        stockWantBu.setCurrentPrice(context.getStock().getPrice());%0A        stockWantBu.setCurrentUp(context.getStock().getUp());%0A        stockWantBu.setCurrentDate(context.getStock().getDate());%0A        stockWantBu.setCurrentTime(context.getStock().getTime());%0A        stockWantBu.setValidaters(context.getFlowSwings().stream().map(swing -%3E swing.getSwing().getValidateType().name()).collect(Collectors.joining(%22 %7C %22)));%0A        Boolean flag = stockWantBuyService.insertOrUpdateNeedNotify(stockWantBu);%0A        if (flag) %7B%0A            HttpMessage message = new HttpMessage();%0A            message.setProtocol(HttpMessage.ProtocolEnum.HTTPS);%0A            message.setUrl(new StringBuilder(config.getUrl()).append(%22?%22).append(config.getArg()).append(%22=%22).append(config.getToken()).toString());%0A            message.setMessageTypeEnum(HttpMessage.MessageTypeEnum.markdown);%0A            JSONObject jsonObject = new JSONObject();%0A            jsonObject.put(%22title%22, %22%E8%82%A1%E7%A5%A8%E8%B4%AD%E4%B9%B0%E6%8F%90%E9%86%92%22);%0A            jsonObject.put(%22text%22, MarkdownUtil.createMarkdownContent(context));%0A            message.setContent(jsonObject.toJSONString());%0A        %7D%0A    %7D%0A%7D%0A

add resolver