Search in sources :

Example 1 with MessageProducer

use of hry.trade.mq.service.MessageProducer in project benchmark by seelunzi.

the class ExEntrustServiceImpl method cancelAutoAddExEntrust.

/*     */
/*     */
/*     */
/*     */
/*     */
public void cancelAutoAddExEntrust() /*     */
{
    /* 192 */
    Map<String, String> mapLoadWeb = PropertiesUtils.getLoadWeb();
    /* 193 */
    for (String Website : mapLoadWeb.keySet()) {
        /* 194 */
        List<ExCointoCoin> listExCointoCoin = this.commonDao.getExointocoinValid();
        /* 195 */
        for (ExCointoCoin exCointoCoin : listExCointoCoin) {
            /* 196 */
            String autoUsernames = exCointoCoin.getAutoUsername();
            /* 197 */
            Long customerId = exCointoCoin.getCustomerId();
            /* 198 */
            Integer isSratAuto = exCointoCoin.getIsSratAuto();
            /* 199 */
            Integer isFromChbtc = exCointoCoin.getIsFromChbtc();
            /* 202 */
            if (isSratAuto.equals(Integer.valueOf(1))) {
                /* 203 */
                String[] autoUsernameArr = null;
                /* 204 */
                if (null == customerId) {
                    /* 205 */
                    autoUsernameArr = autoUsernames.split(",");
                /*     */
                }
                /* 207 */
                if (null == autoUsernameArr)
                    break;
                /* 208 */
                for (String autoUsername : autoUsernameArr) {
                    /* 209 */
                    if (null == customerId) {
                        /* 210 */
                        AppCustomer customer = this.commonDao.getAppUserByuserName(autoUsername);
                        /* 211 */
                        if (null == autoUsername) {
                            /* 212 */
                            System.out.println("填写的手机号有误,请检查重试!");
                            /* 213 */
                            break;
                        /*     */
                        }
                        /* 215 */
                        customerId = customer.getId();
                        /* 216 */
                        exCointoCoin.setCustomerId(customerId);
                    /*     */
                    }
                    /* 219 */
                    if (isFromChbtc.equals(Integer.valueOf(0))) /*     */
                    {
                        /* 221 */
                        EntrustTrade entrustTrade = new EntrustTrade();
                        /* 222 */
                        entrustTrade.setCustomerId(customerId);
                        /* 223 */
                        entrustTrade.setCoinCode(exCointoCoin.getCoinCode());
                        /* 224 */
                        entrustTrade.setFixPriceCoinCode(exCointoCoin.getFixPriceCoinCode());
                        /* 225 */
                        entrustTrade.setCancelKeepN(Integer.valueOf(10));
                        /*     */
                        /* 227 */
                        String str = JSON.toJSONString(entrustTrade);
                        /* 228 */
                        MessageProducer messageProducer = (MessageProducer) ContextUtil.getBean("messageProducer");
                        /*     */
                        /* 230 */
                        messageProducer.toTrade(str);
                    /*     */
                    }
                /*     */
                }
            /*     */
            }
        /*     */
        }
    /*     */
    }
/*     */
}
Also used : AppCustomer(hry.customer.user.model.AppCustomer) ExCointoCoin(hry.exchange.product.model.ExCointoCoin) EntrustTrade(hry.trade.redis.model.EntrustTrade) MessageProducer(hry.trade.mq.service.MessageProducer)

Example 2 with MessageProducer

use of hry.trade.mq.service.MessageProducer in project benchmark by seelunzi.

the class ExOrderInfoServiceImpl method reidsToredisLogmq.

/*     */
/*     */
/*     */
public void reidsToredisLogmq() /*     */
{
    /* 487 */
    MessageProducer messageProducer = (MessageProducer) ContextUtil.getBean("messageProducer");
    /* 488 */
    messageProducer.reidsToRedisLog("333");
/*     */
}
Also used : MessageProducer(hry.trade.mq.service.MessageProducer)

Example 3 with MessageProducer

use of hry.trade.mq.service.MessageProducer in project benchmark by seelunzi.

the class ExOrderInfoServiceImpl method reidsToMysqlmq.

/*     */
/*     */
/*     */
public void reidsToMysqlmq() /*     */
{
    /* 480 */
    MessageProducer messageProducer = (MessageProducer) ContextUtil.getBean("messageProducer");
    /* 481 */
    messageProducer.reidsToMysql("111");
/*     */
}
Also used : MessageProducer(hry.trade.mq.service.MessageProducer)

Aggregations

MessageProducer (hry.trade.mq.service.MessageProducer)3 AppCustomer (hry.customer.user.model.AppCustomer)1 ExCointoCoin (hry.exchange.product.model.ExCointoCoin)1 EntrustTrade (hry.trade.redis.model.EntrustTrade)1