Browse Source

去掉注解

dev
yinzuomei 4 years ago
parent
commit
51be3af9fe
  1. 15
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/YuShanSysApiService.java

15
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/YuShanSysApiService.java

@ -8,11 +8,9 @@ import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult;
import com.epmet.commons.tools.enums.EnvEnum;
import com.epmet.commons.tools.enums.ExternalApiEnum;
import com.epmet.commons.tools.enums.ExternalServerEnum;
import com.epmet.commons.tools.exception.RenException;
import com.epmet.commons.tools.redis.common.CustomerStaffRedis;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;
@ -34,16 +32,17 @@ public class YuShanSysApiService {
*
* @return
*/
@Async
// @Async
public void updateUserPoints(String customerId, List<UpdateUserPointsFormDTO> paramList) {
try {
/*try {
Thread.sleep(1000l);
} catch (InterruptedException e) {
log.error("调用榆山街道发放积分睡眠发生异常,{}",e);
e.printStackTrace();
}
}*/
if (StringUtils.isBlank(customerId) || CollectionUtils.isEmpty(paramList)) {
throw new RenException("参数错误");
log.warn("updateUserPoints 参数错误");
return;
}
if (!SpecialCustomerOrgConstant.PING_YIN_CUSTOMER_ID.equals(customerId)) {
return;
@ -71,13 +70,13 @@ public class YuShanSysApiService {
// formDTO.setMobile("13205302682");
Result<String> res = HttpClientManager.getInstance().sendPostByJSON(apiPath, JSON.toJSONString(formDTO));
Result result = JSON.parseObject(res.getData(), Result.class);
log.info(String.format("updateUserPoints 入参:%s;返参:%s", JSON.toJSONString(formDTO),JSON.toJSONString(result)));
log.info(String.format("updateUserPoints 入参:%s;返参:%s", JSON.toJSONString(formDTO), JSON.toJSONString(result)));
if (!result.success()) {
log.warn("updateUserPoints failed:{}", JSON.toJSONString(result));
}
}
} catch (Exception e) {
log.error("updateUserPoints exception 入参:{},异常:{}", JSON.toJSONString(formDTO),e);
log.error("updateUserPoints exception 入参:{},异常:{}", JSON.toJSONString(formDTO), e);
}
}
}

Loading…
Cancel
Save