parent
0e38d74d08
commit
2e6d04aeff
@ -1,10 +1,15 @@
|
|||||||
package cn.teammodel.controller.admin.service;
|
package cn.teammodel.controller.admin.service;
|
||||||
|
|
||||||
|
import cn.teammodel.model.dto.admin.common.CommentDto;
|
||||||
import cn.teammodel.model.dto.admin.common.GCDto;
|
import cn.teammodel.model.dto.admin.common.GCDto;
|
||||||
|
import cn.teammodel.model.entity.common.Comment;
|
||||||
import cn.teammodel.model.vo.admin.GradeAndClassVo;
|
import cn.teammodel.model.vo.admin.GradeAndClassVo;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
public interface CommonService {
|
public interface CommonService {
|
||||||
List<GradeAndClassVo> getGradeAndClass(GCDto gcDto);
|
List<GradeAndClassVo> getGradeAndClass(GCDto gcDto);
|
||||||
|
Comment saveOrUpdateComment(Comment comment);
|
||||||
|
List<String> deleteComment(CommentDto comment);
|
||||||
|
List<Comment> getCommentById(Comment comment);
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,19 @@
|
|||||||
|
package cn.teammodel.repository;
|
||||||
|
|
||||||
|
import cn.teammodel.model.entity.common.Comment;
|
||||||
|
import cn.teammodel.model.entity.school.School;
|
||||||
|
import com.azure.cosmos.models.CosmosPatchOperations;
|
||||||
|
import com.azure.cosmos.models.PartitionKey;
|
||||||
|
import com.azure.spring.data.cosmos.repository.CosmosRepository;
|
||||||
|
import com.azure.spring.data.cosmos.repository.Query;
|
||||||
|
import org.springframework.data.repository.query.Param;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Repository
|
||||||
|
public interface CommentRepository extends CosmosRepository<Comment, String> {
|
||||||
|
@Query("select * from Comment as s where s.id = @id and s.pk = 'Comment' and s.school = @school ")
|
||||||
|
List<Comment> findById(@Param("id") String id, @Param("school") String school);
|
||||||
|
|
||||||
|
}
|
Loading…
Reference in new issue