AccountMapper.java 1.26 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 10
/**
 * @author 86187
 */
licc's avatar
licc committed
11
public interface AccountMapper extends BaseMapper<AccountInfo> {
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28

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

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

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

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

45 46 47 48 49 50 51 52
    /**
     * 通过userId 和 yearMonth获取账户信息
     *
     * @param userId    用户id
     * @param yearMonth 年月
     * @return 账户信息
     */
    AccountInfo getByUserIdAndTime(@Param("userId") String userId, @Param("yearMonth") String yearMonth);
53 54 55 56 57 58 59

    /**
     * 修改用户的当月收益个累计收益
     * @param accountInfo
     * @return
     */
    int updateEarningsMonthAndEarningsTotalByid(AccountInfo accountInfo);
licc's avatar
licc committed
60
}