AccountMapper.java 1.11 KB
Newer Older
licc's avatar
licc committed
1 2 3 4
package cn.wisenergy.mapper;

import cn.wisenergy.model.app.AccountInfo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
5
import org.apache.ibatis.annotations.Param;
licc's avatar
licc committed
6 7 8

import java.util.Map;

9 10 11
/**
 * @author 86187
 */
licc's avatar
licc committed
12
public interface AccountMapper extends BaseMapper<AccountInfo> {
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29

    /**
     * 添加
     *
     * @param accountInfo 账户信息
     * @return 1
     */
    int add(AccountInfo accountInfo);

    /**
     * 编辑
     *
     * @param accountInfo 账户信息
     * @return 1
     */
    int edit(AccountInfo accountInfo);

licc's avatar
licc committed
30
    /**
31 32 33 34
     * 删除
     *
     * @param id 主键id
     * @return 1
licc's avatar
licc committed
35
     */
36
    int delById(@Param("id") Integer id);
licc's avatar
licc committed
37

licc's avatar
licc committed
38 39
    /**
     * 通过userId获取账户信息
40
     *
licc's avatar
licc committed
41 42 43
     * @param userId 用户id
     * @return 账户信息
     */
licc's avatar
licc committed
44 45
    AccountInfo getByUserId(@Param("userId") String userId);

46 47 48 49 50 51 52 53
    /**
     * 通过userId 和 yearMonth获取账户信息
     *
     * @param userId    用户id
     * @param yearMonth 年月
     * @return 账户信息
     */
    AccountInfo getByUserIdAndTime(@Param("userId") String userId, @Param("yearMonth") String yearMonth);
licc's avatar
licc committed
54
}