package com.iamberry.wechat.face.receive;

import com.iamberry.wechat.core.entity.PaperBean;
import com.iamberry.wechat.core.entity.cart.ShopOrderAndItemDto;
import com.iamberry.wechat.core.entity.integral.UseIntegral;
import com.iamberry.wechat.core.entity.page.PageRequest;
import com.iamberry.wechat.core.entity.page.PagedResult;
import com.iamberry.wechat.core.entity.receive.ChargerReceive;

import java.util.List;

public interface ChargReceiveService {

    int insert(ChargerReceive record);

//    int insertSelective(ChargerReceive record);

    ChargerReceive selectByPrimaryKey(Integer receiveId);

    ChargerReceive selectByOrderId(String orderId);

    int updateByPrimaryKeySelective(ChargerReceive record);

    /**
     * 发货
     * @param record
     * @return
     */
    int ship(ChargerReceive record);

    /*按照orderId修改*/
    int updateByOrderId(ChargerReceive record);

    /*获取列表*/
    List<ChargerReceive> getChargerReceiveList(ChargerReceive chargerReceive);

    /*分页 -- 前台专用*/
    PagedResult<ChargerReceive> listChargerReceive(PageRequest<ChargerReceive> pageRequest);

    /*分页 -- 后台专用*/
    PagedResult<ChargerReceive> listAdminChargerReceive(PageRequest<ChargerReceive> pageRequest);


    /**
     * 获取用户所拥有的机器的数量
     * @param openId
     * @return
     */
    Integer getApparatusNumber(String openId);
}
