|
|
@@ -21,14 +21,12 @@ import com.poteviohealth.cgp.common.integrated.order.model.PayAccount;
|
|
|
import com.poteviohealth.cgp.common.integrated.partner.model.AreaDTO;
|
|
|
import com.poteviohealth.cgp.common.integrated.partner.model.EmployeeStationFace;
|
|
|
import com.poteviohealth.cgp.common.integrated.partner.model.EmployeeStationJsonFace;
|
|
|
+import com.poteviohealth.cgp.common.model.VaultsResponse;
|
|
|
import com.poteviohealth.cgp.common.service.impl.BaseServiceImpl;
|
|
|
import com.poteviohealth.cgp.statistics.constant.enums.OrderConstantEnum;
|
|
|
import com.poteviohealth.cgp.statistics.mapper.OrderMapper;
|
|
|
import com.poteviohealth.cgp.statistics.model.Order;
|
|
|
-import com.poteviohealth.cgp.statistics.model.indto.DishesOrderWebInDTO;
|
|
|
-import com.poteviohealth.cgp.statistics.model.indto.OrderCostWebInDTO;
|
|
|
-import com.poteviohealth.cgp.statistics.model.indto.OrderServiceWebInDTO;
|
|
|
-import com.poteviohealth.cgp.statistics.model.indto.OrderWebInDTO;
|
|
|
+import com.poteviohealth.cgp.statistics.model.indto.*;
|
|
|
import com.poteviohealth.cgp.statistics.model.outdto.*;
|
|
|
import com.poteviohealth.cgp.statistics.service.IOrderService;
|
|
|
import lombok.extern.log4j.Log4j2;
|
|
|
@@ -316,6 +314,35 @@ public class OrderServiceImpl extends BaseServiceImpl<OrderMapper, Order> implem
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public VaultsResponse updateOrderUrl(List<PriceUploadDto> list) {
|
|
|
+ List<String> startUrl = Lists.newArrayList();
|
|
|
+ List<String> endUrl = Lists.newArrayList();
|
|
|
+ Long orderId = null;
|
|
|
+ for (PriceUploadDto dto : list) {
|
|
|
+ orderId = dto.getOrderId();
|
|
|
+ if(dto.getIndex() <=3 && StringUtils.isNotEmpty(dto.getUrl())){
|
|
|
+ startUrl.add(dto.getUrl());
|
|
|
+ }else if(dto.getIndex() >3 && StringUtils.isNotEmpty(dto.getUrl())){
|
|
|
+ endUrl.add(dto.getUrl());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ String start = "";
|
|
|
+ if(!startUrl.isEmpty()){
|
|
|
+ start = startUrl.stream().map(String::valueOf).collect(Collectors.joining(","));
|
|
|
+ }
|
|
|
+
|
|
|
+ String end = "";
|
|
|
+ if(!endUrl.isEmpty()){
|
|
|
+ end = endUrl.stream().map(String::valueOf).collect(Collectors.joining(","));
|
|
|
+ }
|
|
|
+
|
|
|
+ if(orderId != null){
|
|
|
+ baseMapper.updateOrderUrl(TokenContext.cureOperatorId(),start ,end , dbName, orderId);
|
|
|
+ }
|
|
|
+ return VaultsResponse.success();
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
private String getPayAccountString(String payAccount){
|
|
|
StringBuilder sb = new StringBuilder();
|