package com.yeshi.fanli.dao.mybatis;
|
|
import java.math.BigDecimal;
|
import java.util.List;
|
|
import org.apache.ibatis.annotations.Param;
|
|
import com.yeshi.fanli.dto.ChartTDO;
|
import com.yeshi.fanli.entity.bus.user.UserInfo;
|
import com.yeshi.fanli.vo.user.UserInfoVO;
|
|
public interface UserInfoMapper {
|
|
int deleteByPrimaryKey(Long id);
|
|
int insert(UserInfo record);
|
|
int insertSelective(UserInfo record);
|
|
UserInfo selectByPrimaryKey(Long id);
|
|
/**
|
* 查询有效的
|
*
|
* @param id
|
* @return
|
*/
|
UserInfo selectAvailableByPrimaryKey(Long id);
|
|
UserInfo selectByPrimaryKeyForUpdate(Long id);
|
|
int updateByPrimaryKeySelective(UserInfo record);
|
|
int updateByPrimaryKey(UserInfo record);
|
|
// 减掉用户红包金额
|
int subHongBaoByUid(@Param("uid") long uid, @Param("money") BigDecimal money);
|
|
// 增加用户红包金额
|
int addHongBaoByUid(@Param("uid") long uid, @Param("money") BigDecimal money);
|
|
void cleanPassword(long id);
|
|
BigDecimal getNewPeopleHB(Long id);
|
|
BigDecimal getMyHB(Long id);
|
|
// 根据AppId与微信unionID获取用户
|
List<UserInfo> listByAppIdAndWXUnionId(@Param("appId") String appId, @Param("unionId") String unionId);
|
|
// 根据AppId与淘宝OpenId获取用户
|
List<UserInfo> listByAppIdAndTaoBaoOpenId(@Param("appId") String appId, @Param("openId") String openId);
|
|
// 根据AppId与电话号码获取用户
|
List<UserInfo> listByAppIdAndPhone(@Param("appId") String appId, @Param("phone") String phone);
|
|
// 根据获取电话号码有效用户
|
UserInfo getEffectiveUserInfoByPhone(@Param("phone") String phone);
|
|
// 根据获WXUnionId有效用户
|
UserInfo getEffectiveUserInfoByWXUnionId(@Param("unionId") String unionId);
|
|
//根据微信openid查询
|
UserInfo getEffectiveUserInfoByWXOpenId(@Param("wxOpenId") String wxOpenId);
|
|
Long getMaxUid();
|
|
/**
|
* 融合账号
|
*
|
* @param mainUid-主账号
|
* @param lessUid-副账号
|
*/
|
void connectUser(@Param("mainUid") Long mainUid, @Param("lessUid") Long lessUid);
|
|
/**
|
*
|
* @param start
|
* @param count
|
* @param key
|
* 查询条件
|
* @param userType
|
* 用户类型
|
* @param days
|
* 天数
|
* @param startTime
|
* 注册时间 -小
|
* @param endTime
|
* 注册时间 -大
|
* @param orderMode
|
* 排序方式
|
* @return
|
*/
|
List<UserInfoVO> query(@Param("start") long start, @Param("count") int count, @Param("userState") Integer userState,
|
@Param("key") String key, @Param("keyType") Integer keyType, @Param("userRank") String userRank,
|
@Param("days") Integer days, @Param("startTime") String startTime, @Param("endTime") String endTime,
|
@Param("orderField") Integer orderField, @Param("orderMode") Integer orderMode,@Param("userType") Integer userType);
|
|
long queryCount(@Param("userState") Integer userState, @Param("key") String key, @Param("keyType") Integer keyType,
|
@Param("userRank") String userRank, @Param("days") Integer days, @Param("startTime") String startTime,
|
@Param("endTime") String endTime,@Param("userType") Integer userType);
|
|
/**
|
* 统计当前查询结果总金额
|
*
|
* @param title
|
* @param userType
|
* @param days
|
* @param startTime
|
* @param endTime
|
* @return
|
*/
|
double querySumMoney(@Param("key") String key, @Param("userType") Integer userType, @Param("days") Integer days,
|
@Param("startTime") String startTime, @Param("endTime") String endTime);
|
|
/**
|
* 统计用户数量
|
*
|
* @param isToday
|
* 统计今日
|
* @param isMonth
|
* 统计当月 二则不可同时存在
|
* @return
|
*/
|
long countNewUser(@Param("isToday") Integer isToday, @Param("isMonth") Integer isMonth);
|
|
/**
|
* 根据等级统计用户数量
|
*
|
* @param rank
|
* @return
|
*/
|
long countRank(@Param("rank") Integer rank);
|
|
/**
|
* 统计所有用户总金额 或 可提现金额
|
*
|
* @param minMoney
|
* @return
|
*/
|
BigDecimal countAllMoney(@Param("minMoney") Double minMoney);
|
|
/**
|
* 超过 daysNum 天未登陆的用户
|
*
|
* @param minMoney
|
* @return
|
*/
|
List<Long> longTimeNoLogin(@Param("daysNum") int daysNum, @Param("list") List<Long> list);
|
|
/**
|
* 统计流失用户数量:( num 天未使用登录并且无任何资金流动的账号数量)
|
*
|
* @param num
|
* 180
|
* @return
|
*/
|
long countLoseUser(@Param("num") int num);
|
|
/**
|
* 累计有购买用户数
|
*
|
* @return
|
*/
|
long countHasOrderUser();
|
|
/**
|
* 统计新增用户
|
*
|
* @return
|
*/
|
List<ChartTDO> countNewUserByDate(@Param("channel") String channel, @Param("type") Integer type,
|
@Param("years") String years, @Param("startTime") String startTime, @Param("endTime") String endTime);
|
|
/**
|
* 统计新增用户当日产生订单用户数量
|
*
|
* @return
|
*/
|
List<ChartTDO> getTodayHasOrder(@Param("channel") String channel, @Param("type") Integer type,
|
@Param("years") String years, @Param("startTime") String startTime, @Param("endTime") String endTime);
|
|
/**
|
* 统计新增用户一周产生订单用户数量
|
*
|
* @return
|
*/
|
ChartTDO getWeekHasOrder(@Param("channel") String channel, @Param("startTime") String startTime,
|
@Param("endTime") String endTime, @Param("orderNum") Integer orderNum);
|
|
/**
|
* 根据电话号码、邀请码获取邀请用户
|
*
|
* @param phone
|
* @param inviteCode
|
* @return
|
*/
|
UserInfo getUserInfoByInviteCode(@Param("inviteCode") String inviteCode);
|
|
// 根据AppId与电话号码获取用户
|
List<UserInfo> listByClosed(@Param("appId") String appId, @Param("phone") String phone);
|
|
long countAvaiableUser();
|
|
/**
|
* 查询满足自动提现用户
|
*
|
* @param start
|
* @param count
|
* @return
|
*/
|
|
List<UserInfo> getAutoExtractUser(@Param("start") int start, @Param("count") int count,
|
@Param("money") BigDecimal money, @Param("beganDate") String beganDate, @Param("endDate") String endDate);
|
|
/**
|
* 根据type检索
|
* @param type
|
* @param start
|
* @param count
|
* @return
|
*/
|
List<UserInfo> listByType(@Param("type")int type,@Param("start") long start, @Param("count")int count);
|
|
long countByType(int type);
|
|
/**
|
* 查询满足自动提现用户
|
* @param start
|
* @param count
|
* @return
|
*/
|
List<UserInfo> getAutoExtractUserTo1212(@Param("start") int start, @Param("count") int count);
|
}
|