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

licc's avatar
licc committed
3

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

import java.util.Map;

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

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

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

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

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

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