|
@@ -8,6 +8,7 @@ import com.ruixuan.common.core.controller.BaseController;
|
|
import com.ruixuan.common.core.domain.AjaxResult;
|
|
import com.ruixuan.common.core.domain.AjaxResult;
|
|
import com.ruixuan.common.core.page.TableDataInfo;
|
|
import com.ruixuan.common.core.page.TableDataInfo;
|
|
import com.ruixuan.common.enums.BusinessType;
|
|
import com.ruixuan.common.enums.BusinessType;
|
|
|
|
+import com.ruixuan.common.utils.Check;
|
|
import com.ruixuan.common.utils.poi.ExcelUtil;
|
|
import com.ruixuan.common.utils.poi.ExcelUtil;
|
|
import com.ruixuan.jinniu.entity.KuaishouAgentAccountList;
|
|
import com.ruixuan.jinniu.entity.KuaishouAgentAccountList;
|
|
import com.ruixuan.jinniu.service.IKuaishouAgentAccountListService;
|
|
import com.ruixuan.jinniu.service.IKuaishouAgentAccountListService;
|
|
@@ -30,18 +31,33 @@ import org.springframework.web.bind.annotation.RestController;
|
|
*/
|
|
*/
|
|
@RestController
|
|
@RestController
|
|
@RequestMapping("/agent/account")
|
|
@RequestMapping("/agent/account")
|
|
-public class KuaishouAgentAccountListController extends BaseController
|
|
|
|
-{
|
|
|
|
|
|
+public class KuaishouAgentAccountListController extends BaseController {
|
|
@Autowired
|
|
@Autowired
|
|
private IKuaishouAgentAccountListService kuaishouAgentAccountListService;
|
|
private IKuaishouAgentAccountListService kuaishouAgentAccountListService;
|
|
|
|
|
|
|
|
+
|
|
|
|
+ @GetMapping("/syncAccounts")
|
|
|
|
+ public void syncAccounts() {
|
|
|
|
+ List<String> cookies = kuaishouAgentAccountListService.getCookie();
|
|
|
|
+ if (!Check.isNull(cookies)) {
|
|
|
|
+ for (int i = 0; i < cookies.size(); i++) {
|
|
|
|
+ String cookie = cookies.get(i);
|
|
|
|
+ kuaishouAgentAccountListService.kuaishouAgentAccountListService(cookie,1, 500, null, null);
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* 查询【请填写功能名称】列表
|
|
* 查询【请填写功能名称】列表
|
|
*/
|
|
*/
|
|
@PreAuthorize("@ss.hasPermi('system:list:list')")
|
|
@PreAuthorize("@ss.hasPermi('system:list:list')")
|
|
@GetMapping("/list")
|
|
@GetMapping("/list")
|
|
- public TableDataInfo list(KuaishouAgentAccountList kuaishouAgentAccountList)
|
|
|
|
- {
|
|
|
|
|
|
+ public TableDataInfo list(KuaishouAgentAccountList kuaishouAgentAccountList) {
|
|
startPage();
|
|
startPage();
|
|
List<KuaishouAgentAccountList> list = kuaishouAgentAccountListService.selectKuaishouAgentAccountListList(kuaishouAgentAccountList);
|
|
List<KuaishouAgentAccountList> list = kuaishouAgentAccountListService.selectKuaishouAgentAccountListList(kuaishouAgentAccountList);
|
|
return getDataTable(list);
|
|
return getDataTable(list);
|
|
@@ -53,8 +69,7 @@ public class KuaishouAgentAccountListController extends BaseController
|
|
@PreAuthorize("@ss.hasPermi('system:list:export')")
|
|
@PreAuthorize("@ss.hasPermi('system:list:export')")
|
|
@Log(title = "【请填写功能名称】", businessType = BusinessType.EXPORT)
|
|
@Log(title = "【请填写功能名称】", businessType = BusinessType.EXPORT)
|
|
@PostMapping("/export")
|
|
@PostMapping("/export")
|
|
- public void export(HttpServletResponse response, KuaishouAgentAccountList kuaishouAgentAccountList)
|
|
|
|
- {
|
|
|
|
|
|
+ public void export(HttpServletResponse response, KuaishouAgentAccountList kuaishouAgentAccountList) {
|
|
List<KuaishouAgentAccountList> list = kuaishouAgentAccountListService.selectKuaishouAgentAccountListList(kuaishouAgentAccountList);
|
|
List<KuaishouAgentAccountList> list = kuaishouAgentAccountListService.selectKuaishouAgentAccountListList(kuaishouAgentAccountList);
|
|
ExcelUtil<KuaishouAgentAccountList> util = new ExcelUtil<KuaishouAgentAccountList>(KuaishouAgentAccountList.class);
|
|
ExcelUtil<KuaishouAgentAccountList> util = new ExcelUtil<KuaishouAgentAccountList>(KuaishouAgentAccountList.class);
|
|
util.exportExcel(response, list, "【请填写功能名称】数据");
|
|
util.exportExcel(response, list, "【请填写功能名称】数据");
|
|
@@ -65,8 +80,7 @@ public class KuaishouAgentAccountListController extends BaseController
|
|
*/
|
|
*/
|
|
@PreAuthorize("@ss.hasPermi('system:list:query')")
|
|
@PreAuthorize("@ss.hasPermi('system:list:query')")
|
|
@GetMapping(value = "/{accountId}")
|
|
@GetMapping(value = "/{accountId}")
|
|
- public AjaxResult getInfo(@PathVariable("accountId") Long accountId)
|
|
|
|
- {
|
|
|
|
|
|
+ public AjaxResult getInfo(@PathVariable("accountId") Long accountId) {
|
|
return AjaxResult.success(kuaishouAgentAccountListService.selectKuaishouAgentAccountListByAccountId(accountId));
|
|
return AjaxResult.success(kuaishouAgentAccountListService.selectKuaishouAgentAccountListByAccountId(accountId));
|
|
}
|
|
}
|
|
|
|
|
|
@@ -76,8 +90,7 @@ public class KuaishouAgentAccountListController extends BaseController
|
|
@PreAuthorize("@ss.hasPermi('system:list:add')")
|
|
@PreAuthorize("@ss.hasPermi('system:list:add')")
|
|
@Log(title = "【请填写功能名称】", businessType = BusinessType.INSERT)
|
|
@Log(title = "【请填写功能名称】", businessType = BusinessType.INSERT)
|
|
@PostMapping
|
|
@PostMapping
|
|
- public AjaxResult add(@RequestBody KuaishouAgentAccountList kuaishouAgentAccountList)
|
|
|
|
- {
|
|
|
|
|
|
+ public AjaxResult add(@RequestBody KuaishouAgentAccountList kuaishouAgentAccountList) {
|
|
return toAjax(kuaishouAgentAccountListService.insertKuaishouAgentAccountList(kuaishouAgentAccountList));
|
|
return toAjax(kuaishouAgentAccountListService.insertKuaishouAgentAccountList(kuaishouAgentAccountList));
|
|
}
|
|
}
|
|
|
|
|
|
@@ -87,8 +100,7 @@ public class KuaishouAgentAccountListController extends BaseController
|
|
@PreAuthorize("@ss.hasPermi('system:list:edit')")
|
|
@PreAuthorize("@ss.hasPermi('system:list:edit')")
|
|
@Log(title = "【请填写功能名称】", businessType = BusinessType.UPDATE)
|
|
@Log(title = "【请填写功能名称】", businessType = BusinessType.UPDATE)
|
|
@PutMapping
|
|
@PutMapping
|
|
- public AjaxResult edit(@RequestBody KuaishouAgentAccountList kuaishouAgentAccountList)
|
|
|
|
- {
|
|
|
|
|
|
+ public AjaxResult edit(@RequestBody KuaishouAgentAccountList kuaishouAgentAccountList) {
|
|
return toAjax(kuaishouAgentAccountListService.updateKuaishouAgentAccountList(kuaishouAgentAccountList));
|
|
return toAjax(kuaishouAgentAccountListService.updateKuaishouAgentAccountList(kuaishouAgentAccountList));
|
|
}
|
|
}
|
|
|
|
|
|
@@ -98,8 +110,7 @@ public class KuaishouAgentAccountListController extends BaseController
|
|
@PreAuthorize("@ss.hasPermi('system:list:remove')")
|
|
@PreAuthorize("@ss.hasPermi('system:list:remove')")
|
|
@Log(title = "【请填写功能名称】", businessType = BusinessType.DELETE)
|
|
@Log(title = "【请填写功能名称】", businessType = BusinessType.DELETE)
|
|
@DeleteMapping("/{accountIds}")
|
|
@DeleteMapping("/{accountIds}")
|
|
- public AjaxResult remove(@PathVariable Long[] accountIds)
|
|
|
|
- {
|
|
|
|
|
|
+ public AjaxResult remove(@PathVariable Long[] accountIds) {
|
|
return toAjax(kuaishouAgentAccountListService.deleteKuaishouAgentAccountListByAccountIds(accountIds));
|
|
return toAjax(kuaishouAgentAccountListService.deleteKuaishouAgentAccountListByAccountIds(accountIds));
|
|
}
|
|
}
|
|
}
|
|
}
|