|
|
|
|
|
|
|
|
import org.springframework.beans.BeanUtils; |
|
|
import org.springframework.beans.BeanUtils; |
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
import org.springframework.stereotype.Service; |
|
|
import org.springframework.stereotype.Service; |
|
|
|
|
|
import org.springframework.transaction.annotation.Transactional; |
|
|
|
|
|
|
|
|
import java.util.Date; |
|
|
import java.util.Date; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@Override |
|
|
@Override |
|
|
|
|
|
@Transactional |
|
|
public JsonResult updateProgress(WestreamVideoQuery query) { |
|
|
public JsonResult updateProgress(WestreamVideoQuery query) { |
|
|
if(null == query.getTenantId() || StringUtils.isEmpty(query.getOpenid())){ |
|
|
if(null == query.getTenantId() || StringUtils.isEmpty(query.getOpenid())){ |
|
|
return JsonResult.error("参数为空!"); |
|
|
return JsonResult.error("参数为空!"); |
|
|
|
|
|
|
|
|
userPointsDetail.setCreateTime(new Date()); |
|
|
userPointsDetail.setCreateTime(new Date()); |
|
|
userPointsDetailMapper.insert(userPointsDetail); |
|
|
userPointsDetailMapper.insert(userPointsDetail); |
|
|
|
|
|
|
|
|
|
|
|
//用户积分更新 |
|
|
|
|
|
westreamUser.setMallPoints(westreamUser.getMallPoints() + userPointsDetail.getPointsChange()); |
|
|
|
|
|
westreamUserMapper.updateById(westreamUser); |
|
|
|
|
|
|
|
|
//TODO 对接商城 |
|
|
//TODO 对接商城 |
|
|
} |
|
|
} |
|
|
} |
|
|
} |