|
|
@@ -76,7 +76,7 @@ public class WestreamUserServiceImpl extends BaseServiceImpl<WestreamUserMapper, |
|
|
|
westreamUser.setCreateTime(new Date()); |
|
|
|
//添加积分及其积分明细 |
|
|
|
westreamUserMapper.insert(westreamUser); |
|
|
|
addIntegral(westreamUserQuery); |
|
|
|
addIntegral(westreamUser); |
|
|
|
|
|
|
|
westreamUser.setNickname("护河行者" + westreamUser.getId()); |
|
|
|
westreamUserMapper.updateById(westreamUser); |
|
|
@@ -88,10 +88,10 @@ public class WestreamUserServiceImpl extends BaseServiceImpl<WestreamUserMapper, |
|
|
|
return JsonResult.success(); |
|
|
|
} |
|
|
|
|
|
|
|
private void addIntegral(WestreamUser westreamUserQuery) { |
|
|
|
private void addIntegral(WestreamUser westreamUser) { |
|
|
|
//注册程序 积分设置 |
|
|
|
ThDict thDict = dictMapper.selectOne(new LambdaQueryWrapper<ThDict>() |
|
|
|
.eq(ThDict::getTenantId, westreamUserQuery.getTenantId()) |
|
|
|
.eq(ThDict::getTenantId, westreamUser.getTenantId()) |
|
|
|
.eq(ThDict::getCode, DictConstants.POINTS_RULE_CODE) |
|
|
|
.eq(ThDict::getMark, 1)); |
|
|
|
if(ObjectUtils.isNotNull(thDict)){ |
|
|
@@ -100,14 +100,9 @@ public class WestreamUserServiceImpl extends BaseServiceImpl<WestreamUserMapper, |
|
|
|
.eq(ThDictData::getName, DictConstants.APP_REGISTRY)); |
|
|
|
if(ObjectUtils.isNotNull(thDictData)){ |
|
|
|
if(StringUtils.isNotEmpty(thDictData.getValue())){ |
|
|
|
//查询用户昵称 |
|
|
|
WestreamUser westreamUser = westreamUserMapper.selectOne(new LambdaQueryWrapper<WestreamUser>() |
|
|
|
.eq(WestreamUser::getTenantId, westreamUserQuery.getTenantId()) |
|
|
|
.eq(WestreamUser::getOpenid, westreamUserQuery.getOpenid()) |
|
|
|
.eq(WestreamUser::getMark, 1)); |
|
|
|
//积分明细表入库 |
|
|
|
UserPointsDetail userPointsDetail = new UserPointsDetail(); |
|
|
|
BeanUtils.copyProperties(westreamUserQuery,userPointsDetail); |
|
|
|
BeanUtils.copyProperties(westreamUser,userPointsDetail); |
|
|
|
userPointsDetail.setNickname(westreamUser.getNickname()); |
|
|
|
userPointsDetail.setPointsChange(Integer.parseInt(thDictData.getValue())); |
|
|
|
userPointsDetail.setPointsTime(new Date()); |