xiatian 4 gadi atpakaļ
vecāks
revīzija
da02eacd28

+ 125 - 0
src/main/java/cn/com/qmth/dp/examcloud/oe/entity/question/CoursePropertyNumberDto.java

@@ -0,0 +1,125 @@
+package cn.com.qmth.dp.examcloud.oe.entity.question;
+
+public class CoursePropertyNumberDto {
+
+    private String id;
+
+    private String propertyParentId;
+
+    private String propertyId;
+
+    private String propertyName;
+
+    private Integer number;
+
+    private Integer publicSimple; //公开简单
+
+    private Integer publicMedium; //公开中等
+
+    private Integer publicDifficulty; //公开困难
+
+    private Integer noPublicSimple; //非公开简单
+
+    private Integer noPublicMedium; //非公开中等
+
+    private Integer noPublicDifficulty; //非公开困难
+
+    private Boolean disable; //是否显示
+
+    public String getId() {
+        return id;
+    }
+
+    public void setId(String id) {
+        this.id = id;
+    }
+
+    public String getPropertyParentId() {
+        return propertyParentId;
+    }
+
+    public void setPropertyParentId(String propertyParentId) {
+        this.propertyParentId = propertyParentId;
+    }
+
+    public String getPropertyId() {
+        return propertyId;
+    }
+
+    public void setPropertyId(String propertyId) {
+        this.propertyId = propertyId;
+    }
+
+    public String getPropertyName() {
+        return propertyName;
+    }
+
+    public void setPropertyName(String propertyName) {
+        this.propertyName = propertyName;
+    }
+
+    public Integer getNumber() {
+        return number;
+    }
+
+    public void setNumber(Integer number) {
+        this.number = number;
+    }
+
+    public Integer getPublicSimple() {
+        return publicSimple;
+    }
+
+    public void setPublicSimple(Integer publicSimple) {
+        this.publicSimple = publicSimple;
+    }
+
+    public Integer getPublicMedium() {
+        return publicMedium;
+    }
+
+    public void setPublicMedium(Integer publicMedium) {
+        this.publicMedium = publicMedium;
+    }
+
+    public Integer getPublicDifficulty() {
+        return publicDifficulty;
+    }
+
+    public void setPublicDifficulty(Integer publicDifficulty) {
+        this.publicDifficulty = publicDifficulty;
+    }
+
+    public Integer getNoPublicSimple() {
+        return noPublicSimple;
+    }
+
+    public void setNoPublicSimple(Integer noPublicSimple) {
+        this.noPublicSimple = noPublicSimple;
+    }
+
+    public Integer getNoPublicMedium() {
+        return noPublicMedium;
+    }
+
+    public void setNoPublicMedium(Integer noPublicMedium) {
+        this.noPublicMedium = noPublicMedium;
+    }
+
+    public Integer getNoPublicDifficulty() {
+        return noPublicDifficulty;
+    }
+
+    public void setNoPublicDifficulty(Integer noPublicDifficulty) {
+        this.noPublicDifficulty = noPublicDifficulty;
+    }
+
+    public Boolean getDisable() {
+        return disable;
+    }
+
+    public void setDisable(Boolean disable) {
+        this.disable = disable;
+    }
+
+}

+ 204 - 0
src/main/java/cn/com/qmth/dp/examcloud/oe/entity/question/PaperDetailStruct.java

