修改历史表分页查询搜索条件商户id

master
吴顺杰 1 year ago
parent 336e930833
commit 728c5cfd0f

@ -1,45 +1,61 @@
<?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">
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.system.mapper.BNetHistoryMapper">
<resultMap type="BNetHistory" id="BNetHistoryResult">
<result property="id" column="id" />
<result property="isTrue" column="is_true" />
<result property="netId" column="net_id" />
<result property="netName" column="net_name" />
<result property="wifiName" column="wifi_name" />
<result property="wifiPass" column="wifi_pass" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="remark" column="remark" />
<result property="id" column="id"/>
<result property="isTrue" column="is_true"/>
<result property="shanghuId" column="shanghu_id"/>
<result property="netId" column="net_id"/>
<result property="netName" column="net_name"/>
<result property="wifiName" column="wifi_name"/>
<result property="wifiPass" column="wifi_pass"/>
<result property="createBy" column="create_by"/>
<result property="createTime" column="create_time"/>
<result property="updateBy" column="update_by"/>
<result property="updateTime" column="update_time"/>
<result property="remark" column="remark"/>
</resultMap>
<sql id="selectBNetHistoryVo">
select id, is_true, net_id, net_name, wifi_name, wifi_pass, create_by, create_time, update_by, update_time, remark from b_net_history
select id,
is_true,
shanghu_id,
net_id,
net_name,
wifi_name,
wifi_pass,
create_by,
create_time,
update_by,
update_time,
remark
from b_net_history
</sql>
<select id="selectBNetHistoryList" parameterType="BNetHistory" resultMap="BNetHistoryResult">
<include refid="selectBNetHistoryVo"/>
<where>
<if test="isTrue != null "> and is_true = #{isTrue}</if>
<if test="netName != null and netName != ''"> and net_name like concat('%', #{netName}, '%')</if>
<where>
<if test="isTrue != null ">and is_true = #{isTrue}</if>
<if test="shanghuId != null ">and shanghu_id = #{shanghuId}</if>
<if test="netName != null and netName != ''">and net_name like concat('%', #{netName}, '%')</if>
</where>
</select>
<select id="selectBNetHistoryById" parameterType="Long" resultMap="BNetHistoryResult">
<include refid="selectBNetHistoryVo"/>
where id = #{id}
</select>
<insert id="insertBNetHistory" parameterType="com.ruoyi.system.domain.BNetHistory" useGeneratedKeys="true" keyProperty="id">
<insert id="insertBNetHistory" parameterType="com.ruoyi.system.domain.BNetHistory" useGeneratedKeys="true"
keyProperty="id">
insert into b_net_history
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="isTrue != null">is_true,</if>
<if test="netId != null">net_id,</if>
<if test="shanghuId != null">shanghu_id,</if>
<if test="netName != null and netName != ''">net_name,</if>
<if test="wifiName != null and wifiName != ''">wifi_name,</if>
<if test="wifiPass != null and wifiPass != ''">wifi_pass,</if>
@ -48,10 +64,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="remark != null">remark,</if>
</trim>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="isTrue != null">#{isTrue},</if>
<if test="netId != null">#{netId},</if>
<if test="shanghuId != null">#{shanghuId},</if>
<if test="netName != null and netName != ''">#{netName},</if>
<if test="wifiName != null and wifiName != ''">#{wifiName},</if>
<if test="wifiPass != null and wifiPass != ''">#{wifiPass},</if>
@ -60,7 +77,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="remark != null">#{remark},</if>
</trim>
</trim>
</insert>
<update id="updateBNetHistory" parameterType="BNetHistory">
@ -68,6 +85,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<trim prefix="SET" suffixOverrides=",">
<if test="isTrue != null">is_true = #{isTrue},</if>
<if test="netId != null">net_id = #{netId},</if>
<if test="shanghuId != null">shanghu_id = #{shanghuId},</if>
<if test="netName != null and netName != ''">net_name = #{netName},</if>
<if test="wifiName != null and wifiName != ''">wifi_name = #{wifiName},</if>
<if test="wifiPass != null and wifiPass != ''">wifi_pass = #{wifiPass},</if>
@ -81,11 +99,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</update>
<delete id="deleteBNetHistoryById" parameterType="Long">
delete from b_net_history where id = #{id}
delete
from b_net_history
where id = #{id}
</delete>
<delete id="deleteBNetHistoryByIds" parameterType="String">
delete from b_net_history where id in
delete from b_net_history where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>

@ -1,46 +1,63 @@
<?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">
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.system.mapper.BPosterHistoryMapper">
<resultMap type="BPosterHistory" id="BPosterHistoryResult">
<result property="id" column="id" />
<result property="posterId" column="poster_id" />
<result property="posterName" column="poster_name" />
<result property="startTime" column="start_time" />
<result property="endTime" column="end_time" />
<result property="videoPath" column="video_path" />
<result property="videoLogo" column="video_logo" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="remark" column="remark" />
<result property="id" column="id"/>
<result property="posterId" column="poster_id"/>
<result property="shanghuId" column="shanghu_id"/>
<result property="posterName" column="poster_name"/>
<result property="startTime" column="start_time"/>
<result property="endTime" column="end_time"/>
<result property="videoPath" column="video_path"/>
<result property="videoLogo" column="video_logo"/>
<result property="createBy" column="create_by"/>
<result property="createTime" column="create_time"/>
<result property="updateBy" column="update_by"/>
<result property="updateTime" column="update_time"/>
<result property="remark" column="remark"/>
</resultMap>
<sql id="selectBPosterHistoryVo">
select id, poster_id, poster_name, start_time, end_time, video_path, video_logo, create_by, create_time, update_by, update_time, remark from b_poster_history
select id,
poster_id,
shanghu_id,
poster_name,
start_time,
end_time,
video_path,
video_logo,
create_by,
create_time,
update_by,
update_time,
remark
from b_poster_history
</sql>
<select id="selectBPosterHistoryList" parameterType="BPosterHistory" resultMap="BPosterHistoryResult">
<include refid="selectBPosterHistoryVo"/>
<where>
<if test="posterName != null and posterName != ''"> and poster_name like concat('%', #{posterName}, '%')</if>
<if test="startTime != null "> and start_time = #{startTime}</if>
<if test="endTime != null "> and end_time = #{endTime}</if>
<where>
<if test="posterName != null and posterName != ''">and poster_name like concat('%', #{posterName}, '%')
</if>
<if test="startTime != null ">and start_time = #{startTime}</if>
<if test="shanghuId != null ">and shanghu_id = #{shanghuId}</if>
<if test="endTime != null ">and end_time = #{endTime}</if>
</where>
</select>
<select id="selectBPosterHistoryById" parameterType="Long" resultMap="BPosterHistoryResult">
<include refid="selectBPosterHistoryVo"/>
where id = #{id}
</select>
<insert id="insertBPosterHistory" parameterType="BPosterHistory" useGeneratedKeys="true" keyProperty="id">
insert into b_poster_history
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="posterId != null">poster_id,</if>
<if test="shanghuId != null">shanghu_id,</if>
<if test="posterName != null and posterName != ''">poster_name,</if>
<if test="startTime != null">start_time,</if>
<if test="endTime != null">end_time,</if>
@ -51,9 +68,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="remark != null">remark,</if>
</trim>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="posterId != null">#{posterId},</if>
<if test="shanghuId != null">#{shanghuId},</if>
<if test="posterName != null and posterName != ''">#{posterName},</if>
<if test="startTime != null">#{startTime},</if>
<if test="endTime != null">#{endTime},</if>
@ -64,13 +82,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="remark != null">#{remark},</if>
</trim>
</trim>
</insert>
<update id="updateBPosterHistory" parameterType="BPosterHistory">
update b_poster_history
<trim prefix="SET" suffixOverrides=",">
<if test="posterId != null">poster_id = #{posterId},</if>
<if test="shanghuId != null">shanghu_id = #{shanghuId},</if>
<if test="posterName != null and posterName != ''">poster_name = #{posterName},</if>
<if test="startTime != null">start_time = #{startTime},</if>
<if test="endTime != null">end_time = #{endTime},</if>
@ -86,11 +105,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</update>
<delete id="deleteBPosterHistoryById" parameterType="Long">
delete from b_poster_history where id = #{id}
delete
from b_poster_history
where id = #{id}
</delete>
<delete id="deleteBPosterHistoryByIds" parameterType="String">
delete from b_poster_history where id in
delete from b_poster_history where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>

@ -2,11 +2,10 @@ package com.ruoyi.common.core.domain.model;
/**
*
*
*
* @author ruoyi
*/
public class LoginBody
{
public class LoginBody {
/**
*
*/
@ -27,43 +26,35 @@ public class LoginBody
*/
private String uuid;
public String getUsername()
{
public String getUsername() {
return username;
}
public void setUsername(String username)
{
public void setUsername(String username) {
this.username = username;
}
public String getPassword()
{
public String getPassword() {
return password;
}
public void setPassword(String password)
{
public void setPassword(String password) {
this.password = password;
}
public String getCode()
{
public String getCode() {
return code;
}
public void setCode(String code)
{
public void setCode(String code) {
this.code = code;
}
public String getUuid()
{
public String getUuid() {
return uuid;
}
public void setUuid(String uuid)
{
public void setUuid(String uuid) {
this.uuid = uuid;
}
}

@ -1,11 +1,62 @@
package com.ruoyi.common.core.domain.model;
import com.ruoyi.common.annotation.Excel;
/**
*
*
*
* @author ruoyi
*/
public class RegisterBody extends LoginBody
{
public class RegisterBody extends LoginBody {
/**
*
*/
@Excel(name = "商户名称")
private String posName;
/**
*
*/
@Excel(name = "城市")
private String city;
/**
*
*/
@Excel(name = "地址信息")
private String address;
@Override
public String toString() {
return "RegisterBody{" +
"posName='" + posName + '\'' +
", city='" + city + '\'' +
", address='" + address + '\'' +
'}';
}
public String getPosName() {
return posName;
}
public void setPosName(String posName) {
this.posName = posName;
}
public String getCity() {
return city;
}
public void setCity(String city) {
this.city = city;
}
public String getAddress() {
return address;
}
public void setAddress(String address) {
this.address = address;
}
}

@ -20,6 +20,7 @@ import com.ruoyi.system.service.ISysUserService;
import org.springframework.stereotype.Component;
import javax.annotation.Resource;
import java.util.Date;
/**
*
@ -45,7 +46,7 @@ public class SysRegisterService {
*
*/
public String register(RegisterBody registerBody) {
String msg = "" , username = registerBody.getUsername(), password = registerBody.getPassword();
String msg = "", username = registerBody.getUsername(), password = registerBody.getPassword();
SysUser sysUser = new SysUser();
sysUser.setUserName(username);
@ -80,10 +81,12 @@ public class SysRegisterService {
} else {
// 添加商户
SysShanghu shangHu = new SysShanghu();
shangHu.setAddress(sysUser.getAddress());
shangHu.setPosName(sysUser.getPosName());
shangHu.setAddress(registerBody.getAddress());
shangHu.setCity(registerBody.getCity());
shangHu.setPosName(registerBody.getPosName());
shangHu.setPhoneNumber(sysUser.getUserName());
shangHu.setLinkMan(sysUser.getNickName());
shangHu.setCreateTime(new Date());
shanghuMapper.insertBShanghu(shangHu);
AsyncManager.me().execute(AsyncFactory.recordLogininfor(username, Constants.REGISTER, MessageUtils.message("user.register.success")));
}

Loading…
Cancel
Save