|
@@ -17,6 +17,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
import com.fdkankan.ucenter.service.IUserService;
|
|
|
import com.fdkankan.ucenter.vo.request.SceneParam;
|
|
|
import com.fdkankan.ucenter.vo.response.ScenePlusVo;
|
|
|
+import org.apache.commons.lang3.StringUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
@@ -46,21 +47,20 @@ public class ScenePlusVoidServiceImpl extends ServiceImpl<IScenePlusVoidMapper,
|
|
|
UploadToOssUtil uploadToOssUtil;
|
|
|
|
|
|
@Override
|
|
|
- public void setStatus(Long plusId, Integer type,String token) {
|
|
|
- if(plusId == null || type == null){
|
|
|
+ public void setStatus(String num, Integer type,String token) {
|
|
|
+ if(StringUtils.isEmpty(num) || type == null){
|
|
|
throw new BusinessException(ErrorCode.MISSING_REQUIRED_PARAMETERS);
|
|
|
}
|
|
|
- ScenePlus scenePlus = scenePlusService.getById(plusId);
|
|
|
+ ScenePlus scenePlus = scenePlusService.getByNum(num);
|
|
|
if(scenePlus == null){
|
|
|
throw new BusinessException(-1,"场景不存在");
|
|
|
}
|
|
|
- ScenePlusVoid plusVoid ;
|
|
|
User user = userService.getByToken(token);
|
|
|
- plusVoid = this.getByPlusId(plusId);
|
|
|
+ ScenePlusVoid plusVoid = this.getByPlusId(scenePlus.getId());
|
|
|
if(plusVoid == null){
|
|
|
plusVoid = new ScenePlusVoid();
|
|
|
plusVoid.setUserId(user.getId());
|
|
|
- plusVoid.setPlusId(plusId);
|
|
|
+ plusVoid.setPlusId(scenePlus.getId());
|
|
|
this.save(plusVoid);
|
|
|
}else {
|
|
|
plusVoid.setStatus(type);
|