Ver código fonte

Merge branch 'master' of https://gitee.com/hcst/adsp-boot

syh 5 anos atrás
pai
commit
180311a718
25 arquivos alterados com 1097 adições e 243 exclusões
  1. 5 5
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/AuthController.java
  2. 79 92
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/BindAccountController.java
  3. 295 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/BindAccountLoginController.java
  4. 3 3
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/CallbackController.java
  5. 70 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/entity/BindAccountAuth.java
  6. 12 18
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/entity/BindAccount.java
  7. 3 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/entity/ByteDanceBudgetTemplate.java
  8. 17 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/mapper/BindAccountAuthMapper.java
  9. 14 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/mapper/BindAccountLoginMapper.java
  10. 0 14
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/mapper/BindAccountMapper.java
  11. 1 1
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/mapper/xml/BindAccountMapper.xml
  12. 5 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/mapper/xml/BindAccountLoginMapper.xml
  13. 5 6
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/service/IBindAccountService.java
  14. 18 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/service/IBindAccountLoginService.java
  15. 16 46
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/service/impl/BindAccountServiceImpl.java
  16. 54 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/service/impl/BindAccountLoginServiceImpl.java
  17. 17 5
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/service/impl/ByteDanceBudgetTemplateServiceImpl.java
  18. 168 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/vue/BindAccountAuthList.vue
  19. 18 23
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/vue/BindAccountList.vue
  20. 136 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/vue/modules/BindAccountAuthModal.vue
  21. 143 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/vue/modules/BindAccountAuthModal__Style#Drawer.vue
  22. 8 14
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/vue/modules/BindAccountModal.vue
  23. 8 14
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/vue/modules/BindAccountModal__Style#Drawer.vue
  24. 1 1
      jeecg-boot-module-system/src/main/resources/application-dev.yml
  25. 1 1
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/graphql/service/impl/KuaishouWebInterfaceServiceImpl.java

+ 5 - 5
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/AuthController.java

@@ -10,8 +10,8 @@ import constant.KuaishouInterfaceConstant;
 import org.apache.commons.lang.StringUtils;
 import org.jeecg.modules.ctop.entity.CTopOauthToken;
 import org.jeecg.modules.ctop.mapper.CTopOauthTokenMapper;
+import org.jeecg.modules.ctop.service.IBindAccountAuthService;
 import org.jeecg.modules.ctop.service.ICTopOauthTokenService;
