|
|
@@ -6,16 +6,18 @@
|
|
|
<result property="id" column="id" jdbcType="INTEGER"/>
|
|
|
<result property="aid" column="aid" jdbcType="VARCHAR"/>
|
|
|
<result property="htSatCount" column="ht_sat_count" jdbcType="INTEGER"/>
|
|
|
+ <result property="htSatNotScoreCount" column="ht_sat_not_score_count" jdbcType="INTEGER"/>
|
|
|
<result property="htSatScoreCount" column="ht_sat_score_count" jdbcType="INTEGER"/>
|
|
|
<result property="htSatScoreAverage" column="ht_sat_score_average" jdbcType="NUMERIC"/>
|
|
|
<result property="memberCount" column="member_count" jdbcType="INTEGER"/>
|
|
|
+ <result property="memberNotScoreCount" column="member_not_score_count" jdbcType="INTEGER"/>
|
|
|
<result property="memberScoreCount" column="member_score_count" jdbcType="INTEGER"/>
|
|
|
<result property="memberScoreAverage" column="member_score_average" jdbcType="NUMERIC"/>
|
|
|
<result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
|
|
|
</resultMap>
|
|
|
|
|
|
<sql id="AdminProjectStatisticsAllSql">
|
|
|
- id, aid, ht_sat_count, ht_sat_score_count, ht_sat_score_average, member_count, member_score_count, member_score_average, create_time
|
|
|
+ id, aid, ht_sat_count, ht_sat_not_score_count, ht_sat_score_count, ht_sat_score_average, member_count, member_not_score_count, member_score_count, member_score_average, create_time
|
|
|
</sql>
|
|
|
|
|
|
<!--查询单个-->
|
|
|
@@ -42,6 +44,9 @@
|
|
|
<if test="htSatCount != null">
|
|
|
and ht_sat_count = #{htSatCount}
|
|
|
</if>
|
|
|
+ <if test="htSatNotScoreCount != null">
|
|
|
+ and ht_sat_not_score_count = #{htSatNotScoreCount}
|
|
|
+ </if>
|
|
|
<if test="htSatScoreCount != null">
|
|
|
and ht_sat_score_count = #{htSatScoreCount}
|
|
|
</if>
|
|
|
@@ -51,6 +56,9 @@
|
|
|
<if test="memberCount != null">
|
|
|
and member_count = #{memberCount}
|
|
|
</if>
|
|
|
+ <if test="memberNotScoreCount != null">
|
|
|
+ and member_not_score_count = #{memberNotScoreCount}
|
|
|
+ </if>
|
|
|
<if test="memberScoreCount != null">
|
|
|
and member_score_count = #{memberScoreCount}
|
|
|
</if>
|
|
|
@@ -80,6 +88,9 @@
|
|
|
<if test="htSatCount != null">
|
|
|
and ht_sat_count = #{htSatCount}
|
|
|
</if>
|
|
|
+ <if test="htSatNotScoreCount != null">
|
|
|
+ and ht_sat_not_score_count = #{htSatNotScoreCount}
|
|
|
+ </if>
|
|
|
<if test="htSatScoreCount != null">
|
|
|
and ht_sat_score_count = #{htSatScoreCount}
|
|
|
</if>
|
|
|
@@ -89,6 +100,9 @@
|
|
|
<if test="memberCount != null">
|
|
|
and member_count = #{memberCount}
|
|
|
</if>
|
|
|
+ <if test="memberNotScoreCount != null">
|
|
|
+ and member_not_score_count = #{memberNotScoreCount}
|
|
|
+ </if>
|
|
|
<if test="memberScoreCount != null">
|
|
|
and member_score_count = #{memberScoreCount}
|
|
|
</if>
|
|
|
@@ -103,36 +117,43 @@
|
|
|
|
|
|
<!--新增所有列-->
|
|
|
<insert id="insert" keyProperty="id" useGeneratedKeys="true">
|
|
|
- insert into admin_project_statistics(aid, ht_sat_count, ht_sat_score_count, ht_sat_score_average, member_count,
|
|
|
+ insert into admin_project_statistics(aid, ht_sat_count, ht_sat_not_score_count, ht_sat_score_count,
|
|
|
+ ht_sat_score_average, member_count, member_not_score_count,
|
|
|
member_score_count, member_score_average, create_time)
|
|
|
- values (#{aid}, #{htSatCount}, #{htSatScoreCount}, #{htSatScoreAverage}, #{memberCount}, #{memberScoreCount},
|
|
|
- #{memberScoreAverage}, #{createTime})
|
|
|
+ values (#{aid}, #{htSatCount}, #{htSatNotScoreCount}, #{htSatScoreCount}, #{htSatScoreAverage}, #{memberCount},
|
|
|
+ #{memberNotScoreCount}, #{memberScoreCount}, #{memberScoreAverage}, #{createTime})
|
|
|
</insert>
|
|
|
|
|
|
<insert id="insertBatch">
|
|
|
- insert into admin_project_statistics(aid, ht_sat_count, ht_sat_score_count, ht_sat_score_average, member_count,
|
|
|
- member_score_count, member_score_average, create_time)
|
|
|
+ insert into admin_project_statistics(aid, ht_sat_count, ht_sat_not_score_count, ht_sat_score_count,
|
|
|
+ ht_sat_score_average, member_count, member_not_score_count, member_score_count, member_score_average,
|
|
|
+ create_time)
|
|
|
values
|
|
|
<foreach collection="entities" item="entity" separator=",">
|
|
|
- (#{entity.aid}, #{entity.htSatCount}, #{entity.htSatScoreCount}, #{entity.htSatScoreAverage},
|
|
|
- #{entity.memberCount}, #{entity.memberScoreCount}, #{entity.memberScoreAverage}, #{entity.createTime})
|
|
|
+ (#{entity.aid}, #{entity.htSatCount}, #{entity.htSatNotScoreCount}, #{entity.htSatScoreCount},
|
|
|
+ #{entity.htSatScoreAverage}, #{entity.memberCount}, #{entity.memberNotScoreCount},
|
|
|
+ #{entity.memberScoreCount}, #{entity.memberScoreAverage}, #{entity.createTime})
|
|
|
</foreach>
|
|
|
</insert>
|
|
|
|
|
|
<insert id="insertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true">
|
|
|
- insert into admin_project_statistics(aid, ht_sat_count, ht_sat_score_count, ht_sat_score_average, member_count,
|
|
|
- member_score_count, member_score_average, create_time)
|
|
|
+ insert into admin_project_statistics(aid, ht_sat_count, ht_sat_not_score_count, ht_sat_score_count,
|
|
|
+ ht_sat_score_average, member_count, member_not_score_count, member_score_count, member_score_average,
|
|
|
+ create_time)
|
|
|
values
|
|
|
<foreach collection="entities" item="entity" separator=",">
|
|
|
- (#{entity.aid}, #{entity.htSatCount}, #{entity.htSatScoreCount}, #{entity.htSatScoreAverage},
|
|
|
- #{entity.memberCount}, #{entity.memberScoreCount}, #{entity.memberScoreAverage}, #{entity.createTime})
|
|
|
+ (#{entity.aid}, #{entity.htSatCount}, #{entity.htSatNotScoreCount}, #{entity.htSatScoreCount},
|
|
|
+ #{entity.htSatScoreAverage}, #{entity.memberCount}, #{entity.memberNotScoreCount},
|
|
|
+ #{entity.memberScoreCount}, #{entity.memberScoreAverage}, #{entity.createTime})
|
|
|
</foreach>
|
|
|
on duplicate key update
|
|
|
aid = values(aid),
|
|
|
ht_sat_count = values(ht_sat_count),
|
|
|
+ ht_sat_not_score_count = values(ht_sat_not_score_count),
|
|
|
ht_sat_score_count = values(ht_sat_score_count),
|
|
|
ht_sat_score_average = values(ht_sat_score_average),
|
|
|
member_count = values(member_count),
|
|
|
+ member_not_score_count = values(member_not_score_count),
|
|
|
member_score_count = values(member_score_count),
|
|
|
member_score_average = values(member_score_average),
|
|
|
create_time = values(create_time)
|
|
|
@@ -148,6 +169,9 @@
|
|
|
<if test="htSatCount != null">
|
|
|
ht_sat_count = #{htSatCount},
|
|
|
</if>
|
|
|
+ <if test="htSatNotScoreCount != null">
|
|
|
+ ht_sat_not_score_count = #{htSatNotScoreCount},
|
|
|
+ </if>
|
|
|
<if test="htSatScoreCount != null">
|
|
|
ht_sat_score_count = #{htSatScoreCount},
|
|
|
</if>
|
|
|
@@ -157,6 +181,9 @@
|
|
|
<if test="memberCount != null">
|
|
|
member_count = #{memberCount},
|
|
|
</if>
|
|
|
+ <if test="memberNotScoreCount != null">
|
|
|
+ member_not_score_count = #{memberNotScoreCount},
|
|
|
+ </if>
|
|
|
<if test="memberScoreCount != null">
|
|
|
member_score_count = #{memberScoreCount},
|
|
|
</if>
|