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

Commit 2126ecd9 authored by 胡佳晨's avatar 胡佳晨

艺人排序

parent 1945b457
......@@ -91,89 +91,92 @@ public class SweetAppletController {
@RequestParam(required = false) Integer page,
@RequestParam(required = false) Integer size,
@RequestParam String uid) {
try {
List<SweetManualArtistListDto> allReturnArtist = ObjectUtil.getSweetManualArtistListDtoList();
List<SweetManualArtistListDto> returnArtist = ObjectUtil.getSweetManualArtistListDtoList();
List<SweetManualArtistListDto> allReturnArtist = ObjectUtil.getSweetManualArtistListDtoList();
List<SweetManualArtistListDto> returnArtist = ObjectUtil.getSweetManualArtistListDtoList();
SweetManualArtistList2Dto data = redisDataUtils.getTimeList(manualId);
SweetArtistsRelationVo relationData = redisDataUtils.getArtistsRelationRedisVo(uid, manualId);
SweetManualArtistList2Dto data = redisDataUtils.getTimeList(manualId);
SweetArtistsRelationVo relationData = redisDataUtils.getArtistsRelationRedisVo(uid, manualId);
List<SweetManualArtistListDto> artistData = data.getData();
List<SweetManualArtistListDto> artistData = data.getData();
int startPosition = 0;
int endPosition = 0;
if (page != null) {
startPosition = (page - 1) * size;
endPosition = (page) * size;
}
int startPosition = 0;
int endPosition = 0;
if (page != null) {
startPosition = (page - 1) * size;
endPosition = (page) * size;
}
if (page == null && dateTime == null) {
try {
dateTime = data.getDate().get(0);
} catch (Exception e) {
if (page == null && dateTime == null) {
try {
dateTime = data.getDate().get(0);
} catch (Exception e) {
}
}
}
for (SweetManualArtistListDto item : artistData) {
boolean isSave = true;
if (isSign == 1) {
if (item.getSignatureStart() == null) {
//不保留
isSave = false;
for (SweetManualArtistListDto item : artistData) {
boolean isSave = true;
if (isSign == 1) {
if (item.getSignatureStart() == null) {
//不保留
isSave = false;
}
}
}
if (dateTime != null) {
if (!item.getPerformanceStart().contains(dateTime)) {
//不保留
isSave = false;
if (dateTime != null) {
if (!item.getPerformanceStart().contains(dateTime)) {
//不保留
isSave = false;
}
}
}
if (stage != null) {
if (!item.getTitle().equalsIgnoreCase(stage)) {
//保留
isSave = false;
if (stage != null) {
if (!item.getTitle().equalsIgnoreCase(stage)) {
//保留
isSave = false;
}
}
}
if (isSave) {
allReturnArtist.add(item);
if (isSave) {
allReturnArtist.add(item);
}
}
}
for (int i = 0; i < allReturnArtist.size(); i++) {
SweetManualArtistListDto item = allReturnArtist.get(i);
if (page != null && i >= startPosition && i < endPosition) {
for (int i = 0; i < allReturnArtist.size(); i++) {
SweetManualArtistListDto item = allReturnArtist.get(i);
if (page != null && i >= startPosition && i < endPosition) {
item.setIsWatch(0);
item.setIsSign(0);
item.setIsWatch(0);
item.setIsSign(0);
if (relationData.getWatchList() != null) {
for (String artistsId : relationData.getWatchList()) {
if (artistsId.equalsIgnoreCase(item.getArtistId())) {
item.setIsWatch(1);
break;
if (relationData.getWatchList() != null) {
for (String artistsId : relationData.getWatchList()) {
if (artistsId.equalsIgnoreCase(item.getArtistId())) {
item.setIsWatch(1);
break;
}
}
}
}
if (relationData.getSignList() != null) {
for (String artistsId : relationData.getSignList()) {
if (artistsId.equalsIgnoreCase(item.getArtistId())) {
item.setIsSign(1);
break;
if (relationData.getSignList() != null) {
for (String artistsId : relationData.getSignList()) {
if (artistsId.equalsIgnoreCase(item.getArtistId())) {
item.setIsSign(1);
break;
}
}
}
}
returnArtist.add(item);
returnArtist.add(item);
}
}
}
data.setData(returnArtist);
data.setTotal(allReturnArtist.size());
return ResponseDto.success(data);
data.setData(returnArtist);
data.setTotal(allReturnArtist.size());
return ResponseDto.success(data);
} catch (Exception e) {
return ResponseDto.failure();
}
}
@GetMapping("richText")
......@@ -353,7 +356,7 @@ public class SweetAppletController {
if (mobile == null || mobile.isEmpty()) {
return ResponseDto.failure();
}
SweetPrizeVo vo = redisDataUtils.changeLuckDrawStatus(mobile,unionId, luckDrawNum);
SweetPrizeVo vo = redisDataUtils.changeLuckDrawStatus(mobile, unionId, luckDrawNum);
return ResponseDto.success(vo);
}
}
......@@ -91,89 +91,92 @@ public class SweetAppletMdskController {
@RequestParam(required = false) Integer page,
@RequestParam(required = false) Integer size,
@RequestParam String uid) {
try {
List<SweetManualArtistListMDSKDto> allReturnArtist = ObjectUtil.getSweetManualArtistListMDSKDtoList();
List<SweetManualArtistListMDSKDto> returnArtist = ObjectUtil.getSweetManualArtistListMDSKDtoList();
List<SweetManualArtistListMDSKDto> allReturnArtist = ObjectUtil.getSweetManualArtistListMDSKDtoList();
List<SweetManualArtistListMDSKDto> returnArtist = ObjectUtil.getSweetManualArtistListMDSKDtoList();
SweetManualArtistList2MDSKDto data = redisDataUtils.getTimeList(manualId);
SweetArtistsRelationVo relationData = redisDataUtils.getArtistsRelationRedisVo(uid, manualId);
SweetManualArtistList2MDSKDto data = redisDataUtils.getTimeList(manualId);
SweetArtistsRelationVo relationData = redisDataUtils.getArtistsRelationRedisVo(uid, manualId);
List<SweetManualArtistListMDSKDto> artistData = data.getData();
List<SweetManualArtistListMDSKDto> artistData = data.getData();
int startPosition = 0;
int endPosition = 0;
if (page != null) {
startPosition = (page - 1) * size;
endPosition = (page) * size;
}
int startPosition = 0;
int endPosition = 0;
if (page != null) {
startPosition = (page - 1) * size;
endPosition = (page) * size;
}
if (page == null && dateTime == null) {
try {
dateTime = data.getDate().get(0);
} catch (Exception e) {
if (page == null && dateTime == null) {
try {
dateTime = data.getDate().get(0);
} catch (Exception e) {
}
}
}
for (SweetManualArtistListMDSKDto item : artistData) {
boolean isSave = true;
if (isSign == 1) {
if (item.getSignatureStart() == null) {
//不保留
isSave = false;
for (SweetManualArtistListMDSKDto item : artistData) {
boolean isSave = true;
if (isSign == 1) {
if (item.getSignatureStart() == null) {
//不保留
isSave = false;
}
}
}
if (dateTime != null) {
if (!item.getPerformanceStart().contains(dateTime)) {
//不保留
isSave = false;
if (dateTime != null) {
if (!item.getPerformanceStart().contains(dateTime)) {
//不保留
isSave = false;
}
}
}
if (stage != null) {
if (!item.getTitle().equalsIgnoreCase(stage)) {
//保留
isSave = false;
if (stage != null) {
if (!item.getTitle().equalsIgnoreCase(stage)) {
//保留
isSave = false;
}
}
}
if (isSave) {
allReturnArtist.add(item);
if (isSave) {
allReturnArtist.add(item);
}
}
}
for (int i = 0; i < allReturnArtist.size(); i++) {
SweetManualArtistListMDSKDto item = allReturnArtist.get(i);
if (page != null && i >= startPosition && i < endPosition) {
for (int i = 0; i < allReturnArtist.size(); i++) {
SweetManualArtistListMDSKDto item = allReturnArtist.get(i);
if (page != null && i >= startPosition && i < endPosition) {
item.setIsWatch(0);
item.setIsSign(0);
item.setIsWatch(0);
item.setIsSign(0);
if (relationData.getWatchList() != null) {
for (String artistsId : relationData.getWatchList()) {
if (artistsId.equalsIgnoreCase(item.getArtistId())) {
item.setIsWatch(1);
break;
if (relationData.getWatchList() != null) {
for (String artistsId : relationData.getWatchList()) {
if (artistsId.equalsIgnoreCase(item.getArtistId())) {
item.setIsWatch(1);
break;
}
}
}
}
if (relationData.getSignList() != null) {
for (String artistsId : relationData.getSignList()) {
if (artistsId.equalsIgnoreCase(item.getArtistId())) {
item.setIsSign(1);
break;
if (relationData.getSignList() != null) {
for (String artistsId : relationData.getSignList()) {
if (artistsId.equalsIgnoreCase(item.getArtistId())) {
item.setIsSign(1);
break;
}
}
}
}
returnArtist.add(item);
returnArtist.add(item);
}
}
}
data.setData(returnArtist);
data.setTotal(allReturnArtist.size());
return ResponseDto.success(data);
data.setData(returnArtist);
data.setTotal(allReturnArtist.size());
return ResponseDto.success(data);
} catch (Exception e) {
return ResponseDto.failure();
}
}
@GetMapping("richText")
......
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