feat:mini
This commit is contained in:
@@ -132,7 +132,7 @@
|
||||
|
||||
<select id="getALlFail">
|
||||
select * from xfsg_shop_account WHERE
|
||||
system_name in ('火码POS','云流水','新掌柜')
|
||||
system_name in ('火码POS')
|
||||
and status = 6
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -18,6 +18,7 @@ import com.cool.store.mapper.LineInfoMapper;
|
||||
import com.cool.store.mapper.TrainingExperienceMapper;
|
||||
import com.cool.store.mq.producer.SimpleMessageService;
|
||||
import com.cool.store.mq.util.HttpRestTemplateService;
|
||||
import com.cool.store.request.ZxjpApiRequest;
|
||||
import com.cool.store.request.xfsgFirstOrderListRequest;
|
||||
import com.cool.store.response.xfsgFirstOderListResponse;
|
||||
import com.cool.store.service.*;
|
||||
@@ -103,7 +104,13 @@ public class XxlJobHandler {
|
||||
private TallyBookService tallyBookService;
|
||||
@Resource
|
||||
ShopAccountDAO accountDAO;
|
||||
@Resource
|
||||
ShopAccountDAO shopAccountDAO;
|
||||
@Resource
|
||||
ShopAccountService shopAccountService;
|
||||
|
||||
@Resource
|
||||
PushService pushService;
|
||||
|
||||
|
||||
/**
|
||||
@@ -345,27 +352,23 @@ public class XxlJobHandler {
|
||||
boolean hasNext = true;
|
||||
int pageNum = 1;
|
||||
int pageSize = 10;
|
||||
List<Long> shopIdList = new ArrayList<>();
|
||||
while (hasNext) {
|
||||
PageHelper.startPage(pageNum, pageSize);
|
||||
//获取成功开店的门店
|
||||
List<ShopAccountDO> accountDOS = accountDAO.getALlFail();
|
||||
|
||||
if (CollectionUtils.isEmpty(accountDOS)) {
|
||||
log.info("------rePush is empty------");
|
||||
break;
|
||||
}
|
||||
for (ShopAccountDO accountDO : accountDOS){
|
||||
try {
|
||||
// TODO: 2025/4/8 suzhuhong_
|
||||
//推送数据 如果云流水或者新掌柜其中一个失败了 还要不要推送数据
|
||||
|
||||
//如果是POS推送成功 修改状态 还要修改阶段数据
|
||||
|
||||
//云流水 新掌柜 等待回调
|
||||
|
||||
ZxjpApiRequest data = shopAccountService.getData(accountDO.getShopId(), DownSystemTypeEnum.POS);
|
||||
Boolean successFlag = pushService.pushDataToPOS(data);
|
||||
OpenStatusEnum openStatusEnum = successFlag ? OpenStatusEnum.OPENSTATUSENUM_5 : OpenStatusEnum.OPENSTATUSENUM_6;
|
||||
shopAccountDAO.updateEntryStatusByShopIdAndSystemName(accountDO.getShopId(),Arrays.asList(ShopAccountEnum.HUOMA.getSystemName()),openStatusEnum.getCode());
|
||||
}catch (Exception e){
|
||||
|
||||
log.info("rePush error-> accountDO:{},error:{}",JSONObject.toJSONString(accountDO),e.getMessage());
|
||||
}
|
||||
}
|
||||
if (accountDOS.size() < pageSize){
|
||||
@@ -375,9 +378,4 @@ public class XxlJobHandler {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user