普惠GO服务端
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.
puhui-go/service/src/main/java/com/hfkj/qianzhu/channel/CinemaService.java

180 lines
5.5 KiB

package com.hfkj.qianzhu.channel;
import com.alibaba.fastjson.JSONObject;
import com.hfkj.common.exception.ErrorCode;
import com.hfkj.common.exception.ErrorHelp;
import com.hfkj.common.exception.SysCode;
import java.util.HashMap;
import java.util.Map;
/**
* @ClassName CinemaService
* @Author Sum1Dream
* @Description 电影票请求
* @Date 2024/6/11 上午11:31
**/
public class CinemaService {
/**
* @MethodName filmsPagedQuery
* @Description: 根据城市分页查询影片
* @param map
* @return: com.alibaba.fastjson.JSONObject
* @Author: Sum1Dream
* @Date: 2024/6/11 上午11:45
*/
public static JSONObject filmsPagedQuery(Map<String , Object> map) throws Exception {
JSONObject object = QianZhuService.request("/openApi/v1/films/filmsPagedQuery" , map);
if (object.getBoolean("success") && object.getInteger("code") == 10000) {
return object;
} else {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "查询失败!");
}
}
/**
* @MethodName pagedQueryNotShownFilms
* @Description:分页查询待上映影片
* @param map
* @return: com.alibaba.fastjson.JSONObject
* @Author: Sum1Dream
* @Date: 2024/6/11 下午3:01
*/
public static JSONObject pagedQueryNotShownFilms(Map<String , Object> map) throws Exception {
JSONObject object = QianZhuService.request("/openApi/v1/films/pagedQueryNotShownFilms" , map);
if (object.getBoolean("success") && object.getInteger("code") == 10000) {
return object;
} else {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "查询失败!");
}
}
/**
* @MethodName cinemaBrands
* @Description:查询所有影院品牌
* @return: com.alibaba.fastjson.JSONObject
* @Author: Sum1Dream
* @Date: 2024/6/11 下午3:21
*/
public static JSONObject cinemaBrands() throws Exception {
JSONObject object = QianZhuService.request("/openApi/v1/cinema-brands/listAll" , new HashMap<>());
if (object.getBoolean("success") && object.getInteger("code") == 10000) {
return object;
} else {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "查询失败!");
}
}
/**
* @MethodName cinemasPagedQuery
* @Description:分页查询城市影院
* @param map
* @return: com.alibaba.fastjson.JSONObject
* @Author: Sum1Dream
* @Date: 2024/6/11 下午3:31
*/
public static JSONObject cinemasPagedQuery(Map<String , Object> map) throws Exception {
JSONObject object = QianZhuService.request("/openApi/v2/cinemas/pagedQuery" , map);
if (object.getBoolean("success") && object.getInteger("code") == 10000) {
return object;
} else {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "查询失败!");
}
}
/**
* @MethodName listByCinemaId
* @Description:根据影院id查询影片
* @param map
* @return: com.alibaba.fastjson.JSONObject
* @Author: Sum1Dream
* @Date: 2024/6/11 下午4:09
*/
public static JSONObject listByCinemaId(Map<String , Object> map) throws Exception {
JSONObject object = QianZhuService.request("/openApi/v1/films/listByCinemaId" , map);
if (object.getBoolean("success") && object.getInteger("code") == 10000) {
return object;
} else {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "查询失败!");
}
}
/**
* @MethodName listByCinemaAndFilm
* @Description:根据影院和影片查询场次
* @param map
* @return: com.alibaba.fastjson.JSONObject
* @Author: Sum1Dream
* @Date: 2024/6/13 下午5:48
*/
public static JSONObject listByCinemaAndFilm(Map<String , Object> map) throws Exception {
JSONObject object = QianZhuService.request("/openApi/v1/films/listByCinemaAndFilm" , map);
if (object.getBoolean("success") && object.getInteger("code") == 10000) {
return object;
} else {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "查询失败!");
}
}
/**
* @MethodName pagedQuery
* @Description: 分页查询场次
* @param map
* @return: com.alibaba.fastjson.JSONObject
* @Author: Sum1Dream
* @Date: 2024/6/25 上午9:58
*/
public static JSONObject pagedQuery(Map<String , Object> map) throws Exception {
JSONObject object = QianZhuService.request("/openApi/v2/shows/pagedQuery" , map);
if (object.getBoolean("success") && object.getInteger("code") == 10000) {
return object;
} else {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "查询失败!");
}
}
/**
* @MethodName getRealTimeSeatByShowId
* @Description:查询场次实时座位
* @param map
* @return: com.alibaba.fastjson.JSONObject
* @Author: Sum1Dream
* @Date: 2024/6/25 上午10:23
*/
public static JSONObject getRealTimeSeatByShowId(Map<String , Object> map) throws Exception {
JSONObject object = QianZhuService.request("/openApi/v1/shows/getRealTimeSeatByShowId" , map);
if (object.getBoolean("success") && object.getInteger("code") == 10000) {
return object;
} else {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "查询失败!");
}
}
}