feat(hw-portal):为HwWeb1实体添加deviceId字段及相关接口

新增了deviceId字段,并在HwWeb1相关的controller、service、mapper及XML映射文件中
同步更新,同时添加了获取列表的新接口。此外,调整了部分命名不规范的参数名称,统一为
小驼峰格式以提升代码可读性与一致性。
master
zangch@mesnac.com 3 months ago
parent 6fd14109f7
commit ed5cd44dc8

@ -3,6 +3,8 @@ package com.ruoyi.portal.controller;
import java.util.List;
import java.io.IOException;
import javax.servlet.http.HttpServletResponse;
import com.ruoyi.portal.domain.HwWeb1;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
@ -42,7 +44,7 @@ public class HwWebController extends BaseController
@GetMapping("/list")
public TableDataInfo list(HwWeb hwWeb)
{
startPage();
// startPage();
List<HwWeb> list = hwWebService.selectHwWebList(hwWeb);
return getDataTable(list);
}
@ -103,4 +105,10 @@ public class HwWebController extends BaseController
{
return toAjax(hwWebService.deleteHwWebByWebIds(webIds));
}
@GetMapping("/getHwWebList")
public AjaxResult getHwWebList(HwWeb HwWeb)
{
return success(hwWebService.selectHwWebList(HwWeb)) ;
}
}

@ -21,9 +21,10 @@ import java.util.List;
* @date 2025-08-18
*/
@RestController
@RequestMapping("/HwWeb1")
@RequestMapping("/hwWeb1")
public class HwWebController1 extends BaseController
{
@Autowired
private IHwWebService1 hwWebService1;
@ -34,7 +35,7 @@ public class HwWebController1 extends BaseController
@GetMapping("/list")
public TableDataInfo list(HwWeb1 HwWeb1)
{
startPage();
// startPage();
List<HwWeb1> list = hwWebService1.selectHwWebList(HwWeb1);
return getDataTable(list);
}
@ -95,4 +96,12 @@ public class HwWebController1 extends BaseController
{
return toAjax(hwWebService1.deleteHwWebByWebIds(webIds));
}
@GetMapping("/getHwWeb1List")
public AjaxResult getHwWeb1List(HwWeb1 HwWeb1)
{
return success(hwWebService1.selectHwWebList(HwWeb1)) ;
}
}

@ -30,6 +30,7 @@ public class HwWeb1 extends BaseEntity
@Excel(name = "页面")
private Long webCode;
private Long deviceId;
public void setWebId(Long webId)
{
@ -68,6 +69,14 @@ public class HwWeb1 extends BaseEntity
return webCode;
}
public Long getDeviceId() {
return deviceId;
}
public void setDeviceId(Long deviceId) {
this.deviceId = deviceId;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
@ -75,6 +84,7 @@ public class HwWeb1 extends BaseEntity
.append("webJson", getWebJson())
.append("webJsonString", getWebJsonString())
.append("webCode", getWebCode())
.append("deviceId", getDeviceId())
.toString();
}
}

