Explorar el Código

Merge branch 'develop' of gitadmin/tuoheng_qmhh into release

tags/V1.8.0^2
xuziqing hace 1 año
padre
commit
8ba3e3e50f
Se han modificado 1 ficheros con 9 adiciones y 7 borrados
  1. +9
    -7
      tuoheng-api/src/main/java/com/tuoheng/api/service/impl/WestreamUserServiceImpl.java

+ 9
- 7
tuoheng-api/src/main/java/com/tuoheng/api/service/impl/WestreamUserServiceImpl.java Ver fichero

@@ -76,8 +76,8 @@ public class WestreamUserServiceImpl extends BaseServiceImpl<WestreamUserMapper,
westreamUser.setCreateTime(new Date());
//添加积分及其积分明细
westreamUserMapper.insert(westreamUser);
addIntegral(westreamUser);
String points = addIntegral(westreamUser);
westreamUser.setMallPoints(Integer.parseInt(points));
westreamUser.setNickname("护河行者" + westreamUser.getId());
westreamUserMapper.updateById(westreamUser);
} else {
@@ -88,21 +88,21 @@ public class WestreamUserServiceImpl extends BaseServiceImpl<WestreamUserMapper,
return JsonResult.success();
}

private void addIntegral(WestreamUser westreamUser) {
private String addIntegral(WestreamUser westreamUser) {
//注册程序 积分设置
ThDict thDict = dictMapper.selectOne(new LambdaQueryWrapper<ThDict>()
.eq(ThDict::getTenantId, westreamUser.getTenantId())
.eq(ThDict::getCode, DictConstants.POINTS_RULE_CODE)
.eq(ThDict::getMark, 1));
if(ObjectUtils.isNotNull(thDict)){
if (ObjectUtils.isNotNull(thDict)) {
ThDictData thDictData = dictDataMapper.selectOne(new LambdaQueryWrapper<ThDictData>()
.eq(ThDictData::getDictId, thDict.getId())
.eq(ThDictData::getName, DictConstants.APP_REGISTRY));
if(ObjectUtils.isNotNull(thDictData)){
if(StringUtils.isNotEmpty(thDictData.getValue())){
if (ObjectUtils.isNotNull(thDictData)) {
if (StringUtils.isNotEmpty(thDictData.getValue())) {
//积分明细表入库
UserPointsDetail userPointsDetail = new UserPointsDetail();
BeanUtils.copyProperties(westreamUser,userPointsDetail);
BeanUtils.copyProperties(westreamUser, userPointsDetail);
userPointsDetail.setNickname(westreamUser.getNickname());
userPointsDetail.setPointsChange(Integer.parseInt(thDictData.getValue()));
userPointsDetail.setPointsTime(new Date());
@@ -111,9 +111,11 @@ public class WestreamUserServiceImpl extends BaseServiceImpl<WestreamUserMapper,
userPointsDetail.setCreateTime(new Date());
userPointsDetailMapper.insert(userPointsDetail);
//TODO 对接商城
return thDictData.getValue();
}
}
}
return "0";
}

@Override

Cargando…
Cancelar
Guardar