提交 337c0150 作者: 刘明祎-运维用途

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

...@@ -10,8 +10,8 @@ public enum UserPointsEnum { ...@@ -10,8 +10,8 @@ public enum UserPointsEnum {
REGISTER(0, "注册"), REGISTER(0, "注册"),
REAL_NAME_AUTHENTICATION(1, "实名认证"), REAL_NAME_AUTHENTICATION(1, "实名认证"),
PILOT_CERTIFICATION(2, "飞手认证"), PILOT_CERTIFICATION(2, "飞手认证"),
TOPIC_REWARD(3, "论坛发布奖励"), TOPIC_REWARD(3, "发帖奖励"),
SIGN_IN_REWARD(4, "签到"), SIGN_IN_REWARD(4, "签到奖励"),
OTHER_CHANGE(5, "其他变动"), OTHER_CHANGE(5, "其他变动"),
USER_USE(6, "使用"), USER_USE(6, "使用"),
INVITE_USER(7, "邀请用户"), INVITE_USER(7, "邀请用户"),
......
...@@ -40,4 +40,8 @@ public interface SignInDao { ...@@ -40,4 +40,8 @@ public interface SignInDao {
void updateUserAppSignInD(AppSignInVO appSignInVO); void updateUserAppSignInD(AppSignInVO appSignInVO);
List<SignInRecordDO> signInRecord(Integer userAccountId); List<SignInRecordDO> signInRecord(Integer userAccountId);
void deleteSign();
void deleteSignRecord();
} }
...@@ -254,7 +254,9 @@ public class UserAccountServiceImpl implements UserAccountService { ...@@ -254,7 +254,9 @@ public class UserAccountServiceImpl implements UserAccountService {
realNameextracted(id); realNameextracted(id);
} }
// 奖励邀请人 // 奖励邀请人
if (rcdUserId != null) {
activityService.participateActivity(0, rcdUserId, id); activityService.participateActivity(0, rcdUserId, id);
}
return ResultBody.success(); return ResultBody.success();
} }
......
...@@ -38,6 +38,13 @@ public class SignInServiceImpl implements SignInService { ...@@ -38,6 +38,13 @@ public class SignInServiceImpl implements SignInService {
@Override @Override
public ResultBody SignIn(SignInVO signInVO) { public ResultBody SignIn(SignInVO signInVO) {
SignInDO signInDO = new SignInDO(signInVO); SignInDO signInDO = new SignInDO(signInVO);
List<SignInDO> signInDOS = signInDao.SignInList();
for (SignInDO inDO : signInDOS) {
if (!inDO.getPeriod().equals(signInVO.getPeriod())){
signInDao.deleteSign();
signInDao.deleteSignRecord();
}
}
if (signInDO.getId()!=null){ if (signInDO.getId()!=null){
int update = signInDao.update(signInDO); int update = signInDao.update(signInDO);
signInDao.remove(signInDO.getId()); signInDao.remove(signInDO.getId());
...@@ -78,7 +85,16 @@ public class SignInServiceImpl implements SignInService { ...@@ -78,7 +85,16 @@ public class SignInServiceImpl implements SignInService {
signInDao.insertSignInRecord(appSignInVO); signInDao.insertSignInRecord(appSignInVO);
for (SignInDO signInDO : signInDOS) { for (SignInDO signInDO : signInDOS) {
Integer integral = signInDO.getIntegral(); Integer integral = signInDO.getIntegral();
changeUserPointVO.setChangePoint(integral); Integer allPoint=0;
List<UserContinuousCheckInVO> userContinuousCheckInVO = signInDO.getUserContinuousCheckInVO();
Integer bonusPoints=0;
List<UserContinuousCheckInVO> collect = userContinuousCheckInVO.stream().filter(t -> t.getNumberOfDays() == 1).collect(Collectors.toList());
for (UserContinuousCheckInVO continuousCheckInVO : collect) {
bonusPoints= continuousCheckInVO.getBonusPoints();
}
allPoint=integral+bonusPoints;
changeUserPointVO.setChangePoint(allPoint);
} }
userPointsService.change(changeUserPointVO); userPointsService.change(changeUserPointVO);
} }
...@@ -104,14 +120,14 @@ public class SignInServiceImpl implements SignInService { ...@@ -104,14 +120,14 @@ public class SignInServiceImpl implements SignInService {
for (SignInDO signInDO : signInDOS) { for (SignInDO signInDO : signInDOS) {
Integer integral = signInDO.getIntegral(); Integer integral = signInDO.getIntegral();
List<UserContinuousCheckInVO> userContinuousCheckInVO = signInDO.getUserContinuousCheckInVO(); List<UserContinuousCheckInVO> userContinuousCheckInVO = signInDO.getUserContinuousCheckInVO();
for (UserContinuousCheckInVO continuousCheckInVO : userContinuousCheckInVO) { List<UserContinuousCheckInVO> collect = userContinuousCheckInVO.stream().filter(t -> t.getNumberOfDays().equals(userAppSignInDO1.getSignInDays())).collect(Collectors.toList());
if (continuousCheckInVO.getNumberOfDays().equals(userAppSignInDO1.getSignInDays())){ for (UserContinuousCheckInVO continuousCheckInVO : collect) {
int bonusPoints = continuousCheckInVO.getBonusPoints(); int bonusPoints = continuousCheckInVO.getBonusPoints();
allPoints=integral+bonusPoints; allPoints=integral+bonusPoints;
changeUserPointVO.setChangePoint(allPoints); changeUserPointVO.setChangePoint(allPoints);
}else if (!continuousCheckInVO.getNumberOfDays().equals(userAppSignInDO1.getSignInDays())){
changeUserPointVO.setChangePoint(integral);
} }
if (collect.size()==0){
changeUserPointVO.setChangePoint(integral);
} }
} }
userPointsService.change(changeUserPointVO); userPointsService.change(changeUserPointVO);
......
...@@ -475,7 +475,7 @@ ...@@ -475,7 +475,7 @@
and uat.is_deleted = 0 and uat.is_deleted = 0
and uat.apply_status = 1 and uat.apply_status = 1
and ci.is_deleted = 0 and ci.is_deleted = 0
ORDER BY distance ASC ORDER BY if(ci.id = 11, 1, 0) DESC, distance ASC
LIMIT #{pageNo}, #{pageSize} LIMIT #{pageNo}, #{pageSize}
</select> </select>
<select id="getJoinStoreCount" resultType="java.lang.Integer"> <select id="getJoinStoreCount" resultType="java.lang.Integer">
......
...@@ -72,6 +72,14 @@ ...@@ -72,6 +72,14 @@
delete from sign_in_record where user_account_id=#{userAccountId} delete from sign_in_record where user_account_id=#{userAccountId}
</delete> </delete>
<delete id="deleteSign">
delete from user_app_sign_in
</delete>
<delete id="deleteSignRecord">
delete from sign_in_record
</delete>
<insert id="insertSignInRecord" parameterType="com.mmc.iuav.user.model.vo.signin.AppSignInVO"> <insert id="insertSignInRecord" parameterType="com.mmc.iuav.user.model.vo.signin.AppSignInVO">
insert into sign_in_record(user_account_id,sign_in_time,create_time,update_time) insert into sign_in_record(user_account_id,sign_in_time,create_time,update_time)
values(#{userAccountId},#{signTime},NOW(),NOW()) values(#{userAccountId},#{signTime},NOW(),NOW())
...@@ -90,4 +98,6 @@ ...@@ -90,4 +98,6 @@
</select> </select>
</mapper> </mapper>
...@@ -18,4 +18,4 @@ patches: ...@@ -18,4 +18,4 @@ patches:
images: images:
- name: REGISTRY/NAMESPACE/IMAGE:TAG - name: REGISTRY/NAMESPACE/IMAGE:TAG
newName: mmc-registry.cn-shenzhen.cr.aliyuncs.com/sharefly-dev/cms newName: mmc-registry.cn-shenzhen.cr.aliyuncs.com/sharefly-dev/cms
newTag: ea633540cd92a01586be5105bd5c43733aa4f800 newTag: 74fa41bd1a37c192b0570dc60e9b8d0a7bb83970
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论