Browse Source

Merge branch 'dev_v1.3.8_20221223'

# Conflicts:
#	cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/entity/MusicSheet.java
Eric 2 năm trước cách đây
mục cha
commit
1711f22a84

+ 1 - 19
cooleshow-user/user-admin/src/main/java/com/yonge/cooleshow/admin/controller/MusicSheetController.java

@@ -64,24 +64,6 @@ import com.yonge.toolset.utils.easyexcel.ErrMsg;
 import com.yonge.toolset.utils.easyexcel.ExcelDataReader;
 import com.yonge.toolset.utils.easyexcel.ExcelException;
 import com.yonge.toolset.utils.easyexcel.ExcelUtils;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import io.swagger.annotations.ApiParam;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.http.HttpStatus;
-import org.springframework.security.access.prepost.PreAuthorize;
-import org.springframework.web.bind.annotation.GetMapping;
-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.multipart.MultipartFile;
-
-import javax.validation.Valid;
-import java.util.Date;
-import java.util.List;
 
 /**
  * 曲谱表 web 控制层
@@ -216,7 +198,7 @@ public class MusicSheetController extends BaseController {
 
     @ApiOperation(value = "修改", httpMethod="POST", consumes="application/json", produces="application/json")
     @PostMapping(value="/updateRenderFile", consumes="application/json", produces="application/json")
-    @PreAuthorize("@pcs.hasPermissions('music/sheet/update')")
+    @PreAuthorize("@pcs.hasPermissions('music/sheet/updateRenderFile')")
     public HttpResponseResult<Object> updateRenderFile(@Valid @RequestBody MusicSheetRenderDto musicSheetRenderDto) {
         SysUser sysUser = sysUserFeignService.queryUserInfo();
         if (sysUser == null  || sysUser.getId() == null) {

+ 12 - 0
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/dto/search/MusicSheetSearch.java

@@ -15,6 +15,7 @@ import org.apache.commons.collections.CollectionUtils;
 import org.apache.commons.lang3.StringUtils;
 
 import java.util.List;
+import java.util.Optional;
 import java.util.stream.Collectors;
 
 /**
@@ -84,6 +85,9 @@ public class MusicSheetSearch  extends QueryInfo{
     @ApiModelProperty("TOP:推荐曲目 NEW:最新曲目 HOT:最热曲目")
     private MusicSortType musicSortType;
 
+    @ApiModelProperty("数据恢复")
+    private String dataRecovery;
+
     public MusicSortType getMusicSortType() {
         return musicSortType;
     }
@@ -247,4 +251,12 @@ public class MusicSheetSearch  extends QueryInfo{
     public void setActivityId(Long activityId) {
         this.activityId = activityId;
     }
+
+    public String getDataRecovery() {
+        return Optional.ofNullable(dataRecovery).filter(StringUtils::isNotBlank).orElse(null);
+    }
+
+    public void setDataRecovery(String dataRecovery) {
+        this.dataRecovery = dataRecovery;
+    }
 }

+ 3 - 0
cooleshow-user/user-biz/src/main/resources/config/mybatis/MusicSheetMapper.xml

@@ -105,6 +105,9 @@
             <if test="param.auditVersion != null ">
                 and #{param.auditVersion} = t.audit_version_
             </if>
+            <if test="param.dataRecovery != null">
+                AND (t.music_img_ = '' OR t.music_img_ IS NULL OR t.first_tone_ = '' OR t.first_tone_ IS NULL OR t.fixed_tone_ = '' OR t.fixed_tone_ IS NULL)
+            </if>
         </where>
         order by
         <if test="param.myself == null or param.myself == false ">