@Slf4j @ExtensionService("increasePointsExtPointDemo") public class IncreasePointsExtPointDemoImpl implements IncreasePointsExtPoint { @Autowired private UserSourceMapper userSourceMapper; @Override public OutParam<Result> invoke(ExtPointsIncreaseDTO extPointsIncreaseDTO) { log.info("【北洛-执行扩展点】-增加用户积分 {}",JSON.toJSONString(extPointsIncreaseDTO)); try { UserSource userSource = new UserSource(); userSource.setAccountId(extPointsIncreaseDTO.getExtCustomerInfoDTO().getAccountId()); userSource.setAccountType(extPointsIncreaseDTO.getExtCustomerInfoDTO().getAccountType()); userSource.setAmount(extPointsIncreaseDTO.getAmount()); userSource.setBizVlue(extPointsIncreaseDTO.getBizValue()); userSource.setDescription(extPointsIncreaseDTO.getDescription()); userSource.setEventType(extPointsIncreaseDTO.getEventType()); userSource.setExtraInfo(extPointsIncreaseDTO.getExtraInfo()); userSource.setOperatorName(extPointsIncreaseDTO.getOperatorName()); log.info(userSource.toString()); userSourceMapper.updateUserSource(userSource); return OutParamUtil.successResult(increasePoints(extPointsIncreaseDTO)); } catch (Exception e) { log.error("增加用户积分异常 {}", e); return OutParamUtil.failResult("增加用户积分异常:" + e, new Result()); } }
private Result increasePoints(ExtPointsIncreaseDTO extPointsIncreaseDTO) throws SDKException { Long userId = Long.valueOf(extPointsIncreaseDTO.getExtCustomerInfoDTO().getAccountId()); Result result = new Result(); result.setData(true); return result; } }