release- 业务bug调整

release-2024-08-08
pikaqiudeshujia 7 months ago
parent 92d433c132
commit 3d99a4e2fb

@ -13,7 +13,7 @@ import lombok.Getter;
@Getter @Getter
public enum SongInfoChargeEnum { public enum SongInfoChargeEnum {
CHARGE(1, "收费"), CHARGE(1, "收费"),
FREE(2, "费"); FREE(2, "费");
private Integer code; private Integer code;

@ -4,6 +4,7 @@ import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import javax.validation.Valid;
import javax.validation.constraints.NotBlank; import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull; import javax.validation.constraints.NotNull;
import java.io.Serializable; import java.io.Serializable;
@ -53,7 +54,7 @@ public class AlbumAddDTO implements Serializable {
*/ */
@ApiModelProperty("发行日期") @ApiModelProperty("发行日期")
@NotNull(message = "发行日期不能为空") @NotNull(message = "发行日期不能为空")
@JsonFormat(pattern = "yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date publishDate; private Date publishDate;
/** /**
@ -90,6 +91,7 @@ public class AlbumAddDTO implements Serializable {
* *
*/ */
@ApiModelProperty("歌曲新增对象") @ApiModelProperty("歌曲新增对象")
@Valid
private List<AlbumSongAddDTO> songAddList; private List<AlbumSongAddDTO> songAddList;
} }

@ -64,7 +64,7 @@ public class ArtistAlbum implements Serializable {
* *
*/ */
@ApiModelProperty("发行日期") @ApiModelProperty("发行日期")
@JsonFormat(pattern = "yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date publishDate; private Date publishDate;
/** /**
@ -88,7 +88,7 @@ public class ArtistAlbum implements Serializable {
/** /**
* *
*/ */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
@CreatedDate @CreatedDate
@ApiModelProperty("创建时间") @ApiModelProperty("创建时间")
private LocalDateTime createTime; private LocalDateTime createTime;
@ -96,7 +96,7 @@ public class ArtistAlbum implements Serializable {
/** /**
* *
*/ */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
@LastModifiedDate @LastModifiedDate
@ApiModelProperty("修改时间") @ApiModelProperty("修改时间")
private LocalDateTime updateTime; private LocalDateTime updateTime;
@ -144,5 +144,8 @@ public class ArtistAlbum implements Serializable {
@ApiModelProperty("专辑状态-中文") @ApiModelProperty("专辑状态-中文")
private String stateStr; private String stateStr;
@ApiModelProperty("专辑版本")
private Integer version;
} }

@ -66,13 +66,13 @@ public class SongInfo implements Serializable {
/** /**
* *
*/ */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
@CreatedDate @CreatedDate
private LocalDateTime createTime; private LocalDateTime createTime;
/** /**
* *
*/ */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
@LastModifiedDate @LastModifiedDate
private LocalDateTime updateTime; private LocalDateTime updateTime;
/** /**

@ -1,6 +1,7 @@
package com.luoo.music.pojo; package com.luoo.music.pojo;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Getter; import lombok.Getter;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import lombok.Setter; import lombok.Setter;
@ -84,6 +85,7 @@ public class Tag implements Serializable {
* *
*/ */
@CreatedDate @CreatedDate
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private LocalDateTime createTime; private LocalDateTime createTime;
/** /**
@ -95,6 +97,7 @@ public class Tag implements Serializable {
* *
*/ */
@LastModifiedDate @LastModifiedDate
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private LocalDateTime updateTime; private LocalDateTime updateTime;
@Override @Override

@ -420,7 +420,7 @@ public class AlbumService {
*/ */
private void addSongForAlbum(@Validated AlbumSongAddDTO albumSongAddDTO, UserLoginDto user, ArtistAlbum artistAlbum) { private void addSongForAlbum(@Validated AlbumSongAddDTO albumSongAddDTO, UserLoginDto user, ArtistAlbum artistAlbum) {
if(ObjectUtils.notEqual(SongInfoChargeEnum.CHARGE.getCode(), albumSongAddDTO.getCharge())) { if(ObjectUtils.equals(SongInfoChargeEnum.CHARGE.getCode(), albumSongAddDTO.getCharge())) {
if(albumSongAddDTO.getPrice() == null) { if(albumSongAddDTO.getPrice() == null) {
// 定价不能为空 // 定价不能为空
throw new BizException(ErrorConstants.PRICE_CAN_NOT_BE_EMPTY); throw new BizException(ErrorConstants.PRICE_CAN_NOT_BE_EMPTY);

Loading…
Cancel
Save