Merge remote-tracking branch 'origin/master'
commit
836394b110
@ -0,0 +1,106 @@
|
||||
package com.ruoyi.portal.controller;
|
||||
|
||||
import java.util.List;
|
||||
import java.io.IOException;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.ruoyi.common.log.annotation.Log;
|
||||
import com.ruoyi.common.log.enums.BusinessType;
|
||||
import com.ruoyi.common.security.annotation.RequiresPermissions;
|
||||
import com.ruoyi.portal.domain.HwWeb;
|
||||
import com.ruoyi.portal.service.IHwWebService;
|
||||
import com.ruoyi.common.core.web.controller.BaseController;
|
||||
import com.ruoyi.common.core.web.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.web.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* haiwei官网jsonController
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-08-18
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/hwWeb")
|
||||
public class HwWebController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IHwWebService hwWebService;
|
||||
|
||||
/**
|
||||
* 查询haiwei官网json列表
|
||||
*/
|
||||
//@RequiresPermissions("portalhwWeb:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(HwWeb hwWeb)
|
||||
{
|
||||
startPage();
|
||||
List<HwWeb> list = hwWebService.selectHwWebList(hwWeb);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出haiwei官网json列表
|
||||
*/
|
||||
//@RequiresPermissions("portalhwWeb:export")
|
||||
@Log(title = "haiwei官网json", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, HwWeb hwWeb)
|
||||
{
|
||||
List<HwWeb> list = hwWebService.selectHwWebList(hwWeb);
|
||||
ExcelUtil<HwWeb> util = new ExcelUtil<HwWeb>(HwWeb.class);
|
||||
util.exportExcel(response, list, "haiwei官网json数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取haiwei官网json详细信息
|
||||
*/
|
||||
//@RequiresPermissions("portalhwWeb:query")
|
||||
@GetMapping(value = "/{webCode}")
|
||||
public AjaxResult getInfo(@PathVariable("webCode") Long webCode)
|
||||
{
|
||||
return success(hwWebService.selectHwWebByWebcode(webCode));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增haiwei官网json
|
||||
*/
|
||||
//@RequiresPermissions("portalhwWeb:add")
|
||||
@Log(title = "haiwei官网json", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody HwWeb hwWeb)
|
||||
{
|
||||
return toAjax(hwWebService.insertHwWeb(hwWeb));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改haiwei官网json
|
||||
*/
|
||||
//@RequiresPermissions("portalhwWeb:edit")
|
||||
@Log(title = "haiwei官网json", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody HwWeb hwWeb)
|
||||
{
|
||||
int i = hwWebService.updateHwWeb(hwWeb);
|
||||
return toAjax(i);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除haiwei官网json
|
||||
*/
|
||||
//@RequiresPermissions("portalhwWeb:remove")
|
||||
@Log(title = "haiwei官网json", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{webIds}")
|
||||
public AjaxResult remove(@PathVariable Long[] webIds)
|
||||
{
|
||||
return toAjax(hwWebService.deleteHwWebByWebIds(webIds));
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,111 @@
|
||||
package com.ruoyi.portal.controller;
|
||||
|
||||
import java.util.List;
|
||||
import java.io.IOException;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.ruoyi.common.log.annotation.Log;
|
||||
import com.ruoyi.common.log.enums.BusinessType;
|
||||
import com.ruoyi.common.security.annotation.RequiresPermissions;
|
||||
import com.ruoyi.portal.domain.HwWebMenu;
|
||||
import com.ruoyi.portal.service.IHwWebMenuService;
|
||||
import com.ruoyi.common.core.web.controller.BaseController;
|
||||
import com.ruoyi.common.core.web.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.utils.poi.ExcelUtil;
|
||||
|
||||
/**
|
||||
* haiwei官网菜单Controller
|
||||
*
|
||||
* @author zch
|
||||
* @date 2025-08-18
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/hwWebMenu")
|
||||
public class HwWebMenuController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IHwWebMenuService hwWebMenuService;
|
||||
|
||||
/**
|
||||
* 查询haiwei官网菜单列表
|
||||
*/
|
||||
//@RequiresPermissions("portalhwWebMenu:list")
|
||||
@GetMapping("/list")
|
||||
public AjaxResult list(HwWebMenu hwWebMenu)
|
||||
{
|
||||
List<HwWebMenu> list = hwWebMenuService.selectHwWebMenuList(hwWebMenu);
|
||||
return success(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出haiwei官网菜单列表
|
||||
*/
|
||||
//@RequiresPermissions("portalhwWebMenu:export")
|
||||
@Log(title = "haiwei官网菜单", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, HwWebMenu hwWebMenu)
|
||||
{
|
||||
List<HwWebMenu> list = hwWebMenuService.selectHwWebMenuList(hwWebMenu);
|
||||
ExcelUtil<HwWebMenu> util = new ExcelUtil<HwWebMenu>(HwWebMenu.class);
|
||||
util.exportExcel(response, list, "haiwei官网菜单数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取haiwei官网菜单详细信息
|
||||
*/
|
||||
//@RequiresPermissions("portalhwWebMenu:query")
|
||||
@GetMapping(value = "/{webMenuId}")
|
||||
public AjaxResult getInfo(@PathVariable("webMenuId") Long webMenuId)
|
||||
{
|
||||
return success(hwWebMenuService.selectHwWebMenuByWebMenuId(webMenuId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增haiwei官网菜单
|
||||
*/
|
||||
//@RequiresPermissions("portalhwWebMenu:add")
|
||||
@Log(title = "haiwei官网菜单", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody HwWebMenu hwWebMenu)
|
||||
{
|
||||
return toAjax(hwWebMenuService.insertHwWebMenu(hwWebMenu));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改haiwei官网菜单
|
||||
*/
|
||||
//@RequiresPermissions("portalhwWebMenu:edit")
|
||||
@Log(title = "haiwei官网菜单", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody HwWebMenu hwWebMenu)
|
||||
{
|
||||
return toAjax(hwWebMenuService.updateHwWebMenu(hwWebMenu));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除haiwei官网菜单
|
||||
*/
|
||||
//@RequiresPermissions("portalhwWebMenu:remove")
|
||||
@Log(title = "haiwei官网菜单", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{webMenuIds}")
|
||||
public AjaxResult remove(@PathVariable Long[] webMenuIds)
|
||||
{
|
||||
return toAjax(hwWebMenuService.deleteHwWebMenuByWebMenuIds(webMenuIds));
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取菜单树列表
|
||||
*/
|
||||
@GetMapping("/selectMenuTree")
|
||||
public AjaxResult selectMenuTree(HwWebMenu hwWebMenu){
|
||||
return success(hwWebMenuService.selectMenuTree(hwWebMenu));
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,79 @@
|
||||
package com.ruoyi.portal.domain;
|
||||
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.ruoyi.common.core.annotation.Excel;
|
||||
import com.ruoyi.common.core.web.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* haiwei官网json对象 hw_web
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-08-18
|
||||
*/
|
||||
public class HwWeb extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键 */
|
||||
private Long webId;
|
||||
|
||||
/** json */
|
||||
@Excel(name = "json")
|
||||
private String webJson;
|
||||
|
||||
/** json字符串 */
|
||||
@Excel(name = "json字符串")
|
||||
private String webJsonString;
|
||||
|
||||
/** 页面 */
|
||||
@Excel(name = "页面")
|
||||
private Long webCode;
|
||||
|
||||
public void setWebId(Long webId)
|
||||
{
|
||||
this.webId = webId;
|
||||
}
|
||||
|
||||
public Long getWebId()
|
||||
{
|
||||
return webId;
|
||||
}
|
||||
public void setWebJson(String webJson)
|
||||
{
|
||||
this.webJson = webJson;
|
||||
}
|
||||
|
||||
public String getWebJson()
|
||||
{
|
||||
return webJson;
|
||||
}
|
||||
public void setWebJsonString(String webJsonString)
|
||||
{
|
||||
this.webJsonString = webJsonString;
|
||||
}
|
||||
|
||||
public String getWebJsonString()
|
||||
{
|
||||
return webJsonString;
|
||||
}
|
||||
public void setWebCode(Long webCode)
|
||||
{
|
||||
this.webCode = webCode;
|
||||
}
|
||||
|
||||
public Long getWebCode()
|
||||
{
|
||||
return webCode;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("webId", getWebId())
|
||||
.append("webJson", getWebJson())
|
||||
.append("webJsonString", getWebJsonString())
|
||||
.append("webCode", getWebCode())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,124 @@
|
||||
package com.ruoyi.portal.domain;
|
||||
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.ruoyi.common.core.annotation.Excel;
|
||||
import com.ruoyi.common.core.web.domain.TreeEntity;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* haiwei官网菜单对象 hw_web_menu
|
||||
*
|
||||
* @author zch
|
||||
* @date 2025-08-18
|
||||
*/
|
||||
public class HwWebMenu extends TreeEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 菜单主键id */
|
||||
private Long webMenuId;
|
||||
|
||||
/** 父节点 */
|
||||
@Excel(name = "父节点")
|
||||
private Long parent;
|
||||
|
||||
/** 状态 */
|
||||
@Excel(name = "状态")
|
||||
private String status;
|
||||
|
||||
/** 菜单名称 */
|
||||
@Excel(name = "菜单名称")
|
||||
private String webMenuName;
|
||||
|
||||
/** 租户 */
|
||||
@Excel(name = "租户")
|
||||
private Long tenantId;
|
||||
|
||||
/** 图片地址 */
|
||||
@Excel(name = "图片地址")
|
||||
private String webMenuPic;
|
||||
|
||||
/** 官网菜单类型 */
|
||||
@Excel(name = "官网菜单类型")
|
||||
private Long webMenuType;
|
||||
|
||||
public void setWebMenuId(Long webMenuId)
|
||||
{
|
||||
this.webMenuId = webMenuId;
|
||||
}
|
||||
|
||||
public Long getWebMenuId()
|
||||
{
|
||||
return webMenuId;
|
||||
}
|
||||
public void setParent(Long parent)
|
||||
{
|
||||
this.parent = parent;
|
||||
}
|
||||
|
||||
public Long getParent()
|
||||
{
|
||||
return parent;
|
||||
}
|
||||
public void setStatus(String status)
|
||||
{
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getStatus()
|
||||
{
|
||||
return status;
|
||||
}
|
||||
public void setWebMenuName(String webMenuName)
|
||||
{
|
||||
this.webMenuName = webMenuName;
|
||||
}
|
||||
|
||||
public String getWebMenuName()
|
||||
{
|
||||
return webMenuName;
|
||||
}
|
||||
public void setTenantId(Long tenantId)
|
||||
{
|
||||
this.tenantId = tenantId;
|
||||
}
|
||||
|
||||
public Long getTenantId()
|
||||
{
|
||||
return tenantId;
|
||||
}
|
||||
public void setWebMenuPic(String webMenuPic)
|
||||
{
|
||||
this.webMenuPic = webMenuPic;
|
||||
}
|
||||
|
||||
public String getWebMenuPic()
|
||||
{
|
||||
return webMenuPic;
|
||||
}
|
||||
public void setWebMenuType(Long webMenuType)
|
||||
{
|
||||
this.webMenuType = webMenuType;
|
||||
}
|
||||
|
||||
public Long getWebMenuType()
|
||||
{
|
||||
return webMenuType;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("webMenuId", getWebMenuId())
|
||||
.append("parent", getParent())
|
||||
.append("ancestors", getAncestors())
|
||||
.append("status", getStatus())
|
||||
.append("webMenuName", getWebMenuName())
|
||||
.append("tenantId", getTenantId())
|
||||
.append("webMenuPic", getWebMenuPic())
|
||||
.append("webMenuType", getWebMenuType())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,61 @@
|
||||
package com.ruoyi.portal.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.portal.domain.HwWeb;
|
||||
|
||||
/**
|
||||
* haiwei官网jsonMapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-08-18
|
||||
*/
|
||||
public interface HwWebMapper
|
||||
{
|
||||
/**
|
||||
* 查询haiwei官网json
|
||||
*
|
||||
* @param webId haiwei官网json主键
|
||||
* @return haiwei官网json
|
||||
*/
|
||||
public HwWeb selectHwWebByWebcode(Long webCode);
|
||||
|
||||
/**
|
||||
* 查询haiwei官网json列表
|
||||
*
|
||||
* @param hwWeb haiwei官网json
|
||||
* @return haiwei官网json集合
|
||||
*/
|
||||
public List<HwWeb> selectHwWebList(HwWeb hwWeb);
|
||||
|
||||
/**
|
||||
* 新增haiwei官网json
|
||||
*
|
||||
* @param hwWeb haiwei官网json
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertHwWeb(HwWeb hwWeb);
|
||||
|
||||
/**
|
||||
* 修改haiwei官网json
|
||||
*
|
||||
* @param hwWeb haiwei官网json
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateHwWeb(HwWeb hwWeb);
|
||||
|
||||
/**
|
||||
* 删除haiwei官网json
|
||||
*
|
||||
* @param webId haiwei官网json主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteHwWebByWebId(Long webId);
|
||||
|
||||
/**
|
||||
* 批量删除haiwei官网json
|
||||
*
|
||||
* @param webIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteHwWebByWebIds(Long[] webIds);
|
||||
}
|
||||
@ -0,0 +1,61 @@
|
||||
package com.ruoyi.portal.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.portal.domain.HwWebMenu;
|
||||
|
||||
/**
|
||||
* haiwei官网菜单Mapper接口
|
||||
*
|
||||
* @author zch
|
||||
* @date 2025-08-18
|
||||
*/
|
||||
public interface HwWebMenuMapper
|
||||
{
|
||||
/**
|
||||
* 查询haiwei官网菜单
|
||||
*
|
||||
* @param webMenuId haiwei官网菜单主键
|
||||
* @return haiwei官网菜单
|
||||
*/
|
||||
public HwWebMenu selectHwWebMenuByWebMenuId(Long webMenuId);
|
||||
|
||||
/**
|
||||
* 查询haiwei官网菜单列表
|
||||
*
|
||||
* @param hwWebMenu haiwei官网菜单
|
||||
* @return haiwei官网菜单集合
|
||||
*/
|
||||
public List<HwWebMenu> selectHwWebMenuList(HwWebMenu hwWebMenu);
|
||||
|
||||
/**
|
||||
* 新增haiwei官网菜单
|
||||
*
|
||||
* @param hwWebMenu haiwei官网菜单
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertHwWebMenu(HwWebMenu hwWebMenu);
|
||||
|
||||
/**
|
||||
* 修改haiwei官网菜单
|
||||
*
|
||||
* @param hwWebMenu haiwei官网菜单
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateHwWebMenu(HwWebMenu hwWebMenu);
|
||||
|
||||
/**
|
||||
* 删除haiwei官网菜单
|
||||
*
|
||||
* @param webMenuId haiwei官网菜单主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteHwWebMenuByWebMenuId(Long webMenuId);
|
||||
|
||||
/**
|
||||
* 批量删除haiwei官网菜单
|
||||
*
|
||||
* @param webMenuIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteHwWebMenuByWebMenuIds(Long[] webMenuIds);
|
||||
}
|
||||
@ -0,0 +1,68 @@
|
||||
package com.ruoyi.portal.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.portal.domain.HwWebMenu;
|
||||
|
||||
/**
|
||||
* haiwei官网菜单Service接口
|
||||
*
|
||||
* @author zch
|
||||
* @date 2025-08-18
|
||||
*/
|
||||
public interface IHwWebMenuService
|
||||
{
|
||||
/**
|
||||
* 查询haiwei官网菜单
|
||||
*
|
||||
* @param webMenuId haiwei官网菜单主键
|
||||
* @return haiwei官网菜单
|
||||
*/
|
||||
public HwWebMenu selectHwWebMenuByWebMenuId(Long webMenuId);
|
||||
|
||||
/**
|
||||
* 查询haiwei官网菜单列表
|
||||
*
|
||||
* @param hwWebMenu haiwei官网菜单
|
||||
* @return haiwei官网菜单集合
|
||||
*/
|
||||
public List<HwWebMenu> selectHwWebMenuList(HwWebMenu hwWebMenu);
|
||||
|
||||
/**
|
||||
* 新增haiwei官网菜单
|
||||
*
|
||||
* @param hwWebMenu haiwei官网菜单
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertHwWebMenu(HwWebMenu hwWebMenu);
|
||||
|
||||
/**
|
||||
* 修改haiwei官网菜单
|
||||
*
|
||||
* @param hwWebMenu haiwei官网菜单
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateHwWebMenu(HwWebMenu hwWebMenu);
|
||||
|
||||
/**
|
||||
* 批量删除haiwei官网菜单
|
||||
*
|
||||
* @param webMenuIds 需要删除的haiwei官网菜单主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteHwWebMenuByWebMenuIds(Long[] webMenuIds);
|
||||
|
||||
/**
|
||||
* 删除haiwei官网菜单信息
|
||||
*
|
||||
* @param webMenuId haiwei官网菜单主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteHwWebMenuByWebMenuId(Long webMenuId);
|
||||
|
||||
|
||||
/**
|
||||
* 获取菜单树列表
|
||||
*/
|
||||
public List<HwWebMenu> selectMenuTree(HwWebMenu hwWebMenu);
|
||||
|
||||
}
|
||||
@ -0,0 +1,61 @@
|
||||
package com.ruoyi.portal.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.portal.domain.HwWeb;
|
||||
|
||||
/**
|
||||
* haiwei官网jsonService接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-08-18
|
||||
*/
|
||||
public interface IHwWebService
|
||||
{
|
||||
/**
|
||||
* 查询haiwei官网json
|
||||
*
|
||||
* @param webId haiwei官网json主键
|
||||
* @return haiwei官网json
|
||||
*/
|
||||
public HwWeb selectHwWebByWebcode(Long webCode);
|
||||
|
||||
/**
|
||||
* 查询haiwei官网json列表
|
||||
*
|
||||
* @param hwWeb haiwei官网json
|
||||
* @return haiwei官网json集合
|
||||
*/
|
||||
public List<HwWeb> selectHwWebList(HwWeb hwWeb);
|
||||
|
||||
/**
|
||||
* 新增haiwei官网json
|
||||
*
|
||||
* @param hwWeb haiwei官网json
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertHwWeb(HwWeb hwWeb);
|
||||
|
||||
/**
|
||||
* 修改haiwei官网json
|
||||
*
|
||||
* @param hwWeb haiwei官网json
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateHwWeb(HwWeb hwWeb);
|
||||
|
||||
/**
|
||||
* 批量删除haiwei官网json
|
||||
*
|
||||
* @param webIds 需要删除的haiwei官网json主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteHwWebByWebIds(Long[] webIds);
|
||||
|
||||
/**
|
||||
* 删除haiwei官网json信息
|
||||
*
|
||||
* @param webId haiwei官网json主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteHwWebByWebId(Long webId);
|
||||
}
|
||||
@ -0,0 +1,101 @@
|
||||
package com.ruoyi.portal.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.portal.mapper.HwWebMapper;
|
||||
import com.ruoyi.portal.domain.HwWeb;
|
||||
import com.ruoyi.portal.service.IHwWebService;
|
||||
|
||||
/**
|
||||
* haiwei官网jsonService业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-08-18
|
||||
*/
|
||||
@Service
|
||||
public class HwWebServiceImpl implements IHwWebService
|
||||
{
|
||||
@Autowired
|
||||
private HwWebMapper hwWebMapper;
|
||||
|
||||
/**
|
||||
* 查询haiwei官网json
|
||||
*
|
||||
* @param webId haiwei官网json主键
|
||||
* @return haiwei官网json
|
||||
*/
|
||||
@Override
|
||||
public HwWeb selectHwWebByWebcode(Long webCode)
|
||||
{
|
||||
HwWeb hwWeb = hwWebMapper.selectHwWebByWebcode(webCode);
|
||||
return hwWeb;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 查询haiwei官网json列表
|
||||
*
|
||||
* @param hwWeb haiwei官网json
|
||||
* @return haiwei官网json
|
||||
*/
|
||||
@Override
|
||||
public List<HwWeb> selectHwWebList(HwWeb hwWeb)
|
||||
{
|
||||
return hwWebMapper.selectHwWebList(hwWeb);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增haiwei官网json
|
||||
*
|
||||
* @param hwWeb haiwei官网json
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertHwWeb(HwWeb hwWeb)
|
||||
{
|
||||
return hwWebMapper.insertHwWeb(hwWeb);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改haiwei官网json
|
||||
*
|
||||
* @param hwWeb haiwei官网json
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateHwWeb(HwWeb hwWeb)
|
||||
{
|
||||
HwWeb codeWeb = new HwWeb();
|
||||
//编号唯一
|
||||
codeWeb.setWebCode(hwWeb.getWebCode());
|
||||
if(hwWebMapper.selectHwWebList(codeWeb).isEmpty()){
|
||||
return hwWebMapper.insertHwWeb(hwWeb);
|
||||
}
|
||||
return hwWebMapper.updateHwWeb(hwWeb);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除haiwei官网json
|
||||
*
|
||||
* @param webIds 需要删除的haiwei官网json主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteHwWebByWebIds(Long[] webIds)
|
||||
{
|
||||
return hwWebMapper.deleteHwWebByWebIds(webIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除haiwei官网json信息
|
||||
*
|
||||
* @param webId haiwei官网json主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteHwWebByWebId(Long webId)
|
||||
{
|
||||
return hwWebMapper.deleteHwWebByWebId(webId);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,67 @@
|
||||
<?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="com.ruoyi.portal.mapper.HwWebMapper">
|
||||
|
||||
<resultMap type="HwWeb" id="HwWebResult">
|
||||
<result property="webId" column="web_id" />
|
||||
<result property="webJson" column="web_json" />
|
||||
<result property="webJsonString" column="web_json_string" />
|
||||
<result property="webCode" column="web_code" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectHwWebVo">
|
||||
select web_id, web_json, web_json_string, web_code from hw_web
|
||||
</sql>
|
||||
|
||||
<select id="selectHwWebList" parameterType="HwWeb" resultMap="HwWebResult">
|
||||
<include refid="selectHwWebVo"/>
|
||||
<where>
|
||||
<if test="webId != null "> and web_id = #{webId}</if>
|
||||
<if test="webJson != null and webJson != ''"> and web_json = #{webJson}</if>
|
||||
<if test="webJsonString != null and webJsonString != ''"> and web_json_string = #{webJsonString}</if>
|
||||
<if test="webCode != null "> and web_code = #{webCode}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectHwWebByWebcode" parameterType="Long" resultMap="HwWebResult">
|
||||
<include refid="selectHwWebVo"/>
|
||||
where web_code = #{webCode}
|
||||
</select>
|
||||
|
||||
<insert id="insertHwWeb" parameterType="HwWeb" useGeneratedKeys="true" keyProperty="webId">
|
||||
insert into hw_web
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="webJson != null">web_json,</if>
|
||||
<if test="webJsonString != null">web_json_string,</if>
|
||||
<if test="webCode != null">web_code,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="webJson != null">#{webJson},</if>
|
||||
<if test="webJsonString != null">#{webJsonString},</if>
|
||||
<if test="webCode != null">#{webCode},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateHwWeb" parameterType="HwWeb">
|
||||
update hw_web
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="webJson != null">web_json = #{webJson},</if>
|
||||
<if test="webJsonString != null">web_json_string = #{webJsonString},</if>
|
||||
<if test="webCode != null">web_code = #{webCode},</if>
|
||||
</trim>
|
||||
where web_code = #{webCode}
|
||||
</update>
|
||||
|
||||
<delete id="deleteHwWebByWebId" parameterType="Long">
|
||||
delete from hw_web where web_id = #{webId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteHwWebByWebIds" parameterType="String">
|
||||
delete from hw_web where web_id in
|
||||
<foreach item="webId" collection="array" open="(" separator="," close=")">
|
||||
#{webId}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
@ -0,0 +1,88 @@
|
||||
<?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="com.ruoyi.portal.mapper.HwWebMenuMapper">
|
||||
|
||||
<resultMap type="HwWebMenu" id="HwWebMenuResult">
|
||||
<result property="webMenuId" column="web_menu_id" />
|
||||
<result property="parent" column="parent" />
|
||||
<result property="ancestors" column="ancestors" />
|
||||
<result property="status" column="status" />
|
||||
<result property="webMenuName" column="web_menu_name" />
|
||||
<result property="tenantId" column="tenant_id" />
|
||||
<result property="webMenuPic" column="web_menu__pic" />
|
||||
<result property="webMenuType" column="web_menu_type" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectHwWebMenuVo">
|
||||
select web_menu_id, parent, ancestors, status, web_menu_name, tenant_id, web_menu__pic, web_menu_type from hw_web_menu
|
||||
</sql>
|
||||
|
||||
<select id="selectHwWebMenuList" parameterType="HwWebMenu" resultMap="HwWebMenuResult">
|
||||
<include refid="selectHwWebMenuVo"/>
|
||||
<where>
|
||||
<if test="parent != null "> and parent = #{parent}</if>
|
||||
<if test="ancestors != null and ancestors != ''"> and ancestors = #{ancestors}</if>
|
||||
<if test="status != null and status != ''"> and status = #{status}</if>
|
||||
<if test="webMenuName != null and webMenuName != ''"> and web_menu_name like concat('%', #{webMenuName}, '%')</if>
|
||||
<if test="tenantId != null "> and tenant_id = #{tenantId}</if>
|
||||
<if test="webMenuPic != null and webMenuPic != ''"> and web_menu__pic = #{webMenuPic}</if>
|
||||
<if test="webMenuType != null "> and web_menu_type = #{webMenuType}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectHwWebMenuByWebMenuId" parameterType="Long" resultMap="HwWebMenuResult">
|
||||
<include refid="selectHwWebMenuVo"/>
|
||||
where web_menu_id = #{webMenuId}
|
||||
</select>
|
||||
|
||||
<insert id="insertHwWebMenu" parameterType="HwWebMenu">
|
||||
insert into hw_web_menu
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="webMenuId != null">web_menu_id,</if>
|
||||
<if test="parent != null">parent,</if>
|
||||
<if test="ancestors != null">ancestors,</if>
|
||||
<if test="status != null">status,</if>
|
||||
<if test="webMenuName != null">web_menu_name,</if>
|
||||
<if test="tenantId != null">tenant_id,</if>
|
||||
<if test="webMenuPic != null">web_menu__pic,</if>
|
||||
<if test="webMenuType != null">web_menu_type,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="webMenuId != null">#{webMenuId},</if>
|
||||
<if test="parent != null">#{parent},</if>
|
||||
<if test="ancestors != null">#{ancestors},</if>
|
||||
<if test="status != null">#{status},</if>
|
||||
<if test="webMenuName != null">#{webMenuName},</if>
|
||||
<if test="tenantId != null">#{tenantId},</if>
|
||||
<if test="webMenuPic != null">#{webMenuPic},</if>
|
||||
<if test="webMenuType != null">#{webMenuType},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateHwWebMenu" parameterType="HwWebMenu">
|
||||
update hw_web_menu
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="parent != null">parent = #{parent},</if>
|
||||
<if test="ancestors != null">ancestors = #{ancestors},</if>
|
||||
<if test="status != null">status = #{status},</if>
|
||||
<if test="webMenuName != null">web_menu_name = #{webMenuName},</if>
|
||||
<if test="tenantId != null">tenant_id = #{tenantId},</if>
|
||||
<if test="webMenuPic != null">web_menu__pic = #{webMenuPic},</if>
|
||||
<if test="webMenuType != null">web_menu_type = #{webMenuType},</if>
|
||||
</trim>
|
||||
where web_menu_id = #{webMenuId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteHwWebMenuByWebMenuId" parameterType="Long">
|
||||
delete from hw_web_menu where web_menu_id = #{webMenuId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteHwWebMenuByWebMenuIds" parameterType="String">
|
||||
delete from hw_web_menu where web_menu_id in
|
||||
<foreach item="webMenuId" collection="array" open="(" separator="," close=")">
|
||||
#{webMenuId}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
@ -0,0 +1,44 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询haiwei官网json列表
|
||||
export function listHwWeb(query) {
|
||||
return request({
|
||||
url: '/portal/hwWeb/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询haiwei官网json详细
|
||||
export function getHwWeb(webId) {
|
||||
return request({
|
||||
url: '/portal/hwWeb/' + webId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增haiwei官网json
|
||||
export function addHwWeb(data) {
|
||||
return request({
|
||||
url: '/portal/hwWeb',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改haiwei官网json
|
||||
export function updateHwWeb(data) {
|
||||
return request({
|
||||
url: '/portal/hwWeb',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除haiwei官网json
|
||||
export function delHwWeb(webId) {
|
||||
return request({
|
||||
url: '/portal/hwWeb/' + webId,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
@ -0,0 +1,52 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询haiwei官网菜单列表
|
||||
export function listHwWebMenu(query) {
|
||||
return request({
|
||||
url: '/portal/hwWebMenu/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询haiwei官网菜单详细
|
||||
export function getHwWebMenu(webMenuId) {
|
||||
return request({
|
||||
url: '/portal/hwWebMenu/' + webMenuId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增haiwei官网菜单
|
||||
export function addHwWebMenu(data) {
|
||||
return request({
|
||||
url: '/portal/hwWebMenu',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改haiwei官网菜单
|
||||
export function updateHwWebMenu(data) {
|
||||
return request({
|
||||
url: '/portal/hwWebMenu',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除haiwei官网菜单
|
||||
export function delHwWebMenu(webMenuId) {
|
||||
return request({
|
||||
url: '/portal/hwWebMenu/' + webMenuId,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
export function selectMenuTree(query) {
|
||||
return request({
|
||||
url: '/portal/hwWebMenu/selectMenuTree',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
Loading…
Reference in New Issue