|
@@ -14,6 +14,7 @@ import com.ruixuan.common.core.domain.AjaxResult;
|
|
|
import com.ruixuan.common.core.page.TableDataInfo;
|
|
|
import com.ruixuan.common.enums.BusinessType;
|
|
|
import com.ruixuan.common.utils.Check;
|
|
|
+import com.ruixuan.isc.entity.KuaishouAccessToken;
|
|
|
import com.ruixuan.isc.entity.KuaishouItemList;
|
|
|
import com.ruixuan.isc.service.IAccessTokenService;
|
|
|
import com.ruixuan.isc.service.IKuaishouItemListService;
|
|
@@ -51,6 +52,23 @@ public class KuaishouItemListController extends BaseController {
|
|
|
accessTokenService.refreshAccessToken();
|
|
|
}
|
|
|
|
|
|
+ @GetMapping("/getRegimental")
|
|
|
+ @ApiOperation(value = "团长信息")
|
|
|
+ public JSONObject getRegimental() {
|
|
|
+ JSONObject returnJson = new JSONObject();
|
|
|
+ try {
|
|
|
+ List<JSONObject> list = kuaishouItemListService.getRegimental();
|
|
|
+ returnJson.put("code", 0);
|
|
|
+ returnJson.put("message", "success");
|
|
|
+ returnJson.put("data", list);
|
|
|
+ } catch (Exception e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ returnJson.put("code", -1);
|
|
|
+ returnJson.put("message", e.getMessage());
|
|
|
+ }
|
|
|
+ return returnJson;
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
@GetMapping("/getActivityIds")
|
|
|
@ApiOperation(value = "活动列表")
|
|
@@ -77,14 +95,23 @@ public class KuaishouItemListController extends BaseController {
|
|
|
@ApiOperation(value = "商品详情预览")
|
|
|
public JSONObject getItemPreview(
|
|
|
@ApiParam("活动ID") @RequestParam(value = "activityId", required = false) Long activityId,
|
|
|
- @ApiParam("商品ID") @RequestParam(value = "itemId", required = false) Long itemId) {
|
|
|
+ @ApiParam("商品ID") @RequestParam(value = "itemId", required = false) Long itemId,
|
|
|
+ @ApiParam("团长ID") @RequestParam(value = "regId", required = false) Long regId
|
|
|
+
|
|
|
+ ) {
|
|
|
JSONObject returnJson = new JSONObject();
|
|
|
try {
|
|
|
-
|
|
|
if (Check.isNull(itemId)) {
|
|
|
throw new Exception("请传入商品ID");
|
|
|
}
|
|
|
- String accessToken = accessTokenService.getAccessToken();
|
|
|
+ if (Check.isNull(regId)) {
|
|
|
+ throw new Exception("请选择所属团");
|
|
|
+ }
|
|
|
+ if (Check.isNull(activityId)) {
|
|
|
+ throw new Exception("请输入活动ID");
|
|
|
+ }
|
|
|
+ KuaishouAccessToken accessToken = accessTokenService.getAccessToken(regId);
|
|
|
+
|
|
|
if (Check.isNull(accessToken)) {
|
|
|
throw new Exception("获取token授权信息为空");
|
|
|
}
|
|
@@ -313,7 +340,7 @@ public class KuaishouItemListController extends BaseController {
|
|
|
if (Check.isNull(examineName)) {
|
|
|
throw new Exception("请传入审核人名称");
|
|
|
}
|
|
|
- kuaishouItemListService.batchItemProcess(itemIds, status,examineId,examineName);
|
|
|
+ kuaishouItemListService.batchItemProcess(itemIds, status, examineId, examineName);
|
|
|
returnJson.put("code", 0);
|
|
|
returnJson.put("message", "批量审核通过");
|
|
|
} catch (Exception e) {
|