|
@@ -4,6 +4,8 @@ import java.util.List;
|
|
|
|
|
|
import com.dgtly.common.utils.StringUtils;
|
|
|
import com.dgtly.common.utils.file.FileUploadUtils;
|
|
|
+import com.dgtly.framework.util.ShiroUtils;
|
|
|
+import com.dgtly.system.service.ISysConfigService;
|
|
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Controller;
|
|
@@ -38,10 +40,20 @@ public class GoodsInfoController extends BaseController
|
|
|
@Autowired
|
|
|
private IGoodsInfoService goodsInfoService;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private ISysConfigService configService;
|
|
|
+
|
|
|
@RequiresPermissions("goods:info:view")
|
|
|
@GetMapping()
|
|
|
- public String info()
|
|
|
+ public String info(ModelMap mmp)
|
|
|
{
|
|
|
+ Boolean isSystemUser = false;
|
|
|
+
|
|
|
+ if(ShiroUtils.getCompanyId()==Long.parseLong(configService.selectConfigByKey("sys.company.id"))){
|
|
|
+ isSystemUser=true;
|
|
|
+ }
|
|
|
+ mmp.addAttribute("isSystemUser",isSystemUser);
|
|
|
+
|
|
|
return prefix + "/info";
|
|
|
}
|
|
|
|
|
@@ -53,6 +65,10 @@ public class GoodsInfoController extends BaseController
|
|
|
@ResponseBody
|
|
|
public TableDataInfo list(GoodsInfo goodsInfo)
|
|
|
{
|
|
|
+
|
|
|
+ if(ShiroUtils.getCompanyId()!=Long.parseLong(configService.selectConfigByKey("sys.company.id"))){
|
|
|
+ goodsInfo.setCompanyId(ShiroUtils.getCompanyId());
|
|
|
+ }
|
|
|
startPage();
|
|
|
List<GoodsInfo> list = goodsInfoService.selectGoodsInfoList(goodsInfo);
|
|
|
return getDataTable(list);
|
|
@@ -64,8 +80,14 @@ public class GoodsInfoController extends BaseController
|
|
|
* 新增商品基础详情
|
|
|
*/
|
|
|
@GetMapping("/add")
|
|
|
- public String add()
|
|
|
+ public String add(ModelMap mmp)
|
|
|
{
|
|
|
+ Boolean isSystemUser = false;
|
|
|
+
|
|
|
+ if(ShiroUtils.getCompanyId()==Long.parseLong(configService.selectConfigByKey("sys.company.id"))){
|
|
|
+ isSystemUser=true;
|
|
|
+ }
|
|
|
+ mmp.addAttribute("isSystemUser",isSystemUser);
|
|
|
return prefix + "/add";
|
|
|
}
|
|
|
|