Browse Source

获取最近过期的专辑

zouxuan 1 week ago
parent
commit
867659a35e

+ 0 - 6
cooleshow-app/src/main/java/com/yonge/cooleshow/admin/controller/UserTenantAlbumRecordController.java

@@ -113,10 +113,4 @@ public class UserTenantAlbumRecordController extends BaseController {
 
         return R.from(userTenantAlbumRecordService.info(infoQuery));
     }
-
-    @ApiOperation(value = "获取最近一次购买记录")
-    @GetMapping("/lastRecord")
-    public R<UserTenantAlbumRecordWrapper.LastUserTenantAlbumRecord> last() {
-        return R.from(userTenantAlbumRecordService.last(sysUserService.getUserId(),null));
-    }
 }

+ 9 - 7
cooleshow-app/src/main/java/com/yonge/cooleshow/student/controller/UserTenantAlbumRecordController.java

@@ -10,6 +10,7 @@ import com.yonge.cooleshow.biz.dal.entity.Student;
 import com.yonge.cooleshow.biz.dal.entity.TenantInfo;
 import com.yonge.cooleshow.biz.dal.entity.UserTenantAlbumRecord;
 import com.yonge.cooleshow.biz.dal.service.StudentService;
+import com.yonge.cooleshow.biz.dal.service.SysUserService;
 import com.yonge.cooleshow.biz.dal.service.TenantInfoService;
 import com.yonge.cooleshow.biz.dal.service.UserTenantAlbumRecordService;
 import com.yonge.cooleshow.biz.dal.wrapper.TenantAlbumWrapper;
@@ -24,12 +25,7 @@ import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.validation.annotation.Validated;
-import org.springframework.web.bind.annotation.PathVariable;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestParam;
-import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.bind.annotation.*;
 
 import javax.annotation.Resource;
 import java.util.ArrayList;
@@ -50,7 +46,7 @@ public class UserTenantAlbumRecordController {
     private SysUserFeignService sysUserFeignService;
 
     @Autowired
-    private TenantInfoService tenantInfoService;
+    private SysUserService sysUserService;
 
     @Autowired
     private StudentService studentService;
@@ -136,4 +132,10 @@ public class UserTenantAlbumRecordController {
 
         return R.from(userTenantAlbumRecordService.removeById(id));
     }
+
+    @ApiOperation(value = "获取最近一次购买记录")
+    @GetMapping("/lastRecord")
+    public R<UserTenantAlbumRecordWrapper.LastUserTenantAlbumRecord> last() {
+        return R.from(userTenantAlbumRecordService.last(sysUserService.getUserId(),null));
+    }
 }