use of hry.customer.user.model.AppCustomer in project benchmark by seelunzi.
the class ExEntrustServiceImpl method autoAddExEntrust.
/* */
/* */
/* */
/* */
public void autoAddExEntrust() /* */
{
/* 250 */
Map<String, String> mapLoadWeb = PropertiesUtils.getLoadWeb();
/* 251 */
for (String Website : mapLoadWeb.keySet()) {
/* 252 */
String currencyType = (String) mapLoadWeb.get(Website);
/* 253 */
List<ExCointoCoin> listExCointoCoin = this.commonDao.getExointocoinValid();
/* 254 */
max = 10;
/* 255 */
maxjs = 1;
/* 256 */
for (ExCointoCoin exCointoCoin : listExCointoCoin) {
/* 257 */
if (maxjs > max) {
/* 258 */
if (entrustType == 1) /* */
{
/* 260 */
entrustType = 2;
/* */
} else {
/* 262 */
entrustType = 1;
/* */
}
/* 264 */
return;
/* */
}
/* 266 */
String autoUsernames = exCointoCoin.getAutoUsername();
/* 267 */
Long customerId = exCointoCoin.getCustomerId();
/* 268 */
BigDecimal autoCount = exCointoCoin.getAutoCount();
/* 269 */
BigDecimal autoCountFloat = exCointoCoin.getAutoCountFloat();
/* 270 */
BigDecimal autoPrice = exCointoCoin.getAutoPrice();
/* 271 */
BigDecimal autoPriceFloat = exCointoCoin.getAutoPriceFloat();
/* 272 */
Integer isSratAuto = exCointoCoin.getIsSratAuto();
/* 273 */
Integer isFromChbtc = exCointoCoin.getIsFromChbtc();
/* 274 */
Integer fixPriceType = exCointoCoin.getFixPriceType();
/* 275 */
if (isSratAuto.equals(Integer.valueOf(1))) {
/* 276 */
String[] autoUsernameArr = null;
/* 277 */
if (null == customerId) {
/* 278 */
autoUsernameArr = autoUsernames.split(",");
/* */
}
/* 280 */
if (null == autoUsernameArr)
break;
/* 281 */
for (String autoUsername : autoUsernameArr) /* */
{
/* 283 */
AppCustomer customer = this.commonDao.getAppUserByuserName(autoUsername);
/* 284 */
if (null == autoUsername) {
/* 285 */
System.out.println("填写的手机号有误,请检查重试!");
/* 286 */
break;
/* */
}
/* 288 */
customerId = customer.getId();
/* 289 */
exCointoCoin.setCustomerId(customerId);
/* */
/* 291 */
maxjs++;
/* 292 */
if (isFromChbtc.equals(Integer.valueOf(0))) /* */
{
/* 297 */
for (int i = 0; i < 1; i++) {
/* 298 */
if (entrustType == 1) /* */
{
/* 300 */
BigDecimal buyautoPrice = getPrcie(exCointoCoin.getAtuoPriceType(), exCointoCoin.getUpFloatPer(), exCointoCoin.getCoinCode(), exCointoCoin.getFixPriceCoinCode(), autoPrice, autoPriceFloat);
/* */
/* 302 */
buyautoPrice = buyautoPrice.setScale(8, 5);
/* */
/* 304 */
BigDecimal buytrueNum = getPrcie(exCointoCoin.getAtuoPriceType(), exCointoCoin.getUpFloatPer(), exCointoCoin.getCoinCode(), exCointoCoin.getFixPriceCoinCode(), autoCount, autoCountFloat);
/* */
/* 306 */
buytrueNum = buytrueNum.setScale(8, 5);
/* 307 */
String coinCodebuy = exCointoCoin.getCoinCode() + "_" + exCointoCoin.getFixPriceCoinCode();
/* 308 */
addExEntrust(fixPriceType, Integer.valueOf(1), customerId, buyautoPrice, autoUsername, coinCodebuy, buytrueNum, "cny", "cn");
/* */
} else /* */
{
/* 311 */
BigDecimal sellautoPrice = getPrcie(exCointoCoin.getAtuoPriceType(), exCointoCoin.getUpFloatPer(), exCointoCoin.getCoinCode(), exCointoCoin.getFixPriceCoinCode(), autoPrice, autoPriceFloat);
/* */
/* 313 */
sellautoPrice = sellautoPrice.setScale(8, 5);
/* */
/* 315 */
BigDecimal selltrueNum = getPrcie(exCointoCoin.getAtuoPriceType(), exCointoCoin.getUpFloatPer(), exCointoCoin.getCoinCode(), exCointoCoin.getFixPriceCoinCode(), autoCount, autoCountFloat);
/* */
/* 317 */
selltrueNum = selltrueNum.setScale(8, 5);
/* 318 */
String coinCodesell = exCointoCoin.getCoinCode() + "_" + exCointoCoin.getFixPriceCoinCode();
/* 319 */
addExEntrust(fixPriceType, Integer.valueOf(2), customerId, sellautoPrice, autoUsername, coinCodesell, selltrueNum, "cny", "cn");
/* */
}
/* */
}
/* */
}
/* */
}
/* */
}
/* */
}
/* */
}
/* */
/* */
/* */
/* */
int max;
/* */
/* */
/* */
/* */
int maxjs;
/* 337 */
if (entrustType == 1) /* */
{
/* 339 */
entrustType = 2;
/* */
} else {
/* 341 */
entrustType = 1;
/* */
}
/* */
}
use of hry.customer.user.model.AppCustomer 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);
/* */
}
/* */
}
/* */
}
/* */
}
/* */
}
/* */
}
Aggregations