package com.reptileclient.jlifeapp.dao.qg;

import com.reptileclient.jlifeapp.entity.qg.JzOrderQg;

import java.util.List;

import org.apache.ibatis.annotations.Param;

public interface JzOrderQgMapper {
    /**
     * delete by primary key
     *
     * @param id primaryKey
     * @return deleteCount
     */
    int deleteByPrimaryKey(Integer id);

    /**
     * insert record to table
     *
     * @param record the record
     * @return insert count
     */
    int insert(JzOrderQg record);

    int insertOrUpdate(JzOrderQg record);

    int insertOrUpdateSelective(JzOrderQg record);

    /**
     * insert record to table selective
     *
     * @param record the record
     * @return insert count
     */
    int insertSelective(JzOrderQg record);

    /**
     * select by primary key
     *
     * @param id primary key
     * @return object by primary key
     */
    JzOrderQg selectByPrimaryKey(Integer id);

    /**
     * update record selective
     *
     * @param record the updated record
     * @return update count
     */
    int updateByPrimaryKeySelective(JzOrderQg record);

    /**
     * update record
     *
     * @param record the updated record
     * @return update count
     */
    int updateByPrimaryKey(JzOrderQg record);

    int updateBatch(List<JzOrderQg> list);

    int batchInsert(@Param("list") List<JzOrderQg> list);

    List<JzOrderQg> selectAll();

    int selectCount();

    List<JzOrderQg> selectByCreateTime(@Param("lastMonth") long lastMonth, @Param("now") long now);

    //更新已核销工单信息-根据外部订单
    void updateBatchByOutId(@Param("waitUpdate") List<String> waitUpdate, @Param("status") String status, @Param("statusDesc") String statusDesc);

    void deleteDuplicate();

    void deleteByCity(String city);
}
