|
|
|
@ -77,6 +77,10 @@ |
|
|
|
<result property="punishmentPoints" column="PUNISHMENT_POINTS"/> |
|
|
|
<result property="reward" column="REWARD"/> |
|
|
|
<result property="actUserDefaultState" column="ACT_USER_DEFAULT_STATE"/> |
|
|
|
<result property="topFlag" column="TOP_FLAG"/> |
|
|
|
<result property="topTime" column="TOP_TIME"/> |
|
|
|
<result property="topUserId" column="TOP_USER_ID"/> |
|
|
|
<result property="topUserName" column="TOP_USER_NAME"/> |
|
|
|
</resultMap> |
|
|
|
<select id="getActInfoPageFromPC" resultMap="actResultMap"> |
|
|
|
SELECT |
|
|
|
@ -113,7 +117,11 @@ |
|
|
|
actInfo.DEPT_ID, |
|
|
|
actInfo.PUNISHMENT_POINTS, |
|
|
|
actInfo.REWARD, |
|
|
|
actInfo.ACT_USER_DEFAULT_STATE |
|
|
|
actInfo.ACT_USER_DEFAULT_STATE, |
|
|
|
actInfo.TOP_FLAG, |
|
|
|
actInfo.TOP_TIME, |
|
|
|
actInfo.TOP_USER_ID, |
|
|
|
actInfo.TOP_USER_NAME |
|
|
|
FROM |
|
|
|
epdc_act_info actInfo |
|
|
|
WHERE |
|
|
|
@ -128,6 +136,7 @@ |
|
|
|
AND actInfo.ACT_STATUS = #{actStatus} |
|
|
|
</if> |
|
|
|
ORDER BY |
|
|
|
actInfo.TOP_FLAG desc, |
|
|
|
actInfo.CREATED_TIME DESC |
|
|
|
</select> |
|
|
|
<resultMap type="com.elink.esua.epdc.activity.result.ActInfoAppResultDTO" id="actAppResultMap"> |
|
|
|
@ -167,7 +176,8 @@ |
|
|
|
when <![CDATA[ DATE_FORMAT(actInfo.ACT_END_TIME,'%Y-%m-%d %H:%i:%s') < ]]> #{timestamp} |
|
|
|
then '4' |
|
|
|
end as actCurrentState, |
|
|
|
IF(relation.USER_ID = #{userId},'1','0') as signupFlag,actInfo.CREATED_TIME |
|
|
|
IF(relation.USER_ID = #{userId},'1','0') as signupFlag,actInfo.CREATED_TIME, |
|
|
|
actInfo.TOP_FLAG |
|
|
|
FROM |
|
|
|
epdc_act_info actInfo |
|
|
|
left join epdc_act_user_relation relation on relation.DEL_FLAG = '0' |
|
|
|
@ -185,7 +195,7 @@ |
|
|
|
<![CDATA[ AND DATE_FORMAT(actInfo.SIGNUP_END_TIME,'%Y-%m-%d %H:%i:%s') <= ]]> #{timestamp} |
|
|
|
</if> |
|
|
|
) temp |
|
|
|
ORDER BY temp.actCurrentState ASC,temp.CREATED_TIME desc |
|
|
|
ORDER BY temp.TOP_FLAG desc,temp.actCurrentState ASC,temp.CREATED_TIME desc |
|
|
|
<if test='actType != null and actType != "" and actType == "0"'>,temp.PUBLISH_TIME DESC</if> |
|
|
|
<if test='actType != null and actType != "" and actType == "1"'>,temp.ACT_START_TIME ASC</if> |
|
|
|
LIMIT #{pageIndex},#{pageSize} |
|
|
|
@ -222,7 +232,8 @@ |
|
|
|
then '4' |
|
|
|
end as actCurrentState, |
|
|
|
IF(clock.clockCount is not null ,'1','0') as signupFlag, |
|
|
|
relation.ID as actUserId |
|
|
|
relation.ID as actUserId, |
|
|
|
actInfo.TOP_FLAG |
|
|
|
FROM |
|
|
|
epdc_act_info actInfo |
|
|
|
left join epdc_act_user_relation relation on relation.DEL_FLAG = '0' |
|
|
|
@ -252,6 +263,7 @@ |
|
|
|
and actInfo.ACT_STATUS = '1' |
|
|
|
</if> |
|
|
|
ORDER BY |
|
|
|
actInfo.TOP_FLAG, |
|
|
|
relation.SIGNUP_TIME DESC |
|
|
|
LIMIT #{pageIndex},#{pageSize} |
|
|
|
</select> |
|
|
|
@ -518,6 +530,16 @@ |
|
|
|
UPDATE epdc_act_info SET DEL_FLAG = 1,UPDATED_TIME=NOW() |
|
|
|
where id=#{relationId} |
|
|
|
</update> |
|
|
|
<update id="updateActTopFlagById"> |
|
|
|
UPDATE epdc_act_info SET TOP_FLAG = #{topFlag}, TOP_USER_ID = #{topUserId}, TOP_USER_NAME = #{topUserName} |
|
|
|
<if test='topFlag == "0"'> |
|
|
|
, TOP_TIME = NULL |
|
|
|
</if> |
|
|
|
<if test='topFlag == "1"'> |
|
|
|
, TOP_TIME = NOW() |
|
|
|
</if> |
|
|
|
WHERE ID = #{actId} |
|
|
|
</update> |
|
|
|
|
|
|
|
<select id="selectCountUserUnreadSignUpAct" resultType="integer"> |
|
|
|
SELECT |
|
|
|
|