You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
43 lines
1.2 KiB
43 lines
1.2 KiB
package hl.service; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
@Service |
|
public class WxService { |
|
|
|
/*@Autowired |
|
private IBVideoAllowService ibVideoAllowService; |
|
|
|
@Autowired |
|
private IBVideosService videosService; |
|
|
|
@Autowired |
|
private VideoConfig videoConfig; |
|
|
|
|
|
public synchronized AjaxResult getOwnVideo(String id, String openid){ |
|
|
|
BVideoAllow bVideoAllow =new BVideoAllow(); |
|
bVideoAllow.setAllowId(id); |
|
List<BVideoAllow> list= ibVideoAllowService.selectBVideoAllowList(bVideoAllow); |
|
if (list==null||list.size()==0){ |
|
return AjaxResult.error(404,"未找到链接"); |
|
} |
|
BVideoAllow allow=list.get(0);//允许对象 |
|
|
|
String loadOpenid=allow.getWxOpenid(); |
|
if (StrUtil.isBlankIfStr(loadOpenid)){ |
|
allow.setWxOpenid(openid); |
|
ibVideoAllowService.updateBVideoAllow(allow); |
|
|
|
}else if (!loadOpenid.equals(openid)){ |
|
return AjaxResult.error(401,"视频已被绑定"); |
|
} |
|
BVideos videos=videosService.selectBVideosById(allow.getVideoId()); |
|
if (videos==null){ |
|
return AjaxResult.error(404,"未找到视频"); |
|
} |
|
|
|
return AjaxResult.success(id+"----"+openid); |
|
}*/ |
|
}
|
|
|