|
@@ -58,6 +58,7 @@ import java.util.*;
|
|
public class AuthApi {
|
|
public class AuthApi {
|
|
|
|
|
|
private final AuthService authService;
|
|
private final AuthService authService;
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* 授权列表
|
|
* 授权列表
|
|
*/
|
|
*/
|
|
@@ -79,7 +80,7 @@ public class AuthApi {
|
|
@GetMapping("/list")
|
|
@GetMapping("/list")
|
|
public ResponseJson<PageInfo<AuthVo>> getAuthList(@CurrentUser SysUser sysUser, Integer authUserId, Integer listType, String authParty, String mobile,
|
|
public ResponseJson<PageInfo<AuthVo>> getAuthList(@CurrentUser SysUser sysUser, Integer authUserId, Integer listType, String authParty, String mobile,
|
|
Integer status, Integer starFlag, Integer auditStatus, Integer lowerAuditStatus,
|
|
Integer status, Integer starFlag, Integer auditStatus, Integer lowerAuditStatus,
|
|
- Integer shopAuditStatus, Integer sendStatus,String authCode,
|
|
|
|
|
|
+ Integer shopAuditStatus, Integer sendStatus, String authCode,
|
|
@RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
|
|
@RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
|
|
@RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize) {
|
|
@RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize) {
|
|
// 管理员/供应商公用接口,管理员调用时传authUserId,供应商调用不传
|
|
// 管理员/供应商公用接口,管理员调用时传authUserId,供应商调用不传
|
|
@@ -93,17 +94,17 @@ public class AuthApi {
|
|
} else if (null == authUserId) {
|
|
} else if (null == authUserId) {
|
|
return ResponseJson.error("供应商用户id不能为空", null);
|
|
return ResponseJson.error("供应商用户id不能为空", null);
|
|
}
|
|
}
|
|
- return authService.getAuthList(listType, authUserId, authParty, mobile, status, starFlag, auditStatus, lowerAuditStatus, shopAuditStatus, sendStatus,authCode, pageNum, pageSize);
|
|
|
|
|
|
+ return authService.getAuthList(listType, authUserId, authParty, mobile, status, starFlag, auditStatus, lowerAuditStatus, shopAuditStatus, sendStatus, authCode, pageNum, pageSize);
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
* 授权列表
|
|
* 授权列表
|
|
- *1.7.4版本
|
|
|
|
|
|
+ * 1.7.4版本
|
|
* 新加两个查询条件
|
|
* 新加两个查询条件
|
|
- *
|
|
|
|
|
|
+ * <p>
|
|
* name 商品名称
|
|
* name 商品名称
|
|
* snCode 商品sn码
|
|
* snCode 商品sn码
|
|
- * **/
|
|
|
|
|
|
+ **/
|
|
@ApiOperation("授权列表")
|
|
@ApiOperation("授权列表")
|
|
@ApiImplicitParams({
|
|
@ApiImplicitParams({
|
|
@ApiImplicitParam(name = "authUserId", required = false, value = "供应商用户id"),
|
|
@ApiImplicitParam(name = "authUserId", required = false, value = "供应商用户id"),
|
|
@@ -121,10 +122,10 @@ public class AuthApi {
|
|
})
|
|
})
|
|
@GetMapping("/listAll")
|
|
@GetMapping("/listAll")
|
|
public ResponseJson<PageInfo<AuthVo>> getAuthListAll(@CurrentUser SysUser sysUser, Integer authUserId, Integer listType, String authParty, String mobile,
|
|
public ResponseJson<PageInfo<AuthVo>> getAuthListAll(@CurrentUser SysUser sysUser, Integer authUserId, Integer listType, String authParty, String mobile,
|
|
- Integer status, Integer starFlag, Integer auditStatus, Integer lowerAuditStatus,
|
|
|
|
- Integer shopAuditStatus, Integer sendStatus, String name, String snCode,
|
|
|
|
- @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
|
|
|
|
- @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize) {
|
|
|
|
|
|
+ Integer status, Integer starFlag, Integer auditStatus, Integer lowerAuditStatus,
|
|
|
|
+ Integer shopAuditStatus, Integer sendStatus, String name, String snCode,
|
|
|
|
+ @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
|
|
|
|
+ @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize) {
|
|
// 管理员/供应商公用接口,管理员调用时传authUserId,供应商调用不传
|
|
// 管理员/供应商公用接口,管理员调用时传authUserId,供应商调用不传
|
|
if (null != sysUser && 1 != sysUser.getId()) {
|
|
if (null != sysUser && 1 != sysUser.getId()) {
|
|
// 获取供应商用户id
|
|
// 获取供应商用户id
|
|
@@ -242,8 +243,8 @@ public class AuthApi {
|
|
List<String> bannerList = (List<String>) paramsMap.get("bannerList");
|
|
List<String> bannerList = (List<String>) paramsMap.get("bannerList");
|
|
String authParty = paramsMap.getString("authParty");
|
|
String authParty = paramsMap.getString("authParty");
|
|
Integer source = paramsMap.getInteger("source");
|
|
Integer source = paramsMap.getInteger("source");
|
|
- String relationId=paramsMap.getString("relationId");
|
|
|
|
- String relationName=paramsMap.getString("relationName");
|
|
|
|
|
|
+ String relationId = paramsMap.getString("relationId");
|
|
|
|
+ String relationName = paramsMap.getString("relationName");
|
|
if (null == source) {
|
|
if (null == source) {
|
|
// 默认供应商保存
|
|
// 默认供应商保存
|
|
source = 1;
|
|
source = 1;
|
|
@@ -287,10 +288,10 @@ public class AuthApi {
|
|
auth.setRelationName(relationName);
|
|
auth.setRelationName(relationName);
|
|
return authService.saveAuth(auth, bannerList, false, source);
|
|
return authService.saveAuth(auth, bannerList, false, source);
|
|
}
|
|
}
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* 添加/编辑授权
|
|
* 添加/编辑授权
|
|
* 1.7.4版本:编辑时新加关联机构操作
|
|
* 1.7.4版本:编辑时新加关联机构操作
|
|
- *
|
|
|
|
*/
|
|
*/
|
|
@ApiOperation("添加/编辑授权")
|
|
@ApiOperation("添加/编辑授权")
|
|
@ApiImplicitParam(name = "params", value = "authId:授权id;authParty:授权机构;provinceId;cityId;" +
|
|
@ApiImplicitParam(name = "params", value = "authId:授权id;authParty:授权机构;provinceId;cityId;" +
|
|
@@ -336,8 +337,8 @@ public class AuthApi {
|
|
String authCode = paramsMap.getString("authCode");
|
|
String authCode = paramsMap.getString("authCode");
|
|
String authDateStr = paramsMap.getString("authDate");
|
|
String authDateStr = paramsMap.getString("authDate");
|
|
SimpleDateFormat format = new SimpleDateFormat("yyyy.MM.dd");
|
|
SimpleDateFormat format = new SimpleDateFormat("yyyy.MM.dd");
|
|
- String relationId=paramsMap.getString("relationId");
|
|
|
|
- String relationName=paramsMap.getString("relationName");
|
|
|
|
|
|
+ String relationId = paramsMap.getString("relationId");
|
|
|
|
+ String relationName = paramsMap.getString("relationName");
|
|
Date authDate = null;
|
|
Date authDate = null;
|
|
if (StringUtils.isNotEmpty(authDateStr)) {
|
|
if (StringUtils.isNotEmpty(authDateStr)) {
|
|
authDate = format.parse(authDateStr);
|
|
authDate = format.parse(authDateStr);
|
|
@@ -469,24 +470,24 @@ public class AuthApi {
|
|
JSONObject paramsMap = JSONObject.parseObject(params);
|
|
JSONObject paramsMap = JSONObject.parseObject(params);
|
|
Integer authId = paramsMap.getInteger("authId");
|
|
Integer authId = paramsMap.getInteger("authId");
|
|
Integer starFlag = paramsMap.getInteger("starFlag");
|
|
Integer starFlag = paramsMap.getInteger("starFlag");
|
|
- String starNum=paramsMap.getString("starNum");
|
|
|
|
|
|
+ String starNum = paramsMap.getString("starNum");
|
|
if (null == authId) {
|
|
if (null == authId) {
|
|
return ResponseJson.error("机构id不能为空");
|
|
return ResponseJson.error("机构id不能为空");
|
|
}
|
|
}
|
|
if (null == starFlag) {
|
|
if (null == starFlag) {
|
|
return ResponseJson.error("明星机构标识不能为空");
|
|
return ResponseJson.error("明星机构标识不能为空");
|
|
}
|
|
}
|
|
- return authService.starAuth(authId, starFlag,starNum);
|
|
|
|
|
|
+ return authService.starAuth(authId, starFlag, starNum);
|
|
}
|
|
}
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* 获取机构关联的机构信息
|
|
* 获取机构关联的机构信息
|
|
* 1.7.4版本:编辑时新加关联机构操作
|
|
* 1.7.4版本:编辑时新加关联机构操作
|
|
- *
|
|
|
|
*/
|
|
*/
|
|
@PostMapping("/product/relation/list")
|
|
@PostMapping("/product/relation/list")
|
|
- public ResponseJson<List<AuthFormVo>> getRelationgInfo(@CurrentUser SysUser sysUser,@RequestBody String params){
|
|
|
|
|
|
+ public ResponseJson<List<AuthFormVo>> getRelationgInfo(@CurrentUser SysUser sysUser, @RequestBody String params) {
|
|
JSONObject paramsMap = JSONObject.parseObject(params);
|
|
JSONObject paramsMap = JSONObject.parseObject(params);
|
|
- String snCode=paramsMap.getString("snCode");
|
|
|
|
|
|
+ String snCode = paramsMap.getString("snCode");
|
|
if (null == sysUser) {
|
|
if (null == sysUser) {
|
|
return ResponseJson.error("用户信息异常", null);
|
|
return ResponseJson.error("用户信息异常", null);
|
|
}
|
|
}
|
|
@@ -496,15 +497,15 @@ public class AuthApi {
|
|
if (null == authUserId) {
|
|
if (null == authUserId) {
|
|
return ResponseJson.error("供应商用户id不能为空", null);
|
|
return ResponseJson.error("供应商用户id不能为空", null);
|
|
}
|
|
}
|
|
- return authService.getRelationgInfo(snCode,authUserId);
|
|
|
|
|
|
+ return authService.getRelationgInfo(snCode, authUserId);
|
|
}
|
|
}
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* 获取可绑定机构机构信息
|
|
* 获取可绑定机构机构信息
|
|
* 1.7.4版本:编辑时新加关联机构操作
|
|
* 1.7.4版本:编辑时新加关联机构操作
|
|
- *
|
|
|
|
*/
|
|
*/
|
|
@GetMapping("/club/bind/list")
|
|
@GetMapping("/club/bind/list")
|
|
- public ResponseJson<List<AuthFormVo>> getClubBindAuth(@CurrentUser SysUser sysUser){
|
|
|
|
|
|
+ public ResponseJson<List<AuthFormVo>> getClubBindAuth(@CurrentUser SysUser sysUser) {
|
|
if (null == sysUser) {
|
|
if (null == sysUser) {
|
|
return ResponseJson.error("用户信息异常", null);
|
|
return ResponseJson.error("用户信息异常", null);
|
|
}
|
|
}
|
|
@@ -518,70 +519,75 @@ public class AuthApi {
|
|
}
|
|
}
|
|
//-----------------------------------------------------上传视频至抖音-----------------------------------------------------------------------------------
|
|
//-----------------------------------------------------上传视频至抖音-----------------------------------------------------------------------------------
|
|
|
|
|
|
- /**
|
|
|
|
- * 用户扫码授权,获取code值
|
|
|
|
- * @param response
|
|
|
|
- * @throws IOException
|
|
|
|
- */
|
|
|
|
- @GetMapping("/check/accesstoken")
|
|
|
|
- public ResponseJson getDouYingCode(HttpServletResponse response) throws IOException {
|
|
|
|
- return authService.getDouYingCode(response);
|
|
|
|
- }
|
|
|
|
- /**
|
|
|
|
- * 根据用户的code值获取AcessToken
|
|
|
|
- * ccode 用户授权登录code
|
|
|
|
- **/
|
|
|
|
- @GetMapping("/get/douying/acesstoken")
|
|
|
|
- public ResponseJson getDouYingAcessToken(String code) throws IOException {
|
|
|
|
- return authService.getDouYingAcessToken(code);
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- /**
|
|
|
|
- * h5的方式上传视频
|
|
|
|
- * @return
|
|
|
|
- * @throws IOException
|
|
|
|
- */
|
|
|
|
- @PostMapping("/upload/video/to/douyin")
|
|
|
|
- public ResponseJson getclientToken(@RequestBody String params) throws IOException {
|
|
|
|
- JSONObject paramsMap = JSONObject.parseObject(params);
|
|
|
|
- String title = paramsMap.getString("title");
|
|
|
|
- String videoPath = paramsMap.getString("videoPath");
|
|
|
|
- Integer authId=paramsMap.getInteger("authId");
|
|
|
|
- return authService.getclientToken( title, videoPath,authId);
|
|
|
|
- }
|
|
|
|
- /**
|
|
|
|
- * 发布视频后通过webhook获取回调数据
|
|
|
|
- * @param params
|
|
|
|
- * @return
|
|
|
|
- */
|
|
|
|
- @PostMapping("/webhook")
|
|
|
|
- @ResponseBody
|
|
|
|
- @WebHooks
|
|
|
|
- public Object webhook(@RequestBody String params){
|
|
|
|
- JSONObject paramsMap = JSONObject.parseObject(params);
|
|
|
|
- System.out.println(paramsMap.getString("item_id"));
|
|
|
|
- String content = paramsMap.getString("content");
|
|
|
|
- JSONObject contentList = JSONObject.parseObject(content);
|
|
|
|
- System.out.println(content);
|
|
|
|
- String challenge = contentList.getString("challenge");
|
|
|
|
- System.out.println(challenge);
|
|
|
|
- String itemId=contentList.getString("item_id");
|
|
|
|
- System.out.println(itemId);
|
|
|
|
- String shareId=contentList.getString("share_id");
|
|
|
|
- //根据回调的shareId保存itemId
|
|
|
|
- if(StringUtils.isNotEmpty(shareId)&&StringUtils.isNotEmpty(itemId)){
|
|
|
|
- if (authService.getShareId(shareId)){
|
|
|
|
- //根据shareId保存itemId
|
|
|
|
- authService.savaItemIdByShareId(shareId,itemId);
|
|
|
|
- }
|
|
|
|
|
|
+ /**
|
|
|
|
+ * 用户扫码授权,获取code值
|
|
|
|
+ *
|
|
|
|
+ * @param response
|
|
|
|
+ * @throws IOException
|
|
|
|
+ */
|
|
|
|
+ @GetMapping("/check/accesstoken")
|
|
|
|
+ public ResponseJson getDouYingCode(HttpServletResponse response) throws IOException {
|
|
|
|
+ return authService.getDouYingCode(response);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 根据用户的code值获取AcessToken
|
|
|
|
+ * ccode 用户授权登录code
|
|
|
|
+ **/
|
|
|
|
+ @GetMapping("/get/douying/acesstoken")
|
|
|
|
+ public ResponseJson getDouYingAcessToken(String code) throws IOException {
|
|
|
|
+ return authService.getDouYingAcessToken(code);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * h5的方式上传视频
|
|
|
|
+ *
|
|
|
|
+ * @return
|
|
|
|
+ * @throws IOException
|
|
|
|
+ */
|
|
|
|
+ @PostMapping("/upload/video/to/douyin")
|
|
|
|
+ public ResponseJson getclientToken(@RequestBody String params) throws IOException {
|
|
|
|
+ JSONObject paramsMap = JSONObject.parseObject(params);
|
|
|
|
+ String title = paramsMap.getString("title");
|
|
|
|
+ String videoPath = paramsMap.getString("videoPath");
|
|
|
|
+ Integer authId = paramsMap.getInteger("authId");
|
|
|
|
+ return authService.getclientToken(title, videoPath, authId);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 发布视频后通过webhook获取回调数据
|
|
|
|
+ *
|
|
|
|
+ * @param params
|
|
|
|
+ * @return
|
|
|
|
+ */
|
|
|
|
+ @PostMapping("/webhook")
|
|
|
|
+ @ResponseBody
|
|
|
|
+ @WebHooks
|
|
|
|
+ public Object webhook(@RequestBody String params) {
|
|
|
|
+ JSONObject paramsMap = JSONObject.parseObject(params);
|
|
|
|
+ System.out.println(paramsMap.getString("item_id"));
|
|
|
|
+ String content = paramsMap.getString("content");
|
|
|
|
+ JSONObject contentList = JSONObject.parseObject(content);
|
|
|
|
+ System.out.println(content);
|
|
|
|
+ String challenge = contentList.getString("challenge");
|
|
|
|
+ System.out.println(challenge);
|
|
|
|
+ String itemId = contentList.getString("item_id");
|
|
|
|
+ System.out.println(itemId);
|
|
|
|
+ String shareId = contentList.getString("share_id");
|
|
|
|
+ //根据回调的shareId保存itemId
|
|
|
|
+ if (StringUtils.isNotEmpty(shareId) && StringUtils.isNotEmpty(itemId)) {
|
|
|
|
+ if (authService.getShareId(shareId)) {
|
|
|
|
+ //根据shareId保存itemId
|
|
|
|
+ authService.savaItemIdByShareId(shareId, itemId);
|
|
}
|
|
}
|
|
- System.out.println(shareId);
|
|
|
|
- Map<String ,String> map=new HashMap<>();
|
|
|
|
- map.put("challenge",challenge);
|
|
|
|
- map.put("item_id",itemId);
|
|
|
|
- map.put("share_id",shareId);
|
|
|
|
- return map;
|
|
|
|
}
|
|
}
|
|
|
|
+ System.out.println(shareId);
|
|
|
|
+ Map<String, String> map = new HashMap<>();
|
|
|
|
+ map.put("challenge", challenge);
|
|
|
|
+ map.put("item_id", itemId);
|
|
|
|
+ map.put("share_id", shareId);
|
|
|
|
+ return map;
|
|
|
|
+ }
|
|
|
|
|
|
/**
|
|
/**
|
|
* 把抖音分享视频口令以短信推送给机构
|
|
* 把抖音分享视频口令以短信推送给机构
|
|
@@ -589,27 +595,27 @@ public class AuthApi {
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
@PostMapping("/sms/send/douyin")
|
|
@PostMapping("/sms/send/douyin")
|
|
- public ResponseJson sms(@RequestBody String params){//String mobile,String content
|
|
|
|
- JSONObject jsonObject=JSONObject.parseObject(params);
|
|
|
|
- //根据authId获取手机号
|
|
|
|
- Integer authId = jsonObject.getInteger("authId");
|
|
|
|
|
|
+ public ResponseJson sms(@RequestBody String params) {//String mobile,String content
|
|
|
|
+ JSONObject jsonObject = JSONObject.parseObject(params);
|
|
|
|
+ //根据authId获取手机号
|
|
|
|
+ Integer authId = jsonObject.getInteger("authId");
|
|
String mobile = authService.getMobileByAuthId(authId);
|
|
String mobile = authService.getMobileByAuthId(authId);
|
|
//根据authId获取供应商名称
|
|
//根据authId获取供应商名称
|
|
String authUserName = authService.getAuthUserName(authId);
|
|
String authUserName = authService.getAuthUserName(authId);
|
|
- String content=jsonObject.getString("content");
|
|
|
|
|
|
+ String content = jsonObject.getString("content");
|
|
// String authParty=jsonObject.getString("authParty");
|
|
// String authParty=jsonObject.getString("authParty");
|
|
// 短信类型:1通知短信,2验证码短信,3营销短信
|
|
// 短信类型:1通知短信,2验证码短信,3营销短信
|
|
- String con=content.substring(0,content.indexOf("/")+1);
|
|
|
|
- String cs=content.substring(content.indexOf("com")+3);
|
|
|
|
- Integer type=1;
|
|
|
|
- String kouLin="["+authUserName+"]您在认证通抖音视频挑战赛发布的视频已成功上传至抖音平台,抖音分享口令为:"+con+" https://v.douyin.com"+cs+",您可复制该口令后去抖音平台打开";
|
|
|
|
|
|
+ String con = content.substring(0, content.indexOf("/") + 1);
|
|
|
|
+ String cs = content.substring(content.indexOf("com") + 3);
|
|
|
|
+ Integer type = 1;
|
|
|
|
+ String kouLin = "[" + authUserName + "]您在认证通抖音视频挑战赛发布的视频已成功上传至抖音平台,抖音分享口令为:" + con + " https://v.douyin.com" + cs + ",您可复制该口令后去抖音平台打开";
|
|
Boolean flag = SmsUtils.sendSms(type, mobile, kouLin);
|
|
Boolean flag = SmsUtils.sendSms(type, mobile, kouLin);
|
|
- if (flag){
|
|
|
|
|
|
+ if (flag) {
|
|
//短信发送成功后,保存口令
|
|
//短信发送成功后,保存口令
|
|
- authService.savaDyCommand(authId,content);
|
|
|
|
|
|
+ authService.savaDyCommand(authId, content);
|
|
return ResponseJson.success();
|
|
return ResponseJson.success();
|
|
- }else{
|
|
|
|
- return ResponseJson.error("短信发送失败-----"+mobile);
|
|
|
|
|
|
+ } else {
|
|
|
|
+ return ResponseJson.error("短信发送失败-----" + mobile);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@@ -704,11 +710,12 @@ public class AuthApi {
|
|
|
|
|
|
/**
|
|
/**
|
|
* 保存活动信息
|
|
* 保存活动信息
|
|
|
|
+ *
|
|
* @param params
|
|
* @param params
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
@PostMapping("/save/activity/time")
|
|
@PostMapping("/save/activity/time")
|
|
- public ResponseJson saveActivityTime(@CurrentUser SysUser sysUser,@RequestBody String params){
|
|
|
|
|
|
+ public ResponseJson saveActivityTime(@CurrentUser SysUser sysUser, @RequestBody String params) {
|
|
if (null == sysUser) {
|
|
if (null == sysUser) {
|
|
return ResponseJson.error("用户信息异常", null);
|
|
return ResponseJson.error("用户信息异常", null);
|
|
}
|
|
}
|
|
@@ -718,19 +725,21 @@ public class AuthApi {
|
|
if (null == authUserId) {
|
|
if (null == authUserId) {
|
|
return ResponseJson.error("供应商用户id不能为空", null);
|
|
return ResponseJson.error("供应商用户id不能为空", null);
|
|
}
|
|
}
|
|
- JSONObject jsonObject=JSONObject.parseObject(params);
|
|
|
|
|
|
+ JSONObject jsonObject = JSONObject.parseObject(params);
|
|
String startTime = jsonObject.getString("startTime");
|
|
String startTime = jsonObject.getString("startTime");
|
|
String endTime = jsonObject.getString("endTime");
|
|
String endTime = jsonObject.getString("endTime");
|
|
Integer status = jsonObject.getInteger("status");
|
|
Integer status = jsonObject.getInteger("status");
|
|
- authService.saveActivityTime(startTime,endTime,status,authUserId);
|
|
|
|
|
|
+ authService.saveActivityTime(startTime, endTime, status, authUserId);
|
|
return ResponseJson.success();
|
|
return ResponseJson.success();
|
|
}
|
|
}
|
|
|
|
+
|
|
/**
|
|
/**
|
|
- *获取活动信息
|
|
|
|
|
|
+ * 获取活动信息
|
|
|
|
+ *
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
@GetMapping("/get/activity/time")
|
|
@GetMapping("/get/activity/time")
|
|
- public ResponseJson<ChallengeActivityVo> getActivityTime(@CurrentUser SysUser sysUser){
|
|
|
|
|
|
+ public ResponseJson<ChallengeActivityVo> getActivityTime(@CurrentUser SysUser sysUser) {
|
|
if (null == sysUser) {
|
|
if (null == sysUser) {
|
|
return ResponseJson.error("用户信息异常", null);
|
|
return ResponseJson.error("用户信息异常", null);
|
|
}
|
|
}
|
|
@@ -740,11 +749,12 @@ public class AuthApi {
|
|
if (null == authUserId) {
|
|
if (null == authUserId) {
|
|
return ResponseJson.error("供应商用户id不能为空", null);
|
|
return ResponseJson.error("供应商用户id不能为空", null);
|
|
}
|
|
}
|
|
- return authService.getActivityTime(authUserId);
|
|
|
|
|
|
+ return authService.getActivityTime(authUserId);
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
* 获取已发布视频
|
|
* 获取已发布视频
|
|
|
|
+ *
|
|
* @param sysUser
|
|
* @param sysUser
|
|
* @param status
|
|
* @param status
|
|
* @param cursor
|
|
* @param cursor
|
|
@@ -752,8 +762,8 @@ public class AuthApi {
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
@GetMapping("/get/published/video/list")
|
|
@GetMapping("/get/published/video/list")
|
|
- public ResponseJson<PageInfo<ChallengeRoundVo>> getPublishedVideoList(@CurrentUser SysUser sysUser,Integer status,String mobile,String authParty,Integer cursor,Integer count, @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
|
|
|
|
- @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize){
|
|
|
|
|
|
+ public ResponseJson<PageInfo<ChallengeRoundVo>> getPublishedVideoList(@CurrentUser SysUser sysUser, Integer status, String mobile, String authParty, Integer cursor, Integer count, @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
|
|
|
|
+ @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize) {
|
|
if (null == sysUser) {
|
|
if (null == sysUser) {
|
|
return ResponseJson.error("用户信息异常", null);
|
|
return ResponseJson.error("用户信息异常", null);
|
|
}
|
|
}
|
|
@@ -763,20 +773,22 @@ public class AuthApi {
|
|
if (null == authUserId) {
|
|
if (null == authUserId) {
|
|
return ResponseJson.error("供应商用户id不能为空", null);
|
|
return ResponseJson.error("供应商用户id不能为空", null);
|
|
}
|
|
}
|
|
- if(count==null){
|
|
|
|
- count=10;
|
|
|
|
|
|
+ if (count == null) {
|
|
|
|
+ count = 10;
|
|
}
|
|
}
|
|
- if(cursor==null){
|
|
|
|
- cursor=0;
|
|
|
|
|
|
+ if (cursor == null) {
|
|
|
|
+ cursor = 0;
|
|
}
|
|
}
|
|
- return authService.getPublishedVideo(mobile,authParty,status,cursor,count,authUserId,pageNum,pageSize);
|
|
|
|
|
|
+ return authService.getPublishedVideo(mobile, authParty, status, cursor, count, authUserId, pageNum, pageSize);
|
|
}
|
|
}
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* 获取机构已发布视频的机构下拉列表
|
|
* 获取机构已发布视频的机构下拉列表
|
|
|
|
+ *
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
@GetMapping("/get/auth/party/list")
|
|
@GetMapping("/get/auth/party/list")
|
|
- public ResponseJson<List<ChallengeRoundVo>> getAuthPartylist(@CurrentUser SysUser sysUser){
|
|
|
|
|
|
+ public ResponseJson<List<ChallengeRoundVo>> getAuthPartylist(@CurrentUser SysUser sysUser) {
|
|
if (null == sysUser) {
|
|
if (null == sysUser) {
|
|
return ResponseJson.error("用户信息异常", null);
|
|
return ResponseJson.error("用户信息异常", null);
|
|
}
|
|
}
|
|
@@ -791,29 +803,38 @@ public class AuthApi {
|
|
|
|
|
|
/**
|
|
/**
|
|
* 删除视频
|
|
* 删除视频
|
|
|
|
+ *
|
|
* @param videoId
|
|
* @param videoId
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
- @GetMapping("/del/video")
|
|
|
|
- public ResponseJson delVideo(Integer videoId){
|
|
|
|
|
|
+ @GetMapping("/del/video")
|
|
|
|
+ public ResponseJson delVideo(Integer videoId) {
|
|
//删除阿里云存储视频
|
|
//删除阿里云存储视频
|
|
- String ossName = authService.getOssNameAuthId(videoId);
|
|
|
|
- OSSUtils.deleteSingleFile(ossName);
|
|
|
|
- //删除视频信息
|
|
|
|
- authService.deleteVideoByAuthId(videoId);
|
|
|
|
- return ResponseJson.success();
|
|
|
|
|
|
+ String ossName = authService.getOssNameAuthId(videoId);
|
|
|
|
+ OSSUtils.deleteSingleFile(ossName);
|
|
|
|
+ //删除视频信息
|
|
|
|
+ authService.deleteVideoByAuthId(videoId);
|
|
|
|
+ return ResponseJson.success();
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
* 下载视频
|
|
* 下载视频
|
|
|
|
+ *
|
|
* @param fileId
|
|
* @param fileId
|
|
* @param response
|
|
* @param response
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
@GetMapping("/downLoad/chose/zip")
|
|
@GetMapping("/downLoad/chose/zip")
|
|
- public ResponseJson downLoadChoseZip(String fileId,HttpServletResponse response) {
|
|
|
|
|
|
+ public ResponseJson downLoadChoseZip(String fileId, HttpServletResponse response) {
|
|
|
|
|
|
- return authService.downLoadChoseZip(fileId,response);
|
|
|
|
|
|
+ return authService.downLoadChoseZip(fileId, response);
|
|
}
|
|
}
|
|
|
|
|
|
-}
|
|
|
|
|
|
+ /**
|
|
|
|
+ * 根据id获取信息
|
|
|
|
+ */
|
|
|
|
+ @GetMapping("/get/info/by/id")
|
|
|
|
+ public ResponseJson<ChallengeRoundVo> getInfoById(Integer videoId) {
|
|
|
|
+ return authService.getInfoById(videoId);
|
|
|
|
+ }
|
|
|
|
+}
|