提交查询门店和积分返利

yy_dev
袁野 1 year ago
parent ec7a8f80a3
commit b76569ce56
  1. 9
      service/src/main/java/com/hfkj/service/impl/BsStoreCidServiceImpl.java
  2. 11
      service/src/main/java/com/hfkj/service/impl/BsTradeOrderServiceImpl.java

@ -12,6 +12,8 @@ import com.hfkj.tts.HWYunSisService;
import com.hfkj.unipush.UniPushService;
import org.apache.commons.collections4.MapUtils;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
@ -25,6 +27,8 @@ import java.util.Map;
@Service("bsStoreCidService")
public class BsStoreCidServiceImpl implements BsStoreCidService {
private static Logger log = LoggerFactory.getLogger(BsStoreCidService.class);
@Resource
private BsStoreCidMapper bsStoreCidMapper;
@ -67,6 +71,8 @@ public class BsStoreCidServiceImpl implements BsStoreCidService {
@Override
public void storePush(JSONObject object) {
try {
if (object == null ||
object.getBigDecimal("price") == null ||
object.getLong("storeId") == null) {
@ -90,6 +96,9 @@ public class BsStoreCidServiceImpl implements BsStoreCidService {
object.put("cid", bsStoreCid.getCid());
object.put("body", auditPath);
UniPushService.pushToSingleByCid(object);
} catch (Exception e) {
log.info("请求超时:" + e);
}
}

@ -7,9 +7,7 @@ import com.hfkj.common.exception.ErrorCode;
import com.hfkj.common.exception.ErrorHelp;
import com.hfkj.common.exception.SysCode;
import com.hfkj.common.utils.DateUtil;
import com.hfkj.common.utils.HttpsUtils;
import com.hfkj.common.utils.IDGenerator;
import com.hfkj.config.CommonSysConst;
import com.hfkj.config.device.SoundService;
import com.hfkj.dao.BsTradeOrderMapper;
import com.hfkj.entity.*;
@ -39,6 +37,9 @@ public class BsTradeOrderServiceImpl implements BsTradeOrderService {
@Resource
private BsSalesmanService salesmanService;
@Resource
private BsStoreCidService bsStoreCidService;
@Resource
private BsStoreService storeService;
@ -276,6 +277,12 @@ public class BsTradeOrderServiceImpl implements BsTradeOrderService {
tradeOrder.getCreateTime());
}
JSONObject objectPush = new JSONObject();
objectPush.put("storeId" , tradeOrder.getStoreId());
objectPush.put("price" , tradeOrder.getTradeAmount());
bsStoreCidService.storePush(objectPush);
// 创建分账
if (tradeOrder.getProfitSharingStatus().equals(true)) {
tradeOrderProfitSharingService.createProfitSharing(tradeOrder);

Loading…
Cancel
Save