记得上下班打卡 | git大法好,push需谨慎

Commit cc85e1b6 authored by 胡佳晨's avatar 胡佳晨

sweet

parent b74558bb
......@@ -66,25 +66,41 @@ public class SweetAppletController {
@ApiImplicitParam(type = "query", dataType = "String", name = "dateTime", value = "时间 全部传 \"\"", required = true),
@ApiImplicitParam(type = "query", dataType = "String", name = "stage", value = "舞台 全部传 \"\"", required = true),
@ApiImplicitParam(type = "query", dataType = "Integer", name = "isSign", value = "是否签名(1是0否)", required = true),
@ApiImplicitParam(type = "query", dataType = "Integer", name = "page", value = "页数", required = true),
@ApiImplicitParam(type = "query", dataType = "Integer", name = "size", value = "数量", required = true),
@ApiImplicitParam(type = "query", dataType = "Integer", name = "page", value = "页数", required = false),
@ApiImplicitParam(type = "query", dataType = "Integer", name = "size", value = "数量", required = false),
@ApiImplicitParam(type = "query", dataType = "String", name = "uid", value = "用户id", required = true),
})
public ResponseDto<SweetManualArtistList2Dto> timeList(@RequestParam() String manualId,
@RequestParam() String dateTime,
@RequestParam() String stage,
@RequestParam() Integer isSign,
@RequestParam() Integer page,
@RequestParam() Integer size,
@RequestParam() String uid) {
int startPosition = (page - 1) * size;
int endPosition = (page) * size;
public ResponseDto<SweetManualArtistList2Dto> timeList(@RequestParam String manualId,
@RequestParam String dateTime,
@RequestParam String stage,
@RequestParam Integer isSign,
@RequestParam Integer page,
@RequestParam Integer size,
@RequestParam String uid) {
List<SweetManualArtistListDto> allReturnArtist = new ArrayList();
List<SweetManualArtistListDto> returnArtist = new ArrayList();
SweetManualArtistList2Dto data = redisDataUtils.getTimeList(manualId);
SweetArtistsRelationVo relationData = redisDataUtils.getArtistsRelationRedisVo(uid);
List<SweetManualArtistListDto> artistData = data.getData();
List<SweetManualArtistListDto> allReturnArtist = new ArrayList();
List<SweetManualArtistListDto> returnArtist = new ArrayList();
int startPosition = 0;
int endPosition = 0;
if (page != null) {
startPosition = (page - 1) * size;
endPosition = (page) * size;
}
if (page != null && dateTime.equals("")) {
try {
dateTime = data.getDate().get(0);
} catch (Exception e) {
}
}
for (SweetManualArtistListDto item : artistData) {
boolean isSave = false;
if (isSign == 1) {
......@@ -115,7 +131,7 @@ public class SweetAppletController {
for (int i = 0; i < allReturnArtist.size(); i++) {
SweetManualArtistListDto item = allReturnArtist.get(i);
if (i >= startPosition && i < endPosition) {
if (page != null && i >= startPosition && i < endPosition) {
item.setIsWatch(0);
item.setIsSign(0);
......@@ -162,7 +178,7 @@ public class SweetAppletController {
})
public ResponseDto<Boolean> watch(@RequestParam() String uid,
@RequestParam() String artistsId) {
if(uid.equalsIgnoreCase("0")){
if (uid.equalsIgnoreCase("0")) {
return ResponseDto.failure();
}
redisDataUtils.setArtistsRelationRedisVo(uid, artistsId, "sign");
......@@ -177,7 +193,7 @@ public class SweetAppletController {
})
public ResponseDto<Boolean> sign(@RequestParam() String uid,
@RequestParam() String artistsId) {
if(uid.equalsIgnoreCase("0")){
if (uid.equalsIgnoreCase("0")) {
return ResponseDto.failure();
}
redisDataUtils.setArtistsRelationRedisVo(uid, artistsId, "watch");
......@@ -199,13 +215,13 @@ public class SweetAppletController {
SweetManualShopAllVo vo = SweetManualShopAllVo.getNew();
for (SweetManualShop item : shopList) {
if(item.getIsRecommend().equals(1)){
if (item.getIsRecommend().equals(1)) {
recommend.add(item);
}
if(item.getType().equals(1)){
if (item.getType().equals(1)) {
eat.add(item);
}
if(item.getType().equals(2)){
if (item.getType().equals(2)) {
play.add(item);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment