Browse Source

feat(all): 增加我乐自定义数据推送

dist.1.3.0
zhaoqiaobo 10 months ago
parent
commit
c81811d187
  1. 2
      blade-service/logpm-factory-data/logpm-factory-data-olo/src/main/java/com/logpm/factorydata/olo/mapper/DeliveryNoteMapper.java
  2. 11
      blade-service/logpm-factory-data/logpm-factory-data-olo/src/main/java/com/logpm/factorydata/olo/mapper/FactoryNodeOrderMapper.xml
  3. 2
      blade-service/logpm-factory-data/logpm-factory-data-olo/src/main/java/com/logpm/factorydata/olo/service/impl/DeliveryNoteServiceImpl.java

2
blade-service/logpm-factory-data/logpm-factory-data-olo/src/main/java/com/logpm/factorydata/olo/mapper/DeliveryNoteMapper.java

@ -4,6 +4,7 @@ import cn.hutool.json.JSONObject;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.logpm.factorydata.olo.entity.DeliveryNoteEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
/**
* 发货单 mapper
@ -16,4 +17,5 @@ public interface DeliveryNoteMapper extends BaseMapper<DeliveryNoteEntity> {
JSONObject customPushNodeData();
void updateSustomPushNodeDataStatus(@Param("status") String status, @Param("orderNo") String orderNo, @Param("deliveryNo") String deliveryNo);
}

11
blade-service/logpm-factory-data/logpm-factory-data-olo/src/main/java/com/logpm/factorydata/olo/mapper/FactoryNodeOrderMapper.xml

@ -1,7 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.logpm.factorydata.olo.mapper.DeliveryNoteMapper">
<select id="customPushNodeData" resultType="cn.hutool.json.JSONObject">
select status,
opTime,
@ -14,7 +13,13 @@
group_concat(sn) sns
from olo_custom_push_data
where sendStatus = 0
group by orderNo,deliveryNo
limit 1
group by orderNo, deliveryNo, status limit 1
</select>
<update id="updateSustomPushNodeDataStatus">
update olo_custom_push_data
set sendStatus = 1
where status = #{status}
and orderNo = #{orderNo}
and deliveryNo = #{deliveryNo}
</update>
</mapper>

2
blade-service/logpm-factory-data/logpm-factory-data-olo/src/main/java/com/logpm/factorydata/olo/service/impl/DeliveryNoteServiceImpl.java

@ -257,6 +257,8 @@ public class DeliveryNoteServiceImpl extends BaseServiceImpl<DeliveryNoteMapper,
log.info("自定义推送节点数据:{}", js.toString());
String post = HttpUtil.post(oldProperties.getPushNodeUrl(), js.toString());
log.info("推送结果:{}", post);
// 修改推送状态
this.baseMapper.updateSustomPushNodeDataStatus(js.getStr("status"), js.getStr("orderNo"), js.getStr("deliveryNo"));
} catch (Exception e) {
e.printStackTrace();
log.error("推送节点数据错误:{}", e);

Loading…
Cancel
Save