|
@ -37,7 +37,6 @@ import com.elink.esua.epdc.feign.*; |
|
|
import com.elink.esua.epdc.jwt.JwtTokenProperties; |
|
|
import com.elink.esua.epdc.jwt.JwtTokenProperties; |
|
|
import com.elink.esua.epdc.jwt.JwtTokenUtils; |
|
|
import com.elink.esua.epdc.jwt.JwtTokenUtils; |
|
|
import com.elink.esua.epdc.modules.points.feign.PointsFeignClient; |
|
|
import com.elink.esua.epdc.modules.points.feign.PointsFeignClient; |
|
|
import com.elink.esua.epdc.pointcommons.tools.annotation.RecordUserBehavior; |
|
|
|
|
|
import com.elink.esua.epdc.pointcommons.tools.dto.PointsRuleResultDTO; |
|
|
import com.elink.esua.epdc.pointcommons.tools.dto.PointsRuleResultDTO; |
|
|
import com.elink.esua.epdc.redis.AppUserRedis; |
|
|
import com.elink.esua.epdc.redis.AppUserRedis; |
|
|
import com.elink.esua.epdc.service.AppUserService; |
|
|
import com.elink.esua.epdc.service.AppUserService; |
|
@ -1484,64 +1483,25 @@ public class AppUserServiceImpl implements AppUserService { |
|
|
|
|
|
|
|
|
@Override |
|
|
@Override |
|
|
public Result updateUserPoints(PointsUpdateFormDTO formDto) { |
|
|
public Result updateUserPoints(PointsUpdateFormDTO formDto) { |
|
|
Result userResult = userFeignClient.getUserInfoByMobile(formDto); |
|
|
Result<UserDTO> userResult = userFeignClient.getUserInfoByMobile(formDto); |
|
|
if(!userResult.success() || userResult.getData()==null){ |
|
|
if(!userResult.success() || userResult.getData()==null){ |
|
|
return new Result().error("未获取到用户信息!"); |
|
|
log.info(userResult.toString()); |
|
|
|
|
|
throw new RenException("未获取到用户信息!"); |
|
|
} |
|
|
} |
|
|
UserDTO user = (UserDTO) userResult.getData(); |
|
|
formDto.setUserId(userResult.getData().getId()); |
|
|
if("double_info_update".equals(formDto.getBehaviorType())){ |
|
|
if("double_info_update".equals(formDto.getBehaviorType())){ |
|
|
updateBehavior1Points(user); |
|
|
userFeignClient.updateBehavior1Points(formDto); |
|
|
}else if("grid_patrol".equals(formDto.getBehaviorType())){ |
|
|
}else if("grid_patrol".equals(formDto.getBehaviorType())){ |
|
|
updateBehavior2Points(user); |
|
|
userFeignClient.updateBehavior2Points(formDto); |
|
|
}else if("grid_report_event".equals(formDto.getBehaviorType())){ |
|
|
}else if("grid_report_event".equals(formDto.getBehaviorType())){ |
|
|
updateBehavior3Points(user); |
|
|
userFeignClient.updateBehavior3Points(formDto); |
|
|
}else if("grid_work_upload".equals(formDto.getBehaviorType())){ |
|
|
}else if("grid_work_upload".equals(formDto.getBehaviorType())){ |
|
|
updateBehavior4Points(user); |
|
|
userFeignClient.updateBehavior4Points(formDto); |
|
|
|
|
|
}else{ |
|
|
|
|
|
throw new RenException("请输入正确的行为类型编码。"); |
|
|
} |
|
|
} |
|
|
return new Result().ok("操作成功"); |
|
|
return new Result().ok("操作成功"); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* @describe: 双实信息更新及上报 |
|
|
|
|
|
* @author wangtong |
|
|
|
|
|
* @date 2022/2/13 15:20 |
|
|
|
|
|
* @params [user] |
|
|
|
|
|
* @return void |
|
|
|
|
|
*/ |
|
|
|
|
|
@RecordUserBehavior(behavior = BehaviorEnum.DOUBLE_INFO_UPDATE, referenceId = "#{user.getId}", userId = "#{user.getId}") |
|
|
|
|
|
private void updateBehavior1Points(UserDTO user){ |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* @describe: 网格巡查 |
|
|
|
|
|
* @author wangtong |
|
|
|
|
|
* @date 2022/2/13 15:20 |
|
|
|
|
|
* @params [user] |
|
|
|
|
|
* @return void |
|
|
|
|
|
*/ |
|
|
|
|
|
@RecordUserBehavior(behavior = BehaviorEnum.GRID_PATROL, referenceId = "#{user.getId}", userId = "#{user.getId}") |
|
|
|
|
|
private void updateBehavior2Points(UserDTO user){ |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* @describe: 网格上报事件 |
|
|
|
|
|
* @author wangtong |
|
|
|
|
|
* @date 2022/2/13 15:20 |
|
|
|
|
|
* @params [user] |
|
|
|
|
|
* @return void |
|
|
|
|
|
*/ |
|
|
|
|
|
@RecordUserBehavior(behavior = BehaviorEnum.GRID_REPORT_EVENT, referenceId = "#{user.getId}", userId = "#{user.getId}") |
|
|
|
|
|
private void updateBehavior3Points(UserDTO user){ |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* @describe: 网格工作上传 |
|
|
|
|
|
* @author wangtong |
|
|
|
|
|
* @date 2022/2/13 15:20 |
|
|
|
|
|
* @params [user] |
|
|
|
|
|
* @return void |
|
|
|
|
|
*/ |
|
|
|
|
|
@RecordUserBehavior(behavior = BehaviorEnum.GRID_WORK_UPLOAD, referenceId = "#{user.getId}", userId = "#{user.getId}") |
|
|
|
|
|
private void updateBehavior4Points(UserDTO user){ |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
} |
|
|