Browse Source

Merge remote-tracking branch 'origin/dev_heart' into dev_heart

master
yinzuomei 5 years ago
parent
commit
135a4bd8ed
  1. 11
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/ActSignInRecServiceImpl.java
  2. 2
      epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/HeartUserInfoDao.xml

11
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/ActSignInRecServiceImpl.java

@ -38,6 +38,7 @@ import com.epmet.dao.ActSignInRecDao;
import com.epmet.dao.ActUserRelationDao;
import com.epmet.dto.ActSignInRecDTO;
import com.epmet.dto.ActUserRelationDTO;
import com.epmet.dto.HeartUserInfoDTO;
import com.epmet.dto.form.resi.ResiActInsertLiveFormDTO;
import com.epmet.dto.form.resi.ResiActSignInFormDTO;
import com.epmet.entity.ActSignInPicEntity;
@ -45,6 +46,7 @@ import com.epmet.entity.ActSignInRecEntity;
import com.epmet.redis.ActSignInRecRedis;
import com.epmet.service.ActLiveRecService;
import com.epmet.service.ActSignInRecService;
import com.epmet.service.HeartUserInfoService;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
@ -76,6 +78,9 @@ public class ActSignInRecServiceImpl extends BaseServiceImpl<ActSignInRecDao, Ac
@Autowired
private ActLiveRecService actLiveRecService;
@Autowired
private HeartUserInfoService heartUserInfoService;
private Logger logger = LogManager.getLogger(ActSignInRecServiceImpl.class);
@Value("${openapi.scan.server.url}")
private String scanApiUrl;
@ -124,6 +129,12 @@ public class ActSignInRecServiceImpl extends BaseServiceImpl<ActSignInRecDao, Ac
actSignInPicDao.insert(actLivePicEntity);
}
}
// 用户信息表,实际参与活动个数(签到+1)
HeartUserInfoDTO heartUserInfoDTO = new HeartUserInfoDTO();
heartUserInfoDTO.setUserId(formDTO.getUserId());
heartUserInfoDTO.setParticipationNum(NumConstant.ONE);
heartUserInfoService.updateHeartUserInfoByUserId(heartUserInfoDTO);
return new Result();
}

2
epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/HeartUserInfoDao.xml

@ -65,7 +65,7 @@
KINDNESS_TIME = #{kindnessTime},
</if>
<if test="participationNum != null and participationNum != ''">
PARTICIPATION_NUM = #{participationNum},
PARTICIPATION_NUM = PARTICIPATION_NUM + #{participationNum},
</if>
<if test="obtainPointNum != null and obtainPointNum != ''">
OBTAIN_POINT_NUM = #{obtainPointNum},

Loading…
Cancel
Save