Przeglądaj źródła

Merge remote-tracking branch 'origin/master'

xuzuoyun 5 lat temu
rodzic
commit
d23cb5fe4a
19 zmienionych plików z 971 dodań i 35 usunięć
  1. 6 1
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/CallbackController.java
  2. 243 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/kuaishou/controller/KuaiShouAdvertiserBaseInfoController.java
  3. 7 2
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/kuaishou/controller/KuaiShouController.java
  4. 1 1
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/kuaishou/controller/KuaiShouCreateController.java
  5. 77 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/kuaishou/entity/KuaiShouAdvertiserBaseInfo.java
  6. 17 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/kuaishou/mapper/KuaiShouAdvertiserBaseInfoMapper.java
  7. 5 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/kuaishou/mapper/xml/KuaiShouAdvertiserBaseInfoMapper.xml
  8. 14 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/kuaishou/service/IKuaiShouAdvertiserBaseInfoService.java
  9. 17 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/kuaishou/service/IKuaishouInterfaceService.java
  10. 19 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/kuaishou/service/impl/KuaiShouAdvertiserBaseInfoServiceImpl.java
  11. 4 11
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/kuaishou/service/impl/KuaiShouCreateServiceImpl.java
  12. 4 3
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/kuaishou/service/impl/KuaiShouImageServiceImpl.java
  13. 3 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/kuaishou/service/impl/KuaiShouVideoServiceImpl.java
  14. 79 15
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/kuaishou/service/impl/KuaishouInterfaceServiceImpl.java
  15. 178 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/kuaishou/vue/KuaiShouAdvertiserBaseInfoList.vue
  16. 143 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/kuaishou/vue/modules/KuaiShouAdvertiserBaseInfoModal.vue
  17. 150 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/kuaishou/vue/modules/KuaiShouAdvertiserBaseInfoModal__Style#Drawer.vue
  18. 0 2
      module-common/src/main/java/cn/com/ctop/common/utils/HttpUtils.java
  19. 4 0
      module-kuaishou/src/main/java/constant/KuaishouInterfaceConstant.java

+ 6 - 1
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/CallbackController.java