-import org.jeecg.modules.ctop.service.IBindAccountService;
 import org.jeecg.modules.kuaishou.service.IKuaishouInterfaceService;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -35,7 +35,7 @@ public class AuthController {
     @Autowired
     private IKuaishouInterfaceService kuaishouInterfaceService;
     @Autowired
-    private IBindAccountService bindAccountService;
+    private IBindAccountAuthService bindAccountAuthService;
 
     @Autowired
     private CTopOauthTokenMapper cTopOauthTokenMapper;
@@ -48,11 +48,11 @@ public class AuthController {
             String codeUrl = "";
             switch (authType) {
                 case "bytedance":
-                    codeUrl = bindAccountService.getByteDanceCodeUrl(UUID.randomUUID().toString());
+                    codeUrl = bindAccountAuthService.getByteDanceCodeUrl(UUID.randomUUID().toString());
                     System.out.println(codeUrl);
                     return "redirect:" + codeUrl;
                 case "kuaishou":
-                    codeUrl = bindAccountService.getKuaishouCodeUrl(UUID.randomUUID().toString());
+                    codeUrl = bindAccountAuthService.getKuaishouCodeUrl(UUID.randomUUID().toString());
                     System.out.println(codeUrl);
                     return "redirect:" + codeUrl;
                 default:
@@ -114,7 +114,7 @@ public class AuthController {
                 deleteMap.put("account_id", token.getAccountId());
                 cTopOauthTokenMapper.deleteByMap(deleteMap); //删除 广告主id下的相关授权信息
                 cTopOauthTokenMapper.insert(token);
-                bindAccountService.addBindAccount(token.getAccountId(), KuaishouInterfaceConstant.TYPE_AUTHORIZATION, state, KuaishouInterfaceConstant.LOGIN_TYPE_BYTEDANCE); //账号绑定
+                bindAccountAuthService.addBindAccount(token.getAccountId(), KuaishouInterfaceConstant.LOGIN_TYPE_BYTEDANCE, state); //账号绑定
             }
         } catch (Exception e) {
             e.printStackTrace();

+ 79 - 92
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/BindAccountController.java

@@ -1,72 +1,59 @@
 package org.jeecg.modules.ctop.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.ctop.entity.BindAccount;
-import org.jeecg.modules.ctop.service.IBindAccountService;
-
-import java.util.Date;
-
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONObject;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
 import lombok.extern.slf4j.Slf4j;
-
+import org.jeecg.common.api.vo.Result;
+import org.jeecg.common.aspect.annotation.AutoLog;
+import org.jeecg.common.system.query.QueryGenerator;
+import org.jeecg.common.util.oConvertUtils;
+import org.jeecg.modules.ctop.entity.BindAccountAuth;
+import org.jeecg.modules.ctop.service.IBindAccountAuthService;
 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;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+import java.io.UnsupportedEncodingException;
+import java.net.URLDecoder;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map;
 
 /**
- * @Description: 账户绑定
+ * @Description: 账号绑定-授权
  * @Author: jeecg-boot
- * @Date: 2019-07-30
+ * @Date: 2019-07-31
  * @Version: V1.0
  */
 @Slf4j
-@Api(tags = "账户绑定")
+@Api(tags = "账号绑定-授权")
 @RestController
-@RequestMapping("/ctop/bindAccount")
-public class BindAccountController {
+@RequestMapping("/ctop/bindAccountAuth")
+public class BindAccountAuthController {
     @Autowired
-    private IBindAccountService bindAccountService;
-
-
-    @GetMapping(value = "/login")
-    public Result<IPage<BindAccount>> login(String advertiserId, String accountName, String password, String loginType) {
-        Result<IPage<BindAccount>> result = new Result<IPage<BindAccount>>();
-        boolean trueOrFalse = bindAccountService.bindLogin(advertiserId, accountName, password, loginType);
-        result.setSuccess(trueOrFalse);
-        return result;
-    }
+    private IBindAccountAuthService bindAccountAuthService;
 
-    @GetMapping(value = "/authorization")
-    public Result<IPage<BindAccount>> authorization(String advertiserId, String authorizationType) {
-        Result<IPage<BindAccount>> result = new Result<IPage<BindAccount>>();
+    @PostMapping(value = "/authorization")
+    public Result<IPage<BindAccountAuth>> authorization(@RequestBody JSONObject json) {
+        Result<IPage<BindAccountAuth>> result = new Result<IPage<BindAccountAuth>>();
         String codeUrl = null;
         try {
-            codeUrl = bindAccountService.bindAuthorization(advertiserId, authorizationType);
+            codeUrl = bindAccountAuthService.bindAuthorization(json.getString("advertiserId"), json.getString("authorizationType"));
         } catch (UnsupportedEncodingException e) {
             e.printStackTrace();
         }
@@ -79,23 +66,23 @@ public class BindAccountController {
     /**
      * 分页列表查询
      *
-     * @param bindAccount
+     * @param bindAccountAuth
      * @param pageNo
      * @param pageSize
      * @param req
      * @return
      */
-    @AutoLog(value = "账户绑定-分页列表查询")
-    @ApiOperation(value = "账户绑定-分页列表查询", notes = "账户绑定-分页列表查询")
+    @AutoLog(value = "账号绑定-授权-分页列表查询")
+    @ApiOperation(value = "账号绑定-授权-分页列表查询", notes = "账号绑定-授权-分页列表查询")
     @GetMapping(value = "/list")
-    public Result<IPage<BindAccount>> queryPageList(BindAccount bindAccount,
-                                                    @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
-                                                    @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
-                                                    HttpServletRequest req) {
-        Result<IPage<BindAccount>> result = new Result<IPage<BindAccount>>();
-        QueryWrapper<BindAccount> queryWrapper = QueryGenerator.initQueryWrapper(bindAccount, req.getParameterMap());
-        Page<BindAccount> page = new Page<BindAccount>(pageNo, pageSize);
-        IPage<BindAccount> pageList = bindAccountService.page(page, queryWrapper);
+    public Result<IPage<BindAccountAuth>> queryPageList(BindAccountAuth bindAccountAuth,
+                                                        @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
+                                                        @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
+                                                        HttpServletRequest req) {
+        Result<IPage<BindAccountAuth>> result = new Result<IPage<BindAccountAuth>>();
+        QueryWrapper<BindAccountAuth> queryWrapper = QueryGenerator.initQueryWrapper(bindAccountAuth, req.getParameterMap());
+        Page<BindAccountAuth> page = new Page<BindAccountAuth>(pageNo, pageSize);
+        IPage<BindAccountAuth> pageList = bindAccountAuthService.page(page, queryWrapper);
         result.setSuccess(true);
         result.setResult(pageList);
         return result;
@@ -104,16 +91,16 @@ public class BindAccountController {
     /**
      * 添加
      *
-     * @param bindAccount
+     * @param bindAccountAuth
      * @return
      */
-    @AutoLog(value = "账户绑定-添加")
-    @ApiOperation(value = "账户绑定-添加", notes = "账户绑定-添加")
+    @AutoLog(value = "账号绑定-授权-添加")
+    @ApiOperation(value = "账号绑定-授权-添加", notes = "账号绑定-授权-添加")
     @PostMapping(value = "/add")
-    public Result<BindAccount> add(@RequestBody BindAccount bindAccount) {
-        Result<BindAccount> result = new Result<BindAccount>();
+    public Result<BindAccountAuth> add(@RequestBody BindAccountAuth bindAccountAuth) {
+        Result<BindAccountAuth> result = new Result<BindAccountAuth>();
         try {
-            bindAccountService.save(bindAccount);
+            bindAccountAuthService.save(bindAccountAuth);
             result.success("添加成功!");
         } catch (Exception e) {
             log.error(e.getMessage(), e);
@@ -125,19 +112,19 @@ public class BindAccountController {
     /**
      * 编辑
      *
-     * @param bindAccount
+     * @param bindAccountAuth
      * @return
      */
-    @AutoLog(value = "账户绑定-编辑")
-    @ApiOperation(value = "账户绑定-编辑", notes = "账户绑定-编辑")
+    @AutoLog(value = "账号绑定-授权-编辑")
+    @ApiOperation(value = "账号绑定-授权-编辑", notes = "账号绑定-授权-编辑")
     @PutMapping(value = "/edit")
-    public Result<BindAccount> edit(@RequestBody BindAccount bindAccount) {
-        Result<BindAccount> result = new Result<BindAccount>();
-        BindAccount bindAccountEntity = bindAccountService.getById(bindAccount.getId());
-        if (bindAccountEntity == null) {
+    public Result<BindAccountAuth> edit(@RequestBody BindAccountAuth bindAccountAuth) {
+        Result<BindAccountAuth> result = new Result<BindAccountAuth>();
+        BindAccountAuth bindAccountAuthEntity = bindAccountAuthService.getById(bindAccountAuth.getId());
+        if (bindAccountAuthEntity == null) {
             result.error500("未找到对应实体");
         } else {
-            boolean ok = bindAccountService.updateById(bindAccount);
+            boolean ok = bindAccountAuthService.updateById(bindAccountAuth);
             //TODO 返回false说明什么?
             if (ok) {
                 result.success("修改成功!");
@@ -153,12 +140,12 @@ public class BindAccountController {
      * @param id
      * @return
      */
-    @AutoLog(value = "账户绑定-通过id删除")
-    @ApiOperation(value = "账户绑定-通过id删除", notes = "账户绑定-通过id删除")
+    @AutoLog(value = "账号绑定-授权-通过id删除")
+    @ApiOperation(value = "账号绑定-授权-通过id删除", notes = "账号绑定-授权-通过id删除")
     @DeleteMapping(value = "/delete")
     public Result<?> delete(@RequestParam(name = "id", required = true) String id) {
         try {
-            bindAccountService.removeById(id);
+            bindAccountAuthService.removeById(id);
         } catch (Exception e) {
             log.error("删除失败", e.getMessage());
             return Result.error("删除失败!");
@@ -172,15 +159,15 @@ public class BindAccountController {
      * @param ids
      * @return
      */
-    @AutoLog(value = "账户绑定-批量删除")
-    @ApiOperation(value = "账户绑定-批量删除", notes = "账户绑定-批量删除")
+    @AutoLog(value = "账号绑定-授权-批量删除")
+    @ApiOperation(value = "账号绑定-授权-批量删除", notes = "账号绑定-授权-批量删除")
     @DeleteMapping(value = "/deleteBatch")
-    public Result<BindAccount> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
-        Result<BindAccount> result = new Result<BindAccount>();
+    public Result<BindAccountAuth> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
+        Result<BindAccountAuth> result = new Result<BindAccountAuth>();
         if (ids == null || "".equals(ids.trim())) {
             result.error500("参数不识别!");
         } else {
-            this.bindAccountService.removeByIds(Arrays.asList(ids.split(",")));
+            this.bindAccountAuthService.removeByIds(Arrays.asList(ids.split(",")));
             result.success("删除成功!");
         }
         return result;
@@ -192,16 +179,16 @@ public class BindAccountController {
      * @param id
      * @return
      */
-    @AutoLog(value = "账户绑定-通过id查询")
-    @ApiOperation(value = "账户绑定-通过id查询", notes = "账户绑定-通过id查询")
+    @AutoLog(value = "账号绑定-授权-通过id查询")
+    @ApiOperation(value = "账号绑定-授权-通过id查询", notes = "账号绑定-授权-通过id查询")
     @GetMapping(value = "/queryById")
-    public Result<BindAccount> queryById(@RequestParam(name = "id", required = true) String id) {
-        Result<BindAccount> result = new Result<BindAccount>();
-        BindAccount bindAccount = bindAccountService.getById(id);
-        if (bindAccount == null) {
+    public Result<BindAccountAuth> queryById(@RequestParam(name = "id", required = true) String id) {
+        Result<BindAccountAuth> result = new Result<BindAccountAuth>();
+        BindAccountAuth bindAccountAuth = bindAccountAuthService.getById(id);
+        if (bindAccountAuth == null) {
             result.error500("未找到对应实体");
         } else {
-            result.setResult(bindAccount);
+            result.setResult(bindAccountAuth);
             result.setSuccess(true);
         }
         return result;
@@ -216,13 +203,13 @@ public class BindAccountController {
     @RequestMapping(value = "/exportXls")
     public ModelAndView exportXls(HttpServletRequest request, HttpServletResponse response) {
         // Step.1 组装查询条件
-        QueryWrapper<BindAccount> queryWrapper = null;
+        QueryWrapper<BindAccountAuth> queryWrapper = null;
         try {
             String paramsStr = request.getParameter("paramsStr");
             if (oConvertUtils.isNotEmpty(paramsStr)) {
                 String deString = URLDecoder.decode(paramsStr, "UTF-8");
-                BindAccount bindAccount = JSON.parseObject(deString, BindAccount.class);
-                queryWrapper = QueryGenerator.initQueryWrapper(bindAccount, request.getParameterMap());
+                BindAccountAuth bindAccountAuth = JSON.parseObject(deString, BindAccountAuth.class);
+                queryWrapper = QueryGenerator.initQueryWrapper(bindAccountAuth, request.getParameterMap());
             }
         } catch (UnsupportedEncodingException e) {
             e.printStackTrace();
@@ -230,11 +217,11 @@ public class BindAccountController {
 
         //Step.2 AutoPoi 导出Excel
         ModelAndView mv = new ModelAndView(new JeecgEntityExcelView());
-        List<BindAccount> pageList = bindAccountService.list(queryWrapper);
+        List<BindAccountAuth> pageList = bindAccountAuthService.list(queryWrapper);
         //导出文件名称
-        mv.addObject(NormalExcelConstants.FILE_NAME, "账户绑定列表");
-        mv.addObject(NormalExcelConstants.CLASS, BindAccount.class);
-        mv.addObject(NormalExcelConstants.PARAMS, new ExportParams("账户绑定列表数据", "导出人:Jeecg", "导出信息"));
+        mv.addObject(NormalExcelConstants.FILE_NAME, "账号绑定-授权列表");
+        mv.addObject(NormalExcelConstants.CLASS, BindAccountAuth.class);
+        mv.addObject(NormalExcelConstants.PARAMS, new ExportParams("账号绑定-授权列表数据", "导出人:Jeecg", "导出信息"));
         mv.addObject(NormalExcelConstants.DATA_LIST, pageList);
         return mv;
     }
@@ -257,9 +244,9 @@ public class BindAccountController {
             params.setHeadRows(1);
             params.setNeedSave(true);
             try {
-                List<BindAccount> listBindAccounts = ExcelImportUtil.importExcel(file.getInputStream(), BindAccount.class, params);
-                bindAccountService.saveBatch(listBindAccounts);
-                return Result.ok("文件导入成功!数据行数:" + listBindAccounts.size());
+                List<BindAccountAuth> listBindAccountAuths = ExcelImportUtil.importExcel(file.getInputStream(), BindAccountAuth.class, params);
+                bindAccountAuthService.saveBatch(listBindAccountAuths);
+                return Result.ok("文件导入成功!数据行数:" + listBindAccountAuths.size());
             } catch (Exception e) {
                 log.error(e.getMessage(), e);
                 return Result.error("文件导入失败:" + e.getMessage());

+ 295 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/BindAccountLoginController.java

@@ -0,0 +1,295 @@
+package org.jeecg.modules.ctop.controller;
+
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONObject;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
+import org.jeecg.common.api.vo.Result;
+import org.jeecg.common.aspect.annotation.AutoLog;
+import org.jeecg.common.system.query.QueryGenerator;
+import org.jeecg.common.util.oConvertUtils;
+
+import org.jeecg.modules.ctop.entity.BindAccountLogin;
+import org.jeecg.modules.ctop.service.IBindAccountLoginService;
+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 javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+import java.io.UnsupportedEncodingException;
+import java.net.URLDecoder;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @Description: 账号绑定-登陆
+ * @Author: jeecg-boot
+ * @Date: 2019-07-31
+ * @Version: V1.0
+ */
+@Slf4j
+@Api(tags = "账号绑定-登陆")
+@RestController
+@RequestMapping("/ctop/bindAccountLogin")
+public class BindAccountLoginController {
+    @Autowired
+    private IBindAccountLoginService bindAccountLoginService;
+
+
+    @PostMapping(value = "/login")
+    public Result<IPage<BindAccountLogin>> login(@RequestBody JSONObject json) {
+
+
+        System.err.println(json);
+
+        String advertiserId = json.getString("advertiserId");
+        String departmentId = json.getString("departmentId"); //部门id
+        String distributionName = json.getString("distributionName");//分配人姓名
+        String accountName = json.getString("accountName");
+        String password = json.getString("password");
+        String loginType = json.getString("loginType");
+
+        boolean trueOrFalse = bindAccountLoginService.bindLogin(advertiserId, accountName, password, loginType);
+
+
+       /* Subject subject = SecurityUtils.getSubject();
+        LoginUser sysUser = (LoginUser) subject.getPrincipal();
+        String realname = sysUser.getRealname(); //登录人姓名  分配人
+        String loginId = sysUser.getId();//登录id
+
+        UserAllocation userAllocation = new UserAllocation();
+        userAllocation.setAccountName(realname); //账号姓名
+        userAllocation.setDistributionName(realname); //分配人
+        userAllocation.setUserId(loginId);
+
+        bindAccountLoginService.bindLogin()
+
+        //userAllocation.setAdvertiserId(advertiserId);
+
+
+        // userAllocationService.userAllocation();
+
+
+        log.info(" 用户名:  " + sysUser.getRealname() + ",退出成功! ");
+        subject.logout();
+*/
+        Result<IPage<BindAccountLogin>> result = new Result<IPage<BindAccountLogin>>();
+        //  boolean trueOrFalse = bindAccountService.bindLogin(advertiserId, accountName, password, loginType);
+        result.setSuccess(trueOrFalse);
+        return result;
+    }
+
+
+    /**
+     * 分页列表查询
+     *
+     * @param bindAccountLogin
+     * @param pageNo
+     * @param pageSize
+     * @param req
+     * @return
+     */
+    @AutoLog(value = "账号绑定-登陆-分页列表查询")
+    @ApiOperation(value = "账号绑定-登陆-分页列表查询", notes = "账号绑定-登陆-分页列表查询")
+    @GetMapping(value = "/list")
+    public Result<IPage<BindAccountLogin>> queryPageList(BindAccountLogin bindAccountLogin,
+                                                         @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
+                                                         @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
+                                                         HttpServletRequest req) {
+        Result<IPage<BindAccountLogin>> result = new Result<IPage<BindAccountLogin>>();
+        QueryWrapper<BindAccountLogin> queryWrapper = QueryGenerator.initQueryWrapper(bindAccountLogin, req.getParameterMap());
+        Page<BindAccountLogin> page = new Page<BindAccountLogin>(pageNo, pageSize);
+        IPage<BindAccountLogin> pageList = bindAccountLoginService.page(page, queryWrapper);
+        result.setSuccess(true);
+        result.setResult(pageList);
+        return result;
+    }
+
+    /**
+     * 添加
+     *
+     * @param bindAccountLogin
+     * @return
+     */
+    @AutoLog(value = "账号绑定-登陆-添加")
+    @ApiOperation(value = "账号绑定-登陆-添加", notes = "账号绑定-登陆-添加")
+    @PostMapping(value = "/add")
+    public Result<BindAccountLogin> add(@RequestBody BindAccountLogin bindAccountLogin) {
+        Result<BindAccountLogin> result = new Result<BindAccountLogin>();
+        try {
+            bindAccountLoginService.save(bindAccountLogin);
+            result.success("添加成功!");
+        } catch (Exception e) {
+            log.error(e.getMessage(), e);
+            result.error500("操作失败");
+        }
+        return result;
+    }
+
+    /**
+     * 编辑
+     *
+     * @param bindAccountLogin
+     * @return
+     */
+    @AutoLog(value = "账号绑定-登陆-编辑")
+    @ApiOperation(value = "账号绑定-登陆-编辑", notes = "账号绑定-登陆-编辑")
+    @PutMapping(value = "/edit")
+    public Result<BindAccountLogin> edit(@RequestBody BindAccountLogin bindAccountLogin) {
+        Result<BindAccountLogin> result = new Result<BindAccountLogin>();
+        BindAccountLogin bindAccountLoginEntity = bindAccountLoginService.getById(bindAccountLogin.getId());
+        if (bindAccountLoginEntity == null) {
+            result.error500("未找到对应实体");
+        } else {
+            boolean ok = bindAccountLoginService.updateById(bindAccountLogin);
+            //TODO 返回false说明什么?
+            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 {
+            bindAccountLoginService.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<BindAccountLogin> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
+        Result<BindAccountLogin> result = new Result<BindAccountLogin>();
+        if (ids == null || "".equals(ids.trim())) {
+            result.error500("参数不识别!");
+        } else {
+            this.bindAccountLoginService.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<BindAccountLogin> queryById(@RequestParam(name = "id", required = true) String id) {
+        Result<BindAccountLogin> result = new Result<BindAccountLogin>();
+        BindAccountLogin bindAccountLogin = bindAccountLoginService.getById(id);
+        if (bindAccountLogin == null) {
+            result.error500("未找到对应实体");
+        } else {
+            result.setResult(bindAccountLogin);
+            result.setSuccess(true);
+        }
+        return result;
+    }
+
+    /**
+     * 导出excel
+     *
+     * @param request
+     * @param response
+     */
+    @RequestMapping(value = "/exportXls")
+    public ModelAndView exportXls(HttpServletRequest request, HttpServletResponse response) {
+        // Step.1 组装查询条件
+        QueryWrapper<BindAccountLogin> queryWrapper = null;
+        try {
+            String paramsStr = request.getParameter("paramsStr");
+            if (oConvertUtils.isNotEmpty(paramsStr)) {
+                String deString = URLDecoder.decode(paramsStr, "UTF-8");
+                BindAccountLogin bindAccountLogin = JSON.parseObject(deString, BindAccountLogin.class);
+                queryWrapper = QueryGenerator.initQueryWrapper(bindAccountLogin, request.getParameterMap());
+            }
+        } catch (UnsupportedEncodingException e) {
+            e.printStackTrace();
+        }
+
+        //Step.2 AutoPoi 导出Excel
+        ModelAndView mv = new ModelAndView(new JeecgEntityExcelView());
+        List<BindAccountLogin> pageList = bindAccountLoginService.list(queryWrapper);
+        //导出文件名称
+        mv.addObject(NormalExcelConstants.FILE_NAME, "账号绑定-登陆列表");
+        mv.addObject(NormalExcelConstants.CLASS, BindAccountLogin.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<BindAccountLogin> listBindAccountLogins = ExcelImportUtil.importExcel(file.getInputStream(), BindAccountLogin.class, params);
+                bindAccountLoginService.saveBatch(listBindAccountLogins);
+                return Result.ok("文件导入成功!数据行数:" + listBindAccountLogins.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("文件导入失败!");
+    }
+
+}

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

@@ -7,7 +7,7 @@ import constant.KuaishouInterfaceConstant;
 import org.apache.commons.lang.StringUtils;
 import org.jeecg.modules.ctop.entity.CTopOauthToken;
 import org.jeecg.modules.ctop.mapper.CTopOauthTokenMapper;
-import org.jeecg.modules.ctop.service.IBindAccountService;
+import org.jeecg.modules.ctop.service.IBindAccountAuthService;
 import org.jeecg.modules.kuaishou.service.IKuaishouInterfaceService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Controller;
@@ -31,7 +31,7 @@ public class CallbackController {
     @Autowired
     private CTopOauthTokenMapper cTopOauthTokenMapper;
     @Autowired
-    private IBindAccountService bindAccountService;
+    private IBindAccountAuthService bindAccountAuthService;
 
     @RequestMapping("/kuaishou")
     @ResponseBody
@@ -62,7 +62,7 @@ public class CallbackController {
                 Date refreshTokenExpireInDate = new Date(now + refreshTokenExpireIn);
                 topOauthToken.setRefreshTokenExpiresIn(refreshTokenExpireInDate);
                 cTopOauthTokenMapper.insert(topOauthToken);
-                bindAccountService.addBindAccount(accountId, KuaishouInterfaceConstant.TYPE_AUTHORIZATION, state, KuaishouInterfaceConstant.LOGIN_TYPE_KUAISHOU); //账号绑定
+                bindAccountAuthService.addBindAccount(accountId, KuaishouInterfaceConstant.LOGIN_TYPE_KUAISHOU, state); //账号绑定
             }
             return "auth_success";
         }

+ 70 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/entity/BindAccountAuth.java

@@ -0,0 +1,70 @@
+package org.jeecg.modules.ctop.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;
+
+/**
+ * @Description: 账号绑定-授权
+ * @Author: jeecg-boot
+ * @Date: 2019-07-31
+ * @Version: V1.0
+ */
+@Data
+@TableName("ctop_bind_account_auth")
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+@ApiModel(value = "ctop_bind_account_auth对象", description = "账号绑定-授权")
+public class BindAccountAuth {
+
+    /**
+     * 主键ID
+     */
+    @TableId(type = IdType.AUTO)
+    @ApiModelProperty(value = "主键ID")
+    private Long id;
+    /**
+     * 广告id
+     */
+    @Excel(name = "广告id", width = 15)
+    @ApiModelProperty(value = "广告id")
+    private String advertiserId;
+    /**
+     * 授权方式
+     */
+    @Excel(name = "授权方式", width = 15)
+    @ApiModelProperty(value = "授权方式")
+    private String authType;
+    /**
+     * 回调返回广告主id
+     */
+    @Excel(name = "回调返回广告主id", width = 15)
+    @ApiModelProperty(value = "回调返回广告主id")
+    private Long accountId;
+    /**
+     * 创建时间
+     */
+    @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;
+}

+ 12 - 18
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/entity/BindAccount.java

@@ -15,17 +15,17 @@ import org.springframework.format.annotation.DateTimeFormat;
 import java.util.Date;
 
 /**
- * @Description: 账户绑定
+ * @Description: 账号绑定-登陆
  * @Author: jeecg-boot
- * @Date: 2019-07-30
+ * @Date: 2019-07-31
  * @Version: V1.0
  */
 @Data
-@TableName("ctop_bind_account")
+@TableName("ctop_bind_account_login")
 @EqualsAndHashCode(callSuper = false)
 @Accessors(chain = true)
-@ApiModel(value = "ctop_bind_account对象", description = "账户绑定")
-public class BindAccount {
+@ApiModel(value = "ctop_bind_account_login对象", description = "账号绑定-登陆")
+public class BindAccountLogin {
 
     /**
      * 主键ID
@@ -52,23 +52,17 @@ public class BindAccount {
     @ApiModelProperty(value = "密码")
     private String password;
     /**
-     * 登录/授权方式
+     * 登录方式
      */
-    @Excel(name = "登录/授权方式", width = 15)
-    @ApiModelProperty(value = "登录/授权方式")
+    @Excel(name = "登录方式", width = 15)
+    @ApiModelProperty(value = "登录方式")
     private String loginType;
     /**
-     * 方式:登录或授权
+     * 1未登陆 2已登陆
      */
-    @Excel(name = "方式:登录或授权", width = 15)
-    @ApiModelProperty(value = "方式:登录或授权")
-    private String type;
-    /**
-     * 回调返回广告主id
-     */
-    @Excel(name = "回调返回广告主id", width = 15)
-    @ApiModelProperty(value = "回调返回广告主id")
-    private Long accountId;
+    @Excel(name = "1未登陆 2已登陆", width = 15)
+    @ApiModelProperty(value = "1未登陆 2已登陆")
+    private String status;
     /**
      * 创建时间
      */

+ 3 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/entity/ByteDanceBudgetTemplate.java

@@ -129,4 +129,7 @@ public class ByteDanceBudgetTemplate {
      */
     @ApiModelProperty(value = "updateTime")
     private Date updateTime;
+
+    private String createBy;
+    private String updateBy;
 }

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

@@ -0,0 +1,17 @@
+package org.jeecg.modules.ctop.mapper;
+
+import java.util.List;
+
+import org.apache.ibatis.annotations.Param;
+import org.jeecg.modules.ctop.entity.BindAccountAuth;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * @Description: 账号绑定-授权
+ * @Author: jeecg-boot
+ * @Date:   2019-07-31
+ * @Version: V1.0
+ */
+public interface BindAccountAuthMapper extends BaseMapper<BindAccountAuth> {
+
+}

+ 14 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/mapper/BindAccountLoginMapper.java

@@ -0,0 +1,14 @@
+package org.jeecg.modules.ctop.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.jeecg.modules.ctop.entity.BindAccountLogin;
+
+/**
+ * @Description: 账号绑定-登陆
+ * @Author: jeecg-boot
+ * @Date: 2019-07-31
+ * @Version: V1.0
+ */
+public interface BindAccountLoginMapper extends BaseMapper<BindAccountLogin> {
+
+}

+ 0 - 14
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/mapper/BindAccountMapper.java

@@ -1,14 +0,0 @@
-package org.jeecg.modules.ctop.mapper;
-
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import org.jeecg.modules.ctop.entity.BindAccount;
-
-/**
- * @Description: 账户绑定
- * @Author: jeecg-boot
- * @Date: 2019-07-30
- * @Version: V1.0
- */
-public interface BindAccountMapper extends BaseMapper<BindAccount> {
-
-}

+ 1 - 1
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/mapper/xml/BindAccountMapper.xml

@@ -1,5 +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.ctop.mapper.BindAccountMapper">
+<mapper namespace="org.jeecg.modules.ctop.mapper.BindAccountAuthMapper">
 
 </mapper>

+ 5 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/mapper/xml/BindAccountLoginMapper.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.ctop.mapper.BindAccountLoginMapper">
+
+</mapper>

+ 5 - 6
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/service/IBindAccountService.java

@@ -1,18 +1,17 @@
 package org.jeecg.modules.ctop.service;
 
 import com.baomidou.mybatisplus.extension.service.IService;
-import org.jeecg.modules.ctop.entity.BindAccount;
+import org.jeecg.modules.ctop.entity.BindAccountAuth;
 
 import java.io.UnsupportedEncodingException;
 
 /**
- * @Description: 账户绑定
+ * @Description: 账号绑定-授权
  * @Author: jeecg-boot
- * @Date: 2019-07-30
+ * @Date: 2019-07-31
  * @Version: V1.0
  */
-public interface IBindAccountService extends IService<BindAccount> {
-    boolean bindLogin(String advertiserId, String accountName, String password, String loginType);
+public interface IBindAccountAuthService extends IService<BindAccountAuth> {
 
     String bindAuthorization(String advertiserId, String authorizationType) throws UnsupportedEncodingException;
 
@@ -21,5 +20,5 @@ public interface IBindAccountService extends IService<BindAccount> {
     String getByteDanceCodeUrl(String state) throws UnsupportedEncodingException;
 
 
-    void addBindAccount(Long accountId, String type, String state, String loginType);
+    void addBindAccount(Long accountId, String type, String state);
 }

+ 18 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/service/IBindAccountLoginService.java

@@ -0,0 +1,18 @@
+package org.jeecg.modules.ctop.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import org.jeecg.modules.ctop.entity.BindAccountLogin;
+
+/**
+ * @Description: 账号绑定-登陆
+ * @Author: jeecg-boot
+ * @Date: 2019-07-31
+ * @Version: V1.0
+ */
+public interface IBindAccountLoginService extends IService<BindAccountLogin> {
+
+
+    boolean bindLogin(String advertiserId, String accountName, String password, String loginType);
+
+
+}

+ 16 - 46
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/service/impl/BindAccountServiceImpl.java

@@ -1,13 +1,12 @@
 package org.jeecg.modules.ctop.service.impl;
 
-import cn.com.ctop.common.utils.Check;
 import cn.com.ctop.common.utils.PropertiesUtils;
 import cn.com.ctop.toutiao.common.BytedanceInterfaceConstant;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import constant.KuaishouInterfaceConstant;
-import org.jeecg.modules.ctop.entity.BindAccount;
-import org.jeecg.modules.ctop.mapper.BindAccountMapper;
-import org.jeecg.modules.ctop.service.IBindAccountService;
+import org.jeecg.modules.ctop.entity.BindAccountAuth;
+import org.jeecg.modules.ctop.mapper.BindAccountAuthMapper;
+import org.jeecg.modules.ctop.service.IBindAccountAuthService;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -16,46 +15,20 @@ import org.springframework.stereotype.Service;
 import java.io.UnsupportedEncodingException;
 import java.net.URLEncoder;
 import java.util.HashMap;
-import java.util.List;
 import java.util.Map;
 
 /**
- * @Description: 账户绑定
+ * @Description: 账号绑定-授权
  * @Author: jeecg-boot
- * @Date: 2019-07-30
+ * @Date: 2019-07-31
  * @Version: V1.0
  */
 @Service
-public class BindAccountServiceImpl extends ServiceImpl<BindAccountMapper, BindAccount> implements IBindAccountService {
-    private static final Logger logger = LoggerFactory.getLogger(BindAccountServiceImpl.class);
+public class BindAccountAuthServiceImpl extends ServiceImpl<BindAccountAuthMapper, BindAccountAuth> implements IBindAccountAuthService {
+    private static final Logger logger = LoggerFactory.getLogger(BindAccountAuthServiceImpl.class);
 
     @Autowired
-    BindAccountMapper bindAccountMapper;
-
-    @Override
-    public boolean bindLogin(String advertiserId, String accountName, String password, String loginType) {
-        Map<String, Object> requestMap = new HashMap<>();
-        requestMap.put("advertiser_id", advertiserId);
-        requestMap.put("account_name", accountName);
-        requestMap.put("login_type", loginType);
-        List<BindAccount> bindAccounts = bindAccountMapper.selectByMap(requestMap);
-        if (!Check.isNull(bindAccounts)) {
-            return false;
-        }
-        BindAccount bindAccount = new BindAccount();
-        bindAccount.setAdvertiserId(advertiserId);
-        bindAccount.setAccountName(accountName);
-        bindAccount.setPassword(password);
-        bindAccount.setType(KuaishouInterfaceConstant.TYPE_LOGIN);
-        bindAccount.setLoginType(loginType);
-        int i = bindAccountMapper.insert(bindAccount);
-        if (i > 0) {
-            logger.info("登录账号绑定成功,广告主id:{}", bindAccount.getAdvertiserId());
-            return true;
-        }
-
-        return false;
-    }
+    private BindAccountAuthMapper bindAccountAuthMapper;
 
     /**
      * 授权
@@ -77,34 +50,31 @@ public class BindAccountServiceImpl extends ServiceImpl<BindAccountMapper, BindA
         return codeUrl;
     }
 
-
     /**
      * 授权 绑定账号信息
      *
      * @param accountId
-     * @param type
      * @param state
-     * @param loginType
      */
     @Override
-    public void addBindAccount(Long accountId, String type, String state, String loginType) {
+    public void addBindAccount(Long accountId, String authType, String state) {
         Map<String, Object> deleteMap = new HashMap<>();
         deleteMap.put("advertiser_id", state);
         deleteMap.put("account_id", accountId);
-        deleteMap.put("type", type);
-        deleteMap.put("login_type", loginType);
-        bindAccountMapper.deleteByMap(deleteMap);
-        BindAccount bindAccount = new BindAccount();
+        deleteMap.put("auth_type", authType);
+        bindAccountAuthMapper.deleteByMap(deleteMap);
+        BindAccountAuth bindAccount = new BindAccountAuth();
         bindAccount.setAccountId(accountId);
-        bindAccount.setLoginType(loginType);
+
         bindAccount.setAdvertiserId(state);
-        bindAccount.setType(type);
-        int i = bindAccountMapper.insert(bindAccount);
+        bindAccount.setAuthType(authType);
+        int i = bindAccountAuthMapper.insert(bindAccount);
         if (i > 0) {
             logger.info("授权账号绑定成功,本地id:{},accountId:{}", bindAccount.getAdvertiserId(), accountId);
         }
     }
 
+
     @Override
     public String getKuaishouCodeUrl(String state) throws UnsupportedEncodingException {
         StringBuffer sb = new StringBuffer();

+ 54 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/service/impl/BindAccountLoginServiceImpl.java

@@ -0,0 +1,54 @@
+package org.jeecg.modules.ctop.service.impl;
+
+import cn.com.ctop.common.utils.Check;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.jeecg.modules.ctop.entity.BindAccountLogin;
+import org.jeecg.modules.ctop.mapper.BindAccountLoginMapper;
+import org.jeecg.modules.ctop.service.IBindAccountLoginService;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @Description: 账号绑定-登陆
+ * @Author: jeecg-boot
+ * @Date: 2019-07-31
+ * @Version: V1.0
+ */
+@Service
+public class BindAccountLoginServiceImpl extends ServiceImpl<BindAccountLoginMapper, BindAccountLogin> implements IBindAccountLoginService {
+    private static final Logger logger = LoggerFactory.getLogger(BindAccountLoginServiceImpl.class);
+
+    @Autowired
+    private BindAccountLoginMapper bindAccountLoginMapper;
+
+    @Override
+    public boolean bindLogin(String advertiserId, String accountName, String password, String loginType) {
+        Map<String, Object> requestMap = new HashMap<>();
+        requestMap.put("advertiser_id", advertiserId);
+        requestMap.put("account_name", accountName);
+        requestMap.put("login_type", loginType);
+        List<BindAccountLogin> bindAccounts = bindAccountLoginMapper.selectByMap(requestMap);
+        if (!Check.isNull(bindAccounts)) {
+            return false;
+        }
+        BindAccountLogin bindAccountLogin = new BindAccountLogin();
+        bindAccountLogin.setAdvertiserId(advertiserId);
+        bindAccountLogin.setAccountName(accountName);
+        bindAccountLogin.setPassword(password);
+        bindAccountLogin.setLoginType(loginType);
+        int i = bindAccountLoginMapper.insert(bindAccountLogin);
+        if (i > 0) {
+            logger.info("登录账号绑定成功,广告主id:{}", bindAccountLogin.getAdvertiserId());
+            return true;
+        }
+
+        return false;
+    }
+
+}

+ 17 - 5
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/service/impl/ByteDanceBudgetTemplateServiceImpl.java

@@ -23,6 +23,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 
 import javax.servlet.http.HttpServletRequest;
 import java.util.HashMap;
+import java.util.List;
 import java.util.Map;
 
 /**
@@ -37,12 +38,23 @@ public class ByteDanceBudgetTemplateServiceImpl extends ServiceImpl<ByteDanceBud
     @Override
     public Map<String, Object> insertTemplate(ByteDanceBudgetTemplate template) {
         Map<String, Object> resultMap = new HashMap<>();
-        LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal();
-        CTopOauthToken token = tokenService.getOAuthTokenByAccountId(user.getId());
+        QueryWrapper<ByteDanceBudgetTemplate> queryWrapper = new QueryWrapper<ByteDanceBudgetTemplate>();
+        queryWrapper.eq("name", template.getName());
+        queryWrapper.ne("id", template.getId());
+        List<ByteDanceBudgetTemplate> templateExistList = this.list(queryWrapper);
+        if (templateExistList != null && templateExistList.size() > 0) {
+            resultMap.put("success", false);
+            resultMap.put("message", "模板名称已存在,请修改后重试");
+            return resultMap;
+        }
         template.setStatus(1);
-        template.setStartDate(template.getStartDate().substring(0, 10));
-        template.setEndDate(template.getEndDate().substring(0, 10));
-        budgetTemplateMapper.insert(template);
+        if (template.getStartDate() != null) {
+            template.setStartDate(template.getStartDate().substring(0, 10));
+        }
+        if (template.getEndDate() != null) {
+            template.setEndDate(template.getEndDate().substring(0, 10));
+        }
+        this.saveOrUpdate(template);
         resultMap.put("success", true);
         resultMap.put("message", "模板保存成功");
         return resultMap;

+ 168 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/vue/BindAccountAuthList.vue

@@ -0,0 +1,168 @@
+<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.advertiserId"></a-input>
+            </a-form-item>
+          </a-col>
+          <a-col :md="6" :sm="8">
+            <a-form-item label="授权方式">
+              <a-input placeholder="请输入授权方式" v-model="queryParam.authType"></a-input>
+            </a-form-item>
+          </a-col>
+        <template v-if="toggleSearchStatus">
+        <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>
+          </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 -->
+
+    <!-- 表单区域 -->
+    <bindAccountAuth-modal ref="modalForm" @ok="modalFormOk"></bindAccountAuth-modal>
+  </a-card>
+</template>
+
+<script>
+  import BindAccountAuthModal from './modules/BindAccountAuthModal'
+  import { JeecgListMixin } from '@/mixins/JeecgListMixin'
+
+  export default {
+    name: "BindAccountAuthList",
+    mixins:[JeecgListMixin],
+    components: {
+      BindAccountAuthModal
+    },
+    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: 'advertiserId'
+           },
+		   {
+            title: '授权方式',
+            align:"center",
+            dataIndex: 'authType'
+           },
+		   {
+            title: '回调返回广告主id',
+            align:"center",
+            dataIndex: 'accountId'
+           },
+          {
+            title: '操作',
+            dataIndex: 'action',
+            align:"center",
+            scopedSlots: { customRender: 'action' },
+          }
+        ],
+		url: {
+          list: "/ctop/bindAccountAuth/list",
+          delete: "/ctop/bindAccountAuth/delete",
+          deleteBatch: "/ctop/bindAccountAuth/deleteBatch",
+          exportXlsUrl: "ctop/bindAccountAuth/exportXls",
+          importExcelUrl: "ctop/bindAccountAuth/importExcel",
+       },
+    }
+  },
+  computed: {
+    importExcelUrl: function(){
+      return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
+    }
+  },
+    methods: {
+     
+    }
+  }
+</script>
+<style scoped>
+  @import '~@assets/less/common.less'
+</style>

+ 18 - 23
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/vue/BindAccountList.vue

@@ -23,13 +23,13 @@
             </a-form-item>
           </a-col>
           <a-col :md="6" :sm="8">
-            <a-form-item label="登录/授权方式">
-              <a-input placeholder="请输入登录/授权方式" v-model="queryParam.loginType"></a-input>
+            <a-form-item label="登录方式">
+              <a-input placeholder="请输入登录方式" v-model="queryParam.loginType"></a-input>
             </a-form-item>
           </a-col>
           <a-col :md="6" :sm="8">
-            <a-form-item label="方式:登录或授权">
-              <a-input placeholder="请输入方式:登录或授权" v-model="queryParam.type"></a-input>
+            <a-form-item label="1未登陆 2已登陆">
+              <a-input placeholder="请输入1未登陆 2已登陆" v-model="queryParam.status"></a-input>
             </a-form-item>
           </a-col>
           </template>
@@ -51,7 +51,7 @@
     <!-- 操作按钮区域 -->
     <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-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>
@@ -103,23 +103,23 @@
     <!-- table区域-end -->
 
     <!-- 表单区域 -->
-    <bindAccount-modal ref="modalForm" @ok="modalFormOk"></bindAccount-modal>
+    <bindAccountLogin-modal ref="modalForm" @ok="modalFormOk"></bindAccountLogin-modal>
   </a-card>
 </template>
 
 <script>
-  import BindAccountModal from './modules/BindAccountModal'
+  import BindAccountLoginModal from './modules/BindAccountLoginModal'
   import { JeecgListMixin } from '@/mixins/JeecgListMixin'
 
   export default {
-    name: "BindAccountList",
+    name: "BindAccountLoginList",
     mixins:[JeecgListMixin],
     components: {
-      BindAccountModal
+      BindAccountLoginModal
     },
     data () {
       return {
-        description: '账户绑定管理页面',
+        description: '账号绑定-登陆管理页面',
         // 表头
         columns: [
           {
@@ -148,19 +148,14 @@
             dataIndex: 'password'
            },
 		   {
-            title: '登录/授权方式',
+            title: '登录方式',
             align:"center",
             dataIndex: 'loginType'
            },
 		   {
-            title: '方式:登录或授权',
+            title: '1未登陆 2已登陆',
             align:"center",
-            dataIndex: 'type'
-           },
-		   {
-            title: '回调返回广告主id',
-            align:"center",
-            dataIndex: 'accountId'
+            dataIndex: 'status'
            },
           {
             title: '操作',
@@ -170,11 +165,11 @@
           }
         ],
 		url: {
-          list: "/ctop/bindAccount/list",
-          delete: "/ctop/bindAccount/delete",
-          deleteBatch: "/ctop/bindAccount/deleteBatch",
-          exportXlsUrl: "ctop/bindAccount/exportXls",
-          importExcelUrl: "ctop/bindAccount/importExcel",
+          list: "/ctop/bindAccountLogin/list",
+          delete: "/ctop/bindAccountLogin/delete",
+          deleteBatch: "/ctop/bindAccountLogin/deleteBatch",
+          exportXlsUrl: "ctop/bindAccountLogin/exportXls",
+          importExcelUrl: "ctop/bindAccountLogin/importExcel",
        },
     }
   },

+ 136 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/vue/modules/BindAccountAuthModal.vue

@@ -0,0 +1,136 @@
+<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="['advertiserId', {}]" />
+        </a-form-item>
+        <a-form-item
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="授权方式">
+          <a-input placeholder="请输入授权方式" v-decorator="['authType', {}]" />
+        </a-form-item>
+        <a-form-item
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="回调返回广告主id">
+          <a-input placeholder="请输入回调返回广告主id" v-decorator="['accountId', {}]" />
+        </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: "BindAccountAuthModal",
+    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:{
+        },
+        url: {
+          add: "/ctop/bindAccountAuth/add",
+          edit: "/ctop/bindAccountAuth/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,'advertiserId','authType','accountId'))
+		  //时间格式化
+        });
+
+      },
+      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>

+ 143 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/vue/modules/BindAccountAuthModal__Style#Drawer.vue

@@ -0,0 +1,143 @@
+<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="['advertiserId', {}]" />
+        </a-form-item>
+        <a-form-item
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="授权方式">
+          <a-input placeholder="请输入授权方式" v-decorator="['authType', {}]" />
+        </a-form-item>
+        <a-form-item
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="回调返回广告主id">
+          <a-input placeholder="请输入回调返回广告主id" v-decorator="['accountId', {}]" />
+        </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: "BindAccountAuthModal",
+    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:{
+        },
+        url: {
+          add: "/ctop/bindAccountAuth/add",
+          edit: "/ctop/bindAccountAuth/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,'advertiserId','authType','accountId'))
+		  //时间格式化
+        });
+
+      },
+      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>

+ 8 - 14
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/vue/modules/BindAccountModal.vue

@@ -32,20 +32,14 @@
         <a-form-item
           :labelCol="labelCol"
           :wrapperCol="wrapperCol"
-          label="登录/授权方式">
-          <a-input placeholder="请输入登录/授权方式" v-decorator="['loginType', {}]" />
+          label="登录方式">
+          <a-input placeholder="请输入登录方式" v-decorator="['loginType', {}]" />
         </a-form-item>
         <a-form-item
           :labelCol="labelCol"
           :wrapperCol="wrapperCol"
-          label="方式:登录或授权">
-          <a-input placeholder="请输入方式:登录或授权" v-decorator="['type', {}]" />
-        </a-form-item>
-        <a-form-item
-          :labelCol="labelCol"
-          :wrapperCol="wrapperCol"
-          label="回调返回广告主id">
-          <a-input placeholder="请输入回调返回广告主id" v-decorator="['accountId', {}]" />
+          label="1未登陆 2已登陆">
+          <a-input placeholder="请输入1未登陆 2已登陆" v-decorator="['status', {}]" />
         </a-form-item>
 		
       </a-form>
@@ -59,7 +53,7 @@
   import moment from "moment"
 
   export default {
-    name: "BindAccountModal",
+    name: "BindAccountLoginModal",
     data () {
       return {
         title:"操作",
@@ -79,8 +73,8 @@
         validatorRules:{
         },
         url: {
-          add: "/ctop/bindAccount/add",
-          edit: "/ctop/bindAccount/edit",
+          add: "/ctop/bindAccountLogin/add",
+          edit: "/ctop/bindAccountLogin/edit",
         },
       }
     },
@@ -95,7 +89,7 @@
         this.model = Object.assign({}, record);
         this.visible = true;
         this.$nextTick(() => {
-          this.form.setFieldsValue(pick(this.model,'advertiserId','accountName','password','loginType','type','accountId'))
+          this.form.setFieldsValue(pick(this.model,'advertiserId','accountName','password','loginType','status'))
 		  //时间格式化
         });
 

+ 8 - 14
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/vue/modules/BindAccountModal__Style#Drawer.vue

@@ -32,20 +32,14 @@
         <a-form-item
           :labelCol="labelCol"
           :wrapperCol="wrapperCol"
-          label="登录/授权方式">
-          <a-input placeholder="请输入登录/授权方式" v-decorator="['loginType', {}]" />
+          label="登录方式">
+          <a-input placeholder="请输入登录方式" v-decorator="['loginType', {}]" />
         </a-form-item>
         <a-form-item
           :labelCol="labelCol"
           :wrapperCol="wrapperCol"
-          label="方式:登录或授权">
-          <a-input placeholder="请输入方式:登录或授权" v-decorator="['type', {}]" />
-        </a-form-item>
-        <a-form-item
-          :labelCol="labelCol"
-          :wrapperCol="wrapperCol"
-          label="回调返回广告主id">
-          <a-input placeholder="请输入回调返回广告主id" v-decorator="['accountId', {}]" />
+          label="1未登陆 2已登陆">
+          <a-input placeholder="请输入1未登陆 2已登陆" v-decorator="['status', {}]" />
         </a-form-item>
 		
       </a-form>
@@ -61,7 +55,7 @@
   import moment from "moment"
 
   export default {
-    name: "BindAccountModal",
+    name: "BindAccountLoginModal",
     data () {
       return {
         title:"操作",
@@ -81,8 +75,8 @@
         validatorRules:{
         },
         url: {
-          add: "/ctop/bindAccount/add",
-          edit: "/ctop/bindAccount/edit",
+          add: "/ctop/bindAccountLogin/add",
+          edit: "/ctop/bindAccountLogin/edit",
         },
       }
     },
@@ -97,7 +91,7 @@
         this.model = Object.assign({}, record);
         this.visible = true;
         this.$nextTick(() => {
-          this.form.setFieldsValue(pick(this.model,'advertiserId','accountName','password','loginType','type','accountId'))
+          this.form.setFieldsValue(pick(this.model,'advertiserId','accountName','password','loginType','status'))
 		  //时间格式化
         });
 

+ 1 - 1
jeecg-boot-module-system/src/main/resources/application-dev.yml

@@ -90,7 +90,7 @@ spring:
         connectionProperties: druid.stat.mergeSql\=true;druid.stat.slowSqlMillis\=5000
       datasource:
         master:
-          url: jdbc:mysql://192.168.0.23:3306/jeecg-boot?characterEncoding=UTF-8&useUnicode=true&useSSL=false
+          url: jdbc:mysql://192.168.1.21:3306/jeecg-boot?characterEncoding=UTF-8&useUnicode=true&useSSL=false
           username: hcst
           password: 123456
           driver-class-name: com.mysql.jdbc.Driver

+ 1 - 1
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/graphql/service/impl/KuaishouWebInterfaceServiceImpl.java

@@ -423,7 +423,7 @@ public class KuaishouWebInterfaceServiceImpl implements IKuaishouWebInterfaceSer
     public static void main(String[] args) {
         try {
             KuaishouWebInterfaceServiceImpl i = new KuaishouWebInterfaceServiceImpl();
-            i.adkuaishouWebLogin("18811551872", "a123456");
+            i.adkuaishouWebLogin("17611760019", "a123456");
             Thread.sleep(20000);
             i.deleteAllComment(new HashMap<>());
         } catch (Exception e) {