Browse Source

1.新增 通过订单号查询一个暂存单的 接口

dist.1.3.0
zhenghaoyu 8 months ago
parent
commit
fd575573b5
  1. 4
      blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/feign/ITrunklineAdvanceClient.java
  2. 9
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/feign/TrunklineAdvanceClient.java

4
blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/feign/ITrunklineAdvanceClient.java

@ -3,8 +3,10 @@ package com.logpm.trunkline.feign;
import com.logpm.trunkline.entity.TrunklineAdvanceEntity;
import org.springblade.common.constant.ModuleNameConstant;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
@FeignClient(
value = ModuleNameConstant.APPLICATION_TRUNKLINE_NAME
@ -16,5 +18,7 @@ public interface ITrunklineAdvanceClient {
@PostMapping(API_PREFIX+"/addAdvanceReturnId")
Long addAdvanceReturnId(@RequestBody TrunklineAdvanceEntity trunklineAdvanceEntity);
@GetMapping(API_PREFIX+"/findAdvanceLimitOneByOrderCode")
TrunklineAdvanceEntity findAdvanceLimitOneByOrderCode(@RequestParam String orderCode);
}

9
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/feign/TrunklineAdvanceClient.java

@ -1,5 +1,6 @@
package com.logpm.trunkline.feign;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.logpm.trunkline.entity.TrunklineAdvanceEntity;
import com.logpm.trunkline.service.ITrunklineAdvanceService;
import lombok.AllArgsConstructor;
@ -23,4 +24,12 @@ public class TrunklineAdvanceClient implements ITrunklineAdvanceClient{
}
return trunklineAdvanceEntity.getId();
}
@Override
public TrunklineAdvanceEntity findAdvanceLimitOneByOrderCode(String orderCode) {
QueryWrapper<TrunklineAdvanceEntity> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("order_code",orderCode)
.last("limit 1");
return advanceService.getOne(queryWrapper);
}
}

Loading…
Cancel
Save