@@ -87,7 +87,12 @@ public class CallbackController {
                     userAllocation.setDistributionName(distributionName);
                     userAllocation.setUserId(userId);
                     userAllocation.setAdvertiserId(advertiserId);
-                    userAllocation.setAuthName(json.getString("authName"));
+
+
+                    Map<String, Object> advertiseBaseInfoMap = kuaishouInterfaceService.advertiserInfo(accountId, token.getAccessToken());// 获取快手昵称
+                    if ((Integer) advertiseBaseInfoMap.get("code") == 0) {
+                        userAllocation.setAuthName((String) advertiseBaseInfoMap.get("userName"));
+                    }
                     userAllocation.setAdvertiserName(advertiserName);
                     userAllocation.setMediaId(mediaId);
                     userAllocation.setDepartmentId(departmentId);

+ 243 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/kuaishou/controller/KuaiShouAdvertiserBaseInfoController.java

@@ -0,0 +1,243 @@
+package org.jeecg.modules.kuaishou.controller;
+
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map;
+import java.io.IOException;
+import java.io.UnsupportedEncodingException;
+import java.net.URLDecoder;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import org.jeecg.common.api.vo.Result;
+import org.jeecg.common.system.query.QueryGenerator;
+import org.jeecg.common.aspect.annotation.AutoLog;
+import org.jeecg.common.util.oConvertUtils;
+import org.jeecg.modules.kuaishou.entity.KuaiShouAdvertiserBaseInfo;
+import org.jeecg.modules.kuaishou.service.IKuaiShouAdvertiserBaseInfoService;
+import java.util.Date;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import lombok.extern.slf4j.Slf4j;
+
+import org.jeecgframework.poi.excel.ExcelImportUtil;
+import org.jeecgframework.poi.excel.def.NormalExcelConstants;
+import org.jeecgframework.poi.excel.entity.ExportParams;
+import org.jeecgframework.poi.excel.entity.ImportParams;
+import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.multipart.MultipartFile;
+import org.springframework.web.multipart.MultipartHttpServletRequest;
+import org.springframework.web.servlet.ModelAndView;
+import com.alibaba.fastjson.JSON;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+
+ /**
+ * 快手-广告主基本信息
+ * @author jeecg-boot
+ * @date   2019-09-18
+ * @version V1.0
+ */
+@Slf4j
+@Api(tags="快手-广告主基本信息")
+@RestController
+@RequestMapping("/kuaishou/kuaiShouAdvertiserBaseInfo")
+public class KuaiShouAdvertiserBaseInfoController {
+	@Autowired
+	private IKuaiShouAdvertiserBaseInfoService kuaiShouAdvertiserBaseInfoService;
+	
+	/**
+	  * 分页列表查询
+	 * @param kuaiShouAdvertiserBaseInfo
+	 * @param pageNo
+	 * @param pageSize
+	 * @param req
+	 * @return
+	 */
+	@AutoLog(value = "快手-广告主基本信息-分页列表查询")
+	@ApiOperation(value="快手-广告主基本信息-分页列表查询", notes="快手-广告主基本信息-分页列表查询")
+	@GetMapping(value = "/list")
+	public Result<IPage<KuaiShouAdvertiserBaseInfo>> queryPageList(KuaiShouAdvertiserBaseInfo kuaiShouAdvertiserBaseInfo,
+									  @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
+									  @RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
+									  HttpServletRequest req) {
+		Result<IPage<KuaiShouAdvertiserBaseInfo>> result = new Result<IPage<KuaiShouAdvertiserBaseInfo>>();
+		QueryWrapper<KuaiShouAdvertiserBaseInfo> queryWrapper = QueryGenerator.initQueryWrapper(kuaiShouAdvertiserBaseInfo, req.getParameterMap());
+		Page<KuaiShouAdvertiserBaseInfo> page = new Page<KuaiShouAdvertiserBaseInfo>(pageNo, pageSize);
+		IPage<KuaiShouAdvertiserBaseInfo> pageList = kuaiShouAdvertiserBaseInfoService.page(page, queryWrapper);
+		result.setSuccess(true);
+		result.setResult(pageList);
+		return result;
+	}
+	
+	/**
+	  *   添加
+	 * @param kuaiShouAdvertiserBaseInfo
+	 * @return
+	 */
+	@AutoLog(value = "快手-广告主基本信息-添加")
+	@ApiOperation(value="快手-广告主基本信息-添加", notes="快手-广告主基本信息-添加")
+	@PostMapping(value = "/add")
+	public Result<KuaiShouAdvertiserBaseInfo> add(@RequestBody KuaiShouAdvertiserBaseInfo kuaiShouAdvertiserBaseInfo) {
+		Result<KuaiShouAdvertiserBaseInfo> result = new Result<KuaiShouAdvertiserBaseInfo>();
+		try {
+			kuaiShouAdvertiserBaseInfoService.save(kuaiShouAdvertiserBaseInfo);
+			result.success("添加成功!");
+		} catch (Exception e) {
+			log.error(e.getMessage(),e);
+			result.error500("操作失败");
+		}
+		return result;
+	}
+	
+	/**
+	  *  编辑
+	 * @param kuaiShouAdvertiserBaseInfo
+	 * @return
+	 */
+	@AutoLog(value = "快手-广告主基本信息-编辑")
+	@ApiOperation(value="快手-广告主基本信息-编辑", notes="快手-广告主基本信息-编辑")
+	@PutMapping(value = "/edit")
+	public Result<KuaiShouAdvertiserBaseInfo> edit(@RequestBody KuaiShouAdvertiserBaseInfo kuaiShouAdvertiserBaseInfo) {
+		Result<KuaiShouAdvertiserBaseInfo> result = new Result<KuaiShouAdvertiserBaseInfo>();
+		KuaiShouAdvertiserBaseInfo kuaiShouAdvertiserBaseInfoEntity = kuaiShouAdvertiserBaseInfoService.getById(kuaiShouAdvertiserBaseInfo.getId());
+		if(kuaiShouAdvertiserBaseInfoEntity==null) {
+			result.error500("未找到对应实体");
+		}else {
+			boolean ok = kuaiShouAdvertiserBaseInfoService.updateById(kuaiShouAdvertiserBaseInfo);
+			if(ok) {
+				result.success("修改成功!");
+			}
+		}
+		
+		return result;
+	}
+	
+	/**
+	  *   通过id删除
+	 * @param id
+	 * @return
+	 */
+	@AutoLog(value = "快手-广告主基本信息-通过id删除")
+	@ApiOperation(value="快手-广告主基本信息-通过id删除", notes="快手-广告主基本信息-通过id删除")
+	@DeleteMapping(value = "/delete")
+	public Result<?> delete(@RequestParam(name="id",required=true) String id) {
+		try {
+			kuaiShouAdvertiserBaseInfoService.removeById(id);
+		} catch (Exception e) {
+			log.error("删除失败",e.getMessage());
+			return Result.error("删除失败!");
+		}
+		return Result.ok("删除成功!");
+	}
+	
+	/**
+	  *  批量删除
+	 * @param ids
+	 * @return
+	 */
+	@AutoLog(value = "快手-广告主基本信息-批量删除")
+	@ApiOperation(value="快手-广告主基本信息-批量删除", notes="快手-广告主基本信息-批量删除")
+	@DeleteMapping(value = "/deleteBatch")
+	public Result<KuaiShouAdvertiserBaseInfo> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
+		Result<KuaiShouAdvertiserBaseInfo> result = new Result<KuaiShouAdvertiserBaseInfo>();
+		if(ids==null || "".equals(ids.trim())) {
+			result.error500("参数不识别!");
+		}else {
+			this.kuaiShouAdvertiserBaseInfoService.removeByIds(Arrays.asList(ids.split(",")));
+			result.success("删除成功!");
+		}
+		return result;
+	}
+	
+	/**
+	  * 通过id查询
+	 * @param id
+	 * @return
+	 */
+	@AutoLog(value = "快手-广告主基本信息-通过id查询")
+	@ApiOperation(value="快手-广告主基本信息-通过id查询", notes="快手-广告主基本信息-通过id查询")
+	@GetMapping(value = "/queryById")
+	public Result<KuaiShouAdvertiserBaseInfo> queryById(@RequestParam(name="id",required=true) String id) {
+		Result<KuaiShouAdvertiserBaseInfo> result = new Result<KuaiShouAdvertiserBaseInfo>();
+		KuaiShouAdvertiserBaseInfo kuaiShouAdvertiserBaseInfo = kuaiShouAdvertiserBaseInfoService.getById(id);
+		if(kuaiShouAdvertiserBaseInfo==null) {
+			result.error500("未找到对应实体");
+		}else {
+			result.setResult(kuaiShouAdvertiserBaseInfo);
+			result.setSuccess(true);
+		}
+		return result;
+	}
+
+  /**
+      * 导出excel
+   *
+   * @param request
+   * @param response
+   */
+  @RequestMapping(value = "/exportXls")
+  public ModelAndView exportXls(HttpServletRequest request, HttpServletResponse response) {
+      // Step.1 组装查询条件
+      QueryWrapper<KuaiShouAdvertiserBaseInfo> queryWrapper = null;
+      try {
+          String paramsStr = request.getParameter("paramsStr");
+          if (oConvertUtils.isNotEmpty(paramsStr)) {
+              String deString = URLDecoder.decode(paramsStr, "UTF-8");
+              KuaiShouAdvertiserBaseInfo kuaiShouAdvertiserBaseInfo = JSON.parseObject(deString, KuaiShouAdvertiserBaseInfo.class);
+              queryWrapper = QueryGenerator.initQueryWrapper(kuaiShouAdvertiserBaseInfo, request.getParameterMap());
+          }
+      } catch (UnsupportedEncodingException e) {
+          e.printStackTrace();
+      }
+
+      //Step.2 AutoPoi 导出Excel
+      ModelAndView mv = new ModelAndView(new JeecgEntityExcelView());
+      List<KuaiShouAdvertiserBaseInfo> pageList = kuaiShouAdvertiserBaseInfoService.list(queryWrapper);
+      //导出文件名称
+      mv.addObject(NormalExcelConstants.FILE_NAME, "快手-广告主基本信息列表");
+      mv.addObject(NormalExcelConstants.CLASS, KuaiShouAdvertiserBaseInfo.class);
+      mv.addObject(NormalExcelConstants.PARAMS, new ExportParams("快手-广告主基本信息列表数据", "导出人:Jeecg", "导出信息"));
+      mv.addObject(NormalExcelConstants.DATA_LIST, pageList);
+      return mv;
+  }
+
+  /**
+      * 通过excel导入数据
+   *
+   * @param request
+   * @param response
+   * @return
+   */
+  @RequestMapping(value = "/importExcel", method = RequestMethod.POST)
+  public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
+      MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request;
+      Map<String, MultipartFile> fileMap = multipartRequest.getFileMap();
+      for (Map.Entry<String, MultipartFile> entity : fileMap.entrySet()) {
+          MultipartFile file = entity.getValue();
+          ImportParams params = new ImportParams();
+          params.setTitleRows(2);
+          params.setHeadRows(1);
+          params.setNeedSave(true);
+          try {
+              List<KuaiShouAdvertiserBaseInfo> listKuaiShouAdvertiserBaseInfos = ExcelImportUtil.importExcel(file.getInputStream(), KuaiShouAdvertiserBaseInfo.class, params);
+              kuaiShouAdvertiserBaseInfoService.saveBatch(listKuaiShouAdvertiserBaseInfos);
+              return Result.ok("文件导入成功!数据行数:" + listKuaiShouAdvertiserBaseInfos.size());
+          } catch (Exception e) {
+              log.error(e.getMessage(),e);
+              return Result.error("文件导入失败:"+e.getMessage());
+          } finally {
+              try {
+                  file.getInputStream().close();
+              } catch (IOException e) {
+                  e.printStackTrace();
+              }
+          }
+      }
+      return Result.ok("文件导入失败!");
+  }
+
+}

