Browse Source

Merge remote-tracking branch 'origin/dev_group_act_notice' into dev_temp

master
yinzuomei 4 years ago
parent
commit
6fc8748978
  1. 4
      epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/result/ActDetailResultDTO.java
  2. 9
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/dao/ActSignInRecordDao.java
  3. 5
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/impl/ActSignInRecordServiceImpl.java
  4. 2
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/impl/GroupActInfoServiceImpl.java
  5. 11
      epmet-module/resi-group/resi-group-server/src/main/resources/mapper/act/ActSignInRecordDao.xml

4
epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/result/ActDetailResultDTO.java

@ -146,4 +146,8 @@ public class ActDetailResultDTO implements Serializable {
*/
private Boolean startTimeEditFlag;
/**
* 已签到人数有人签到自动+1
*/
private Integer signedInNum;
}

9
epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/dao/ActSignInRecordDao.java

@ -49,4 +49,13 @@ public interface ActSignInRecordDao extends BaseDao<ActSignInRecordEntity> {
* @return int
*/
List<ActSignInRecordEntity> selectListByGroupActId(String groupActId);
/**
* 查询当前用户签到记录
*
* @param groupActId
* @param signUserId
* @return com.epmet.modules.act.entity.ActSignInRecordEntity
*/
ActSignInRecordEntity queryActSignInRecord(@Param("groupActId") String groupActId, @Param("signUserId")String signUserId);
}

5
epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/impl/ActSignInRecordServiceImpl.java

@ -149,8 +149,11 @@ public class ActSignInRecordServiceImpl extends BaseServiceImpl<ActSignInRecordD
@Override
public void signIn(SignInFormDTO formDTO) {
if(queryUserSignInRec(formDTO.getGroupActId(),formDTO.getUserId())){
//已经签到无需重复签到
//已经签到无需重复签到,更新时间
log.warn(String.format("当前用户userId=%s,已经签到,groupActId=%s",formDTO.getUserId(),formDTO.getGroupActId()));
ActSignInRecordEntity updateEntity=baseDao.queryActSignInRecord(formDTO.getGroupActId(),formDTO.getUserId());
updateEntity.setUpdatedTime(new Date());
baseDao.updateById(updateEntity);
return;
}
GroupActInfoDTO originalActInfo = groupActInfoService.getGroupActInfoDTO(formDTO.getGroupActId());

2
epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/impl/GroupActInfoServiceImpl.java

@ -343,6 +343,7 @@ public class GroupActInfoServiceImpl extends BaseServiceImpl<GroupActInfoDao, Gr
entity.setContentType(GroupActConstant.IMG);
entity.setCustomerId(customerId);
entity.setSort(imgSort);
list.add(entity);
imgSort++;
}
return list;
@ -358,6 +359,7 @@ public class GroupActInfoServiceImpl extends BaseServiceImpl<GroupActInfoDao, Gr
entity.setContentType(GroupActConstant.TEXT);
entity.setCustomerId(customerId);
entity.setSort(textSort);
list.add(entity);
textSort++;
}
return list;

11
epmet-module/resi-group/resi-group-server/src/main/resources/mapper/act/ActSignInRecordDao.xml

@ -26,4 +26,15 @@
acr.DEL_FLAG = '0'
AND acr.GROUP_ACT_ID = #{groupActId}
</select>
<select id="queryActSignInRecord" parameterType="map" resultType="com.epmet.modules.act.entity.ActSignInRecordEntity">
SELECT
acr.*
FROM
act_sign_in_record acr
WHERE
acr.DEL_FLAG = '0'
AND acr.GROUP_ACT_ID = #{groupActId}
AND acr.SIGN_USER_ID =#{signUserId}
</select>
</mapper>
Loading…
Cancel
Save