wifi查询关联商户

master
吴顺杰 10 months ago
parent b1a5505770
commit 1b04f73056

@ -2,6 +2,8 @@ package com.ruoyi.system.domain;
import com.ruoyi.common.annotation.Excel; import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity; import com.ruoyi.common.core.domain.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
/** /**
* b_net * b_net
@ -9,6 +11,8 @@ import com.ruoyi.common.core.domain.BaseEntity;
* @author ruoyi * @author ruoyi
* @date 2023-11-21 * @date 2023-11-21
*/ */
@Data
@EqualsAndHashCode(callSuper = true)
public class BNet extends BaseEntity { public class BNet extends BaseEntity {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@ -22,6 +26,36 @@ public class BNet extends BaseEntity {
*/ */
private Long shanghuId; private Long shanghuId;
/**
*
*/
@Excel(name = "商户名称")
private String posName;
/**
*
*/
@Excel(name = "手机号")
private String phoneNumber;
/**
*
*/
@Excel(name = "联系人")
private String linkMan;
/**
*
*/
@Excel(name = "城市")
private String city;
/**
*
*/
@Excel(name = "地址信息")
private String address;
/** /**
* *
*/ */
@ -40,65 +74,4 @@ public class BNet extends BaseEntity {
@Excel(name = "wifi密码") @Excel(name = "wifi密码")
private String wifiPass; private String wifiPass;
public BNet() {
}
public BNet(Long id, Long shanghuId, String netName, String wifiName, String wifiPass) {
this.id = id;
this.shanghuId = shanghuId;
this.netName = netName;
this.wifiName = wifiName;
this.wifiPass = wifiPass;
}
@Override
public String toString() {
return "BNet{" +
"id=" + id +
", shanghuId=" + shanghuId +
", netName='" + netName + '\'' +
", wifiName='" + wifiName + '\'' +
", wifiPass='" + wifiPass + '\'' +
'}';
}
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public Long getShanghuId() {
return shanghuId;
}
public void setShanghuId(Long shanghuId) {
this.shanghuId = shanghuId;
}
public String getNetName() {
return netName;
}
public void setNetName(String netName) {
this.netName = netName;
}
public String getWifiName() {
return wifiName;
}
public void setWifiName(String wifiName) {
this.wifiName = wifiName;
}
public String getWifiPass() {
return wifiPass;
}
public void setWifiPass(String wifiPass) {
this.wifiPass = wifiPass;
}
} }

@ -14,23 +14,51 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="updateBy" column="update_by" /> <result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" /> <result property="updateTime" column="update_time" />
<result property="remark" column="remark" /> <result property="remark" column="remark" />
<result property="posName" column="pos_name"/>
<result property="phoneNumber" column="phone_number"/>
<result property="linkMan" column="link_man"/>
<result property="city" column="city"/>
<result property="address" column="address"/>
</resultMap> </resultMap>
<sql id="selectBNetVo"> <sql id="selectBNetVo">
select id,net_name, shanghu_id, wifi_name, wifi_pass, create_by, create_time, update_by, update_time, remark from b_net select bn.id,
bn.net_name,
bn.shanghu_id,
bn.wifi_name,
bn.wifi_pass,
bn.create_by,
bn.create_time,
bn.update_by,
bn.update_time,
bn.remark,
bs.pos_name,
bs.phone_number,
bs.link_man,
bs.city,
bs.address
from b_net bn
left join b_shanghu bs on bn.shanghu_id = bs.id
</sql> </sql>
<select id="selectBNetList" parameterType="BNet" resultMap="BNetResult"> <select id="selectBNetList" parameterType="BNet" resultMap="BNetResult">
<include refid="selectBNetVo"/> <include refid="selectBNetVo"/>
<where> <where>
<if test="netName != null and netName != ''">and net_name like concat('%', #{netName}, '%')</if> <if test="netName != null and netName != ''">and bn.net_name like concat('%', #{netName}, '%')</if>
<if test="shanghuId != null and shanghuId != ''">and shanghu_id = #{shanghuId}</if> <if test="shanghuId != null and shanghuId != ''">and bn.shanghu_id = #{shanghuId}</if>
<if test="posName != null and posName != ''">and bs.pos_name like concat('%', #{posName}, '%')</if>
<if test="phoneNumber != null and phoneNumber != ''">and bs.phone_number like concat('%', #{phoneNumber},
'%')
</if>
<if test="linkMan != null and linkMan != ''">and bs.link_man like concat('%', #{linkMan}, '%')</if>
<if test="city != null and city != ''">and bs.city like concat('%', #{city}, '%')</if>
<if test="address != null and address != ''">and bs.address like concat('%', #{address}, '%')</if>
</where> </where>
</select> </select>
<select id="selectBNetById" parameterType="Long" resultMap="BNetResult"> <select id="selectBNetById" parameterType="Long" resultMap="BNetResult">
<include refid="selectBNetVo"/> <include refid="selectBNetVo"/>
where id = #{id} where bn.id = #{id}
</select> </select>
<select id="findByShanghuId" resultType="com.ruoyi.system.domain.BNet"> <select id="findByShanghuId" resultType="com.ruoyi.system.domain.BNet">

Loading…
Cancel
Save