+ 7 - 2
jeecg-boot-module-system/src/main/java/org/jeecg/modules/kuaishou/controller/KuaiShouController.java

@@ -117,8 +117,6 @@ public class KuaiShouController {
     }
 
 
-
-
     @RequestMapping("/video/get")
     public void videoGet() {
 
@@ -212,4 +210,11 @@ public class KuaiShouController {
         result.put("data", stringObjectMap);
         return result;
     }
+
+    @RequestMapping("advertiserInfo")
+    public void advertiserInfo() {
+        kuaishouInterfaceService.advertiserInfo(23212L, "10b6ad966b7e958d1510a78a5315ec5c");
+    }
+
+
 }

+ 1 - 1
jeecg-boot-module-system/src/main/java/org/jeecg/modules/kuaishou/controller/KuaiShouCreateController.java

@@ -34,7 +34,7 @@ public class KuaiShouCreateController {
             result.setSuccess(true);
         } else {
             result.setSuccess(false);
-            result.setMessage((String) map.get("desc"));
+            result.setMessage((String) map.get("message"));
         }
         return result;
 

+ 77 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/kuaishou/entity/KuaiShouAdvertiserBaseInfo.java

@@ -0,0 +1,77 @@
+package org.jeecg.modules.kuaishou.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+import org.jeecgframework.poi.excel.annotation.Excel;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.util.Date;
+
+/**
+ * 快手-广告主基本信息
+ *
+ * @author jeecg-boot
+ * @version V1.0
+ * @date 2019-09-18
+ */
+@Data
+@TableName("ctop_kuaishou_advertiser_base_info")
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+@ApiModel(value = "ctop_kuaishou_advertiser_base_info对象", description = "快手-广告主基本信息")
+public class KuaiShouAdvertiserBaseInfo {
+
+    /**
+     * id
+     */
+    @TableId(type = IdType.AUTO)
+    @ApiModelProperty(value = "id")
+    private Long id;
+    /**
+     * 账户ID
+     */
+    @Excel(name = "账户ID", width = 15)
+    @ApiModelProperty(value = "账户ID")
+    private Long accountId;
+    /**
+     * 账号快手id
+     */
+    @Excel(name = "账号快手id", width = 15)
+    @ApiModelProperty(value = "账号快手id")
+    private String userId;
+    /**
+     * 公司名称
+     */
+    @Excel(name = "公司名称", width = 15)
+    @ApiModelProperty(value = "公司名称")
+    private String corporationName;
+    /**
+     * 快手昵称
+     */
+    @Excel(name = "快手昵称", width = 15)
+    @ApiModelProperty(value = "快手昵称")
+    private String userName;
+    /**
+     * 创建时间
+     */
+    @Excel(name = "创建时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
+    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @ApiModelProperty(value = "创建时间")
+    private Date createTime;
+    /**
+     * 修改时间
+     */
+    @Excel(name = "修改时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
+    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @ApiModelProperty(value = "修改时间")
+    private Date updateTime;
+}

+ 17 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/kuaishou/mapper/KuaiShouAdvertiserBaseInfoMapper.java

@@ -0,0 +1,17 @@
+package org.jeecg.modules.kuaishou.mapper;
+
+import java.util.List;
+
+import org.apache.ibatis.annotations.Param;
+import org.jeecg.modules.kuaishou.entity.KuaiShouAdvertiserBaseInfo;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * 快手-广告主基本信息
+ * @author: jeecg-boot
+ * @date:   2019-09-18
+ * @cersion: V1.0
+ */
+public interface KuaiShouAdvertiserBaseInfoMapper extends BaseMapper<KuaiShouAdvertiserBaseInfo> {
+
+}

+ 5 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/kuaishou/mapper/xml/KuaiShouAdvertiserBaseInfoMapper.xml

@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="org.jeecg.modules.kuaishou.mapper.KuaiShouAdvertiserBaseInfoMapper">
+
+</mapper>

+ 14 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/kuaishou/service/IKuaiShouAdvertiserBaseInfoService.java

@@ -0,0 +1,14 @@
+package org.jeecg.modules.kuaishou.service;
+
+import org.jeecg.modules.kuaishou.entity.KuaiShouAdvertiserBaseInfo;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * 快手-广告主基本信息
+ * @author jeecg-boot
+ * @date   2019-09-18
+ * @version V1.0
+ */
+public interface IKuaiShouAdvertiserBaseInfoService extends IService<KuaiShouAdvertiserBaseInfo> {
+
+}

+ 17 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/kuaishou/service/IKuaishouInterfaceService.java

@@ -206,5 +206,22 @@ public interface IKuaishouInterfaceService {
      */
     void appUpdate(Long advertiserId, String accessToken, JSONObject requestJson, MultipartFile multipartFile, HttpServletRequest request);
 
+    /**
+     * 创建 url应用
+     *
+     * @param accountId
+     * @param accessToken
+     * @param apkJson
+     * @return
+     */
     Map<String, Object> urlAppCreate(Long accountId, String accessToken, JSONObject apkJson);
+
+    /**
+     * 快手 广告主信息
+     *
+     * @param accountId
+     * @param accessToken
+     * @return
+     */
+    Map<String, Object> advertiserInfo(Long accountId, String accessToken);
 }

+ 19 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/kuaishou/service/impl/KuaiShouAdvertiserBaseInfoServiceImpl.java

@@ -0,0 +1,19 @@
+package org.jeecg.modules.kuaishou.service.impl;
+
+import org.jeecg.modules.kuaishou.entity.KuaiShouAdvertiserBaseInfo;
+import org.jeecg.modules.kuaishou.mapper.KuaiShouAdvertiserBaseInfoMapper;
+import org.jeecg.modules.kuaishou.service.IKuaiShouAdvertiserBaseInfoService;
+import org.springframework.stereotype.Service;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+
+/**
+ * 快手-广告主基本信息
+ * @author jeecg-boot
+ * @date   2019-09-18
+ * @version V1.0
+ */
+@Service
+public class KuaiShouAdvertiserBaseInfoServiceImpl extends ServiceImpl<KuaiShouAdvertiserBaseInfoMapper, KuaiShouAdvertiserBaseInfo> implements IKuaiShouAdvertiserBaseInfoService {
+
+}

+ 4 - 11
jeecg-boot-module-system/src/main/java/org/jeecg/modules/kuaishou/service/impl/KuaiShouCreateServiceImpl.java

@@ -62,7 +62,7 @@ public class KuaiShouCreateServiceImpl implements IKuaiShouCreateService {
             if (Check.isNull(accountId)) {
                 returnMap.put("code", -1);
                 returnMap.put("success", false);
-                returnMap.put("desc", "请选择快手账号");
+                returnMap.put("message", "请选择快手账号");
                 return returnMap;
             }
 
@@ -77,7 +77,7 @@ public class KuaiShouCreateServiceImpl implements IKuaiShouCreateService {
             if (Check.isNull(campaignTemplateId)) {
                 returnMap.put("code", -1);
                 returnMap.put("success", false);
-                returnMap.put("desc", "请选择广告计划模板");
+                returnMap.put("message", "请选择广告计划模板");
                 return returnMap;
             }
 
@@ -231,12 +231,12 @@ public class KuaiShouCreateServiceImpl implements IKuaiShouCreateService {
             }
             returnMap.put("code", 0);
             returnMap.put("success", true);
-            returnMap.put("desc", "批量创建广告组成功");
+            returnMap.put("message", "批量创建广告组成功");
         } catch (Exception e) {
             e.printStackTrace();
             returnMap.put("code", -1);
             returnMap.put("success", false);
-            returnMap.put("desc", "批量创建广告组失败");
+            returnMap.put("message", "批量创建广告组失败");
         }
         return returnMap;
     }
@@ -321,16 +321,12 @@ public class KuaiShouCreateServiceImpl implements IKuaiShouCreateService {
                     returnMap.put("message", "请选择上传的视频");
                     return returnMap;
                 }
-
-                long startTime = System.currentTimeMillis();
-                log.info("开始上传视频");
                 Map<String, Object> videoMap = kuaishouInterfaceService.videoUpload(accountId, accessToken, videoUrl); // 上传视频到快手后台
                 if ((Integer) videoMap.get("code") != 0) {
                     log.error("上传视频失败,accountId:{}", accountId);
                     return videoMap;
                 }
                 createJson.put("photo_id", videoMap.get("photoId"));
-                log.info("上传信息流广告视频完成,共耗时:{} ms", System.currentTimeMillis() - startTime);
                 if (!Check.isNull(requestJson.getString("clickTrackUrl"))) {
                     createJson.put("click_track_url", requestJson.getString("clickTrackUrl"));
                 }
@@ -413,14 +409,11 @@ public class KuaiShouCreateServiceImpl implements IKuaiShouCreateService {
                             return returnMap;
                         }
 
-                        long startTime = System.currentTimeMillis();
-                        log.info("开始上传视频");
                         Map<String, Object> videoMap = kuaishouInterfaceService.videoUpload(accountId, accessToken, havaVideoUrl); // 上传视频到快手后台
                         if ((Integer) videoMap.get("code") != 0) {
                             log.error("后贴片素材上传视频失败,accountId:{}", accountId);
                             return videoMap;
                         }
-                        log.info("上传贴片视频完成,共耗时:{} ms", System.currentTimeMillis() - startTime);
                         createJson.put("photo_id", videoMap.get("photoId"));
 
                         if (haveSinglePicVideoUrlArr.size() == 1) {

+ 4 - 3
jeecg-boot-module-system/src/main/java/org/jeecg/modules/kuaishou/service/impl/KuaiShouImageServiceImpl.java

@@ -4,20 +4,19 @@ import cn.com.ctop.common.utils.Check;
 import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONObject;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import constant.KuaishouInterfaceConstant;
+import lombok.extern.slf4j.Slf4j;
 import org.jeecg.common.util.encryption.AesEncryptUtil;
 import org.jeecg.modules.ctop.entity.CtopOauthToken;
 import org.jeecg.modules.ctop.service.ICtopOauthTokenService;
 import org.jeecg.modules.kuaishou.entity.KuaiShouImage;
-import org.jeecg.modules.kuaishou.entity.KuaiShouVideo;
 import org.jeecg.modules.kuaishou.mapper.KuaiShouImageMapper;
 import org.jeecg.modules.kuaishou.service.IKuaiShouImageService;
 import org.jeecg.modules.kuaishou.service.IKuaishouInterfaceService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-
 import java.util.List;
 
 /**
@@ -26,6 +25,7 @@ import java.util.List;
  * @Date: 2019-08-14
  * @Version: V1.0
  */
+@Slf4j
 @Service
 public class KuaiShouImageServiceImpl extends ServiceImpl<KuaiShouImageMapper, KuaiShouImage> implements IKuaiShouImageService {
 
@@ -73,6 +73,7 @@ public class KuaiShouImageServiceImpl extends ServiceImpl<KuaiShouImageMapper, K
                 Thread thread = new Thread() {
                     @Override
                     public void run() {
+                        log.info("快手开始上传图片,accountId:{}", accountId);
                         interfaceService.imageUpload(accountId, accessToken, imageUrlStr, 0);
                     }
                 };

+ 3 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/kuaishou/service/impl/KuaiShouVideoServiceImpl.java

@@ -6,6 +6,7 @@ import com.alibaba.fastjson.JSONObject;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import constant.KuaishouInterfaceConstant;
+import lombok.extern.slf4j.Slf4j;
 import org.jeecg.common.util.encryption.AesEncryptUtil;
 import org.jeecg.modules.ctop.entity.CtopOauthToken;
 import org.jeecg.modules.ctop.service.ICtopOauthTokenService;
@@ -22,6 +23,7 @@ import org.springframework.stereotype.Service;
  * @Date: 2019-08-14
  * @Version: V1.0
  */
+@Slf4j
 @Service
 public class KuaiShouVideoServiceImpl extends ServiceImpl<KuaiShouVideoMapper, KuaiShouVideo> implements IKuaiShouVideoService {
     @Autowired
@@ -71,6 +73,7 @@ public class KuaiShouVideoServiceImpl extends ServiceImpl<KuaiShouVideoMapper, K
                 Thread thread = new Thread() {
                     @Override
                     public void run() {
+                        log.info("快手开始上传视频,accountId:{}", accountId);
                         interfaceService.videoUpload(accountId, accessToken, urlStr);
                     }
                 };

+ 79 - 15
jeecg-boot-module-system/src/main/java/org/jeecg/modules/kuaishou/service/impl/KuaishouInterfaceServiceImpl.java

@@ -39,14 +39,12 @@ import org.springframework.util.MultiValueMap;
 import org.springframework.web.client.RestTemplate;
 import org.springframework.web.multipart.MultipartFile;
 
-import javax.crypto.spec.PBEParameterSpec;
 import javax.servlet.http.HttpServletRequest;
 import java.io.File;
 import java.io.IOException;
 import java.lang.reflect.ParameterizedType;
 import java.lang.reflect.Type;
 import java.util.*;
-import java.util.stream.Collectors;
 
 /**
  * @author 于萌萌
@@ -100,6 +98,8 @@ public class KuaishouInterfaceServiceImpl implements IKuaishouInterfaceService {
     private IKuaishouReportDailyAccountService dailyAccountService;
     @Autowired
     private IKuaishouReportHourlyAccountService hourlyAccountService;
+    @Autowired
+    private KuaiShouAdvertiserBaseInfoMapper advertiserBaseInfoMapper;
 
     /**
      * 广告主日报表信息
@@ -248,6 +248,7 @@ public class KuaishouInterfaceServiceImpl implements IKuaishouInterfaceService {
     private IKuaishouReportDailyCreativeService dailyCreativeService;
     @Autowired
     private IKuaishouReportHourlyCreativeService hourlyCreativeService;
+
     @Override
     public KuaishouResult<KuaishouReportDailyGroup> getGroupDailyReport(String accessToken, Long advertiserId, String startDate, String endDate, int pageSize, int pageNum) {
         String url = PropertiesUtils.getConfig("kuaishou_api_url") + KuaishouInterfaceConstant.GTOUP_REPORT;
@@ -408,7 +409,7 @@ public class KuaishouInterfaceServiceImpl implements IKuaishouInterfaceService {
                     returnMap.put("campaign_id", campaignId);
                     returnMap.put("success", true);
                 } else {
-                    log.error("创建广告信息失败,advertiser_id:{},返回信息:{}", advertiserId, resultJson);
+                    log.error("创建广告计划失败,advertiser_id:{},返回信息:{}", advertiserId, resultJson);
                     returnMap.put("code", -1);
                     returnMap.put("message", resultJson.getString("message"));
                     returnMap.put("desc", "创建广告计划失败");
@@ -453,6 +454,7 @@ public class KuaishouInterfaceServiceImpl implements IKuaishouInterfaceService {
             headers.put("Content-Type", " application/json");
             String result = HttpUtils.kuaiShouhttpPostRequest(url, requestJson.toJSONString(), headers);
             JSONObject resultJson = JSONObject.parseObject(result);
+            log.info("快手创建广告组返回,accountId:{},返回结果:{}", advertiserId, resultJson);
             if (!Check.isNull(resultJson)) {
                 Integer code = resultJson.getInteger("code");
                 if (code == 0) {
@@ -466,14 +468,14 @@ public class KuaishouInterfaceServiceImpl implements IKuaishouInterfaceService {
                     }
 
                 } else {
-                    log.error("创建广告信息失败,advertiser_id:{},返回信息:{}", advertiserId, resultJson);
+                    log.error("创建广告信息失败,advertiser_id:{},返回信息:{},入参:{}", advertiserId, resultJson, requestJson);
                     returnMap.put("code", -1);
                     returnMap.put("message", resultJson.getString("message"));
                     returnMap.put("desc", "创建广告组失败");
                     returnMap.put("success", false);
                 }
             } else {
-                log.error("快手创建广告计划返回内容为空,advertiser_id:{}", advertiserId);
+                log.error("快手创建广告计划返回内容为空,advertiser_id:{},入参:{}", advertiserId, requestJson);
                 returnMap.put("code", -1);
                 returnMap.put("message", "创建广告组异常");
                 returnMap.put("desc", "result is null");
@@ -944,7 +946,7 @@ public class KuaishouInterfaceServiceImpl implements IKuaishouInterfaceService {
 
             String result = HttpUtils.kuaiShouhttpPostRequest(url, requestJson.toJSONString(), header);
             JSONObject resultJson = JSONObject.parseObject(result);
-            log.info("快手创建创意返回信息:{}", resultJson);
+            log.info("快手创建创意返回:accountId:{},返回结果{}", advertiserId, resultJson);
             if (!Check.isNull(resultJson)) {
                 Integer code = resultJson.getInteger("code");
                 if (code == 0) {
@@ -969,14 +971,14 @@ public class KuaishouInterfaceServiceImpl implements IKuaishouInterfaceService {
                         returnMap.put("success", true);
                     }
                 } else {
-                    log.error("创建广告创意失败,advertiser_id:{},返回信息:{}", advertiserId, resultJson);
+                    log.error("创建广告创意失败,advertiser_id:{},返回信息:{},入参:{}", advertiserId, resultJson, requestJson);
                     returnMap.put("code", -1);
                     returnMap.put("message", resultJson.getString("message"));
-                    returnMap.put("desc", "上传图片失败");
+                    returnMap.put("desc", "创意创建失败");
                     returnMap.put("success", false);
                 }
             } else {
-                log.error("快手创建广告创意返回内容为空,advertiser_id:{}", advertiserId);
+                log.error("快手创建广告创意返回内容为空,advertiser_id:{},入参:{}", advertiserId, requestJson);
                 returnMap.put("code", -1);
                 returnMap.put("message", "上传图片异常");
                 returnMap.put("desc", "result is null");
@@ -997,7 +999,6 @@ public class KuaishouInterfaceServiceImpl implements IKuaishouInterfaceService {
 
     @Override
     public Map<String, Object> videoUpload(Long advertiserId, String accessToken, String videoUrl) {
-        log.info("开始上传视频");
         Map<String, Object> returnMap = new HashMap<>();
         try {
             QueryWrapper<KuaiShouVideoUpload> wrapper = new QueryWrapper<>();
@@ -1016,6 +1017,7 @@ public class KuaishouInterfaceServiceImpl implements IKuaishouInterfaceService {
                 log.error("下载文件到本地文件夹失败,filePath:{},accountId:{}", videoUrl, advertiserId);
                 throw new Exception("下载文件到本地失败");
             }
+            Long startTime = System.currentTimeMillis();
             String url = PropertiesUtils.getConfig("kuaishou_api_url") + KuaishouInterfaceConstant.VIDEO_UPLOAD;
             JSONObject requestJson = new JSONObject();
             requestJson.put("advertiser_id", advertiserId);
@@ -1048,7 +1050,7 @@ public class KuaishouInterfaceServiceImpl implements IKuaishouInterfaceService {
                         queryWrapper.eq("local_url", videoUrl);
                         int y = kuaiShouVideoMapper.update(video, queryWrapper);
                         if (y > 0) {
-                            log.info("更新快手视频状态成功.accountId:{}", advertiserId);
+                            log.info("更新快手视频状态成功.accountId:{},上传耗时:{} ms", advertiserId, System.currentTimeMillis() - startTime);
                         }
 
                         returnMap.put("code", 0);
@@ -1244,7 +1246,6 @@ public class KuaishouInterfaceServiceImpl implements IKuaishouInterfaceService {
      */
     @Override
     public Map<String, Object> imageUpload(Long advertiserId, String accessToken, String filePath, Integer type) {
-        log.info("上传快手图片");
         Map<String, Object> returnMap = new HashMap<>();
         try {
             QueryWrapper<KuaiShouImageUploand> queryWrapper = new QueryWrapper<>();
@@ -1263,6 +1264,7 @@ public class KuaishouInterfaceServiceImpl implements IKuaishouInterfaceService {
                 log.error("下载文件到本地文件夹失败,filePath:{},accountId:{}", filePath, advertiserId);
                 throw new Exception("下载文件到本地失败");
             }
+            Long startTime = System.currentTimeMillis();
             String url = PropertiesUtils.getConfig("kuaishou_api_url") + KuaishouInterfaceConstant.IMAGE_UPLOAD;
             JSONObject requestJson = new JSONObject();
             requestJson.put("advertiser_id", advertiserId);
@@ -1289,7 +1291,7 @@ public class KuaishouInterfaceServiceImpl implements IKuaishouInterfaceService {
                         imageUploand.setWidth(dataJson.getLong("width"));
                         int i = imageUploandMapper.insert(imageUploand);
                         if (i > 0) {
-                            log.info("快手-图片上传成功");
+                            log.info("快手-图片上传成功,共耗时:{} ms", System.currentTimeMillis() - startTime);
                         }
                         returnMap.put("code", 0);
                         returnMap.put("desc", "上传图片完成");
@@ -1363,6 +1365,7 @@ public class KuaishouInterfaceServiceImpl implements IKuaishouInterfaceService {
             Map<String, String> header = new HashMap<String, String>();
             header.put("Content-Type", "multipart/form-data");
             header.put("Access-Token", accessToken);
+            Long startTime = System.currentTimeMillis();
             String result = exceptInfoForRestTemplate(url, requestJson, header, localUrl);
             JSONObject resultJson = JSONObject.parseObject(result);
             if (!Check.isNull(result)) {
@@ -1384,7 +1387,7 @@ public class KuaishouInterfaceServiceImpl implements IKuaishouInterfaceService {
                         appCreate.setUploadTime(new Date().toString());
                         int i = appCreateMapper.insert(appCreate);
                         if (i > 0) {
-                            log.info("快手创建应用成功");
+                            log.info("快手创建应用成功,共耗时:{} ms", System.currentTimeMillis() - startTime);
                         }
                         returnMap.put("appId", dataJson.getLong("app_id"));
                         returnMap.put("success", true);
@@ -1493,6 +1496,68 @@ public class KuaishouInterfaceServiceImpl implements IKuaishouInterfaceService {
         return returnMap;
     }
 
+
+    /**
+     * 获取快手广告租信息
+     *
+     * @param accountId
+     * @param accessToken
+     * @return
+     */
+    @Override
+    public Map<String, Object> advertiserInfo(Long accountId, String accessToken) {
+        Map<String, Object> returnMap = new HashMap<>();
+        try {
+
+            Map<String, Object> deleteMap = new HashMap<>();
+            deleteMap.put("account_id", accountId);
+            advertiserBaseInfoMapper.deleteByMap(deleteMap);
+            String url = PropertiesUtils.getConfig("kuaishou_api_url") + KuaishouInterfaceConstant.ADVERTISER_INFO;
+            Map<String, String> headers = new HashMap<String, String>();
+            headers.put("Access-Token", accessToken);
+            headers.put("Content-Type", " application/json");
+            JSONObject requestJson = new JSONObject();
+            requestJson.put("advertiser_id", accountId);
+            String result = HttpUtils.kuaiShouhttpPostRequest(url, requestJson.toJSONString(), headers);
+            JSONObject resultJson = JSONObject.parseObject(result);
+            if (resultJson.getInteger("code") == 0) {
+                JSONObject dataJson = resultJson.getJSONObject("data");
+                if (!Check.isNull(dataJson)) {
+                    KuaiShouAdvertiserBaseInfo advertiserBaseInfo = new KuaiShouAdvertiserBaseInfo();
+                    advertiserBaseInfo.setAccountId(accountId);
+                    advertiserBaseInfo.setUserId(dataJson.getString("user_id"));
+                    String corporationName = dataJson.getString("corporation_name");
+                    advertiserBaseInfo.setCorporationName(corporationName);
+                    String userName = dataJson.getString("user_name");
+                    advertiserBaseInfo.setUserName(userName);
+                    returnMap.put("code", 0);
+                    returnMap.put("message", "success");
+                    returnMap.put("userName", userName);
+                    returnMap.put("corporationName", corporationName);
+                    int i = advertiserBaseInfoMapper.insert(advertiserBaseInfo);
+                    if (i > 0) {
+                        log.info("快手获取广告主基本信息入库完成,accountId:{}", accountId);
+                    }
+                } else {
+                    log.error("快手获取广告主基本信息返回为空,accountId:{}", accountId);
+                    returnMap.put("code", -1);
+                    returnMap.put("message", "返回信息为空");
+                }
+
+            } else {
+                log.error("快手获取广告主基本信息返回错误,accountId:{},错误信息:{}", accountId, resultJson);
+                returnMap.put("code", -1);
+                returnMap.put("message", resultJson.getString("message"));
+            }
+
+        } catch (Exception e) {
+            e.printStackTrace();
+            returnMap.put("code", -1);
+            returnMap.put("message", "接口执行失败");
+        }
+        return returnMap;
+    }
+
     /**
      * 获取应用列表
      *
@@ -1609,7 +1674,6 @@ public class KuaishouInterfaceServiceImpl implements IKuaishouInterfaceService {
                 }
                 HttpEntity<MultiValueMap<String, Object>> httpEntity = new HttpEntity<MultiValueMap<String, Object>>(param, headers);
                 ResponseEntity<String> responseEntity = rest.exchange(url, HttpMethod.POST, httpEntity, String.class);
-                System.err.println(responseEntity.getBody());
                 return responseEntity.getBody();
             }
         } catch (Exception e) {

+ 178 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/kuaishou/vue/KuaiShouAdvertiserBaseInfoList.vue

@@ -0,0 +1,178 @@
+<template>
+  <a-card :bordered="false">
+
+    <!-- 查询区域 -->
+    <div class="table-page-search-wrapper">
+      <a-form layout="inline">
+        <a-row :gutter="24">
+
+          <a-col :md="6" :sm="8">
+            <a-form-item label="账户ID">
+              <a-input placeholder="请输入账户ID" v-model="queryParam.accountId"></a-input>
+            </a-form-item>
+          </a-col>
+          <a-col :md="6" :sm="8">
+            <a-form-item label="账号快手id">
+              <a-input placeholder="请输入账号快手id" v-model="queryParam.userId"></a-input>
+            </a-form-item>
+          </a-col>
+        <template v-if="toggleSearchStatus">
+        <a-col :md="6" :sm="8">
+            <a-form-item label="公司名称">
+              <a-input placeholder="请输入公司名称" v-model="queryParam.corporationName"></a-input>
+            </a-form-item>
+          </a-col>
+          <a-col :md="6" :sm="8">
+            <a-form-item label="快手昵称">
+              <a-input placeholder="请输入快手昵称" v-model="queryParam.userName"></a-input>
+            </a-form-item>
+          </a-col>
+          </template>
+          <a-col :md="6" :sm="8" >
+            <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
+              <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
+              <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
+              <a @click="handleToggleSearch" style="margin-left: 8px">
+                {{ toggleSearchStatus ? '收起' : '展开' }}
+                <a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>
+              </a>
+            </span>
+          </a-col>
+
+        </a-row>
+      </a-form>
+    </div>
+
+    <!-- 操作按钮区域 -->
+    <div class="table-operator">
+      <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
+      <a-button type="primary" icon="download" @click="handleExportXls('快手-广告主基本信息')">导出</a-button>
+      <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
+        <a-button type="primary" icon="import">导入</a-button>
+      </a-upload>
+      <a-dropdown v-if="selectedRowKeys.length > 0">
+        <a-menu slot="overlay">
+          <a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
+        </a-menu>
+        <a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>
+      </a-dropdown>
+    </div>
+
+    <!-- table区域-begin -->
+    <div>
+      <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
+        <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>项
+        <a style="margin-left: 24px" @click="onClearSelected">清空</a>
+      </div>
+
+      <a-table
+        ref="table"
+        size="middle"
+        bordered
+        rowKey="id"
+        :columns="columns"
+        :dataSource="dataSource"
+        :pagination="ipagination"
+        :loading="loading"
+        :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
+        @change="handleTableChange">
+
+        <span slot="action" slot-scope="text, record">
+          <a @click="handleEdit(record)">编辑</a>
+
+          <a-divider type="vertical" />
+          <a-dropdown>
+            <a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
+            <a-menu slot="overlay">
+              <a-menu-item>
+                <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
+                  <a>删除</a>
+                </a-popconfirm>
+              </a-menu-item>
+            </a-menu>
+          </a-dropdown>
+        </span>
+
+      </a-table>
+    </div>
+    <!-- table区域-end -->
+
+    <!-- 表单区域 -->
+    <kuaiShouAdvertiserBaseInfo-modal ref="modalForm" @ok="modalFormOk"></kuaiShouAdvertiserBaseInfo-modal>
+  </a-card>
+</template>
+
+<script>
+  import KuaiShouAdvertiserBaseInfoModal from './modules/KuaiShouAdvertiserBaseInfoModal'
+  import { JeecgListMixin } from '@/mixins/JeecgListMixin'
+
+  export default {
+    name: "KuaiShouAdvertiserBaseInfoList",
+    mixins:[JeecgListMixin],
+    components: {
+      KuaiShouAdvertiserBaseInfoModal
+    },
+    data () {
+      return {
+        description: '快手-广告主基本信息管理页面',
+        // 表头
+        columns: [
+          {
+            title: '#',
+            dataIndex: '',
+            key:'rowIndex',
+            width:60,
+            align:"center",
+            customRender:function (t,r,index) {
+              return parseInt(index)+1;
+            }
+           },
+		   {
+            title: '账户ID',
+            align:"center",
+            dataIndex: 'accountId'
+           },
+		   {
+            title: '账号快手id',
+            align:"center",
+            dataIndex: 'userId'
+           },
+		   {
+            title: '公司名称',
+            align:"center",
+            dataIndex: 'corporationName'
+           },
+		   {
+            title: '快手昵称',
+            align:"center",
+            dataIndex: 'userName'
+           },
+          {
+            title: '操作',
+            dataIndex: 'action',
+            align:"center",
+            scopedSlots: { customRender: 'action' },
+          }
+        ],
+		url: {
+          list: "/kuaishou/kuaiShouAdvertiserBaseInfo/list",
+          delete: "/kuaishou/kuaiShouAdvertiserBaseInfo/delete",
+          deleteBatch: "/kuaishou/kuaiShouAdvertiserBaseInfo/deleteBatch",
+          exportXlsUrl: "kuaishou/kuaiShouAdvertiserBaseInfo/exportXls",
+          importExcelUrl: "kuaishou/kuaiShouAdvertiserBaseInfo/importExcel",
+       },
+    }
+  },
+  computed: {
+    importExcelUrl: function(){
+      return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
+    }
+  },
+    methods: {
+     
+    }
+  }
+</script>
+<style scoped>
+  @import '~@assets/less/common.less'
+</style>

+ 143 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/kuaishou/vue/modules/KuaiShouAdvertiserBaseInfoModal.vue

@@ -0,0 +1,143 @@
+<template>
+  <a-modal
+    :title="title"
+    :width="800"
+    :visible="visible"
+    :confirmLoading="confirmLoading"
+    @ok="handleOk"
+    @cancel="handleCancel"
+    cancelText="关闭">
+    
+    <a-spin :spinning="confirmLoading">
+      <a-form :form="form">
+      
+        <a-form-item
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="账户ID">
+          <a-input placeholder="请输入账户ID" v-decorator="['accountId', validatorRules.accountId ]" />
+        </a-form-item>
+        <a-form-item
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="账号快手id">
+          <a-input placeholder="请输入账号快手id" v-decorator="['userId', {}]" />
+        </a-form-item>
+        <a-form-item
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="公司名称">
+          <a-input placeholder="请输入公司名称" v-decorator="['corporationName', {}]" />
+        </a-form-item>
+        <a-form-item
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="快手昵称">
+          <a-input placeholder="请输入快手昵称" v-decorator="['userName', {}]" />
+        </a-form-item>
+		
+      </a-form>
+    </a-spin>
+  </a-modal>
+</template>
+
+<script>
+  import { httpAction } from '@/api/manage'
+  import pick from 'lodash.pick'
+  import moment from "moment"
+
+  export default {
+    name: "KuaiShouAdvertiserBaseInfoModal",
+    data () {
+      return {
+        title:"操作",
+        visible: false,
+        model: {},
+        labelCol: {
+          xs: { span: 24 },
+          sm: { span: 5 },
+        },
+        wrapperCol: {
+          xs: { span: 24 },
+          sm: { span: 16 },
+        },
+
+        confirmLoading: false,
+        form: this.$form.createForm(this),
+        validatorRules:{
+        accountId:{rules: [{ required: true, message: '请输入账户ID!' }]},
+        },
+        url: {
+          add: "/kuaishou/kuaiShouAdvertiserBaseInfo/add",
+          edit: "/kuaishou/kuaiShouAdvertiserBaseInfo/edit",
+        },
+      }
+    },
+    created () {
+    },
+    methods: {
+      add () {
+        this.edit({});
+      },
+      edit (record) {
+        this.form.resetFields();
+        this.model = Object.assign({}, record);
+        this.visible = true;
+        this.$nextTick(() => {
+          this.form.setFieldsValue(pick(this.model,'accountId','userId','corporationName','userName'))
+		  //时间格式化
+        });
+
+      },
+      close () {
+        this.$emit('close');
+        this.visible = false;
+      },
+      handleOk () {
+        const that = this;
+        // 触发表单验证
+        this.form.validateFields((err, values) => {
+          if (!err) {
+            that.confirmLoading = true;
+            let httpurl = '';
+            let method = '';
+            if(!this.model.id){
+              httpurl+=this.url.add;
+              method = 'post';
+            }else{
+              httpurl+=this.url.edit;
+               method = 'put';
+            }
+            let formData = Object.assign(this.model, values);
+            //时间格式化
+            
+            console.log(formData)
+            httpAction(httpurl,formData,method).then((res)=>{
+              if(res.success){
+                that.$message.success(res.message);
+                that.$emit('ok');
+              }else{
+                that.$message.warning(res.message);
+              }
+            }).finally(() => {
+              that.confirmLoading = false;
+              that.close();
+            })
+
+
+
+          }
+        })
+      },
+      handleCancel () {
+        this.close()
+      },
+
+
+    }
+  }
+</script>
+
+<style lang="less" scoped>
+
+</style>

+ 150 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/kuaishou/vue/modules/KuaiShouAdvertiserBaseInfoModal__Style#Drawer.vue

@@ -0,0 +1,150 @@
+<template>
+  <a-drawer
+      :title="title"
+      :width="800"
+      placement="right"
+      :closable="false"
+      @close="close"
+      :visible="visible"
+  >
+
+    <a-spin :spinning="confirmLoading">
+      <a-form :form="form">
+      
+        <a-form-item
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="账户ID">
+          <a-input placeholder="请输入账户ID" v-decorator="['accountId', validatorRules.accountId ]" />
+        </a-form-item>
+        <a-form-item
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="账号快手id">
+          <a-input placeholder="请输入账号快手id" v-decorator="['userId', {}]" />
+        </a-form-item>
+        <a-form-item
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="公司名称">
+          <a-input placeholder="请输入公司名称" v-decorator="['corporationName', {}]" />
+        </a-form-item>
+        <a-form-item
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="快手昵称">
+          <a-input placeholder="请输入快手昵称" v-decorator="['userName', {}]" />
+        </a-form-item>
+		
+      </a-form>
+    </a-spin>
+    <a-button type="primary" @click="handleOk">确定</a-button>
+    <a-button type="primary" @click="handleCancel">取消</a-button>
+  </a-drawer>
+</template>
+
+<script>
+  import { httpAction } from '@/api/manage'
+  import pick from 'lodash.pick'
+  import moment from "moment"
+
+  export default {
+    name: "KuaiShouAdvertiserBaseInfoModal",
+    data () {
+      return {
+        title:"操作",
+        visible: false,
+        model: {},
+        labelCol: {
+          xs: { span: 24 },
+          sm: { span: 5 },
+        },
+        wrapperCol: {
+          xs: { span: 24 },
+          sm: { span: 16 },
+        },
+
+        confirmLoading: false,
+        form: this.$form.createForm(this),
+        validatorRules:{
+        accountId:{rules: [{ required: true, message: '请输入账户ID!' }]},
+        },
+        url: {
+          add: "/kuaishou/kuaiShouAdvertiserBaseInfo/add",
+          edit: "/kuaishou/kuaiShouAdvertiserBaseInfo/edit",
+        },
+      }
+    },
+    created () {
+    },
+    methods: {
+      add () {
+        this.edit({});
+      },
+      edit (record) {
+        this.form.resetFields();
+        this.model = Object.assign({}, record);
+        this.visible = true;
+        this.$nextTick(() => {
+          this.form.setFieldsValue(pick(this.model,'accountId','userId','corporationName','userName'))
+		  //时间格式化
+        });
+
+      },
+      close () {
+        this.$emit('close');
+        this.visible = false;
+      },
+      handleOk () {
+        const that = this;
+        // 触发表单验证
+        this.form.validateFields((err, values) => {
+          if (!err) {
+            that.confirmLoading = true;
+            let httpurl = '';
+            let method = '';
+            if(!this.model.id){
+              httpurl+=this.url.add;
+              method = 'post';
+            }else{
+              httpurl+=this.url.edit;
+               method = 'put';
+            }
+            let formData = Object.assign(this.model, values);
+            //时间格式化
+            
+            console.log(formData)
+            httpAction(httpurl,formData,method).then((res)=>{
+              if(res.success){
+                that.$message.success(res.message);
+                that.$emit('ok');
+              }else{
+                that.$message.warning(res.message);
+              }
+            }).finally(() => {
+              that.confirmLoading = false;
+              that.close();
+            })
+
+
+
+          }
+        })
+      },
+      handleCancel () {
+        this.close()
+      },
+
+
+    }
+  }
+</script>
+
+<style lang="less" scoped>
+/** Button按钮间距 */
+  .ant-btn {
+    margin-left: 30px;
+    margin-bottom: 30px;
+    float: right;
+  }
+</style>

+ 0 - 2
module-common/src/main/java/cn/com/ctop/common/utils/HttpUtils.java

@@ -283,7 +283,6 @@ public class HttpUtils {
 
 
     public static String kuaiShouhttpPostRequest(String url, String body, Map<String, String> headers) {
-        System.err.println(body);
         HttpClient httpClient = createSslClientDefault();
         String strReturn = "";
         try {
@@ -298,7 +297,6 @@ public class HttpUtils {
                 httppost.setEntity(new StringEntity(body, Charset.forName("UTF-8")));
             }
             HttpEntity respentity;
-            System.err.println(httppost);
             HttpResponse response = httpClient.execute(httppost);
             int statusCode = response.getStatusLine().getStatusCode();
             if (statusCode == HttpStatus.SC_OK) {

+ 4 - 0
module-kuaishou/src/main/java/constant/KuaishouInterfaceConstant.java

@@ -112,6 +112,10 @@ public class KuaishouInterfaceConstant {
      * 修改广告创意状态
      */
     public static final String UPDATE_CREATIVE_STATUS = "/rest/openapi/v1/creative/update/status";
+    /**
+     * 快手-广告主信息
+     */
+    public static final String ADVERTISER_INFO = "//rest/openapi/v1/advertiser/info";
 
 
     /**