|
|
|
@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
|
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
|
|
|
import com.zh.project0512.annotation.AdminCheckAuthorityAnnotation;
|
|
|
|
|
import com.zh.project0512.annotation.AdminTokenValid;
|
|
|
|
|
import com.zh.project0512.model.*;
|
|
|
|
|
import com.zh.project0512.service.IReferenceBrandService;
|
|
|
|
@ -73,6 +74,7 @@ public class ReferenceController {
|
|
|
|
|
@Operation(summary = "添加素材",description = "可根据文件不同同时上传多个素材")
|
|
|
|
|
@PostMapping("/add")
|
|
|
|
|
@AdminTokenValid
|
|
|
|
|
@AdminCheckAuthorityAnnotation(jurisdictionId = "7")
|
|
|
|
|
public Result add(@Validated @RequestBody AddRParam param) {
|
|
|
|
|
List<String> list = param.getFileUrlList();
|
|
|
|
|
List<Reference> l = new ArrayList<>();
|
|
|
|
@ -208,6 +210,7 @@ public class ReferenceController {
|
|
|
|
|
@Operation(summary = "素材删除品牌")
|
|
|
|
|
@PostMapping("/delBrand")
|
|
|
|
|
@AdminTokenValid
|
|
|
|
|
@AdminCheckAuthorityAnnotation(jurisdictionId = "9")
|
|
|
|
|
public Result delBrand(@Validated @RequestBody DelBrandParam param) {
|
|
|
|
|
return MybatisPlusUtil.sqlResult(referenceBrandService.remove(Wrappers.<ReferenceBrand>query().lambda().eq(ReferenceBrand::getReferenceId, param.getId()).eq(ReferenceBrand::getBrandId, param.getBrandId())), "删除");
|
|
|
|
|
}
|
|
|
|
@ -229,6 +232,7 @@ public class ReferenceController {
|
|
|
|
|
@Operation(summary = "更新素材")
|
|
|
|
|
@PostMapping("/upd")
|
|
|
|
|
@AdminTokenValid
|
|
|
|
|
@AdminCheckAuthorityAnnotation(jurisdictionId = "8")
|
|
|
|
|
public Result upd(@Validated @RequestBody UpdRParam param) {
|
|
|
|
|
int id = param.getId();
|
|
|
|
|
Reference reference = new Reference().setTitle(param.getTitle()).setFileUrl(param.getFileUrl()).setCoverUrl(param.getCoverUrl()).setUpdateAt(LocalDateTime.now());
|
|
|
|
|