会员卡管理接口

This commit is contained in:
张松
2025-02-15 14:58:39 +08:00
parent 2a909f7b26
commit faa6f448c0
6 changed files with 55 additions and 4 deletions

View File

@@ -1,6 +1,7 @@
package com.czg.service.account.mapper;
import com.czg.account.dto.shopuser.ShopUserSummaryDTO;
import com.czg.account.dto.shopuser.ShopUserVipCardDTO;
import com.czg.account.entity.ShopUser;
import com.mybatisflex.core.BaseMapper;
import com.mybatisflex.core.paginate.Page;
@@ -24,4 +25,6 @@ public interface ShopUserMapper extends BaseMapper<ShopUser> {
int decrAccount(@Param("shopId") long shopId, @Param("id") Long id, @Param("time") LocalDateTime time, @Param("money") BigDecimal money);
ShopUserSummaryDTO selectUserSummary(@Param("shopId") Long shopId, @Param("isVip") Integer isVip);
Page<ShopUserVipCardDTO> selectVipCard(@Param("page") Page<Object> objectPage, @Param("userInfoId") long userInfoId);
}

View File

@@ -2,10 +2,7 @@ package com.czg.service.account.service.impl;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.date.DateUtil;
import com.czg.account.dto.shopuser.ShopUserAddDTO;
import com.czg.account.dto.shopuser.ShopUserEditDTO;
import com.czg.account.dto.shopuser.ShopUserMoneyEditDTO;
import com.czg.account.dto.shopuser.ShopUserSummaryDTO;
import com.czg.account.dto.shopuser.*;
import com.czg.account.entity.ShopUser;
import com.czg.account.entity.ShopUserFlow;
import com.czg.account.entity.UserInfo;
@@ -120,4 +117,10 @@ public class ShopUserServiceImpl extends ServiceImpl<ShopUserMapper, ShopUser>
shopUser.setJoinTime(shopUser.getIsVip() != null &&shopUser.getIsVip() == 1 ? DateUtil.date().toLocalDateTime() : null);
return save(shopUser);
}
@Override
public Page<ShopUser> vipCard(long userInfoId) {
Page<ShopUserVipCardDTO> infos = mapper.selectVipCard(PageUtil.buildPage(), userInfoId);
return null;
}
}

View File

@@ -38,4 +38,7 @@
and a.is_vip=#{isVip}
</if>
</select>
<select id="selectVipCard" resultType="com.czg.account.dto.shopuser.ShopUserVipCardDTO">
</select>
</mapper>