加字段

This commit is contained in:
Jerry Yan 2025-04-07 12:16:59 +08:00
parent 52d0c4bc36
commit 79ea08898b
3 changed files with 15 additions and 5 deletions

View File

@ -12,6 +12,7 @@ public class ScenicAccountEntity {
private Long scenicId;
private Integer isSuper;
private String name;
private String phone;
private String account;
private String password;
private Integer status;

View File

@ -19,6 +19,9 @@ public class ScenicAccountReqQuery extends BaseQueryParameterReq {
@ApiModelProperty("账号名称")
private String account;
@ApiModelProperty("手机号")
private String phone;
@ApiModelProperty("账号状态1启用/0关闭")
private Integer status;

View File

@ -2,8 +2,8 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.ycwl.basic.mapper.ScenicAccountMapper">
<insert id="add">
insert into scenic_account(id, scenic_id, is_super, name, account, password, create_time, update_time)
values (#{id}, #{scenicId}, #{isSuper}, #{name}, #{account}, #{password}, now(), now())
insert into scenic_account(id, scenic_id, is_super, name, phone, account, password, create_time, update_time)
values (#{id}, #{scenicId}, #{isSuper}, #{name}, #{phone}, #{account}, #{password}, now(), now())
</insert>
<update id="update">
update scenic_account
@ -11,6 +11,9 @@
<if test="name != null and name != ''">
name = #{name},
</if>
<if test="phone != null and phone != ''">
phone = #{phone},
</if>
<if test="account != null and account != ''">
account = #{account},
</if>
@ -40,12 +43,12 @@
</delete>
<select id="getSuperAccountOfScenic"
resultType="com.ycwl.basic.model.pc.scenic.entity.ScenicAccountEntity">
select id, scenic_id, is_super, name, account, password, create_time, update_time
select id, scenic_id, is_super, name, phone, account, password, create_time, update_time
from scenic_account
where scenic_id = #{scenicId} and is_super = 1
</select>
<select id="getByAccount" resultType="com.ycwl.basic.model.pc.scenic.entity.ScenicAccountEntity">
select id, scenic_id, is_super, name, account, password, status,create_time, update_time
select id, scenic_id, is_super, name, phone, account, password, status,create_time, update_time
from scenic_account
where account = #{account}
</select>
@ -60,9 +63,12 @@
<if test="scenicId != null">
AND scenic_id = #{scenicId}
</if>
<if test="account != null">
<if test="account != null and account != ''">
AND account LIKE CONCAT('%', #{account}, '%')
</if>
<if test="phone != null and phone != ''">
AND phone LIKE CONCAT('%', #{phone}, '%')
</if>
<if test="status != null">
AND status = #{status}
</if>