parent
58ff2e7eb1
commit
c9eba804ab
@ -0,0 +1,18 @@
|
||||
package cn.teammodel.model.entity.school;
|
||||
|
||||
import cn.teammodel.model.entity.BaseItem;
|
||||
import com.azure.spring.data.cosmos.core.mapping.Container;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 学校试卷
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Container(containerName = "School")
|
||||
@Data
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
public class PaperSchool extends BaseItem {
|
||||
|
||||
}
|
@ -0,0 +1,19 @@
|
||||
package cn.teammodel.model.entity.school;
|
||||
|
||||
import cn.teammodel.model.entity.BaseItem;
|
||||
import com.azure.spring.data.cosmos.core.mapping.Container;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 教师试卷
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Container(containerName = "Teacher")
|
||||
@Data
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
public class PaperTeacher extends BaseItem {
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,13 @@
|
||||
package cn.teammodel.repository;
|
||||
|
||||
import cn.teammodel.model.entity.school.PaperSchool;
|
||||
import com.azure.spring.data.cosmos.repository.CosmosRepository;
|
||||
import com.azure.spring.data.cosmos.repository.Query;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
|
||||
@Repository
|
||||
public interface PaperSchoolRepository extends CosmosRepository<PaperSchool, String> {
|
||||
@Query("select value count(1) from c where c.pk='Paper' and c.code= @code")
|
||||
int getPaperCount(String code);
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
package cn.teammodel.repository;
|
||||
|
||||
import cn.teammodel.model.entity.school.PaperTeacher;
|
||||
import com.azure.spring.data.cosmos.repository.CosmosRepository;
|
||||
import com.azure.spring.data.cosmos.repository.Query;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Repository
|
||||
public interface PaperTeacherRepository extends CosmosRepository<PaperTeacher,String>{
|
||||
@Query("select value count(1) from c where c.pk='Paper' and c.code=@code")
|
||||
int getPaperCount(String code);
|
||||
}
|
Loading…
Reference in new issue