|
@@ -41,6 +41,7 @@ import org.springblade.core.mp.support.Query;
|
|
import org.springblade.core.tool.api.R;
|
|
import org.springblade.core.tool.api.R;
|
|
import org.springblade.core.tool.utils.StringUtil;
|
|
import org.springblade.core.tool.utils.StringUtil;
|
|
import org.springblade.core.tool.utils.WebUtil;
|
|
import org.springblade.core.tool.utils.WebUtil;
|
|
|
|
+import org.springblade.modules.api.request.ConsignPayRequest;
|
|
import org.springblade.modules.api.request.OrderCommonSaveRequest;
|
|
import org.springblade.modules.api.request.OrderCommonSaveRequest;
|
|
import org.springblade.modules.api.request.OrderConsignRandomRequest;
|
|
import org.springblade.modules.api.request.OrderConsignRandomRequest;
|
|
import org.springblade.modules.api.request.OrderTakeRequest;
|
|
import org.springblade.modules.api.request.OrderTakeRequest;
|
|
@@ -175,6 +176,58 @@ public class Api05Controller extends BladeController {
|
|
return R.data(response);
|
|
return R.data(response);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ @PostMapping("checkConsignPay")
|
|
|
|
+ @ApiOperation(value = "确认付款id")
|
|
|
|
+ public R checkConsignPay(@RequestBody ConsignPayRequest payRequest){
|
|
|
|
+
|
|
|
|
+ return R.success("确认付款成功");
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ *
|
|
|
|
+ * @return
|
|
|
|
+ */
|
|
|
|
+ @PostMapping("getConsignListByConfigId")
|
|
|
|
+ @ApiOperation(value = "查询场次付款记录")
|
|
|
|
+ public R<List<Consign>> getConsignListByConfigId(@ApiParam(value = "批次ID", required = true) @RequestParam Long consignConfigId){
|
|
|
|
+ LambdaQueryWrapper<Consign> query = Wrappers.lambdaQuery(Consign.class);
|
|
|
|
+ query.eq(Consign::getConsignConfigId,consignConfigId);
|
|
|
|
+ query.eq(Consign::getConsignState, 2);
|
|
|
|
+ List<Consign> list = consignService.list(query);
|
|
|
|
+ return R.data(list);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ *
|
|
|
|
+ * @return
|
|
|
|
+ */
|
|
|
|
+ @PostMapping("getConsignALLList")
|
|
|
|
+ @ApiOperation(value = "查询付款授权场次")
|
|
|
|
+ public R<List<ConsignListVO>> getConsignALLList(){
|
|
|
|
+ //查询已授权表记录
|
|
|
|
+ LambdaQueryWrapper<PlatformAuthorization> query = Wrappers.lambdaQuery(PlatformAuthorization.class);
|
|
|
|
+ query.eq(PlatformAuthorization::getState, 1);
|
|
|
|
+ List<PlatformAuthorization> platformAuthorizations = paMapper.selectList(query);
|
|
|
|
+ LambdaQueryWrapper<Consign> consignLambdaQueryWrapper = Wrappers.lambdaQuery(Consign.class);
|
|
|
|
+ consignLambdaQueryWrapper.eq(Consign::getNowStock, 0).eq(Consign::getConsignState, 2);
|
|
|
|
+ List<Consign> list = consignService.list(consignLambdaQueryWrapper);
|
|
|
|
+ ConsignListVO consignListVO = null;
|
|
|
|
+ List<ConsignListVO> consignListVOS = new ArrayList<>();
|
|
|
|
+ Map<Long, List<Consign>> collect1 = list.stream().collect(Collectors.groupingBy(Consign::getConsignConfigId));
|
|
|
|
+ for (Map.Entry<Long, List<Consign>> entry : collect1.entrySet()) {
|
|
|
|
+ consignListVO = new ConsignListVO();
|
|
|
|
+ Integer num = entry.getValue().size();
|
|
|
|
+ if(num > 0){
|
|
|
|
+ consignListVO.setConsignConfigId(entry.getKey());
|
|
|
|
+ consignListVO.setOrderNum(num);
|
|
|
|
+ consignListVO.setOrderPrice(new BigDecimal(entry.getValue().get(0).getConsignPrice()).setScale(2, BigDecimal.ROUND_DOWN));
|
|
|
|
+ consignListVOS.add(consignListVO);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ return R.data(consignListVOS);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
/**
|
|
/**
|
|
*
|
|
*
|
|
* @return
|
|
* @return
|