|
|
|
@@ -0,0 +1,65 @@ |
|
|
|
package com.iformall.controller.basic; |
|
|
|
|
|
|
|
import com.iformall.annotation.TenantIgnore; |
|
|
|
import com.iformall.common.ResultData; |
|
|
|
import com.iformall.controller.base.BaseController; |
|
|
|
import com.iformall.domain.po.WxMall; |
|
|
|
import com.iformall.domain.po.WxPayOrder; |
|
|
|
import com.iformall.domain.po.WxProfitSharingOrder; |
|
|
|
import com.iformall.enums.EnumProfitSharingOrderStatus; |
|
|
|
import com.iformall.mapper.WxMallMapper; |
|
|
|
import com.iformall.mapper.WxPayOrderMapper; |
|
|
|
import com.iformall.mapper.WxProfitSharingOrderMapper; |
|
|
|
import com.iformall.service.WxProfitSharingOrderService; |
|
|
|
import io.swagger.annotations.ApiOperation; |
|
|
|
|
|
|
|
import java.util.List; |
|
|
|
|
|
|
|
import org.slf4j.Logger; |
|
|
|
import org.slf4j.LoggerFactory; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.web.bind.annotation.*; |
|
|
|
|
|
|
|
/** |
|
|
|
* @author gongbiao |
|
|
|
*/ |
|
|
|
@RestController |
|
|
|
@RequestMapping("wxtttttttt") |
|
|
|
public class WxtttttttController extends BaseController { |
|
|
|
private final Logger logger = LoggerFactory.getLogger(this.getClass()); |
|
|
|
|
|
|
|
@Autowired |
|
|
|
private WxProfitSharingOrderService wxProfitSharingOrderService; |
|
|
|
|
|
|
|
@Autowired |
|
|
|
private WxProfitSharingOrderMapper wxProfitSharingOrderMapper; |
|
|
|
|
|
|
|
@Autowired |
|
|
|
WxPayOrderMapper wxPayOrderMapper; |
|
|
|
|
|
|
|
@Autowired |
|
|
|
WxMallMapper wxMallMapper; |
|
|
|
|
|
|
|
|
|
|
|
@TenantIgnore |
|
|
|
@ApiOperation("根据关键字查询") |
|
|
|
@GetMapping("sharingRedo") |
|
|
|
public ResultData search(String tenantId) { |
|
|
|
WxMall mall = wxMallMapper.getByTenantId(tenantId); |
|
|
|
WxProfitSharingOrder wxProfitSharingOrder = new WxProfitSharingOrder(); |
|
|
|
wxProfitSharingOrder.setTenantId(mall.getTenantId()); |
|
|
|
wxProfitSharingOrder.setSharingStatus(EnumProfitSharingOrderStatus.PROFIT_SHARING_REQ_FAILED.getCode()); |
|
|
|
List<WxProfitSharingOrder> list = wxProfitSharingOrderMapper.findList(wxProfitSharingOrder); |
|
|
|
if (null != list) { |
|
|
|
for (int i = 0 ; i < list.size(); i++) { |
|
|
|
WxProfitSharingOrder record = list.get(i); |
|
|
|
WxPayOrder wxPayOrder = new WxPayOrder(); |
|
|
|
wxPayOrder.updateTenantInfo(record); |
|
|
|
wxPayOrder = wxPayOrderMapper.selectById(record.getOrderId(), record.getTenantId()); |
|
|
|
wxProfitSharingOrderService.redoSharingOrder(record, wxPayOrder); |
|
|
|
} |
|
|
|
} |
|
|
|
return new ResultData(); |
|
|
|
} |
|
|
|
|
|
|
|
} |