package com.ym.mec.biz.service;

import java.math.BigDecimal;

import com.ym.mec.biz.dal.dto.CashAccountDetail;
import com.ym.mec.biz.dal.entity.SysUserCashAccountDetail;
import com.ym.mec.biz.dal.enums.DealStatusEnum;
import com.ym.mec.biz.dal.enums.PlatformCashAccountDetailTypeEnum;
import com.ym.mec.biz.dal.enums.TransTypeEnum;
import com.ym.mec.common.page.PageInfo;
import com.ym.mec.common.page.QueryInfo;
import com.ym.mec.common.service.BaseService;

public interface SysUserCashAccountDetailService extends BaseService<Long, SysUserCashAccountDetail> {
	
	final static String MUSIC_GROUP = "group";
	
	final static String ORGAN = "organ";
	
	final static String COURSE_SCHEDULE = "cs";

	SysUserCashAccountDetail queryDetailByTransNo(String transNo);

	/**
	 * 添加流水信息(若成功会更新账户余额)
	 * @param userId 用户编号
	 * @param amount 金额
	 * @param origOrderId 原始订单号
	 * @param transNo 交易流水号
	 * @param type 交易类型
	 * @param transType 交易渠道
	 * @param status 交易状态
	 * @param comment 备注
	 * @param comment 描述
	 * @return
	 */
	boolean addCashAccountDetail(Integer userId, BigDecimal amount, String origOrderId, String transNo, PlatformCashAccountDetailTypeEnum type,
			TransTypeEnum transType, DealStatusEnum status, String comment,String description);

	/**
	 * 流水明细查询-包含账户余额与课程余额
	 * @param queryInfo
	 * @return
	 */
	PageInfo<SysUserCashAccountDetail> queryAccountDetail(CashAccountDetail queryInfo);

}