|
@@ -1,5 +1,6 @@
|
|
package com.zswl.cloud.springBtach.server.core.job.standard;
|
|
package com.zswl.cloud.springBtach.server.core.job.standard;
|
|
|
|
|
|
|
|
+import cn.hutool.core.util.ObjectUtil;
|
|
import cn.hutool.json.JSONUtil;
|
|
import cn.hutool.json.JSONUtil;
|
|
import com.github.microservice.auth.client.content.ResultContent;
|
|
import com.github.microservice.auth.client.content.ResultContent;
|
|
import com.zhongshu.payment.client.model.order.v2.CreateOrder2Model;
|
|
import com.zhongshu.payment.client.model.order.v2.CreateOrder2Model;
|
|
@@ -19,20 +20,16 @@ import com.zswl.cloud.shop.client.vo.life.ShopDetailVo;
|
|
import lombok.Data;
|
|
import lombok.Data;
|
|
import lombok.extern.log4j.Log4j2;
|
|
import lombok.extern.log4j.Log4j2;
|
|
import org.springframework.batch.core.Job;
|
|
import org.springframework.batch.core.Job;
|
|
-import org.springframework.batch.core.JobExecution;
|
|
|
|
import org.springframework.batch.core.Step;
|
|
import org.springframework.batch.core.Step;
|
|
-import org.springframework.batch.core.StepExecution;
|
|
|
|
import org.springframework.batch.core.configuration.annotation.JobBuilderFactory;
|
|
import org.springframework.batch.core.configuration.annotation.JobBuilderFactory;
|
|
import org.springframework.batch.core.configuration.annotation.StepBuilderFactory;
|
|
import org.springframework.batch.core.configuration.annotation.StepBuilderFactory;
|
|
import org.springframework.batch.core.launch.support.RunIdIncrementer;
|
|
import org.springframework.batch.core.launch.support.RunIdIncrementer;
|
|
-import org.springframework.batch.core.repository.JobRepository;
|
|
|
|
import org.springframework.batch.repeat.RepeatStatus;
|
|
import org.springframework.batch.repeat.RepeatStatus;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.context.annotation.Bean;
|
|
import org.springframework.context.annotation.Bean;
|
|
import org.springframework.context.annotation.Configuration;
|
|
import org.springframework.context.annotation.Configuration;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
import javax.annotation.Resource;
|
|
-import java.math.BigDecimal;
|
|
|
|
import java.util.ArrayList;
|
|
import java.util.ArrayList;
|
|
|
|
|
|
@Data
|
|
@Data
|
|
@@ -105,8 +102,14 @@ public class StandardOrderJob {
|
|
com.zswl.cloud.shop.client.ret.ResultContent<ShopDetailVo> detail1 = shopService.detail(createOrder2Model.getShopId());
|
|
com.zswl.cloud.shop.client.ret.ResultContent<ShopDetailVo> detail1 = shopService.detail(createOrder2Model.getShopId());
|
|
ShopDetailVo shopDetailVo = detail1.getContent();
|
|
ShopDetailVo shopDetailVo = detail1.getContent();
|
|
createOrder2Model.setShopInfo(JSONUtil.parseObj(shopDetailVo));
|
|
createOrder2Model.setShopInfo(JSONUtil.parseObj(shopDetailVo));
|
|
|
|
+ if (ObjectUtil.isEmpty(shopDetailVo.getAuthAccount())){
|
|
|
|
+ resultContent.set( ResultContent.build(com.github.microservice.auth.client.content.ResultState.Fail,"分账账户未设置"));
|
|
|
|
+ stop.set(true);
|
|
|
|
+ return RepeatStatus.FINISHED;
|
|
|
|
+ }
|
|
|
|
|
|
|
|
|
|
|
|
+ createOrder2Model.setAccesserUserId(shopDetailVo.getAuthAccount());
|
|
// 商品详情
|
|
// 商品详情
|
|
com.zswl.cloud.shop.client.ret.ResultContent<GoodsInfoVo> detail = goodsService.detail(goodsId, 1, createOrder2Model.getUserId());
|
|
com.zswl.cloud.shop.client.ret.ResultContent<GoodsInfoVo> detail = goodsService.detail(goodsId, 1, createOrder2Model.getUserId());
|
|
GoodsInfoVo goodsInfoVo = detail.getContent();
|
|
GoodsInfoVo goodsInfoVo = detail.getContent();
|