@@ -0,0 +1,204 @@
+package cn.com.qmth.dp.examcloud.oe.entity.question;
+
+import java.util.List;
+import java.util.Map;
+
+import cn.com.qmth.dp.examcloud.oe.enums.question.QuesStructType;
+
+/**
+ * 试卷结构明细
+ * Created by songyue on 16/12/28.
+ */
+
+public class PaperDetailStruct extends IdBase {
+    private Integer number;//大题序号
+
+    private String name;//大题名称
+
+    private List<PaperDetailUnitStruct> paperDetailUnitStructs;//小题明细
+
+    private List<PaperDetailUnitStructDto> unitStructs;//题目类型统计
+
+    private Double totalScore;//大题总分
+
+    @SuppressWarnings("rawtypes")
+    private Map params;//大题参数
+
+    private String remark;
+
+    private Integer detailCount; //小题总数
+
+    /**
+     * 蓝图结构字段
+     */
+    private QuesStructType questionType; //题型
+
+    private Double score; //小题分数
+
+    private List<String> quesNames;//来源大题
+
+    private Integer publicSimpleCount; //公开简单总数
+
+    private Integer publicMediumCount; //公开中等总数
+
+    private Integer publicDifficultyCount; //公开困难总数
+
+    private Integer noPublicSimpleCount; //非公开简单总数
+
+    private Integer noPublicMediumCount; //非公开中等总数
+
+    private Integer noPublicDifficultyCount; //非公开困难总数  coursePropertyNumberDtos
+
+    private List<CoursePropertyNumberDto> coursePropertyNumberDtos;
+
+    public Integer getNumber() {
+        return number;
+    }
+
+    public void setNumber(Integer number) {
+        this.number = number;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public List<PaperDetailUnitStruct> getPaperDetailUnitStructs() {
+        return paperDetailUnitStructs;
+    }
+
+    public void setPaperDetailUnitStructs(List<PaperDetailUnitStruct> paperDetailUnitStructs) {
+        this.paperDetailUnitStructs = paperDetailUnitStructs;
+    }
+
+    public List<PaperDetailUnitStructDto> getUnitStructs() {
+        return unitStructs;
+    }
+
+    public void setUnitStructs(List<PaperDetailUnitStructDto> unitStructs) {
+        this.unitStructs = unitStructs;
+    }
+
+    public Double getTotalScore() {
+        return totalScore;
+    }
+
+    public void setTotalScore(Double totalScore) {
+        this.totalScore = totalScore;
+    }
+
+    @SuppressWarnings("rawtypes")
+    public Map getParams() {
+        return params;
+    }
+
+    @SuppressWarnings("rawtypes")
+    public void setParams(Map params) {
+        this.params = params;
+    }
+
+    public String getRemark() {
+        return remark;
+    }
+
+    public void setRemark(String remark) {
+        this.remark = remark;
+    }
+
+    public Integer getDetailCount() {
+        return detailCount;
+    }
+
+    public void setDetailCount(Integer detailCount) {
+        this.detailCount = detailCount;
+    }
+
+    public PaperDetailStruct() {
+    }
+
+    public QuesStructType getQuestionType() {
+        return questionType;
+    }
+
+    public void setQuestionType(QuesStructType questionType) {
+        this.questionType = questionType;
+    }
+
+    public Double getScore() {
+        return score;
+    }
+
+    public void setScore(Double score) {
+        this.score = score;
+    }
+
+    public List<String> getQuesNames() {
+        return quesNames;
+    }
+
+    public void setQuesNames(List<String> quesNames) {
+        this.quesNames = quesNames;
+    }
+
+    public Integer getPublicSimpleCount() {
+        return publicSimpleCount;
+    }
+
+    public void setPublicSimpleCount(Integer publicSimpleCount) {
+        this.publicSimpleCount = publicSimpleCount;
+    }
+
+    public Integer getPublicMediumCount() {
+        return publicMediumCount;
+    }
+
+    public void setPublicMediumCount(Integer publicMediumCount) {
+        this.publicMediumCount = publicMediumCount;
+    }
+
+    public Integer getPublicDifficultyCount() {
+        return publicDifficultyCount;
+    }
+
+    public void setPublicDifficultyCount(Integer publicDifficultyCount) {
+        this.publicDifficultyCount = publicDifficultyCount;
+    }
+
+    public Integer getNoPublicSimpleCount() {
+        return noPublicSimpleCount;
+    }
+
+    public void setNoPublicSimpleCount(Integer noPublicSimpleCount) {
+        this.noPublicSimpleCount = noPublicSimpleCount;
+    }
+
+    public Integer getNoPublicMediumCount() {
+        return noPublicMediumCount;
+    }
+
+    public void setNoPublicMediumCount(Integer noPublicMediumCount) {
+        this.noPublicMediumCount = noPublicMediumCount;
+    }
+
+    public Integer getNoPublicDifficultyCount() {
+        return noPublicDifficultyCount;
+    }
+
+    public void setNoPublicDifficultyCount(Integer noPublicDifficultyCount) {
+        this.noPublicDifficultyCount = noPublicDifficultyCount;
+    }
+
+    public List<CoursePropertyNumberDto> getCoursePropertyNumberDtos() {
+        return coursePropertyNumberDtos;
+    }
+
+    public void setCoursePropertyNumberDtos(
+            List<CoursePropertyNumberDto> coursePropertyNumberDtos) {
+        this.coursePropertyNumberDtos = coursePropertyNumberDtos;
+    }
+
+}

+ 114 - 0
src/main/java/cn/com/qmth/dp/examcloud/oe/entity/question/PaperDetailUnitStruct.java

@@ -0,0 +1,114 @@
+package cn.com.qmth.dp.examcloud.oe.entity.question;
+
+import java.util.List;
+
+import cn.com.qmth.dp.examcloud.oe.enums.question.QuesStructType;
+
+/**
+ * Created by songyue on 17/3/21.
+ */
+public class PaperDetailUnitStruct extends IdBase {
+
+    private Integer number;
+
+    private Double score;//小题分数
+
+    private QuesStructType questionType;//小题类型
+
+    private List<String> quesNames;//来源大题
+
+    private String propertyId; //属性名
+
+    private String difficulty; //难度
+
+    private Boolean publicity; //公开度
+
+    private String propertyGroup; //单个属性组(用来筛选题目)
+
+    public PaperDetailUnitStruct() {
+
+    }
+
+    public PaperDetailUnitStruct(PaperDetailStruct paperDetailStruct, int number, CoursePropertyNumberDto coursePropertyNumberDto) {
+        this.setScore(paperDetailStruct.getScore());
+        this.setId(String.valueOf(number));
+        this.setNumber(number);
+        this.setQuestionType(paperDetailStruct.getQuestionType());
+        this.setQuesNames(paperDetailStruct.getQuesNames());
+        this.setPropertyId(buildPropertyId(coursePropertyNumberDto));
+    }
+
+    private String buildPropertyId(CoursePropertyNumberDto coursePropertyNumberDto) {
+        //有一级属性和二姐属性
+        if (!Property.ROOT_PARENT_ID.equals(coursePropertyNumberDto.getPropertyParentId())) {
+            return coursePropertyNumberDto.getPropertyParentId() + "-" + coursePropertyNumberDto.getPropertyId();
+        }
+
+        return String.valueOf(coursePropertyNumberDto.getPropertyId());
+    }
+
+    public Integer getNumber() {
+        return number;
+    }
+
+    public void setNumber(Integer number) {
+        this.number = number;
+    }
+
+    public Double getScore() {
+        return score;
+    }
+
+    public void setScore(Double score) {
+        this.score = score;
+    }
+
+    public QuesStructType getQuestionType() {
+        return questionType;
+    }
+
+    public void setQuestionType(QuesStructType questionType) {
+        this.questionType = questionType;
+    }
+
+    public List<String> getQuesNames() {
+        return quesNames;
+    }
+
+    public void setQuesNames(List<String> quesNames) {
+        this.quesNames = quesNames;
+    }
+
+    public Boolean getPublicity() {
+        return publicity;
+    }
+
+    public void setPublicity(Boolean publicity) {
+        this.publicity = publicity;
+    }
+
+    public String getDifficulty() {
+        return difficulty;
+    }
+
+    public void setDifficulty(String difficulty) {
+        this.difficulty = difficulty;
+    }
+
+    public String getPropertyId() {
+        return propertyId;
+    }
+
+    public void setPropertyId(String propertyId) {
+        this.propertyId = propertyId;
+    }
+
+    public String getPropertyGroup() {
+        return propertyGroup;
+    }
+
+    public void setPropertyGroup(String propertyGroup) {
+        this.propertyGroup = propertyGroup;
+    }
+
+}

+ 139 - 0
src/main/java/cn/com/qmth/dp/examcloud/oe/entity/question/PaperDetailUnitStructDto.java

@@ -0,0 +1,139 @@
+package cn.com.qmth.dp.examcloud.oe.entity.question;
+
+import java.io.Serializable;
+import java.util.List;
+
+import cn.com.qmth.dp.examcloud.oe.enums.question.QuesStructType;
+
+/**
+ * Created by songyue on 17/3/21.
+ */
+public class PaperDetailUnitStructDto implements Serializable {
+
+    private static final long serialVersionUID = -3766822545462183904L;
+
+    private String id;
+
+    private Integer count;
+
+    private Double score;//小题分数
+
+    private Double totalScore;
+
+    private QuesStructType questionType;//小题类型
+
+    private List<String> quesNames;//来源大题
+
+    private Integer publicSimple;//公开简单数量
+
+    private Integer publicMedium;//公开中等数量
+
+    private Integer publicDifficulty;//公开困难数量
+
+    private Integer noPublicSimple;//非公开简单数量
+
+    private Integer noPublicMedium;//非公开中等数量
+
+    private Integer noPublicDifficulty;//非公开困难数量
+
+    public static long getSerialVersionUID() {
+        return serialVersionUID;
+    }
+
+    public String getId() {
+        return id;
+    }
+
+    public void setId(String id) {
+        this.id = id;
+    }
+
+    public Integer getCount() {
+        return count;
+    }
+
+    public void setCount(Integer count) {
+        this.count = count;
+    }
+
+    public Double getScore() {
+        return score;
+    }
+
+    public void setScore(Double score) {
+        this.score = score;
+    }
+
+    public Double getTotalScore() {
+        return totalScore;
+    }
+
+    public void setTotalScore(Double totalScore) {
+        this.totalScore = totalScore;
+    }
+
+    public QuesStructType getQuestionType() {
+        return questionType;
+    }
+
+    public void setQuestionType(QuesStructType questionType) {
+        this.questionType = questionType;
+    }
+
+    public List<String> getQuesNames() {
+        return quesNames;
+    }
+
+    public void setQuesNames(List<String> quesNames) {
+        this.quesNames = quesNames;
+    }
+
+    public Integer getPublicSimple() {
+        return publicSimple;
+    }
+
+    public void setPublicSimple(Integer publicSimple) {
+        this.publicSimple = publicSimple;
+    }
+
+    public Integer getPublicMedium() {
+        return publicMedium;
+    }
+
+    public void setPublicMedium(Integer publicMedium) {
+        this.publicMedium = publicMedium;
+    }
+
+    public Integer getPublicDifficulty() {
+        return publicDifficulty;
+    }
+
+    public void setPublicDifficulty(Integer publicDifficulty) {
+        this.publicDifficulty = publicDifficulty;
+    }
+
+    public Integer getNoPublicSimple() {
+        return noPublicSimple;
+    }
+
+    public void setNoPublicSimple(Integer noPublicSimple) {
+        this.noPublicSimple = noPublicSimple;
+    }
+
+    public Integer getNoPublicMedium() {
+        return noPublicMedium;
+    }
+
+    public void setNoPublicMedium(Integer noPublicMedium) {
+        this.noPublicMedium = noPublicMedium;
+    }
+
+    public Integer getNoPublicDifficulty() {
+        return noPublicDifficulty;
+    }
+
+    public void setNoPublicDifficulty(Integer noPublicDifficulty) {
+        this.noPublicDifficulty = noPublicDifficulty;
+    }
+
+}

+ 214 - 0
src/main/java/cn/com/qmth/dp/examcloud/oe/entity/question/PaperStruct.java

@@ -0,0 +1,214 @@
+package cn.com.qmth.dp.examcloud.oe.entity.question;
+
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+
+import org.springframework.data.mongodb.core.index.Indexed;
+
+import cn.com.qmth.dp.examcloud.oe.enums.question.GenPaperType;
+import cn.com.qmth.dp.examcloud.oe.enums.question.PaperStructType;
+
+/**
+ * 试卷结构 Created by songyue on 16/12/28.
+ */
+
+public class PaperStruct extends IdBase {
+
+    @Indexed(unique = true)
+    private String name;// 试卷结构名称
+
+    private Double totalScore;// 总分
+
+    private Integer detailCount;// 大题数量
+
+    private Integer detailUnitCount;//小题数量
+
+    @SuppressWarnings("rawtypes")
+    private Map params;
+
+    private List<PaperDetailStruct> paperDetailStructs;// 大题
+
+    private String creator;// 创建人id
+
+    private String createTime;// 创建时间
+
+    private String orgId;// 机构ID
+
+    private Long courseId;
+    
+    private String courseNo;
+
+    private String courseName;
+
+    /**
+     * 试卷结构类型  :  精确组卷    蓝图组卷
+     */
+    private PaperStructType paperStrucType;
+
+    private String type;
+
+    /**
+     * 组卷类型     : 精细组卷      宏观组卷
+     */
+    private GenPaperType genPaperType;
+
+    private String coursePropertyId; //课程属性id
+
+    private Double difficulty; //难度
+
+    private String examRemark;//考试说明
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public Double getTotalScore() {
+        return totalScore;
+    }
+
+    public void setTotalScore(Double totalScore) {
+        this.totalScore = totalScore;
+    }
+
+    public Integer getDetailCount() {
+        return detailCount;
+    }
+
+    public void setDetailCount(Integer detailCount) {
+        this.detailCount = detailCount;
+    }
+
+    @SuppressWarnings("rawtypes")
+    public Map getParams() {
+        return params;
+    }
+
+    @SuppressWarnings("rawtypes")
+    public void setParams(Map params) {
+        this.params = params;
+    }
+
+    public List<PaperDetailStruct> getPaperDetailStructs() {
+        return paperDetailStructs;
+    }
+
+    public void setPaperDetailStructs(List<PaperDetailStruct> paperDetailStructs) {
+        this.paperDetailStructs = paperDetailStructs;
+    }
+
+    public String getCreator() {
+        return creator;
+    }
+
+    public void setCreator(String creator) {
+        this.creator = creator;
+    }
+
+    public String getCreateTime() {
+        return createTime;
+    }
+
+    public void setCreateTime(String createTime) {
+        this.createTime = createTime;
+    }
+
+    public PaperStruct() {
+        this.createTime = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date());
+    }
+
+    public String getOrgId() {
+        return orgId;
+    }
+
+    public void setOrgId(String orgId) {
+        this.orgId = orgId;
+    }
+
+    public String getCourseNo() {
+        return courseNo;
+    }
+
+    public void setCourseNo(String courseNo) {
+        this.courseNo = courseNo;
+    }
+
+    public Integer getDetailUnitCount() {
+        return detailUnitCount;
+    }
+
+    public void setDetailUnitCount(Integer detailUnitCount) {
+        this.detailUnitCount = detailUnitCount;
+    }
+
+    public GenPaperType getGenPaperType() {
+        return genPaperType;
+    }
+
+    public void setGenPaperType(GenPaperType genPaperType) {
+        this.genPaperType = genPaperType;
+    }
+
+    public PaperStructType getPaperStrucType() {
+        return paperStrucType;
+    }
+
+    public void setPaperStrucType(PaperStructType paperStrucType) {
+        this.paperStrucType = paperStrucType;
+    }
+
+    public String getType() {
+        return type;
+    }
+
+    public void setType(String type) {
+        this.type = type;
+    }
+
+    public String getCoursePropertyId() {
+        return coursePropertyId;
+    }
+
+    public void setCoursePropertyId(String coursePropertyId) {
+        this.coursePropertyId = coursePropertyId;
+    }
+
+    public Double getDifficulty() {
+        return difficulty;
+    }
+
+    public void setDifficulty(Double difficulty) {
+        this.difficulty = difficulty;
+    }
+
+    public String getExamRemark() {
+        return examRemark;
+    }
+
+    public void setExamRemark(String examRemark) {
+        this.examRemark = examRemark;
+    }
+
+    public String getCourseName() {
+        return courseName;
+    }
+
+    public void setCourseName(String courseName) {
+        this.courseName = courseName;
+    }
+
+	public Long getCourseId() {
+		return courseId;
+	}
+
+	public void setCourseId(Long courseId) {
+		this.courseId = courseId;
+	}
+
+    
+}

