Explorar el Código

超级会员购买记录

zhijiezhao hace 3 años
padre
commit
52c8648dc1

+ 48 - 40
src/main/java/com/caimei365/user/controller/BaseApi.java

@@ -7,6 +7,7 @@ import com.caimei365.user.service.BaseService;
 import io.swagger.annotations.*;
 import lombok.RequiredArgsConstructor;
 import org.springframework.beans.factory.annotation.Value;
+import org.springframework.http.ResponseEntity;
 import org.springframework.web.bind.annotation.*;
 
 import java.util.Map;
@@ -17,7 +18,7 @@ import java.util.Map;
  * @author : Charles
  * @date : 2021/3/4
  */
-@Api(tags="用户公共API")
+@Api(tags = "用户公共API")
 @RestController
 @RequiredArgsConstructor
 @RequestMapping("/user")
@@ -28,8 +29,8 @@ public class BaseApi {
     private Boolean swaggerEnabled;
 
     @GetMapping("")
-    public String welcome(){
-        if (swaggerEnabled){
+    public String welcome() {
+        if (swaggerEnabled) {
             return "欢迎使用!<br><a href='http://47.119.112.46:18011/doc.html'>doc接口文档入口(beta)</a><br><a href='http://47.119.112.46:18011/swagger-ui/index.html'>swagger接口文档入口(beta)</a>";
         }
         return "欢迎使用!";
@@ -37,7 +38,7 @@ public class BaseApi {
 
     /**
      * 获取图片验证码
-     *
+     * <p>
      * spi旧接口:/user/getImgVerifyCode
      *
      * @param platformType 0:www,1:crm/h5,2:小程序
@@ -51,7 +52,7 @@ public class BaseApi {
 
     /**
      * 获取短信验证码
-     *
+     * <p>
      * spi旧接口:/user/activateCodeByReg
      *
      * @param mobile           手机号
@@ -63,12 +64,12 @@ public class BaseApi {
      */
     @ApiOperation("获取短信验证码")
     @ApiImplicitParams({
-        @ApiImplicitParam(required = true, name = "mobile", value = "手机号"),
-        @ApiImplicitParam(required = true, name = "activateCodeType", value = "1:找回密码,2:注册机构,3:供应商注册,4:更换联系人手机号-旧手机验证码,5:更换联系人手机号-新手机验证码"),
-        @ApiImplicitParam(required = false, name = "platformType", value = "0:www,1:crm/h5,2:小程序"),
-        @ApiImplicitParam(required = false, name = "isCheckCaptcha", value = "是否检查图片验证码,0:检查,1:不检查"),
-        @ApiImplicitParam(required = false, name = "imgCode", value = "图片验证码"),
-        @ApiImplicitParam(required = false, name = "token", value = "图片token")
+            @ApiImplicitParam(required = true, name = "mobile", value = "手机号"),
+            @ApiImplicitParam(required = true, name = "activateCodeType", value = "1:找回密码,2:注册机构,3:供应商注册,4:更换联系人手机号-旧手机验证码,5:更换联系人手机号-新手机验证码"),
+            @ApiImplicitParam(required = false, name = "platformType", value = "0:www,1:crm/h5,2:小程序"),
+            @ApiImplicitParam(required = false, name = "isCheckCaptcha", value = "是否检查图片验证码,0:检查,1:不检查"),
+            @ApiImplicitParam(required = false, name = "imgCode", value = "图片验证码"),
+            @ApiImplicitParam(required = false, name = "token", value = "图片token")
 
     })
     @GetMapping("/sms/code")
@@ -78,26 +79,26 @@ public class BaseApi {
 
     /**
      * 绑定账号,发送短信验证
-     *
+     * <p>
      * spi旧接口:/user/note
      *
-     * @param mobile           运营人员手机号
-     * @param bindMobile       机构手机号
-     * @param userId           机构Id
-     * @param platformType     0:www,1:crm/h5,2:小程序
-     * @param isCheckCaptcha   是否检查图片验证码,0:检查,1:不检查
-     * @param imgCode          图片验证码
-     * @param token            图片验证码token
+     * @param mobile         运营人员手机号
+     * @param bindMobile     机构手机号
+     * @param userId         机构Id
+     * @param platformType   0:www,1:crm/h5,2:小程序
+     * @param isCheckCaptcha 是否检查图片验证码,0:检查,1:不检查
+     * @param imgCode        图片验证码
+     * @param token          图片验证码token
      */
     @ApiOperation("绑定账号,发送短信验证")
     @ApiImplicitParams({
-        @ApiImplicitParam(required = true, name = "mobile", value = "运营人员手机号"),
-        @ApiImplicitParam(required = false, name = "bindMobile", value = "机构手机号"),
-        @ApiImplicitParam(required = false, name = "userId", value = "机构Id"),
-        @ApiImplicitParam(required = false, name = "platformType", value = "0:www,1:crm/h5,2:小程序"),
-        @ApiImplicitParam(required = false, name = "isCheckCaptcha", value = "是否检查图片验证码,0:检查,1:不检查"),
-        @ApiImplicitParam(required = false, name = "imgCode", value = "图片验证码"),
-        @ApiImplicitParam(required = false, name = "token", value = "图片token")
+            @ApiImplicitParam(required = true, name = "mobile", value = "运营人员手机号"),
+            @ApiImplicitParam(required = false, name = "bindMobile", value = "机构手机号"),
+            @ApiImplicitParam(required = false, name = "userId", value = "机构Id"),
+            @ApiImplicitParam(required = false, name = "platformType", value = "0:www,1:crm/h5,2:小程序"),
+            @ApiImplicitParam(required = false, name = "isCheckCaptcha", value = "是否检查图片验证码,0:检查,1:不检查"),
+            @ApiImplicitParam(required = false, name = "imgCode", value = "图片验证码"),
+            @ApiImplicitParam(required = false, name = "token", value = "图片token")
     })
     @GetMapping("/sms/bind")
     public ResponseJson getBindSmsCode(String mobile, String bindMobile, Integer userId, Integer platformType, Integer isCheckCaptcha, String imgCode, String token) {
@@ -113,8 +114,8 @@ public class BaseApi {
      */
     @ApiOperation("获取邮箱验证码(旧:/user/mailbox)")
     @ApiImplicitParams({
-        @ApiImplicitParam(required = true, name = "email", value = "邮箱"),
-        @ApiImplicitParam(required = true, name = "status", value = "1:绑定邮箱,2邮箱注册,3邮箱找回秘密")
+            @ApiImplicitParam(required = true, name = "email", value = "邮箱"),
+            @ApiImplicitParam(required = true, name = "status", value = "1:绑定邮箱,2邮箱注册,3邮箱找回秘密")
     })
     @GetMapping("/mail/code")
     public ResponseJson sendMail(String email, Integer status) {
@@ -125,12 +126,12 @@ public class BaseApi {
      * 修改密码(找回密码)
      *
      * @param passwordDto {
-     *                           mobileOrEmail 手机号或邮箱
-     *                           smsCode       短信验证码(旧:activationCode)
-     *                           password      密码
-     *                           confirmPwd    确认密码
-     *                           status        1:手机号找回,2:邮箱找回
-     * }
+     *                    mobileOrEmail 手机号或邮箱
+     *                    smsCode       短信验证码(旧:activationCode)
+     *                    password      密码
+     *                    confirmPwd    确认密码
+     *                    status        1:手机号找回,2:邮箱找回
+     *                    }
      */
     @ApiOperation("修改密码(旧:/user/findCompanyPwd)")
     @PostMapping("/update/password")
@@ -142,12 +143,12 @@ public class BaseApi {
      * 更换联系人手机号
      *
      * @param mobileDto {
-     *                      mobile          旧手机号(contractMobile)
-     *                      smsCode         旧手机短信验证码(mobileCode)
-     *                      newMobile       新手机号(contractMobile2)
-     *                      newSmsCode      新手机短信验证码(mobileCode)
-     *                      userId          用户Id
-     * }
+     *                  mobile          旧手机号(contractMobile)
+     *                  smsCode         旧手机短信验证码(mobileCode)
+     *                  newMobile       新手机号(contractMobile2)
+     *                  newSmsCode      新手机短信验证码(mobileCode)
+     *                  userId          用户Id
+     *                  }
      */
     @ApiOperation("更换联系人手机号(旧:/club/changeMobile)")
     @PostMapping("/update/mobile")
@@ -155,4 +156,11 @@ public class BaseApi {
         return baseService.updateMobile(mobileDto);
     }
 
+    @ApiOperation("超级会员购买记录接口")
+    @GetMapping("super/history")
+    public ResponseJson findVipHistory(Integer userId,
+                                       @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
+                                       @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize) {
+        return baseService.findVipHistory(userId,pageNum,pageSize);
+    }
 }

+ 9 - 0
src/main/java/com/caimei365/user/mapper/SuperVipMapper.java

@@ -3,8 +3,10 @@ package com.caimei365.user.mapper;
 import com.caimei365.user.model.po.SuperVipPo;
 import com.caimei365.user.model.po.VipPayHistoryPo;
 import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
 
 import java.util.Date;
+import java.util.List;
 
 /**
  * @author zzj
@@ -96,4 +98,11 @@ public interface SuperVipMapper {
      * @param superVip
      */
     void updateVip(SuperVipPo superVip);
+
+    /**
+     * 查超级会员购买记录
+     * @param userId
+     * @return
+     */
+    List<VipPayHistoryPo> findVipHistory(@Param("userId") Integer userId);
 }

+ 2 - 0
src/main/java/com/caimei365/user/service/BaseService.java

@@ -90,4 +90,6 @@ public interface BaseService {
      * }
      */
     ResponseJson updateMobile(MobileDto mobileDto);
+
+    ResponseJson findVipHistory(Integer userId,Integer pageNum,Integer pageSize);
 }

+ 66 - 33
src/main/java/com/caimei365/user/service/impl/BaseServiceImpl.java

@@ -3,16 +3,21 @@ package com.caimei365.user.service.impl;
 import com.caimei365.user.components.CommonService;
 import com.caimei365.user.mapper.BaseMapper;
 import com.caimei365.user.mapper.LoginMapper;
+import com.caimei365.user.mapper.SuperVipMapper;
 import com.caimei365.user.model.ResponseJson;
 import com.caimei365.user.components.RedisService;
 import com.caimei365.user.model.dto.MobileDto;
 import com.caimei365.user.model.dto.PasswordDto;
 import com.caimei365.user.model.po.ShopPo;
+import com.caimei365.user.model.po.VipPayHistoryPo;
+import com.caimei365.user.model.vo.ClubTemporaryVo;
 import com.caimei365.user.model.vo.ShopVo;
 import com.caimei365.user.model.vo.UserLoginVo;
 import com.caimei365.user.model.vo.UserVo;
 import com.caimei365.user.service.BaseService;
 import com.caimei365.user.utils.*;
+import com.github.pagehelper.PageHelper;
+import com.github.pagehelper.PageInfo;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.lang.StringUtils;
 import org.springframework.beans.factory.annotation.Value;
@@ -20,6 +25,7 @@ import org.springframework.stereotype.Service;
 
 import javax.annotation.Resource;
 import java.util.HashMap;
+import java.util.List;
 import java.util.Map;
 
 
@@ -32,6 +38,8 @@ import java.util.Map;
 @Slf4j
 @Service
 public class BaseServiceImpl implements BaseService {
+    @Resource
+    private SuperVipMapper vipMapper;
     @Resource
     private CommonService commonService;
     @Resource
@@ -68,7 +76,7 @@ public class BaseServiceImpl implements BaseService {
             }
             result.put("baseImage", captcha.getBase64Image());
             result.put("token", captcha.getMd5Code());
-            log.info("获取图片验证码:"+captcha.getCode() + ",token:" + captcha.getMd5Code());
+            log.info("获取图片验证码:" + captcha.getCode() + ",token:" + captcha.getMd5Code());
             return ResponseJson.success(result);
         } catch (Exception e) {
             log.info(e.getMessage());
@@ -86,7 +94,7 @@ public class BaseServiceImpl implements BaseService {
      */
     @Override
     public Boolean checkCaptchaImage(String token, String imgCode, Integer platformType) {
-        if (StringUtils.isBlank(token) || StringUtils.isBlank(imgCode)){
+        if (StringUtils.isBlank(token) || StringUtils.isBlank(imgCode)) {
             return false;
         }
         String captchaKey = ImageCaptchaUtil.getCaptchaKey(token, platformType);
@@ -114,9 +122,11 @@ public class BaseServiceImpl implements BaseService {
     public ResponseJson getSmsCode(String mobile, Integer activateCodeType, Integer platformType, Integer isCheckCaptcha, String imgCode, String token) {
         // 验证手机号
         String result = ValidateUtil.validateMobile(mobile);
-        if (result != null) {return ResponseJson.error(result);}
+        if (result != null) {
+            return ResponseJson.error(result);
+        }
         // 检查图片验证码
-        if (null == isCheckCaptcha || 0 == isCheckCaptcha){
+        if (null == isCheckCaptcha || 0 == isCheckCaptcha) {
             Boolean checkFlag = checkCaptchaImage(token, imgCode, platformType);
             if (!checkFlag) {
                 return ResponseJson.error("图片验证码错误");
@@ -126,7 +136,7 @@ public class BaseServiceImpl implements BaseService {
         // 生成六位验证码
         String randomCode = CodeUtil.generateCodeInt(6);
         boolean isBeta = "dev".equals(profile) || "beta".equals(profile);
-        if (isBeta){
+        if (isBeta) {
             // 开发 和 测试环境 固定短信验证码 666666
             randomCode = "666666";
         }
@@ -140,7 +150,7 @@ public class BaseServiceImpl implements BaseService {
             // 找回密码
             sendFlag = isBeta || AliyunSmsUtil.sendSms(mobile, 1, "{code:" + randomCode + "}");
             codeTypeTxt = "找回密码";
-        } else if (2 == activateCodeType || 3 == activateCodeType){
+        } else if (2 == activateCodeType || 3 == activateCodeType) {
             if (null != userId && userId > 0) {
                 return ResponseJson.error("该手机号已被使用");
             }
@@ -150,27 +160,27 @@ public class BaseServiceImpl implements BaseService {
                 codeTypeTxt = "机构(自主)注册";
             } else if (3 == activateCodeType) {
                 // 供应商(自主)注册
-                sendFlag = isBeta || AliyunSmsUtil.sendSms(mobile, 9, "{code:"+ randomCode +"}");
+                sendFlag = isBeta || AliyunSmsUtil.sendSms(mobile, 9, "{code:" + randomCode + "}");
                 codeTypeTxt = "供应商(自主)注册";
             } else {
                 return ResponseJson.error("参数错误:activateCodeType");
             }
         } else if (4 == activateCodeType) {
             // 您正在更换联系人手机号,您的验证码为:${code}。
-            sendFlag = isBeta || AliyunSmsUtil.sendSms(mobile, 13, "{code:"+ randomCode +"}");
+            sendFlag = isBeta || AliyunSmsUtil.sendSms(mobile, 13, "{code:" + randomCode + "}");
             codeTypeTxt = "更换联系人(旧手机号验证码)";
         } else if (5 == activateCodeType) {
             if (null != userId && userId > 0) {
                 return ResponseJson.error("该手机号已被使用");
             }
             // 您正在更换联系人手机号,您的验证码为:${code}。
-            sendFlag = isBeta || AliyunSmsUtil.sendSms(mobile, 13, "{code:"+ randomCode +"}");
+            sendFlag = isBeta || AliyunSmsUtil.sendSms(mobile, 13, "{code:" + randomCode + "}");
             codeTypeTxt = "更换联系人(新手机号验证码)";
         } else {
             return ResponseJson.error("参数错误:activateCodeType");
         }
         if (sendFlag) {
-            redisService.set("code:"+mobile, randomCode, 1800L);
+            redisService.set("code:" + mobile, randomCode, 1800L);
             log.info(codeTypeTxt + ",发送到:" + mobile + "的短信验证码为: " + randomCode);
         } else {
             log.info(codeTypeTxt + ",验证码发送失败!");
@@ -193,40 +203,44 @@ public class BaseServiceImpl implements BaseService {
     public ResponseJson getBindSmsCode(String mobile, String bindMobile, Integer userId, Integer platformType, Integer isCheckCaptcha, String imgCode, String token) {
         // 验证手机号
         String result = ValidateUtil.validateMobile(mobile);
-        if (result != null) {return ResponseJson.error(result);}
+        if (result != null) {
+            return ResponseJson.error(result);
+        }
         // 检查图片验证码
-        if (null == isCheckCaptcha || 0 == isCheckCaptcha){
+        if (null == isCheckCaptcha || 0 == isCheckCaptcha) {
             Boolean checkFlag = checkCaptchaImage(token, imgCode, platformType);
             if (!checkFlag) {
                 return ResponseJson.error("图片验证码错误");
             }
         }
         Integer dbUserId = null;
-        if (StringUtils.isNotBlank(bindMobile)){
+        if (StringUtils.isNotBlank(bindMobile)) {
             result = ValidateUtil.validateMobile(bindMobile);
-            if (result != null) {return ResponseJson.error(result);}
+            if (result != null) {
+                return ResponseJson.error(result);
+            }
             // 根据手机号查询用户Id
             dbUserId = baseMapper.getUserIdByMobile(bindMobile);
-        } else if(null != userId) {
+        } else if (null != userId) {
             // 根据用户Id查询用户是否存在
             dbUserId = baseMapper.getUserIdByUserId(userId);
         }
-        if (null == dbUserId){
+        if (null == dbUserId) {
             return ResponseJson.error("你输入的账号不存在");
         }
         Integer operationUserId = baseMapper.getOperationUserIdByMobile(mobile);
-        if (null != operationUserId){
+        if (null != operationUserId) {
             // 判断运营人员是否是机构手机号
             Integer tempId = baseMapper.getUserIdByMobile(mobile);
-            if (null != tempId && tempId.equals(userId)){
+            if (null != tempId && tempId.equals(userId)) {
                 // 判断机构状态
                 Integer clubStatus = baseMapper.getClubStatusByUserId(operationUserId);
-                if(null != clubStatus && 91 != clubStatus) {
+                if (null != clubStatus && 91 != clubStatus) {
                     return ResponseJson.error("该手机号已被机构使用");
                 }
                 // 判断供应商状态
                 Integer shopStatus = baseMapper.getShopStatusByUserId(operationUserId);
-                if(null != shopStatus && 91 != shopStatus) {
+                if (null != shopStatus && 91 != shopStatus) {
                     return ResponseJson.error("该手机号已被供应商使用");
                 }
             }
@@ -234,20 +248,20 @@ public class BaseServiceImpl implements BaseService {
         // 生成六位验证码
         String randomCode = CodeUtil.generateCodeInt(6);
         boolean isBeta = "dev".equals(profile) || "beta".equals(profile);
-        if (isBeta){
+        if (isBeta) {
             // 开发 和 测试环境 固定短信验证码 666666
             randomCode = "666666";
         }
         String userName = baseMapper.getUserNameByUserId(userId);
         // 欢迎成为${name}的运营人员,您的邀请码为${code}。
-        boolean smsFlag = isBeta || AliyunSmsUtil.sendSms(mobile, 11, "{name:"+ userName +",code:"+ randomCode +"}");
+        boolean smsFlag = isBeta || AliyunSmsUtil.sendSms(mobile, 11, "{name:" + userName + ",code:" + randomCode + "}");
         if (!smsFlag) {
             // 短信发送失败重试一次
-            smsFlag = AliyunSmsUtil.sendSms(mobile, 11, "{name:\""+ userName +"\",code:"+ randomCode +"}");
+            smsFlag = AliyunSmsUtil.sendSms(mobile, 11, "{name:\"" + userName + "\",code:" + randomCode + "}");
         }
         if (smsFlag) {
-            redisService.set("code:"+mobile, randomCode, 1800L);
-            log.info( "绑定账号,发送到:" + mobile + "的短信验证码为: " + randomCode);
+            redisService.set("code:" + mobile, randomCode, 1800L);
+            log.info("绑定账号,发送到:" + mobile + "的短信验证码为: " + randomCode);
             return ResponseJson.success("发送验证码成功");
         } else {
             return ResponseJson.error("验证码发送失败!请稍后重试");
@@ -271,7 +285,7 @@ public class BaseServiceImpl implements BaseService {
             // 生成六位验证码
             String randomCode = CodeUtil.generateCodeInt(6);
             boolean isBeta = "dev".equals(profile) || "beta".equals(profile);
-            if (isBeta){
+            if (isBeta) {
                 // 开发 和 测试环境 固定短信验证码 666666
                 randomCode = "666666";
             }
@@ -295,8 +309,8 @@ public class BaseServiceImpl implements BaseService {
                 subject = "采美365网修改密码验证邮件";
             }
             EmailUtil.sendMail(email, subject, html);
-            redisService.set("code:"+email, randomCode, 1800L);
-            log.info( "subject,发送到:" + email + "的验证码为: " + randomCode);
+            redisService.set("code:" + email, randomCode, 1800L);
+            log.info("subject,发送到:" + email + "的验证码为: " + randomCode);
         } catch (Exception e) {
             return ResponseJson.error("发送验证码失败");
         }
@@ -324,7 +338,9 @@ public class BaseServiceImpl implements BaseService {
         if (status == 1) {
             // 验证手机号
             String result = ValidateUtil.validateMobile(mobileOrEmail);
-            if (result != null) {return ResponseJson.error(result);}
+            if (result != null) {
+                return ResponseJson.error(result);
+            }
         } else {
             // 验证邮箱
             if (!ValidateUtil.validateEmail(mobileOrEmail)) {
@@ -336,7 +352,7 @@ public class BaseServiceImpl implements BaseService {
         }
         String redisSmsCode = (String) redisService.get("code:" + mobileOrEmail);
         // 开发 和 测试环境 固定短信验证码 666666
-        if ("dev".equals(profile) || "beta".equals(profile)){
+        if ("dev".equals(profile) || "beta".equals(profile)) {
             redisSmsCode = (null != redisSmsCode && !"null".equals(redisSmsCode) ? redisSmsCode : "666666");
         }
         if (!smsCode.equals(redisSmsCode)) {
@@ -401,10 +417,12 @@ public class BaseServiceImpl implements BaseService {
         }
         // 旧手机号与验证码校验
         String result = ValidateUtil.validateMobile(mobileDto.getMobile());
-        if (result != null) {return ResponseJson.error(result);}
+        if (result != null) {
+            return ResponseJson.error(result);
+        }
         String smsCode = (String) redisService.get("code:" + mobileDto.getMobile());
         // 开发 和 测试环境 固定短信验证码 666666
-        if ("dev".equals(profile) || "beta".equals(profile)){
+        if ("dev".equals(profile) || "beta".equals(profile)) {
             smsCode = (null != smsCode && !"null".equals(smsCode) ? smsCode : "666666");
         }
         if (!mobileDto.getSmsCode().equals(smsCode)) {
@@ -416,7 +434,9 @@ public class BaseServiceImpl implements BaseService {
         }
         //验证新手机号是否可用
         result = commonService.mobileAndCodeValidate(mobileDto.getNewMobile(), mobileDto.getNewSmsCode());
-        if (result != null) {return ResponseJson.error(result);}
+        if (result != null) {
+            return ResponseJson.error(result);
+        }
         // 更新user表手机号
         baseMapper.updateMobileByUserId(mobileDto.getNewMobile(), mobileDto.getUserId());
         if (user.getUserIdentity() == 3) {
@@ -429,4 +449,17 @@ public class BaseServiceImpl implements BaseService {
         return ResponseJson.success();
     }
 
+    /**
+     * 根据id查超级会员购买记录
+     *
+     * @param userId
+     * @return
+     */
+    @Override
+    public ResponseJson findVipHistory(Integer userId,Integer pageNum,Integer pageSize) {
+        PageHelper.startPage(pageNum, pageSize);
+        List<VipPayHistoryPo> vipHistory = vipMapper.findVipHistory(userId);
+        PageInfo<VipPayHistoryPo> pageInfo = new PageInfo<>(vipHistory);
+        return ResponseJson.success(pageInfo);
+    }
 }

+ 15 - 0
src/main/resources/mapper/SuperVipMapper.xml

@@ -64,6 +64,7 @@
         where id = #{userPackageId}
     </select>
 
+
     <insert id="addVip">
         insert into cm_svip_user(userId, beginTime, endTime, delFlag, updateTime)
         values (#{userId}, #{beginTime}, #{endTime}, #{delFlag}, #{updateTime})
@@ -84,4 +85,18 @@
         endTime = #{endTime}
         where userId = #{userId}
     </update>
+
+    <select id="findVipHistory" resultType="com.caimei365.user.model.po.VipPayHistoryPo">
+        select packageId,
+               beginTime,
+               endTime,
+               payWay,
+               payType,
+               price,
+               userBeans,
+               payTime
+        from cm_svip_history
+        where userId = #{userId}
+        order by payTime desc
+    </select>
 </mapper>