|
@@ -1,5 +1,6 @@
|
|
package cn.com.ctop.kuaishou.modules.channel.controller;
|
|
package cn.com.ctop.kuaishou.modules.channel.controller;
|
|
|
|
|
|
|
|
+import cn.com.ctop.common.module.service.ISysRoleExtService;
|
|
import cn.com.ctop.common.module.utils.Check;
|
|
import cn.com.ctop.common.module.utils.Check;
|
|
import cn.com.ctop.common.module.utils.ExportExcelUtils;
|
|
import cn.com.ctop.common.module.utils.ExportExcelUtils;
|
|
import cn.com.ctop.kuaishou.modules.channel.entity.KuaishouChannelItems;
|
|
import cn.com.ctop.kuaishou.modules.channel.entity.KuaishouChannelItems;
|
|
@@ -59,6 +60,8 @@ import java.util.Map;
|
|
public class KuaishouChannelItemsController {
|
|
public class KuaishouChannelItemsController {
|
|
@Autowired
|
|
@Autowired
|
|
private IKuaishouChannelItemsService kuaishouChannelItemsService;
|
|
private IKuaishouChannelItemsService kuaishouChannelItemsService;
|
|
|
|
+ @Autowired
|
|
|
|
+ private ISysRoleExtService sysRoleService;
|
|
|
|
|
|
/**
|
|
/**
|
|
* 查询单品列表
|
|
* 查询单品列表
|
|
@@ -66,6 +69,10 @@ public class KuaishouChannelItemsController {
|
|
@GetMapping(value = "/queryChannelItemList")
|
|
@GetMapping(value = "/queryChannelItemList")
|
|
public Result<Object> queryChannelItemList(KuaishouChannelItems kuaishouChannelItems, @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize) {
|
|
public Result<Object> queryChannelItemList(KuaishouChannelItems kuaishouChannelItems, @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize) {
|
|
try {
|
|
try {
|
|
|
|
+ String roleCode = sysRoleService.getRoleCodeByUserId(kuaishouChannelItems.getUserId());
|
|
|
|
+ if ("admin".equals(roleCode) || "sale".contains(roleCode) || "meidaManager".equals(roleCode)) {
|
|
|
|
+ kuaishouChannelItems.setUserId(null);
|
|
|
|
+ }
|
|
PageHelper.startPage(pageNo, pageSize);
|
|
PageHelper.startPage(pageNo, pageSize);
|
|
return kuaishouChannelItemsService.queryChannelItemList(kuaishouChannelItems);
|
|
return kuaishouChannelItemsService.queryChannelItemList(kuaishouChannelItems);
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|