一键发券
This commit is contained in:
parent
60ccc78c46
commit
f325084e07
@ -178,8 +178,8 @@ public class CardGiftServiceImpl extends ServiceImpl<CardGiftMapper, CardGift> i
|
||||
//会员信息
|
||||
// LJUserVo ljUserVo = ljUserMapper.selectUserById(userId);
|
||||
// UserBalance userBalance = userBalanceService.selectUserBalance(userId,ljUserVo.getChainStoreId());
|
||||
MtStore store = storeService.getById(cardGift.getStoreId());
|
||||
UserBalance userBalance = userBalanceService.selectUserBalance(userId,store.getChainStoreId());
|
||||
//MtStore store = storeService.getById(cardGift.getStoreId());
|
||||
UserBalance userBalance = userBalanceService.selectUserBalance(userId,TokenUtil.getNowAccountInfo().getChainStoreId());
|
||||
Double cardBalance = userBalance.getCardBalance();
|
||||
BigDecimal bigDecimal = BigDecimal.valueOf(cardAmount);
|
||||
BigDecimal bigDecimal1 = BigDecimal.valueOf(cardBalance);
|
||||
|
@ -48,6 +48,22 @@ public class LJUserController extends BaseController {
|
||||
return getSuccessResult(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询不活跃会员信息
|
||||
* @param user
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/getUserList")
|
||||
public ResponseObject getUserList(LJUserVo user,
|
||||
@RequestParam(value = "page",defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(value = "pageSize",defaultValue = "10") Integer pageSize){
|
||||
Page page =new Page(pageNo,pageSize);
|
||||
IPage<LJUserVo> list = userService.getUserList(page,user);
|
||||
return getSuccessResult(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取当前登录用户信息
|
||||
* @return
|
||||
|
@ -6,7 +6,6 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.fuint.business.userManager.entity.LJUser;
|
||||
import com.fuint.business.userManager.vo.LJUserVo;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@ -20,6 +19,7 @@ public interface LJUserMapper extends BaseMapper<LJUser> {
|
||||
* @return
|
||||
*/
|
||||
public IPage<LJUserVo> selectUserList(Page page, @Param("user") LJUserVo user);
|
||||
public IPage<LJUserVo> getUserList(Page page, @Param("user") LJUserVo user);
|
||||
|
||||
/**
|
||||
* 根据店铺id查询所有会员信息
|
||||
|
@ -5,8 +5,8 @@
|
||||
select mu.*,mub.grade_id,mub.card_balance,mub.points,mub.consume_num,mub.growth_value,mub.refuel_money,
|
||||
mub.second_card,mub.fixing_level,
|
||||
mi.storeId,mi.staffId,mi.inviterId,mub.chain_store_id from mt_user mu
|
||||
inner join mt_user_balance mub on mu.id = mub.mt_user_id
|
||||
inner join mt_invitation mi on mu.id = mi.userId
|
||||
inner join mt_user_balance mub on mu.id = mub.mt_user_id
|
||||
inner join mt_invitation mi on mu.id = mi.userId
|
||||
</sql>
|
||||
<sql id="selectUserAndBalance">
|
||||
select mu.*,mub.grade_id,mub.card_balance,mub.points,mub.consume_num,mub.growth_value,mub.refuel_money,
|
||||
@ -15,9 +15,23 @@
|
||||
LEFT JOIN mt_user_balance mub ON mu.id = mub.mt_user_id
|
||||
</sql>
|
||||
|
||||
<select id="selectUserList" resultType="com.fuint.business.userManager.vo.LJUserVo">
|
||||
<include refid="selectUserAndBalance"></include>
|
||||
<select id="getUserList" resultType="com.fuint.business.userManager.vo.LJUserVo">
|
||||
SELECT
|
||||
mu.*,
|
||||
mub.grade_id,
|
||||
mub.card_balance,
|
||||
mub.points,
|
||||
mub.consume_num,
|
||||
mub.growth_value,
|
||||
mub.refuel_money,
|
||||
mub.second_card,
|
||||
mub.fixing_level
|
||||
FROM
|
||||
mt_user mu
|
||||
LEFT JOIN mt_user_balance mub ON mu.id = mub.mt_user_id
|
||||
left join oil_order oo on mu.id = oo.user_id
|
||||
<where>
|
||||
oo.create_time <= DATE_SUB(NOW(), INTERVAL 14 DAY)
|
||||
<if test="user.chainStoreId != null and user.chainStoreId != ''">
|
||||
and mub.chain_store_id = #{user.chainStoreId}
|
||||
</if>
|
||||
@ -52,15 +66,51 @@
|
||||
and date_format(mu.create_time,'%y%m%d') <= date_format(#{user.params.endTime},'%y%m%d')
|
||||
</if>
|
||||
</where>
|
||||
GROUP BY mu.id
|
||||
ORDER BY oo.create_time desc
|
||||
</select>
|
||||
<!-- 查询会员统计信息-->
|
||||
|
||||
<select id="selectUserList" resultType="com.fuint.business.userManager.vo.LJUserVo">
|
||||
<include refid="selectUserAndBalance"></include>
|
||||
<where>
|
||||
<if test="user.chainStoreId != null and user.chainStoreId != ''">
|
||||
and mub.chain_store_id = #{user.chainStoreId}
|
||||
</if>
|
||||
<if test="user.storeId != null and user.storeId != ''">
|
||||
and mub.store_id = #{user.storeId}
|
||||
</if>
|
||||
<if test="user.mobile != null and user.mobile != ''">
|
||||
and mu.mobile like concat('%', #{user.mobile}, '%')
|
||||
</if>
|
||||
<if test="user.userNo != null and user.userNo != ''">
|
||||
and mu.user_no like concat('%', #{user.userNo}, '%')
|
||||
</if>
|
||||
<if test="user.name != null and user.name != ''">
|
||||
and mu.name like concat('%', #{user.name}, '%')
|
||||
</if>
|
||||
<if test="user.gradeId != null and user.gradeId != ''">
|
||||
and mub.grade_id = #{user.gradeId}
|
||||
</if>
|
||||
<if test="user.official != null and user.official != ''">
|
||||
and mu.official = #{user.official}
|
||||
</if>
|
||||
<if test="user.cardBalance != null and user.cardBalance != '' and user.cardBalance == 2">
|
||||
and mub.card_balance = 0
|
||||
</if>
|
||||
<if test="user.cardBalance != null and user.cardBalance != '' and user.cardBalance == 1">
|
||||
and mub.card_balance != 0
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<!-- 查询会员统计信息-->
|
||||
<select id="selectSumByStore" resultType="java.lang.Double" parameterType="int">
|
||||
select sum(${sumValue}) from mt_user_balance
|
||||
<where>
|
||||
chain_store_id = #{chainStoreId}
|
||||
</where>
|
||||
</select>
|
||||
<!-- 根据手机号查询会员信息-->
|
||||
<!-- 根据手机号查询会员信息-->
|
||||
<select id="selectUserByMobile" resultType="com.fuint.business.userManager.vo.LJUserVo"
|
||||
parameterType="java.lang.String">
|
||||
<include refid="selectUserAndBalance"></include>
|
||||
@ -81,8 +131,8 @@
|
||||
|
||||
<select id="selectUserByMobileAndChantStoreId" resultType="com.fuint.business.userManager.vo.LJUserVo">
|
||||
select mu.*,mub.grade_id,mub.card_balance,mub.points,mub.consume_num,mub.growth_value,mub.refuel_money,
|
||||
mub.second_card,mub.fixing_level,mub.chain_store_id from mt_user mu
|
||||
inner join mt_user_balance mub on mu.id = mub.mt_user_id
|
||||
mub.second_card,mub.fixing_level,mub.chain_store_id from mt_user mu
|
||||
inner join mt_user_balance mub on mu.id = mub.mt_user_id
|
||||
<where>
|
||||
mu.mobile = #{mobile} and
|
||||
mub.chain_store_id = #{chainStoreId}
|
||||
@ -105,9 +155,9 @@
|
||||
mub.growth_value growthValue,
|
||||
mub.refuel_money refuelMoney
|
||||
from mt_user mu
|
||||
left join mt_user_balance mub on mu.id = mub.mt_user_id
|
||||
left join mt_user_balance mub on mu.id = mub.mt_user_id
|
||||
where mu.id = #{userId}
|
||||
limit 1
|
||||
limit 1
|
||||
</select>
|
||||
|
||||
<select id="selectAllInfoById2" resultType="com.fuint.business.userManager.vo.LJUserVo">
|
||||
@ -132,9 +182,9 @@
|
||||
mub.growth_value growthValue,
|
||||
mub.refuel_money refuelMoney
|
||||
from mt_user mu
|
||||
left join mt_user_balance mub on mu.id = mub.mt_user_id
|
||||
left join mt_user_balance mub on mu.id = mub.mt_user_id
|
||||
where mu.id = #{userId}
|
||||
and mub.chain_store_id = #{chainStoreId}
|
||||
and mub.chain_store_id = #{chainStoreId}
|
||||
limit 1
|
||||
</select>
|
||||
|
||||
|
@ -5,7 +5,6 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.fuint.business.userManager.entity.LJUser;
|
||||
import com.fuint.business.userManager.vo.LJUserVo;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@ -19,6 +18,7 @@ public interface LJUserService extends IService<LJUser> {
|
||||
* @return
|
||||
*/
|
||||
public IPage<LJUserVo> selectUserList(Page page, LJUserVo user);
|
||||
public IPage<LJUserVo> getUserList(Page page, LJUserVo user);
|
||||
|
||||
Integer userNum(Integer storeId);
|
||||
|
||||
|
@ -10,7 +10,6 @@ import com.fuint.business.marketingActivity.cardValueChildrens.service.CardValud
|
||||
import com.fuint.business.storeInformation.entity.LJStore;
|
||||
import com.fuint.business.storeInformation.service.ILJStoreService;
|
||||
import com.fuint.business.userManager.entity.*;
|
||||
import com.fuint.business.userManager.mapper.CertifiedMemberMapper;
|
||||
import com.fuint.business.userManager.mapper.LJUserMapper;
|
||||
import com.fuint.business.userManager.mapper.MtInvitationMapper;
|
||||
import com.fuint.business.userManager.service.*;
|
||||
@ -21,7 +20,6 @@ import com.fuint.common.util.TokenUtil;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Lazy;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.*;
|
||||
|
||||
@ -53,6 +51,21 @@ public class LJUserServiceImpl extends ServiceImpl<LJUserMapper, LJUser> impleme
|
||||
return ljUserIPage;
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据条件分页查询会员信息
|
||||
* @param page
|
||||
* @param user
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public IPage<LJUserVo> getUserList(Page page, LJUserVo user) {
|
||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||
LJStore store = storeService.selectStoreByStoreId(nowAccountInfo.getStoreId());
|
||||
user.setChainStoreId(store.getChainStoreId());
|
||||
IPage<LJUserVo> ljUserIPage = baseMapper.getUserList(page, user);
|
||||
return ljUserIPage;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer userNum(Integer storeId) {
|
||||
// 构建查询条件
|
||||
|
Loading…
Reference in New Issue
Block a user