parent
2e387f1394
commit
0130d1715d
@ -1,84 +1,104 @@
|
||||
package com.ruoyi.system.domain;
|
||||
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 网络对象 b_net
|
||||
*
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2023-11-21
|
||||
*/
|
||||
public class BNet extends BaseEntity
|
||||
{
|
||||
public class BNet extends BaseEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** $column.columnComment */
|
||||
/**
|
||||
* $column.columnComment
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/** 网络名称 */
|
||||
/**
|
||||
* 商户id
|
||||
*/
|
||||
private Long shanghuId;
|
||||
|
||||
/**
|
||||
* 网络名称
|
||||
*/
|
||||
@Excel(name = "网络名称")
|
||||
private String netName;
|
||||
|
||||
/** wifi名称 */
|
||||
/**
|
||||
* wifi名称
|
||||
*/
|
||||
@Excel(name = "wifi名称")
|
||||
private String wifiName;
|
||||
|
||||
/** wifi密码 */
|
||||
/**
|
||||
* wifi密码
|
||||
*/
|
||||
@Excel(name = "wifi密码")
|
||||
private String wifiPass;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
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;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
@Override
|
||||
public String toString() {
|
||||
return "BNet{" +
|
||||
"id=" + id +
|
||||
", shanghuId=" + shanghuId +
|
||||
", netName='" + netName + '\'' +
|
||||
", wifiName='" + wifiName + '\'' +
|
||||
", wifiPass='" + wifiPass + '\'' +
|
||||
'}';
|
||||
}
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
public void setNetName(String netName)
|
||||
{
|
||||
this.netName = netName;
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getNetName()
|
||||
{
|
||||
public Long getShanghuId() {
|
||||
return shanghuId;
|
||||
}
|
||||
|
||||
public void setShanghuId(Long shanghuId) {
|
||||
this.shanghuId = shanghuId;
|
||||
}
|
||||
|
||||
public String getNetName() {
|
||||
return netName;
|
||||
}
|
||||
public void setWifiName(String wifiName)
|
||||
{
|
||||
this.wifiName = wifiName;
|
||||
|
||||
public void setNetName(String netName) {
|
||||
this.netName = netName;
|
||||
}
|
||||
|
||||
public String getWifiName()
|
||||
{
|
||||
public String getWifiName() {
|
||||
return wifiName;
|
||||
}
|
||||
public void setWifiPass(String wifiPass)
|
||||
{
|
||||
this.wifiPass = wifiPass;
|
||||
|
||||
public void setWifiName(String wifiName) {
|
||||
this.wifiName = wifiName;
|
||||
}
|
||||
|
||||
public String getWifiPass()
|
||||
{
|
||||
public String getWifiPass() {
|
||||
return wifiPass;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("netName", getNetName())
|
||||
.append("wifiName", getWifiName())
|
||||
.append("wifiPass", getWifiPass())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("remark", getRemark())
|
||||
.toString();
|
||||
public void setWifiPass(String wifiPass) {
|
||||
this.wifiPass = wifiPass;
|
||||
}
|
||||
}
|
||||
|
@ -1,112 +1,129 @@
|
||||
package com.ruoyi.system.domain;
|
||||
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 连网历史对象 b_net_history
|
||||
*
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2023-11-21
|
||||
*/
|
||||
public class BNetHistory extends BaseEntity
|
||||
{
|
||||
public class BNetHistory extends BaseEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** $column.columnComment */
|
||||
/**
|
||||
* $column.columnComment
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/** 是否连接成功 */
|
||||
/**
|
||||
* 商户id
|
||||
*/
|
||||
private Long shanghuId;
|
||||
|
||||
/**
|
||||
* 是否连接成功
|
||||
*/
|
||||
@Excel(name = "是否连接成功")
|
||||
private Long isTrue;
|
||||
|
||||
/** 网络id */
|
||||
/**
|
||||
* 网络id
|
||||
*/
|
||||
@Excel(name = "网络id")
|
||||
private Long netId;
|
||||
|
||||
/** 网络名称 */
|
||||
/**
|
||||
* 网络名称
|
||||
*/
|
||||
@Excel(name = "网络名称")
|
||||
private String netName;
|
||||
|
||||
/** wifi名称 */
|
||||
/**
|
||||
* wifi名称
|
||||
*/
|
||||
@Excel(name = "wifi名称")
|
||||
private String wifiName;
|
||||
|
||||
/** wifi密码 */
|
||||
/**
|
||||
* wifi密码
|
||||
*/
|
||||
@Excel(name = "wifi密码")
|
||||
private String wifiPass;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
|
||||
public BNetHistory() {
|
||||
}
|
||||
|
||||
public BNetHistory(Long id, Long shanghuId, Long isTrue, Long netId, String netName, String wifiName, String wifiPass) {
|
||||
this.id = id;
|
||||
this.shanghuId = shanghuId;
|
||||
this.isTrue = isTrue;
|
||||
this.netId = netId;
|
||||
this.netName = netName;
|
||||
this.wifiName = wifiName;
|
||||
this.wifiPass = wifiPass;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
public void setIsTrue(Long isTrue)
|
||||
{
|
||||
this.isTrue = isTrue;
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getIsTrue()
|
||||
{
|
||||
public Long getIsTrue() {
|
||||
return isTrue;
|
||||
}
|
||||
public void setNetId(Long netId)
|
||||
{
|
||||
this.netId = netId;
|
||||
|
||||
public void setIsTrue(Long isTrue) {
|
||||
this.isTrue = isTrue;
|
||||
}
|
||||
|
||||
public Long getNetId()
|
||||
{
|
||||
public Long getNetId() {
|
||||
return netId;
|
||||
}
|
||||
public void setNetName(String netName)
|
||||
{
|
||||
this.netName = netName;
|
||||
|
||||
public void setNetId(Long netId) {
|
||||
this.netId = netId;
|
||||
}
|
||||
|
||||
public String getNetName()
|
||||
{
|
||||
public String getNetName() {
|
||||
return netName;
|
||||
}
|
||||
public void setWifiName(String wifiName)
|
||||
{
|
||||
this.wifiName = wifiName;
|
||||
|
||||
public void setNetName(String netName) {
|
||||
this.netName = netName;
|
||||
}
|
||||
|
||||
public String getWifiName()
|
||||
{
|
||||
public String getWifiName() {
|
||||
return wifiName;
|
||||
}
|
||||
public void setWifiPass(String wifiPass)
|
||||
{
|
||||
this.wifiPass = wifiPass;
|
||||
|
||||
public void setWifiName(String wifiName) {
|
||||
this.wifiName = wifiName;
|
||||
}
|
||||
|
||||
public String getWifiPass()
|
||||
{
|
||||
public String getWifiPass() {
|
||||
return wifiPass;
|
||||
}
|
||||
|
||||
public void setWifiPass(String wifiPass) {
|
||||
this.wifiPass = wifiPass;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("isTrue", getIsTrue())
|
||||
.append("netId", getNetId())
|
||||
.append("netName", getNetName())
|
||||
.append("wifiName", getWifiName())
|
||||
.append("wifiPass", getWifiPass())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("remark", getRemark())
|
||||
.toString();
|
||||
return "BNetHistory{" + "id=" + id + ", shanghuId=" + shanghuId + ", isTrue=" + isTrue + ", netId=" + netId + ", netName='" + netName + '\'' + ", wifiName='" + wifiName + '\'' + ", wifiPass='" + wifiPass + '\'' + '}';
|
||||
}
|
||||
|
||||
public Long getShanghuId() {
|
||||
return shanghuId;
|
||||
}
|
||||
|
||||
public void setShanghuId(Long shanghuId) {
|
||||
this.shanghuId = shanghuId;
|
||||
}
|
||||
}
|
||||
|
@ -1,130 +1,148 @@
|
||||
package com.ruoyi.system.domain;
|
||||
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 广告历史对象 b_poster_history
|
||||
*
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2023-11-21
|
||||
*/
|
||||
public class BPosterHistory extends BaseEntity
|
||||
{
|
||||
public class BPosterHistory extends BaseEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** $column.columnComment */
|
||||
/**
|
||||
* $column.columnComment
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/** 广告id */
|
||||
/**
|
||||
* 商户id
|
||||
*/
|
||||
private Long shanghuId;
|
||||
|
||||
/**
|
||||
* 广告id
|
||||
*/
|
||||
@Excel(name = "广告id")
|
||||
private Long posterId;
|
||||
|
||||
/** 广告名称 */
|
||||
/**
|
||||
* 广告名称
|
||||
*/
|
||||
@Excel(name = "广告名称")
|
||||
private String posterName;
|
||||
|
||||
/** 有效起始时间 */
|
||||
/**
|
||||
* 有效起始时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "有效起始时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date startTime;
|
||||
|
||||
/** 有效结束时间 */
|
||||
/**
|
||||
* 有效结束时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "有效结束时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date endTime;
|
||||
|
||||
/** 视频路径 */
|
||||
/**
|
||||
* 视频路径
|
||||
*/
|
||||
@Excel(name = "视频路径")
|
||||
private String videoPath;
|
||||
|
||||
/** 视频封面 */
|
||||
/**
|
||||
* 视频封面
|
||||
*/
|
||||
@Excel(name = "视频封面")
|
||||
private String videoLogo;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
public BPosterHistory() {
|
||||
}
|
||||
|
||||
public BPosterHistory(Long id, Long shanghuId, Long posterId, String posterName, Date startTime, Date endTime, String videoPath, String videoLogo) {
|
||||
this.id = id;
|
||||
this.shanghuId = shanghuId;
|
||||
this.posterId = posterId;
|
||||
this.posterName = posterName;
|
||||
this.startTime = startTime;
|
||||
this.endTime = endTime;
|
||||
this.videoPath = videoPath;
|
||||
this.videoLogo = videoLogo;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
public void setPosterId(Long posterId)
|
||||
{
|
||||
this.posterId = posterId;
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getPosterId()
|
||||
{
|
||||
public Long getPosterId() {
|
||||
return posterId;
|
||||
}
|
||||
public void setPosterName(String posterName)
|
||||
{
|
||||
this.posterName = posterName;
|
||||
|
||||
public void setPosterId(Long posterId) {
|
||||
this.posterId = posterId;
|
||||
}
|
||||
|
||||
public String getPosterName()
|
||||
{
|
||||
public String getPosterName() {
|
||||
return posterName;
|
||||
}
|
||||
public void setStartTime(Date startTime)
|
||||
{
|
||||
this.startTime = startTime;
|
||||
|
||||
public void setPosterName(String posterName) {
|
||||
this.posterName = posterName;
|
||||
}
|
||||
|
||||
public Date getStartTime()
|
||||
{
|
||||
public Date getStartTime() {
|
||||
return startTime;
|
||||
}
|
||||
public void setEndTime(Date endTime)
|
||||
{
|
||||
this.endTime = endTime;
|
||||
|
||||
public void setStartTime(Date startTime) {
|
||||
this.startTime = startTime;
|
||||
}
|
||||
|
||||
public Date getEndTime()
|
||||
{
|
||||
public Date getEndTime() {
|
||||
return endTime;
|
||||
}
|
||||
public void setVideoPath(String videoPath)
|
||||
{
|
||||
this.videoPath = videoPath;
|
||||
|
||||
public void setEndTime(Date endTime) {
|
||||
this.endTime = endTime;
|
||||
}
|
||||
|
||||
public String getVideoPath()
|
||||
{
|
||||
public String getVideoPath() {
|
||||
return videoPath;
|
||||
}
|
||||
public void setVideoLogo(String videoLogo)
|
||||
{
|
||||
this.videoLogo = videoLogo;
|
||||
|
||||
public void setVideoPath(String videoPath) {
|
||||
this.videoPath = videoPath;
|
||||
}
|
||||
|
||||
public String getVideoLogo()
|
||||
{
|
||||
public String getVideoLogo() {
|
||||
return videoLogo;
|
||||
}
|
||||
|
||||
public void setVideoLogo(String videoLogo) {
|
||||
this.videoLogo = videoLogo;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("posterId", getPosterId())
|
||||
.append("posterName", getPosterName())
|
||||
.append("startTime", getStartTime())
|
||||
.append("endTime", getEndTime())
|
||||
.append("videoPath", getVideoPath())
|
||||
.append("videoLogo", getVideoLogo())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("remark", getRemark())
|
||||
.toString();
|
||||
return "BPosterHistory{" + "id=" + id + ", shanghuId=" + shanghuId + ", posterId=" + posterId + ", posterName='" + posterName + '\'' + ", startTime=" + startTime + ", endTime=" + endTime + ", videoPath='" + videoPath + '\'' + ", videoLogo='" + videoLogo + '\'' + '}';
|
||||
}
|
||||
|
||||
public Long getShanghuId() {
|
||||
return shanghuId;
|
||||
}
|
||||
|
||||
public void setShanghuId(Long shanghuId) {
|
||||
this.shanghuId = shanghuId;
|
||||
}
|
||||
}
|
||||
|
@ -1,126 +1,131 @@
|
||||
package com.ruoyi.system.domain;
|
||||
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
|
||||
/**
|
||||
* 商户对象 b_shanghu
|
||||
*
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2023-11-21
|
||||
*/
|
||||
public class BShanghu extends BaseEntity
|
||||
{
|
||||
public class BShanghu extends BaseEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** $column.columnComment */
|
||||
/**
|
||||
* $column.columnComment
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/** 商户名称 */
|
||||
/**
|
||||
* 商户名称
|
||||
*/
|
||||
@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;
|
||||
|
||||
/** 广告标识 */
|
||||
/**
|
||||
* 广告标识
|
||||
*/
|
||||
@Excel(name = "广告标识")
|
||||
private Long posterId;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
public void setPosName(String posName)
|
||||
{
|
||||
this.posName = posName;
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getPosName()
|
||||
{
|
||||
public String getPosName() {
|
||||
return posName;
|
||||
}
|
||||
public void setPhoneNumber(String phoneNumber)
|
||||
{
|
||||
this.phoneNumber = phoneNumber;
|
||||
|
||||
public void setPosName(String posName) {
|
||||
this.posName = posName;
|
||||
}
|
||||
|
||||
public String getPhoneNumber()
|
||||
{
|
||||
public String getPhoneNumber() {
|
||||
return phoneNumber;
|
||||
}
|
||||
public void setLinkMan(String linkMan)
|
||||
{
|
||||
this.linkMan = linkMan;
|
||||
|
||||
public void setPhoneNumber(String phoneNumber) {
|
||||
this.phoneNumber = phoneNumber;
|
||||
}
|
||||
|
||||
public String getLinkMan()
|
||||
{
|
||||
public String getLinkMan() {
|
||||
return linkMan;
|
||||
}
|
||||
public void setCity(String city)
|
||||
{
|
||||
this.city = city;
|
||||
|
||||
public void setLinkMan(String linkMan) {
|
||||
this.linkMan = linkMan;
|
||||
}
|
||||
|
||||
public String getCity()
|
||||
{
|
||||
public String getCity() {
|
||||
return city;
|
||||
}
|
||||
public void setAddress(String address)
|
||||
{
|
||||
this.address = address;
|
||||
|
||||
public void setCity(String city) {
|
||||
this.city = city;
|
||||
}
|
||||
|
||||
public String getAddress()
|
||||
{
|
||||
public String getAddress() {
|
||||
return address;
|
||||
}
|
||||
public void setPosterId(Long posterId)
|
||||
{
|
||||
this.posterId = posterId;
|
||||
|
||||
public void setAddress(String address) {
|
||||
this.address = address;
|
||||
}
|
||||
|
||||
public Long getPosterId()
|
||||
{
|
||||
public Long getPosterId() {
|
||||
return posterId;
|
||||
}
|
||||
|
||||
public void setPosterId(Long posterId) {
|
||||
this.posterId = posterId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("posName", getPosName())
|
||||
.append("phoneNumber", getPhoneNumber())
|
||||
.append("linkMan", getLinkMan())
|
||||
.append("city", getCity())
|
||||
.append("address", getAddress())
|
||||
.append("posterId", getPosterId())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("remark", getRemark())
|
||||
.toString();
|
||||
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("posName", getPosName())
|
||||
.append("phoneNumber", getPhoneNumber())
|
||||
.append("linkMan", getLinkMan())
|
||||
.append("city", getCity())
|
||||
.append("address", getAddress())
|
||||
.append("posterId", getPosterId())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("remark", getRemark())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,46 @@
|
||||
package com.ruoyi.system.domain.dto.request;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 广告批量分配商户请求类
|
||||
*
|
||||
* @author wu
|
||||
* @since 2023/11/24 9:36
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("广告批量分配商户请求类")
|
||||
public class PosterRequest implements Serializable {
|
||||
private static final long serialVersionUID = -2550281756138991362L;
|
||||
|
||||
/**
|
||||
* 广告id
|
||||
*/
|
||||
@ApiModelProperty(value = "广告id")
|
||||
@NotNull(message = "广告不能为空")
|
||||
private Long posterId;
|
||||
|
||||
/**
|
||||
* 商户id集合
|
||||
*/
|
||||
@ApiModelProperty(value = "商户id集合")
|
||||
private List<Long> shanghuIds;
|
||||
|
||||
/**
|
||||
* 商户城市
|
||||
*/
|
||||
@ApiModelProperty(value = "商户城市")
|
||||
private String shanghuCity;
|
||||
|
||||
/**
|
||||
* 商户名称
|
||||
*/
|
||||
@ApiModelProperty(value = "商户名称")
|
||||
private String shanghuName;
|
||||
}
|
@ -1,61 +1,78 @@
|
||||
package com.ruoyi.system.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.system.domain.BNet;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 网络Mapper接口
|
||||
*
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2023-11-21
|
||||
*/
|
||||
public interface BNetMapper
|
||||
{
|
||||
public interface BNetMapper {
|
||||
/**
|
||||
* 查询网络
|
||||
*
|
||||
*
|
||||
* @param id 网络主键
|
||||
* @return 网络
|
||||
*/
|
||||
public BNet selectBNetById(Long id);
|
||||
BNet selectBNetById(Long id);
|
||||
|
||||
/**
|
||||
* 查询网络列表
|
||||
*
|
||||
*
|
||||
* @param bNet 网络
|
||||
* @return 网络集合
|
||||
*/
|
||||
public List<BNet> selectBNetList(BNet bNet);
|
||||
List<BNet> selectBNetList(BNet bNet);
|
||||
|
||||
/**
|
||||
* 新增网络
|
||||
*
|
||||
*
|
||||
* @param bNet 网络
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertBNet(BNet bNet);
|
||||
int insertBNet(BNet bNet);
|
||||
|
||||
/**
|
||||
* 修改网络
|
||||
*
|
||||
*
|
||||
* @param bNet 网络
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateBNet(BNet bNet);
|
||||
int updateBNet(BNet bNet);
|
||||
|
||||
/**
|
||||
* 删除网络
|
||||
*
|
||||
*
|
||||
* @param id 网络主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBNetById(Long id);
|
||||
int deleteBNetById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除网络
|
||||
*
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBNetByIds(Long[] ids);
|
||||
int deleteBNetByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 根据商户id删除wifi
|
||||
*
|
||||
* @param id 商户id
|
||||
*/
|
||||
void deleteBNetByShangHuId(Long id);
|
||||
|
||||
/**
|
||||
* 根据商户id删除wifi
|
||||
*
|
||||
* @param shanghuId 商户id
|
||||
* @return wifi信息
|
||||
*/
|
||||
BNet findByShanghuId(@Param("shanghuId") Long shanghuId);
|
||||
|
||||
}
|
||||
|
@ -1,61 +1,79 @@
|
||||
package com.ruoyi.system.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.system.domain.BShanghu;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 商户Mapper接口
|
||||
*
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2023-11-21
|
||||
*/
|
||||
public interface BShanghuMapper
|
||||
{
|
||||
public interface BShanghuMapper {
|
||||
/**
|
||||
* 查询商户
|
||||
*
|
||||
*
|
||||
* @param id 商户主键
|
||||
* @return 商户
|
||||
*/
|
||||
public BShanghu selectBShanghuById(Long id);
|
||||
BShanghu selectBShanghuById(Long id);
|
||||
|
||||
/**
|
||||
* 查询商户列表
|
||||
*
|
||||
*
|
||||
* @param bShanghu 商户
|
||||
* @return 商户集合
|
||||
*/
|
||||
public List<BShanghu> selectBShanghuList(BShanghu bShanghu);
|
||||
List<BShanghu> selectBShanghuList(BShanghu bShanghu);
|
||||
|
||||
/**
|
||||
* 新增商户
|
||||
*
|
||||
*
|
||||
* @param bShanghu 商户
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertBShanghu(BShanghu bShanghu);
|
||||
int insertBShanghu(BShanghu bShanghu);
|
||||
|
||||
/**
|
||||
* 修改商户
|
||||
*
|
||||
*
|
||||
* @param bShanghu 商户
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateBShanghu(BShanghu bShanghu);
|
||||
int updateBShanghu(BShanghu bShanghu);
|
||||
|
||||
/**
|
||||
* 删除商户
|
||||
*
|
||||
*
|
||||
* @param id 商户主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBShanghuById(Long id);
|
||||
int deleteBShanghuById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除商户
|
||||
*
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBShanghuByIds(Long[] ids);
|
||||
int deleteBShanghuByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 为商户批量填充广告
|
||||
*
|
||||
* @param posterId 广告id
|
||||
* @param list 商户id集合
|
||||
*/
|
||||
void editPostIdByIds(@Param("posterId") Long posterId, @Param("list") List<Long> list);
|
||||
|
||||
/**
|
||||
* 为商户批量填充广告
|
||||
*
|
||||
* @param posterId 广告id
|
||||
* @param shanghuCity 商户城市
|
||||
* @param shanghuName 商户名称
|
||||
*/
|
||||
void editPostIdByReq(@Param("posterId") Long posterId, @Param("shanghuCity") String shanghuCity, @Param("shanghuName") String shanghuName);
|
||||
}
|
||||
|
@ -1,61 +1,76 @@
|
||||
package com.ruoyi.system.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.system.domain.BNet;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 网络Service接口
|
||||
*
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2023-11-21
|
||||
*/
|
||||
public interface IBNetService
|
||||
{
|
||||
public interface IBNetService {
|
||||
/**
|
||||
* 查询网络
|
||||
*
|
||||
*
|
||||
* @param id 网络主键
|
||||
* @return 网络
|
||||
*/
|
||||
public BNet selectBNetById(Long id);
|
||||
BNet selectBNetById(Long id);
|
||||
|
||||
/**
|
||||
* 查询网络列表
|
||||
*
|
||||
*
|
||||
* @param bNet 网络
|
||||
* @return 网络集合
|
||||
*/
|
||||
public List<BNet> selectBNetList(BNet bNet);
|
||||
List<BNet> selectBNetList(BNet bNet);
|
||||
|
||||
/**
|
||||
* 新增网络
|
||||
*
|
||||
*
|
||||
* @param bNet 网络
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertBNet(BNet bNet);
|
||||
int insertBNet(BNet bNet);
|
||||
|
||||
/**
|
||||
* 修改网络
|
||||
*
|
||||
*
|
||||
* @param bNet 网络
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateBNet(BNet bNet);
|
||||
int updateBNet(BNet bNet);
|
||||
|
||||
/**
|
||||
* 批量删除网络
|
||||
*
|
||||
*
|
||||
* @param ids 需要删除的网络主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBNetByIds(Long[] ids);
|
||||
int deleteBNetByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除网络信息
|
||||
*
|
||||
*
|
||||
* @param id 网络主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBNetById(Long id);
|
||||
int deleteBNetById(Long id);
|
||||
|
||||
/**
|
||||
* 根据商户id删除wifi
|
||||
*
|
||||
* @param id 商户id
|
||||
*/
|
||||
void deleteBNetByShangHuId(Long id);
|
||||
|
||||
/**
|
||||
* 根据商户id查询wifi(提供二维码接口)
|
||||
*
|
||||
* @param id 商户id
|
||||
* @return wifi信息
|
||||
*/
|
||||
BNet findById(Long id);
|
||||
}
|
||||
|
@ -1,61 +1,69 @@
|
||||
package com.ruoyi.system.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.system.domain.BPoster;
|
||||
import com.ruoyi.system.domain.dto.request.PosterRequest;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 广告Service接口
|
||||
*
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2023-11-21
|
||||
*/
|
||||
public interface IBPosterService
|
||||
{
|
||||
public interface IBPosterService {
|
||||
/**
|
||||
* 查询广告
|
||||
*
|
||||
*
|
||||
* @param id 广告主键
|
||||
* @return 广告
|
||||
*/
|
||||
public BPoster selectBPosterById(Long id);
|
||||
BPoster selectBPosterById(Long id);
|
||||
|
||||
/**
|
||||
* 查询广告列表
|
||||
*
|
||||
*
|
||||
* @param bPoster 广告
|
||||
* @return 广告集合
|
||||
*/
|
||||
public List<BPoster> selectBPosterList(BPoster bPoster);
|
||||
List<BPoster> selectBPosterList(BPoster bPoster);
|
||||
|
||||
/**
|
||||
* 新增广告
|
||||
*
|
||||
*
|
||||
* @param bPoster 广告
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertBPoster(BPoster bPoster);
|
||||
int insertBPoster(BPoster bPoster);
|
||||
|
||||
/**
|
||||
* 修改广告
|
||||
*
|
||||
*
|
||||
* @param bPoster 广告
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateBPoster(BPoster bPoster);
|
||||
int updateBPoster(BPoster bPoster);
|
||||
|
||||
/**
|
||||
* 批量删除广告
|
||||
*
|
||||
*
|
||||
* @param ids 需要删除的广告主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBPosterByIds(Long[] ids);
|
||||
int deleteBPosterByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除广告信息
|
||||
*
|
||||
*
|
||||
* @param id 广告主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBPosterById(Long id);
|
||||
int deleteBPosterById(Long id);
|
||||
|
||||
/**
|
||||
* 广告批量分配商户
|
||||
*
|
||||
* @param req 请求类
|
||||
*/
|
||||
void batchAllocation(PosterRequest req);
|
||||
}
|
||||
|
@ -1,61 +1,80 @@
|
||||
package com.ruoyi.system.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.system.domain.BNet;
|
||||
import com.ruoyi.system.domain.BShanghu;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 商户Service接口
|
||||
*
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2023-11-21
|
||||
*/
|
||||
public interface IBShanghuService
|
||||
{
|
||||
public interface IBShanghuService {
|
||||
/**
|
||||
* 查询商户
|
||||
*
|
||||
*
|
||||
* @param id 商户主键
|
||||
* @return 商户
|
||||
*/
|
||||
public BShanghu selectBShanghuById(Long id);
|
||||
BShanghu selectBShanghuById(Long id);
|
||||
|
||||
/**
|
||||
* 查询商户列表
|
||||
*
|
||||
*
|
||||
* @param bShanghu 商户
|
||||
* @return 商户集合
|
||||
*/
|
||||
public List<BShanghu> selectBShanghuList(BShanghu bShanghu);
|
||||
List<BShanghu> selectBShanghuList(BShanghu bShanghu);
|
||||
|
||||
/**
|
||||
* 新增商户
|
||||
*
|
||||
*
|
||||
* @param bShanghu 商户
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertBShanghu(BShanghu bShanghu);
|
||||
int insertBShanghu(BShanghu bShanghu);
|
||||
|
||||
/**
|
||||
* 修改商户
|
||||
*
|
||||
*
|
||||
* @param bShanghu 商户
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateBShanghu(BShanghu bShanghu);
|
||||
int updateBShanghu(BShanghu bShanghu);
|
||||
|
||||
/**
|
||||
* 批量删除商户
|
||||
*
|
||||
*
|
||||
* @param ids 需要删除的商户主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBShanghuByIds(Long[] ids);
|
||||
int deleteBShanghuByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除商户信息
|
||||
*
|
||||
*
|
||||
* @param id 商户主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBShanghuById(Long id);
|
||||
int deleteBShanghuById(Long id);
|
||||
|
||||
/**
|
||||
* 为商户批量填充广告
|
||||
*
|
||||
* @param posterId 广告id
|
||||
* @param shanghuIds 商户id集合
|
||||
*/
|
||||
void editPostIdByIds(Long posterId, List<Long> shanghuIds);
|
||||
|
||||
/**
|
||||
* 为商户批量填充广告
|
||||
*
|
||||
* @param posterId 广告id
|
||||
* @param shanghuCity 商户城市
|
||||
* @param shanghuName 商户名称
|
||||
*/
|
||||
void editPostIdByReq(Long posterId, String shanghuCity, String shanghuName);
|
||||
|
||||
}
|
||||
|
@ -1,96 +1,121 @@
|
||||
package com.ruoyi.system.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import com.ruoyi.common.exception.ServiceException;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.system.mapper.BNetMapper;
|
||||
import com.ruoyi.system.domain.BNet;
|
||||
import com.ruoyi.system.mapper.BNetMapper;
|
||||
import com.ruoyi.system.service.IBNetService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 网络Service业务层处理
|
||||
*
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2023-11-21
|
||||
*/
|
||||
@Service
|
||||
public class BNetServiceImpl implements IBNetService
|
||||
{
|
||||
@Autowired
|
||||
public class BNetServiceImpl implements IBNetService {
|
||||
|
||||
@Resource
|
||||
private BNetMapper bNetMapper;
|
||||
|
||||
/**
|
||||
* 查询网络
|
||||
*
|
||||
*
|
||||
* @param id 网络主键
|
||||
* @return 网络
|
||||
*/
|
||||
@Override
|
||||
public BNet selectBNetById(Long id)
|
||||
{
|
||||
public BNet selectBNetById(Long id) {
|
||||
return bNetMapper.selectBNetById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询网络列表
|
||||
*
|
||||
*
|
||||
* @param bNet 网络
|
||||
* @return 网络
|
||||
*/
|
||||
@Override
|
||||
public List<BNet> selectBNetList(BNet bNet)
|
||||
{
|
||||
public List<BNet> selectBNetList(BNet bNet) {
|
||||
return bNetMapper.selectBNetList(bNet);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增网络
|
||||
*
|
||||
*
|
||||
* @param bNet 网络
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertBNet(BNet bNet)
|
||||
{
|
||||
public int insertBNet(BNet bNet) {
|
||||
if (bNet.getShanghuId() == null) {
|
||||
throw new ServiceException("商户id不能为空");
|
||||
}
|
||||
BNet net = bNetMapper.findByShanghuId(bNet.getShanghuId());
|
||||
if (BeanUtil.isNotEmpty(net)) {
|
||||
throw new ServiceException("已经存在wifi网络不能新增");
|
||||
}
|
||||
bNet.setCreateTime(DateUtils.getNowDate());
|
||||
return bNetMapper.insertBNet(bNet);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改网络
|
||||
*
|
||||
*
|
||||
* @param bNet 网络
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateBNet(BNet bNet)
|
||||
{
|
||||
public int updateBNet(BNet bNet) {
|
||||
bNet.setUpdateTime(DateUtils.getNowDate());
|
||||
return bNetMapper.updateBNet(bNet);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除网络
|
||||
*
|
||||
*
|
||||
* @param ids 需要删除的网络主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteBNetByIds(Long[] ids)
|
||||
{
|
||||
public int deleteBNetByIds(Long[] ids) {
|
||||
return bNetMapper.deleteBNetByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除网络信息
|
||||
*
|
||||
*
|
||||
* @param id 网络主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteBNetById(Long id)
|
||||
{
|
||||
public int deleteBNetById(Long id) {
|
||||
return bNetMapper.deleteBNetById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据商户id删除wifi
|
||||
*
|
||||
* @param id 商户id
|
||||
*/
|
||||
@Override
|
||||
public void deleteBNetByShangHuId(Long id) {
|
||||
bNetMapper.deleteBNetByShangHuId(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据商户id查询wifi(提供二维码接口)
|
||||
*
|
||||
* @param id 商户id
|
||||
* @return wifi信息
|
||||
*/
|
||||
@Override
|
||||
public BNet findById(Long id) {
|
||||
return bNetMapper.findByShanghuId(id);
|
||||
}
|
||||
}
|
||||
|
@ -1,96 +1,123 @@
|
||||
package com.ruoyi.system.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.ruoyi.common.exception.ServiceException;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.system.mapper.BPosterMapper;
|
||||
import com.ruoyi.system.domain.BPoster;
|
||||
import com.ruoyi.system.domain.dto.request.PosterRequest;
|
||||
import com.ruoyi.system.mapper.BPosterMapper;
|
||||
import com.ruoyi.system.service.IBPosterService;
|
||||
import com.ruoyi.system.service.IBShanghuService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 广告Service业务层处理
|
||||
*
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2023-11-21
|
||||
*/
|
||||
@Service
|
||||
public class BPosterServiceImpl implements IBPosterService
|
||||
{
|
||||
@Autowired
|
||||
public class BPosterServiceImpl implements IBPosterService {
|
||||
|
||||
@Resource
|
||||
private BPosterMapper bPosterMapper;
|
||||
|
||||
@Resource
|
||||
private IBShanghuService shanghuService;
|
||||
|
||||
/**
|
||||
* 查询广告
|
||||
*
|
||||
*
|
||||
* @param id 广告主键
|
||||
* @return 广告
|
||||
*/
|
||||
@Override
|
||||
public BPoster selectBPosterById(Long id)
|
||||
{
|
||||
public BPoster selectBPosterById(Long id) {
|
||||
return bPosterMapper.selectBPosterById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询广告列表
|
||||
*
|
||||
*
|
||||
* @param bPoster 广告
|
||||
* @return 广告
|
||||
*/
|
||||
@Override
|
||||
public List<BPoster> selectBPosterList(BPoster bPoster)
|
||||
{
|
||||
public List<BPoster> selectBPosterList(BPoster bPoster) {
|
||||
return bPosterMapper.selectBPosterList(bPoster);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增广告
|
||||
*
|
||||
*
|
||||
* @param bPoster 广告
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertBPoster(BPoster bPoster)
|
||||
{
|
||||
public int insertBPoster(BPoster bPoster) {
|
||||
bPoster.setCreateTime(DateUtils.getNowDate());
|
||||
return bPosterMapper.insertBPoster(bPoster);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改广告
|
||||
*
|
||||
*
|
||||
* @param bPoster 广告
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateBPoster(BPoster bPoster)
|
||||
{
|
||||
public int updateBPoster(BPoster bPoster) {
|
||||
bPoster.setUpdateTime(DateUtils.getNowDate());
|
||||
return bPosterMapper.updateBPoster(bPoster);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除广告
|
||||
*
|
||||
*
|
||||
* @param ids 需要删除的广告主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteBPosterByIds(Long[] ids)
|
||||
{
|
||||
public int deleteBPosterByIds(Long[] ids) {
|
||||
return bPosterMapper.deleteBPosterByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除广告信息
|
||||
*
|
||||
*
|
||||
* @param id 广告主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteBPosterById(Long id)
|
||||
{
|
||||
public int deleteBPosterById(Long id) {
|
||||
return bPosterMapper.deleteBPosterById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 广告批量分配商户
|
||||
*
|
||||
* @param req 请求类
|
||||
*/
|
||||
@Override
|
||||
public void batchAllocation(PosterRequest req) {
|
||||
BPoster bPoster = bPosterMapper.selectBPosterById(req.getPosterId());
|
||||
if (BeanUtil.isEmpty(bPoster)) {
|
||||
throw new ServiceException("所选广告不存在");
|
||||
}
|
||||
if (CollectionUtil.isNotEmpty(req.getShanghuIds())) {
|
||||
shanghuService.editPostIdByIds(req.getPosterId(), req.getShanghuIds());
|
||||
return;
|
||||
}
|
||||
if (StrUtil.isNotEmpty(req.getShanghuCity())||StrUtil.isNotEmpty(req.getShanghuName())) {
|
||||
shanghuService.editPostIdByReq(req.getPosterId(),req.getShanghuCity(),req.getShanghuName());
|
||||
return;
|
||||
}
|
||||
throw new ServiceException("参数错误");
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -1,96 +1,148 @@
|
||||
package com.ruoyi.system.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import com.ruoyi.common.core.domain.entity.SysUser;
|
||||
import com.ruoyi.common.exception.ServiceException;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.system.mapper.BShanghuMapper;
|
||||
import com.ruoyi.common.utils.SecurityUtils;
|
||||
import com.ruoyi.system.domain.BPoster;
|
||||
import com.ruoyi.system.domain.BShanghu;
|
||||
import com.ruoyi.system.mapper.BShanghuMapper;
|
||||
import com.ruoyi.system.service.IBNetService;
|
||||
import com.ruoyi.system.service.IBPosterService;
|
||||
import com.ruoyi.system.service.IBShanghuService;
|
||||
import com.ruoyi.system.service.ISysUserService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 商户Service业务层处理
|
||||
*
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2023-11-21
|
||||
*/
|
||||
@Service
|
||||
public class BShanghuServiceImpl implements IBShanghuService
|
||||
{
|
||||
@Autowired
|
||||
public class BShanghuServiceImpl implements IBShanghuService {
|
||||
|
||||
@Resource
|
||||
private BShanghuMapper bShanghuMapper;
|
||||
|
||||
@Resource
|
||||
private ISysUserService userService;
|
||||
|
||||
@Resource
|
||||
private IBPosterService posterService;
|
||||
|
||||
@Resource
|
||||
private IBNetService netService;
|
||||
|
||||
/**
|
||||
* 查询商户
|
||||
*
|
||||
*
|
||||
* @param id 商户主键
|
||||
* @return 商户
|
||||
*/
|
||||
@Override
|
||||
public BShanghu selectBShanghuById(Long id)
|
||||
{
|
||||
public BShanghu selectBShanghuById(Long id) {
|
||||
return bShanghuMapper.selectBShanghuById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询商户列表
|
||||
*
|
||||
*
|
||||
* @param bShanghu 商户
|
||||
* @return 商户
|
||||
*/
|
||||
@Override
|
||||
public List<BShanghu> selectBShanghuList(BShanghu bShanghu)
|
||||
{
|
||||
public List<BShanghu> selectBShanghuList(BShanghu bShanghu) {
|
||||
return bShanghuMapper.selectBShanghuList(bShanghu);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增商户
|
||||
*
|
||||
*
|
||||
* @param bShanghu 商户
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertBShanghu(BShanghu bShanghu)
|
||||
{
|
||||
public int insertBShanghu(BShanghu bShanghu) {
|
||||
bShanghu.setCreateTime(DateUtils.getNowDate());
|
||||
SysUser user = new SysUser();
|
||||
user.setUserName(bShanghu.getPhoneNumber());
|
||||
user.setPassword(SecurityUtils.encryptPassword("123456"));
|
||||
user.setNickName(bShanghu.getLinkMan());
|
||||
// 注册用户
|
||||
if (!userService.checkUserNameUnique(user)) {
|
||||
throw new ServiceException("新增用户'" + user.getUserName() + "'失败,登录账号已存在");
|
||||
}
|
||||
userService.insertUser(user);
|
||||
return bShanghuMapper.insertBShanghu(bShanghu);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改商户
|
||||
*
|
||||
*
|
||||
* @param bShanghu 商户
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateBShanghu(BShanghu bShanghu)
|
||||
{
|
||||
public int updateBShanghu(BShanghu bShanghu) {
|
||||
if (bShanghu.getPosterId() != null) {
|
||||
BPoster bPoster = posterService.selectBPosterById(bShanghu.getPosterId());
|
||||
if (BeanUtil.isEmpty(bPoster)) {
|
||||
throw new ServiceException("所选广告不存在");
|
||||
}
|
||||
}
|
||||
bShanghu.setUpdateTime(DateUtils.getNowDate());
|
||||
return bShanghuMapper.updateBShanghu(bShanghu);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除商户
|
||||
*
|
||||
*
|
||||
* @param ids 需要删除的商户主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteBShanghuByIds(Long[] ids)
|
||||
{
|
||||
public int deleteBShanghuByIds(Long[] ids) {
|
||||
return bShanghuMapper.deleteBShanghuByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除商户信息
|
||||
*
|
||||
*
|
||||
* @param id 商户主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteBShanghuById(Long id)
|
||||
{
|
||||
public int deleteBShanghuById(Long id) {
|
||||
// 删除商户wifi
|
||||
netService.deleteBNetByShangHuId(id);
|
||||
return bShanghuMapper.deleteBShanghuById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 为商户批量填充广告
|
||||
*
|
||||
* @param posterId 广告id
|
||||
* @param shanghuIds 商户id集合
|
||||
*/
|
||||
@Override
|
||||
public void editPostIdByIds(Long posterId, List<Long> shanghuIds) {
|
||||
bShanghuMapper.editPostIdByIds(posterId, shanghuIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 为商户批量填充广告
|
||||
*
|
||||
* @param posterId 广告id
|
||||
* @param shanghuCity 商户城市
|
||||
* @param shanghuName 商户名称
|
||||
*/
|
||||
@Override
|
||||
public void editPostIdByReq(Long posterId, String shanghuCity, String shanghuName) {
|
||||
bShanghuMapper.editPostIdByReq(posterId, shanghuCity, shanghuName);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in new issue