@ -1,6 +1,5 @@
package com.ruoyi.portal.mapper;
import com.ruoyi.portal.domain.HwWeb1;
import com.ruoyi.portal.domain.HwWeb1;
import java.util.List;
@ -27,7 +26,7 @@ public interface HwWebMapper1
* @param HwWeb1 haiweijson
* @return haiweijson
*/
public List<HwWeb1> selectHwWebList(HwWeb1 HwWeb1);
public List<HwWeb1> selectHwWebList(HwWeb1 hwWeb1);
/**
* haiweijson
@ -35,7 +34,7 @@ public interface HwWebMapper1
* @param HwWeb1 haiweijson
* @return
*/
public int insertHwWeb(HwWeb1 HwWeb1);
public int insertHwWeb(HwWeb1 hwWeb1);
/**
* haiweijson
@ -43,7 +42,7 @@ public interface HwWebMapper1
* @param HwWeb1 haiweijson
* @return
*/
public int updateHwWeb(HwWeb1 HwWeb1);
public int updateHwWeb(HwWeb1 hwWeb1);
/**
* haiweijson

@ -1,8 +1,6 @@
package com.ruoyi.portal.service;
import com.ruoyi.portal.domain.HwWeb1;
import com.ruoyi.portal.domain.HwWeb1;
import java.util.List;
/**
@ -27,7 +25,7 @@ public interface IHwWebService1
* @param HwWeb1 haiweijson
* @return haiweijson
*/
public List<HwWeb1> selectHwWebList(HwWeb1 HwWeb1);
public List<HwWeb1> selectHwWebList(HwWeb1 hwWeb1);
/**
* haiweijson
@ -35,7 +33,7 @@ public interface IHwWebService1
* @param HwWeb1 haiweijson
* @return
*/
public int insertHwWeb(HwWeb1 HwWeb1);
public int insertHwWeb(HwWeb1 hwWeb1);
/**
* haiweijson
@ -43,7 +41,7 @@ public interface IHwWebService1
* @param HwWeb1 haiweijson
* @return
*/
public int updateHwWeb(HwWeb1 HwWeb1);
public int updateHwWeb(HwWeb1 hwWeb1);
/**
* haiweijson

@ -1,15 +1,13 @@
package com.ruoyi.portal.service.impl;
import com.ruoyi.portal.domain.HwWeb1;
import com.ruoyi.portal.mapper.HwWebMapper1;
import com.ruoyi.portal.service.IHwWebService1;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
import com.ruoyi.portal.domain.HwWeb1;
import com.ruoyi.portal.domain.HwWeb;
/**
* haiweijsonService
@ -43,9 +41,9 @@ public class HwWebServiceImpl1 implements IHwWebService1
* @return haiweijson
*/
@Override
public List<HwWeb1> selectHwWebList(HwWeb1 HwWeb1)
public List<HwWeb1> selectHwWebList(HwWeb1 hwWeb1)
{
return hwWebMapper1.selectHwWebList(HwWeb1);
return hwWebMapper1.selectHwWebList(hwWeb1);
}
/**
@ -55,9 +53,9 @@ public class HwWebServiceImpl1 implements IHwWebService1
* @return
*/
@Override
public int insertHwWeb(HwWeb1 HwWeb1)
public int insertHwWeb(HwWeb1 hwWeb1)
{
return hwWebMapper1.insertHwWeb(HwWeb1);
return hwWebMapper1.insertHwWeb(hwWeb1);
}
/**
@ -67,15 +65,15 @@ public class HwWebServiceImpl1 implements IHwWebService1
* @return
*/
@Override
public int updateHwWeb(HwWeb1 HwWeb1)
public int updateHwWeb(HwWeb1 hwWeb1)
{
HwWeb1 codeWeb = new HwWeb1();
//编号唯一
codeWeb.setWebCode(HwWeb1.getWebCode());
codeWeb.setWebCode(hwWeb1.getWebCode());
if(hwWebMapper1.selectHwWebList(codeWeb).isEmpty()){
return hwWebMapper1.insertHwWeb(HwWeb1);
return hwWebMapper1.insertHwWeb(hwWeb1);
}
return hwWebMapper1.updateHwWeb(HwWeb1);
return hwWebMapper1.updateHwWeb(hwWeb1);
}
/**

@ -9,10 +9,13 @@
<result property="webJson" column="web_json" />
<result property="webJsonString" column="web_json_string" />
<result property="webCode" column="web_code" />
<result property="deviceId" column="device_id" />
</resultMap>
<sql id="selectHwWebVo">
select web_id, web_json, web_json_string, web_code from hw_web1
select web_id, web_json, web_json_string, web_code,
device_id
from hw_web1
</sql>
<select id="selectHwWebList" parameterType="HwWeb1" resultMap="HwWebResult1">
@ -22,6 +25,7 @@
<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>
<if test="deviceId != null "> and device_id = #{deviceId}</if>
</where>
</select>
@ -36,11 +40,13 @@
<if test="webJson != null">web_json,</if>
<if test="webJsonString != null">web_json_string,</if>
<if test="webCode != null">web_code,</if>
<if test="deviceId != null">device_id,</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>
<if test="deviceId != null">#{deviceId},</if>
</trim>
</insert>
@ -50,6 +56,7 @@
<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>
<if test="deviceId != null">device_id = #{deviceId},</if>
</trim>
where web_code = #{webCode}
</update>

Loading…
Cancel
Save