+ 30 - 0
src/main/java/cn/com/qmth/dp/examcloud/oe/enums/question/GenPaperType.java

@@ -0,0 +1,30 @@
+package cn.com.qmth.dp.examcloud.oe.enums.question;
+
+public enum GenPaperType {
+
+    /**
+     * 细节组卷
+     */
+    SPECIFIC("细节"),
+
+    /**
+     * 宏观
+     */
+    ENSEMBLE("宏观"),
+
+    /**
+     * 普通组卷
+     */
+    COMMON("普通组卷");
+
+    private String name;
+
+    public String getName() {
+        return name;
+    }
+
+    GenPaperType(String name) {
+        this.name = name;
+    }
+
+}

+ 44 - 0
src/main/java/cn/com/qmth/dp/examcloud/oe/enums/question/PaperStructType.java

@@ -0,0 +1,44 @@
+package cn.com.qmth.dp.examcloud.oe.enums.question;
+
+/**
+ * @author weiwenhai
+ * @describle 试卷结构类型
+ * @date 2017.12.11
+ */
+public enum PaperStructType {
+
+    /**
+     * 简易组卷
+     */
+    SIMPLE("简易组卷"),
+
+    /**
+     * 精确组卷
+     */
+    EXACT("精确组卷"),
+
+    /**
+     * 蓝图组卷
+     */
+    BLUEPRINT("蓝图组卷");
+
+    private String name;
+
+    public String getName() {
+        return name;
+    }
+
+    PaperStructType(String name) {
+        this.name = name;
+    }
+
+    public static PaperStructType strToEnum(String str) {
+        for (PaperStructType paperStructType : PaperStructType.values()) {
+            if (paperStructType.name().equals(str)) {
+                return paperStructType;
+            }
+        }
+        return null;
+    }
+
+}

+ 71 - 0
src/main/java/cn/com/qmth/dp/examcloud/oe/modules/fill_course_id/FillCourseIdService.java

@@ -0,0 +1,71 @@
+package cn.com.qmth.dp.examcloud.oe.modules.fill_course_id;
+
+import java.util.Date;
+import java.util.List;
+
+import org.apache.commons.lang3.StringUtils;
+import org.bson.types.ObjectId;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.data.mongodb.core.MongoTemplate;
+import org.springframework.data.mongodb.core.query.Criteria;
+import org.springframework.data.mongodb.core.query.Query;
+import org.springframework.data.mongodb.core.query.Update;
+import org.springframework.jdbc.core.JdbcTemplate;
+import org.springframework.stereotype.Service;
+
+import com.mongodb.client.result.UpdateResult;
+
+import cn.com.qmth.dp.examcloud.oe.entity.question.PaperStruct;
+
+/**题库试卷结构写入课程ID
+ * @author chenken
+ *
+ */
+@Service
+public class FillCourseIdService {
+	@Autowired
+	MongoTemplate mongoTemplate;
+    @Autowired
+    private JdbcTemplate jdbcTemplate;
+
+	public void start() {
+		Date start = new Date();
+		int cc=0;
+		//查找试卷
+		List<PaperStruct> ps = mongoTemplate.findAll(PaperStruct.class);
+		if (ps != null && ps.size() > 0) {
+			System.out.println("total:" + ps.size());
+			int index = 0;
+			for (PaperStruct paper : ps) {
+				if(paper.getCourseId()==null&&StringUtils.isNotBlank(paper.getCourseNo())) {
+					Long courseId=queryCourseId(Long.valueOf(paper.getOrgId()), paper.getCourseNo());
+					updatePaperStruct(paper.getId(), courseId);
+					cc++;
+				}
+				index++;
+				System.out.println("paper_index:" + index);
+			}
+		} else {
+			System.out.println("total:" + 0);
+		}
+		Date end = new Date();
+		System.out.println("dispose total:" + cc);
+		System.out.println("*****************end:" + ((end.getTime() - start.getTime()) / (1000 * 60)) + "分钟");
+	}
+
+    public long updatePaperStruct(String id,Long courseId) {
+        // 查询相应的题目
+        Query query = Query.query(Criteria.where("_id").is(new ObjectId(id)));
+        Update update = new Update();
+        update.set("courseId", courseId);
+        UpdateResult upResult = mongoTemplate.updateFirst(query, update, "paperStruct");
+        long res = upResult.getMatchedCount();
+
+        return res;
+    }
+    
+    private Long queryCourseId(Long rootOrgId, String courseCode) {
+        final String querySql = String.format("select id from ec_b_course where root_org_id = %s and code = '%s' ",rootOrgId,courseCode);
+        return jdbcTemplate.queryForObject(querySql, Long.class);
+    }
+}