Bläddra i källkod

删除激活BUG

小么熊🐻 2 år sedan
förälder
incheckning
a515365036

+ 3 - 3
jsjp-admin/src/main/java/com/miaxis/app/controller/gzpt/GzptUserInfoController.java

@@ -93,14 +93,14 @@ public class GzptUserInfoController extends BaseController {
     }
 
     /**
-     * 清除学员激活状态与会员信息接口(测试专用)
+     * (测试专用)清除学员激活状态与会员信息接口
      */
     @GetMapping("/clearUserVip")
-    @ApiOperation("清除学员激活状态与会员信息接口(测试专用)")
+    @ApiOperation("(测试专用)清除学员激活状态与会员信息接口")
     public Response clearUserVip(GzptVideoVipDTO gzptVideoVipDTO) throws Exception {
         GzptUserInfo gzptUserInfo = userInfoService.getInfoById(gzptVideoVipDTO.getUserId());
         //清除会员信息
-        userVipService.removeByUserId(gzptVideoVipDTO.getUserId());
+        int i = userVipService.removeByUserId(gzptVideoVipDTO.getUserId());
         //清除激活信息
         schActivationService.delSchActivationByStuId(gzptUserInfo.getOutId());
         return Response.success();

+ 1 - 1
jsjp-service/src/main/java/com/miaxis/userInfo/service/impl/UserVipServiceImpl.java

@@ -39,7 +39,7 @@ public class UserVipServiceImpl extends ServiceImpl<UserVipMapper, UserVip> impl
 
     @Override
     public int removeByUserId(Long userId) {
-        return userVipMapper.deleteById(userId);
+        return userVipMapper.removeByUserId(userId);
     }
 
 }

+ 7 - 0
jsjp-service/src/main/resources/mapper/userInfo/UserVipMapper.xml

@@ -41,6 +41,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         </where>
     </select>
 
+    <delete id="removeByUserId"  parameterType="Long">
+        delete from user_vip
+        <where>
+            and user_id = #{userId}
+        </where>
+    </delete>
+