class PayOrderDivisionRecordController extends CommonCtrl {

	@Autowired private PayOrderDivisionRecordService payOrderDivisionRecordService;
	@Autowired private IMQSender mqSender;


	/** list */
	@ApiOperation("分账记录列表")
	@ApiImplicitParams({
			@ApiImplicitParam(name = "iToken", value = "用户身份凭证", required = true, paramType = "header"),
			@ApiImplicitParam(name = "pageNumber", value = "分页页码", dataType = "int", defaultValue = "1"),
			@ApiImplicitParam(name = "pageSize", value = "分页条数（-1时查全部数据）", dataType = "int", defaultValue = "20"),
			@ApiImplicitParam(name = "createdStart", value = "日期格式字符串（yyyy-MM-dd HH:mm:ss），时间范围查询--开始时间，查询范围：大于等于此时间"),
			@ApiImplicitParam(name = "createdEnd", value = "日期格式字符串（yyyy-MM-dd HH:mm:ss），时间范围查询--结束时间，查询范围：小于等于此时间"),
			@ApiImplicitParam(name = "appId", value = "应用ID"),
			@ApiImplicitParam(name = "receiverId", value = "账号快照》 分账接收者ID", dataType = "Long"),
			@ApiImplicitParam(name = "state", value = "状态: 0-待分账 1-分账成功, 2-分账失败", dataType = "Byte"),
			@ApiImplicitParam(name = "receiverGroupId", value = "账号组ID", dataType = "Long"),
			@ApiImplicitParam(name = "accNo", value = "账号快照》 分账接收账号"),
			@ApiImplicitParam(name = "payOrderId", value = "系统支付订单号")
	})
	@PreAuthorize("hasAnyAuthority( 'ENT_DIVISION_RECORD_LIST' )")
	@RequestMapping(value="", method = RequestMethod.GET)
	public ApiPageRes<PayOrderDivisionRecord> list() {<FILL_FUNCTION_BODY>}


	/** detail */
	@ApiOperation("分账记录详情")
	@ApiImplicitParams({
			@ApiImplicitParam(name = "iToken", value = "用户身份凭证", required = true, paramType = "header"),
			@ApiImplicitParam(name = "recordId", value = "分账记录ID", required = true, dataType = "Long")
	})
	@PreAuthorize("hasAuthority( 'ENT_DIVISION_RECORD_VIEW' )")
	@RequestMapping(value="/{recordId}", method = RequestMethod.GET)
	public ApiRes detail(@PathVariable("recordId") Long recordId) {
		PayOrderDivisionRecord record = payOrderDivisionRecordService
				.getOne(PayOrderDivisionRecord.gw()
						.eq(PayOrderDivisionRecord::getMchNo, getCurrentMchNo())
						.eq(PayOrderDivisionRecord::getRecordId, recordId));
		if (record == null) {
            throw new BizException(ApiCodeEnum.SYS_OPERATION_FAIL_SELETE);
        }
		return ApiRes.ok(record);
	}



	/** 分账接口重试 */
	@ApiOperation("分账接口重试")
	@ApiImplicitParams({
			@ApiImplicitParam(name = "iToken", value = "用户身份凭证", required = true, paramType = "header"),
			@ApiImplicitParam(name = "recordId", value = "分账记录ID", required = true, dataType = "Long")
	})
	@PreAuthorize("hasAuthority( 'ENT_DIVISION_RECORD_RESEND' )")
	@RequestMapping(value="/resend/{recordId}", method = RequestMethod.POST)
	public ApiRes resend(@PathVariable("recordId") Long recordId) {
		PayOrderDivisionRecord record = payOrderDivisionRecordService
				.getOne(PayOrderDivisionRecord.gw()
						.eq(PayOrderDivisionRecord::getMchNo, getCurrentMchNo())
						.eq(PayOrderDivisionRecord::getRecordId, recordId));
		if (record == null) {
			throw new BizException(ApiCodeEnum.SYS_OPERATION_FAIL_SELETE);
		}

		if(record.getState() != PayOrderDivisionRecord.STATE_FAIL){
			throw new BizException("请选择失败的分账记录");
		}

		// 更新订单状态 & 记录状态
		payOrderDivisionRecordService.updateResendState(record.getPayOrderId());

		// 重发到MQ
		mqSender.send(PayOrderDivisionMQ.build(record.getPayOrderId(), null, null, true));

		return ApiRes.ok(record);
	}


}


		PayOrderDivisionRecord queryObject = getObject(PayOrderDivisionRecord.class);
		JSONObject paramJSON = getReqParamJSON();

		LambdaQueryWrapper<PayOrderDivisionRecord> condition = PayOrderDivisionRecord.gw();
		condition.eq(PayOrderDivisionRecord::getMchNo, getCurrentMchNo());

		if(queryObject.getReceiverId() != null){
			condition.eq(PayOrderDivisionRecord::getReceiverId, queryObject.getReceiverId());
		}

		if(queryObject.getReceiverGroupId() != null){
			condition.eq(PayOrderDivisionRecord::getReceiverGroupId, queryObject.getReceiverGroupId());
		}

		if(StringUtils.isNotEmpty(queryObject.getAppId())){
			condition.like(PayOrderDivisionRecord::getAppId, queryObject.getAppId());
		}

		if(queryObject.getState() != null){
			condition.eq(PayOrderDivisionRecord::getState, queryObject.getState());
		}

		if(StringUtils.isNotEmpty(queryObject.getPayOrderId())){
			condition.eq(PayOrderDivisionRecord::getPayOrderId, queryObject.getPayOrderId());
		}

		if(StringUtils.isNotEmpty(queryObject.getAccNo())){
			condition.eq(PayOrderDivisionRecord::getAccNo, queryObject.getAccNo());
		}

		if (paramJSON != null) {
			if (StringUtils.isNotEmpty(paramJSON.getString("createdStart"))) {
				condition.ge(PayOrderDivisionRecord::getCreatedAt, paramJSON.getString("createdStart"));
			}
			if (StringUtils.isNotEmpty(paramJSON.getString("createdEnd"))) {
				condition.le(PayOrderDivisionRecord::getCreatedAt, paramJSON.getString("createdEnd"));
			}
		}

		condition.orderByDesc(PayOrderDivisionRecord::getCreatedAt); //时间倒序

		IPage<PayOrderDivisionRecord> pages = payOrderDivisionRecordService.page(getIPage(true), condition);
		return ApiPageRes.pages(pages);
	
<methods>public non-sealed void <init>() <variables>protected com.jeequan.jeepay.mch.config.SystemYmlConfig mainConfig,private com.jeequan.jeepay.service.impl.SysConfigService sysConfigService