Commit 45fec4df by 墨竹

feat:企微收费

parent b9e8fdb1
......@@ -18,4 +18,8 @@ public class Manage3Constants {
* 链接前缀
*/
public static final String DT = "DT";
/**
* 企微最大分页
*/
public static final Integer QW_LIMIT = 1000;
}
package com.gic.haoban.manage.service.service.out.impl.fee;
import com.gic.haoban.manage.api.constants.Manage3Constants;
import com.gic.haoban.manage.api.service.fee.HaobanQywxFeeApiService;
import com.gic.haoban.manage.service.config.Config;
import com.gic.haoban.manage.service.entity.TabHaobanWxEnterprise;
......@@ -8,12 +9,15 @@ import com.gic.haoban.manage.service.service.fee.HaobanQywxFeeAccountStaffServic
import com.gic.haoban.manage.service.service.fee.HaobanQywxFeeOrderAccountService;
import com.gic.haoban.manage.service.service.fee.HaobanQywxFeeOrderService;
import com.gic.haoban.manage.service.service.fee.HaobanQywxFeeService;
import com.gic.wechat.api.dto.qywx.fee.FeeOrderResponseList;
import com.gic.wechat.api.dto.qywx.fee.qdto.FeeOrderListQDTO;
import com.gic.wechat.api.service.qywx.QywxUserApiService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.List;
@Service("haobanQywxFeeApiService")
......@@ -49,6 +53,23 @@ public class HaobanQywxFeeApiServiceImpl implements HaobanQywxFeeApiService {
wxEnterpriseService.updateAutoActiveFlagById(0,wxEnterpriseId);
continue;
}
FeeOrderListQDTO feeOrderListQDTO = new FeeOrderListQDTO();
feeOrderListQDTO.setCorpid(corpid);
feeOrderListQDTO.setLimit(Manage3Constants.QW_LIMIT);
FeeOrderResponseList feeOrderResponseList = qywxUserApiService.listOrder(corpid, serviceCorpid,feeOrderListQDTO);
int errcode = feeOrderResponseList.getErrcode();
if (errcode != 0) {
logger.error("查询订单列表失败:{}",corpid);
continue;
}
List<String> orders = new ArrayList<>();
List<FeeOrderResponseList.OrderListDTO> orderList = feeOrderResponseList.getOrderList();
for (FeeOrderResponseList.OrderListDTO orderListDTO : orderList) {
orders.add(orderListDTO.getOrderId());
}
//更新企微状态
wxEnterpriseService.updateAutoActiveFlagById(1,wxEnterpriseId);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment