<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <mapper namespace="com.yiboshi.science.dao.ComExpertGroupAssignDAO"> <sql id="allColumns"> t.id as id, t.expert_id as expertId, t.proj_id as projId, t.assign_year as assignYear, t.grade_score as gradeScore, t.remark as remark, t.created as created, t.updated as updated </sql> <select id="getListByPage" resultType="com.yiboshi.science.param.dto.ComExpertGroupAssignDTO"> SELECT s.* FROM com_expert_group_assign a <where> ${ew.sqlSegment} </where> ORDER BY a.created ASC </select> <select id="getAssignCount" parameterType="java.lang.String" resultType="com.yiboshi.science.entity.AssignCount"> SELECT assign_year year,count(*) assignCount FROM com_expert_group_assign a where group_id=#{groupId} group by assign_year </select> <update id="updateAssignState"> update com_project <set> assign_state = #{assignState}, completed = #{completed}, total_score = #{totalScore}, average_score = #{averageScore}, updated = #{updated,jdbcType=TIMESTAMP}, </set> where id = #{id} </update> </mapper>