租车用户管理
This commit is contained in:
@ -0,0 +1,127 @@
|
||||
package com.ruoyi.baseUser.controller;
|
||||
|
||||
import java.util.List;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.ModelMap;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.baseUser.domain.ZcBaseUser;
|
||||
import com.ruoyi.baseUser.service.IZcBaseUserService;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 租车用户信息Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-27
|
||||
*/
|
||||
@Controller
|
||||
@RequestMapping("/baseUser/user")
|
||||
public class ZcBaseUserController extends BaseController
|
||||
{
|
||||
private String prefix = "baseUser/user";
|
||||
|
||||
@Autowired
|
||||
private IZcBaseUserService zcBaseUserService;
|
||||
|
||||
@RequiresPermissions("baseUser:user:view")
|
||||
@GetMapping()
|
||||
public String user()
|
||||
{
|
||||
return prefix + "/user";
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询租车用户信息列表
|
||||
*/
|
||||
@RequiresPermissions("baseUser:user:list")
|
||||
@PostMapping("/list")
|
||||
@ResponseBody
|
||||
public TableDataInfo list(ZcBaseUser zcBaseUser)
|
||||
{
|
||||
startPage();
|
||||
List<ZcBaseUser> list = zcBaseUserService.selectZcBaseUserList(zcBaseUser);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出租车用户信息列表
|
||||
*/
|
||||
@RequiresPermissions("baseUser:user:export")
|
||||
@Log(title = "租车用户信息", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
@ResponseBody
|
||||
public AjaxResult export(ZcBaseUser zcBaseUser)
|
||||
{
|
||||
List<ZcBaseUser> list = zcBaseUserService.selectZcBaseUserList(zcBaseUser);
|
||||
ExcelUtil<ZcBaseUser> util = new ExcelUtil<ZcBaseUser>(ZcBaseUser.class);
|
||||
return util.exportExcel(list, "租车用户信息数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增租车用户信息
|
||||
*/
|
||||
@GetMapping("/add")
|
||||
public String add()
|
||||
{
|
||||
return prefix + "/add";
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增保存租车用户信息
|
||||
*/
|
||||
@RequiresPermissions("baseUser:user:add")
|
||||
@Log(title = "租车用户信息", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/add")
|
||||
@ResponseBody
|
||||
public AjaxResult addSave(ZcBaseUser zcBaseUser)
|
||||
{
|
||||
return toAjax(zcBaseUserService.insertZcBaseUser(zcBaseUser));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改租车用户信息
|
||||
*/
|
||||
@RequiresPermissions("baseUser:user:edit")
|
||||
@GetMapping("/edit/{id}")
|
||||
public String edit(@PathVariable("id") Long id, ModelMap mmap)
|
||||
{
|
||||
ZcBaseUser zcBaseUser = zcBaseUserService.selectZcBaseUserById(id);
|
||||
mmap.put("zcBaseUser", zcBaseUser);
|
||||
return prefix + "/edit";
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改保存租车用户信息
|
||||
*/
|
||||
@RequiresPermissions("baseUser:user:edit")
|
||||
@Log(title = "租车用户信息", businessType = BusinessType.UPDATE)
|
||||
@PostMapping("/edit")
|
||||
@ResponseBody
|
||||
public AjaxResult editSave(ZcBaseUser zcBaseUser)
|
||||
{
|
||||
return toAjax(zcBaseUserService.updateZcBaseUser(zcBaseUser));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除租车用户信息
|
||||
*/
|
||||
@RequiresPermissions("baseUser:user:remove")
|
||||
@Log(title = "租车用户信息", businessType = BusinessType.DELETE)
|
||||
@PostMapping( "/remove")
|
||||
@ResponseBody
|
||||
public AjaxResult remove(String ids)
|
||||
{
|
||||
return toAjax(zcBaseUserService.deleteZcBaseUserByIds(ids));
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,161 @@
|
||||
package com.ruoyi.baseUser.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;
|
||||
|
||||
/**
|
||||
* 租车用户信息对象 zc_base_user
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-27
|
||||
*/
|
||||
public class ZcBaseUser extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 用户id主键 */
|
||||
private Long id;
|
||||
|
||||
/** 用户名 */
|
||||
@Excel(name = "用户名")
|
||||
private String userName;
|
||||
|
||||
/** 头像 */
|
||||
private String avatarUrl;
|
||||
|
||||
/** 密码 */
|
||||
private String password;
|
||||
|
||||
/** 手机号 */
|
||||
@Excel(name = "手机号")
|
||||
private String phoneNumber;
|
||||
|
||||
/** 角色id */
|
||||
private Long roleId;
|
||||
|
||||
/** 昵称 */
|
||||
@Excel(name = "昵称")
|
||||
private String nickName;
|
||||
|
||||
/** 微信小程序 openid */
|
||||
@Excel(name = "微信小程序openid")
|
||||
private String wechatOpenid;
|
||||
|
||||
/** 支付宝小程序 userid */
|
||||
@Excel(name = "支付宝小程序userid")
|
||||
private String alipayUserid;
|
||||
|
||||
/** 删除标志(0代表存在 2代表删除) */
|
||||
private String delFlag;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setUserName(String userName)
|
||||
{
|
||||
this.userName = userName;
|
||||
}
|
||||
|
||||
public String getUserName()
|
||||
{
|
||||
return userName;
|
||||
}
|
||||
public void setAvatarUrl(String avatarUrl)
|
||||
{
|
||||
this.avatarUrl = avatarUrl;
|
||||
}
|
||||
|
||||
public String getAvatarUrl()
|
||||
{
|
||||
return avatarUrl;
|
||||
}
|
||||
public void setPassword(String password)
|
||||
{
|
||||
this.password = password;
|
||||
}
|
||||
|
||||
public String getPassword()
|
||||
{
|
||||
return password;
|
||||
}
|
||||
public void setPhoneNumber(String phoneNumber)
|
||||
{
|
||||
this.phoneNumber = phoneNumber;
|
||||
}
|
||||
|
||||
public String getPhoneNumber()
|
||||
{
|
||||
return phoneNumber;
|
||||
}
|
||||
public void setRoleId(Long roleId)
|
||||
{
|
||||
this.roleId = roleId;
|
||||
}
|
||||
|
||||
public Long getRoleId()
|
||||
{
|
||||
return roleId;
|
||||
}
|
||||
public void setNickName(String nickName)
|
||||
{
|
||||
this.nickName = nickName;
|
||||
}
|
||||
|
||||
public String getNickName()
|
||||
{
|
||||
return nickName;
|
||||
}
|
||||
public void setWechatOpenid(String wechatOpenid)
|
||||
{
|
||||
this.wechatOpenid = wechatOpenid;
|
||||
}
|
||||
|
||||
public String getWechatOpenid()
|
||||
{
|
||||
return wechatOpenid;
|
||||
}
|
||||
public void setAlipayUserid(String alipayUserid)
|
||||
{
|
||||
this.alipayUserid = alipayUserid;
|
||||
}
|
||||
|
||||
public String getAlipayUserid()
|
||||
{
|
||||
return alipayUserid;
|
||||
}
|
||||
public void setDelFlag(String delFlag)
|
||||
{
|
||||
this.delFlag = delFlag;
|
||||
}
|
||||
|
||||
public String getDelFlag()
|
||||
{
|
||||
return delFlag;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("userName", getUserName())
|
||||
.append("avatarUrl", getAvatarUrl())
|
||||
.append("password", getPassword())
|
||||
.append("phoneNumber", getPhoneNumber())
|
||||
.append("roleId", getRoleId())
|
||||
.append("nickName", getNickName())
|
||||
.append("wechatOpenid", getWechatOpenid())
|
||||
.append("alipayUserid", getAlipayUserid())
|
||||
.append("delFlag", getDelFlag())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,61 @@
|
||||
package com.ruoyi.baseUser.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.baseUser.domain.ZcBaseUser;
|
||||
|
||||
/**
|
||||
* 租车用户信息Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-27
|
||||
*/
|
||||
public interface ZcBaseUserMapper
|
||||
{
|
||||
/**
|
||||
* 查询租车用户信息
|
||||
*
|
||||
* @param id 租车用户信息主键
|
||||
* @return 租车用户信息
|
||||
*/
|
||||
public ZcBaseUser selectZcBaseUserById(Long id);
|
||||
|
||||
/**
|
||||
* 查询租车用户信息列表
|
||||
*
|
||||
* @param zcBaseUser 租车用户信息
|
||||
* @return 租车用户信息集合
|
||||
*/
|
||||
public List<ZcBaseUser> selectZcBaseUserList(ZcBaseUser zcBaseUser);
|
||||
|
||||
/**
|
||||
* 新增租车用户信息
|
||||
*
|
||||
* @param zcBaseUser 租车用户信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertZcBaseUser(ZcBaseUser zcBaseUser);
|
||||
|
||||
/**
|
||||
* 修改租车用户信息
|
||||
*
|
||||
* @param zcBaseUser 租车用户信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateZcBaseUser(ZcBaseUser zcBaseUser);
|
||||
|
||||
/**
|
||||
* 删除租车用户信息
|
||||
*
|
||||
* @param id 租车用户信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteZcBaseUserById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除租车用户信息
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteZcBaseUserByIds(String[] ids);
|
||||
}
|
||||
@ -0,0 +1,61 @@
|
||||
package com.ruoyi.baseUser.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.baseUser.domain.ZcBaseUser;
|
||||
|
||||
/**
|
||||
* 租车用户信息Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-27
|
||||
*/
|
||||
public interface IZcBaseUserService
|
||||
{
|
||||
/**
|
||||
* 查询租车用户信息
|
||||
*
|
||||
* @param id 租车用户信息主键
|
||||
* @return 租车用户信息
|
||||
*/
|
||||
public ZcBaseUser selectZcBaseUserById(Long id);
|
||||
|
||||
/**
|
||||
* 查询租车用户信息列表
|
||||
*
|
||||
* @param zcBaseUser 租车用户信息
|
||||
* @return 租车用户信息集合
|
||||
*/
|
||||
public List<ZcBaseUser> selectZcBaseUserList(ZcBaseUser zcBaseUser);
|
||||
|
||||
/**
|
||||
* 新增租车用户信息
|
||||
*
|
||||
* @param zcBaseUser 租车用户信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertZcBaseUser(ZcBaseUser zcBaseUser);
|
||||
|
||||
/**
|
||||
* 修改租车用户信息
|
||||
*
|
||||
* @param zcBaseUser 租车用户信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateZcBaseUser(ZcBaseUser zcBaseUser);
|
||||
|
||||
/**
|
||||
* 批量删除租车用户信息
|
||||
*
|
||||
* @param ids 需要删除的租车用户信息主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteZcBaseUserByIds(String ids);
|
||||
|
||||
/**
|
||||
* 删除租车用户信息信息
|
||||
*
|
||||
* @param id 租车用户信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteZcBaseUserById(Long id);
|
||||
}
|
||||
@ -0,0 +1,97 @@
|
||||
package com.ruoyi.baseUser.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.baseUser.mapper.ZcBaseUserMapper;
|
||||
import com.ruoyi.baseUser.domain.ZcBaseUser;
|
||||
import com.ruoyi.baseUser.service.IZcBaseUserService;
|
||||
import com.ruoyi.common.core.text.Convert;
|
||||
|
||||
/**
|
||||
* 租车用户信息Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-27
|
||||
*/
|
||||
@Service
|
||||
public class ZcBaseUserServiceImpl implements IZcBaseUserService
|
||||
{
|
||||
@Autowired
|
||||
private ZcBaseUserMapper zcBaseUserMapper;
|
||||
|
||||
/**
|
||||
* 查询租车用户信息
|
||||
*
|
||||
* @param id 租车用户信息主键
|
||||
* @return 租车用户信息
|
||||
*/
|
||||
@Override
|
||||
public ZcBaseUser selectZcBaseUserById(Long id)
|
||||
{
|
||||
return zcBaseUserMapper.selectZcBaseUserById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询租车用户信息列表
|
||||
*
|
||||
* @param zcBaseUser 租车用户信息
|
||||
* @return 租车用户信息
|
||||
*/
|
||||
@Override
|
||||
public List<ZcBaseUser> selectZcBaseUserList(ZcBaseUser zcBaseUser)
|
||||
{
|
||||
return zcBaseUserMapper.selectZcBaseUserList(zcBaseUser);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增租车用户信息
|
||||
*
|
||||
* @param zcBaseUser 租车用户信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertZcBaseUser(ZcBaseUser zcBaseUser)
|
||||
{
|
||||
zcBaseUser.setCreateTime(DateUtils.getNowDate());
|
||||
return zcBaseUserMapper.insertZcBaseUser(zcBaseUser);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改租车用户信息
|
||||
*
|
||||
* @param zcBaseUser 租车用户信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateZcBaseUser(ZcBaseUser zcBaseUser)
|
||||
{
|
||||
zcBaseUser.setUpdateTime(DateUtils.getNowDate());
|
||||
return zcBaseUserMapper.updateZcBaseUser(zcBaseUser);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除租车用户信息
|
||||
*
|
||||
* @param ids 需要删除的租车用户信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteZcBaseUserByIds(String ids)
|
||||
{
|
||||
return zcBaseUserMapper.deleteZcBaseUserByIds(Convert.toStrArray(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除租车用户信息信息
|
||||
*
|
||||
* @param id 租车用户信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteZcBaseUserById(Long id)
|
||||
{
|
||||
return zcBaseUserMapper.deleteZcBaseUserById(id);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,104 @@
|
||||
<?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">
|
||||
<mapper namespace="com.ruoyi.baseUser.mapper.ZcBaseUserMapper">
|
||||
|
||||
<resultMap type="ZcBaseUser" id="ZcBaseUserResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="userName" column="user_name" />
|
||||
<result property="avatarUrl" column="avatar_url" />
|
||||
<result property="password" column="password" />
|
||||
<result property="phoneNumber" column="phone_number" />
|
||||
<result property="roleId" column="role_id" />
|
||||
<result property="nickName" column="nick_name" />
|
||||
<result property="wechatOpenid" column="wechat_openid" />
|
||||
<result property="alipayUserid" column="alipay_userid" />
|
||||
<result property="delFlag" column="del_flag" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectZcBaseUserVo">
|
||||
select id, user_name, avatar_url, password, phone_number, role_id, nick_name, wechat_openid, alipay_userid, del_flag, create_time, update_time from zc_base_user
|
||||
</sql>
|
||||
|
||||
<select id="selectZcBaseUserList" parameterType="ZcBaseUser" resultMap="ZcBaseUserResult">
|
||||
<include refid="selectZcBaseUserVo"/>
|
||||
<where>
|
||||
<if test="userName != null and userName != ''"> and user_name like concat('%', #{userName}, '%')</if>
|
||||
<if test="avatarUrl != null and avatarUrl != ''"> and avatar_url = #{avatarUrl}</if>
|
||||
<if test="password != null and password != ''"> and password = #{password}</if>
|
||||
<if test="phoneNumber != null and phoneNumber != ''"> and phone_number = #{phoneNumber}</if>
|
||||
<if test="roleId != null "> and role_id = #{roleId}</if>
|
||||
<if test="nickName != null and nickName != ''"> and nick_name like concat('%', #{nickName}, '%')</if>
|
||||
<if test="wechatOpenid != null and wechatOpenid != ''"> and wechat_openid = #{wechatOpenid}</if>
|
||||
<if test="alipayUserid != null and alipayUserid != ''"> and alipay_userid = #{alipayUserid}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectZcBaseUserById" parameterType="Long" resultMap="ZcBaseUserResult">
|
||||
<include refid="selectZcBaseUserVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertZcBaseUser" parameterType="ZcBaseUser" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into zc_base_user
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="userName != null and userName != ''">user_name,</if>
|
||||
<if test="avatarUrl != null">avatar_url,</if>
|
||||
<if test="password != null and password != ''">password,</if>
|
||||
<if test="phoneNumber != null and phoneNumber != ''">phone_number,</if>
|
||||
<if test="roleId != null">role_id,</if>
|
||||
<if test="nickName != null">nick_name,</if>
|
||||
<if test="wechatOpenid != null">wechat_openid,</if>
|
||||
<if test="alipayUserid != null">alipay_userid,</if>
|
||||
<if test="delFlag != null">del_flag,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="userName != null and userName != ''">#{userName},</if>
|
||||
<if test="avatarUrl != null">#{avatarUrl},</if>
|
||||
<if test="password != null and password != ''">#{password},</if>
|
||||
<if test="phoneNumber != null and phoneNumber != ''">#{phoneNumber},</if>
|
||||
<if test="roleId != null">#{roleId},</if>
|
||||
<if test="nickName != null">#{nickName},</if>
|
||||
<if test="wechatOpenid != null">#{wechatOpenid},</if>
|
||||
<if test="alipayUserid != null">#{alipayUserid},</if>
|
||||
<if test="delFlag != null">#{delFlag},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateZcBaseUser" parameterType="ZcBaseUser">
|
||||
update zc_base_user
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="userName != null and userName != ''">user_name = #{userName},</if>
|
||||
<if test="avatarUrl != null">avatar_url = #{avatarUrl},</if>
|
||||
<if test="password != null and password != ''">password = #{password},</if>
|
||||
<if test="phoneNumber != null and phoneNumber != ''">phone_number = #{phoneNumber},</if>
|
||||
<if test="roleId != null">role_id = #{roleId},</if>
|
||||
<if test="nickName != null">nick_name = #{nickName},</if>
|
||||
<if test="wechatOpenid != null">wechat_openid = #{wechatOpenid},</if>
|
||||
<if test="alipayUserid != null">alipay_userid = #{alipayUserid},</if>
|
||||
<if test="delFlag != null">del_flag = #{delFlag},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteZcBaseUserById" parameterType="Long">
|
||||
delete from zc_base_user where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteZcBaseUserByIds" parameterType="String">
|
||||
delete from zc_base_user where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
</mapper>
|
||||
@ -61,6 +61,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<select id="selectCompanyList" parameterType="Company" resultMap="CompanyResult">
|
||||
<include refid="selectCompanyVo"/>
|
||||
<where>
|
||||
del_flag = 0
|
||||
<if test="id != null and id != ''"> and id = #{id}</if>
|
||||
<if test="companyName != null and companyName != ''"> and company_name like concat('%', #{companyName}, '%')</if>
|
||||
<if test="contactName != null and contactName != ''"> and contact_name like concat('%', #{contactName}, '%')</if>
|
||||
@ -108,7 +109,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
|
||||
<!-- 根据手机号查询运营商是否存在 -->
|
||||
<select id="checkPhoneUnique" parameterType="string" resultType="com.ruoyi.operation.domain.Company">
|
||||
SELECT * FROM zc_company WHERE phone = #{phone}
|
||||
SELECT * FROM zc_company WHERE del_flag = 0 AND phone = #{phone}
|
||||
</select>
|
||||
|
||||
<insert id="insertCompany" parameterType="Company" useGeneratedKeys="true" keyProperty="id">
|
||||
@ -269,7 +270,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</delete>
|
||||
|
||||
<delete id="deleteCompanyByIds" parameterType="String">
|
||||
delete from zc_company where id in
|
||||
update zc_company set del_flag = 2 where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
|
||||
@ -69,6 +69,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
from zc_company_store cs
|
||||
left join zc_company c on c.id = cs.operating_company_id
|
||||
<where>
|
||||
cs.del_flag = '0' and c.del_flag = '0'
|
||||
<if test="name != null and name != ''"> and cs.name like concat('%', #{name}, '%')</if>
|
||||
<if test="contactPerson != null and contactPerson != ''"> and cs.contact_person = #{contactPerson}</if>
|
||||
<if test="phone != null and phone != ''"> and cs.phone = #{phone}</if>
|
||||
@ -289,7 +290,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</delete>
|
||||
|
||||
<delete id="deleteCompanyStoreByIds" parameterType="String">
|
||||
delete from zc_company_store where id in
|
||||
update zc_company_store set del_flag = '2' where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
|
||||
@ -83,7 +83,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</select>
|
||||
|
||||
<select id="checkVinUnique" resultType="com.ruoyi.operation.domain.ZcCar">
|
||||
SELECT * FROM zc_car WHERE vin = #{vin}
|
||||
SELECT * FROM zc_car WHERE del_flag = 0 AND vin = #{vin}
|
||||
</select>
|
||||
|
||||
<insert id="insertZcCar" parameterType="ZcCar" useGeneratedKeys="true" keyProperty="id">
|
||||
@ -228,7 +228,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</delete>
|
||||
|
||||
<delete id="deleteZcCarByIds" parameterType="String">
|
||||
delete from zc_car where id in
|
||||
update zc_car set del_flag ='2' where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
|
||||
@ -130,17 +130,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</delete>
|
||||
|
||||
<delete id="deleteZcCarModelByIds" parameterType="String">
|
||||
delete from zc_car_model where id in
|
||||
update zc_car_model set del_flag = '2' where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<select id="selectAllBrands" resultType="string">
|
||||
SELECT DISTINCT brand_name FROM zc_car_model ORDER BY brand_name ASC
|
||||
SELECT DISTINCT brand_name FROM zc_car_model where del_flag = 0 ORDER BY brand_name ASC
|
||||
</select>
|
||||
|
||||
<select id="selectModelsByBrand" resultType="string">
|
||||
SELECT model_name FROM zc_car_model WHERE brand_name = #{brandName} ORDER BY model_name ASC
|
||||
SELECT model_name FROM zc_car_model WHERE del_flag = 0 and brand_name = #{brandName} ORDER BY model_name ASC
|
||||
</select>
|
||||
</mapper>
|
||||
@ -43,6 +43,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
from zc_rent_car_rule a
|
||||
left join zc_company c on c.id = a.operating_company_id
|
||||
<where>
|
||||
a.del_flag = '0' and c.del_flag = '0'
|
||||
<if test="ruleName != null and ruleName != ''"> and a.rule_name like concat('%', #{ruleName}, '%')</if>
|
||||
<if test="ruleCode != null and ruleCode != ''"> and a.rule_code = #{ruleCode}</if>
|
||||
<if test="rentalType != null and rentalType != ''"> and a.rental_type = #{rentalType}</if>
|
||||
@ -157,7 +158,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</delete>
|
||||
|
||||
<delete id="deleteZcRentCarRuleByIds" parameterType="String">
|
||||
delete from zc_rent_car_rule where id in
|
||||
update zc_rent_car_rule set del_flag = '2' where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
|
||||
@ -0,0 +1,62 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
|
||||
<head>
|
||||
<th:block th:include="include :: header('新增租车用户信息')" />
|
||||
</head>
|
||||
<body class="white-bg">
|
||||
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||
<form class="form-horizontal m" id="form-user-add">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">用户名:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="userName" class="form-control" type="text" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">密码:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="password" class="form-control" type="text" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">手机号:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="phoneNumber" class="form-control" type="text" required>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">昵称:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="nickName" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">微信小程序openid:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="wechatOpenid" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">支付宝小程序userid:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="alipayUserid" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<script th:inline="javascript">
|
||||
var prefix = ctx + "baseUser/user"
|
||||
$("#form-user-add").validate({
|
||||
focusCleanup: true
|
||||
});
|
||||
|
||||
function submitHandler() {
|
||||
if ($.validate.form()) {
|
||||
$.operate.save(prefix + "/add", $('#form-user-add').serialize());
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@ -0,0 +1,64 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
|
||||
<head>
|
||||
<th:block th:include="include :: header('修改租车用户信息')" />
|
||||
</head>
|
||||
<body class="white-bg">
|
||||
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||
<form class="form-horizontal m" id="form-user-edit" th:object="${zcBaseUser}">
|
||||
<input name="id" th:field="*{id}" type="hidden">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">用户名:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="userName" th:field="*{userName}" class="form-control" type="text" required>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">密码:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="password" th:field="*{password}" class="form-control" type="text" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">手机号:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="phoneNumber" th:field="*{phoneNumber}" class="form-control" type="text" required>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">昵称:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="nickName" th:field="*{nickName}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">微信小程序openid:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="wechatOpenid" th:field="*{wechatOpenid}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">支付宝小程序userid:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="alipayUserid" th:field="*{alipayUserid}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<script th:inline="javascript">
|
||||
var prefix = ctx + "baseUser/user";
|
||||
$("#form-user-edit").validate({
|
||||
focusCleanup: true
|
||||
});
|
||||
|
||||
function submitHandler() {
|
||||
if ($.validate.form()) {
|
||||
$.operate.save(prefix + "/edit", $('#form-user-edit').serialize());
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
113
ruoyi-admin/src/main/resources/templates/baseUser/user/user.html
Normal file
113
ruoyi-admin/src/main/resources/templates/baseUser/user/user.html
Normal file
@ -0,0 +1,113 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||
<head>
|
||||
<th:block th:include="include :: header('租车用户信息列表')" />
|
||||
</head>
|
||||
<body class="gray-bg">
|
||||
<div class="container-div">
|
||||
<div class="row">
|
||||
<div class="col-sm-12 search-collapse">
|
||||
<form id="formId">
|
||||
<div class="select-list">
|
||||
<ul>
|
||||
<li>
|
||||
<label>用户名:</label>
|
||||
<input type="text" name="userName"/>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<label>手机号:</label>
|
||||
<input type="text" name="phoneNumber"/>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<label>昵称:</label>
|
||||
<input type="text" name="nickName"/>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i> 搜索</a>
|
||||
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i> 重置</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="btn-group-sm" id="toolbar" role="group">
|
||||
<!-- <a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="baseUser:user:add">-->
|
||||
<!-- <i class="fa fa-plus"></i> 添加-->
|
||||
<!-- </a>-->
|
||||
<!-- <a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="baseUser:user:edit">-->
|
||||
<!-- <i class="fa fa-edit"></i> 修改-->
|
||||
<!-- </a>-->
|
||||
<!-- <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="baseUser:user:remove">-->
|
||||
<!-- <i class="fa fa-remove"></i> 删除-->
|
||||
<!-- </a>-->
|
||||
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="baseUser:user:export">
|
||||
<i class="fa fa-download"></i> 导出
|
||||
</a>
|
||||
</div>
|
||||
<div class="col-sm-12 select-table table-striped">
|
||||
<table id="bootstrap-table"></table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<script th:inline="javascript">
|
||||
var editFlag = [[${@permission.hasPermi('baseUser:user:edit')}]];
|
||||
var removeFlag = [[${@permission.hasPermi('baseUser:user:remove')}]];
|
||||
var prefix = ctx + "baseUser/user";
|
||||
|
||||
$(function() {
|
||||
var options = {
|
||||
url: prefix + "/list",
|
||||
createUrl: prefix + "/add",
|
||||
updateUrl: prefix + "/edit/{id}",
|
||||
removeUrl: prefix + "/remove",
|
||||
exportUrl: prefix + "/export",
|
||||
modalName: "租车用户信息",
|
||||
columns: [{
|
||||
checkbox: true
|
||||
},
|
||||
{
|
||||
field: 'id',
|
||||
title: '用户id主键',
|
||||
visible: false
|
||||
},
|
||||
{
|
||||
field: 'userName',
|
||||
title: '用户名'
|
||||
},
|
||||
{
|
||||
field: 'phoneNumber',
|
||||
title: '手机号'
|
||||
},
|
||||
{
|
||||
field: 'nickName',
|
||||
title: '昵称'
|
||||
},
|
||||
{
|
||||
field: 'wechatOpenid',
|
||||
title: '微信小程序'
|
||||
},
|
||||
{
|
||||
field: 'alipayUserid',
|
||||
title: '支付宝小程序'
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
align: 'center',
|
||||
formatter: function(value, row, index) {
|
||||
var actions = [];
|
||||
// actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
|
||||
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>');
|
||||
return actions.join('');
|
||||
}
|
||||
}]
|
||||
};
|
||||
$.table.init(options);
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@ -4,7 +4,7 @@
|
||||
<th:block th:include="include :: header('新增门店')" />
|
||||
<th:block th:include="include :: datetimepicker-css" />
|
||||
<th:block th:include="include :: bootstrap-fileinput-css" />
|
||||
<script src="https://map.qq.com/api/gljs?v=1.exp&key=XG7BZ-WIZ34-E4PUJ-FQFQF-P6PSS-MMBP2"></script>
|
||||
<script src="https://map.qq.com/api/gljs?v=1.exp&key=GPYBZ-Q4TY3-MWZ3S-OO6TP-5GA43-I4BRH"></script>
|
||||
</head>
|
||||
<body class="white-bg">
|
||||
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
<th:block th:include="include :: header('修改门店')" />
|
||||
<th:block th:include="include :: datetimepicker-css" />
|
||||
<th:block th:include="include :: bootstrap-fileinput-css" />
|
||||
<script src="https://map.qq.com/api/gljs?v=1.exp&key=XG7BZ-WIZ34-E4PUJ-FQFQF-P6PSS-MMBP2"></script>
|
||||
<script src="https://map.qq.com/api/gljs?v=1.exp&key=GPYBZ-Q4TY3-MWZ3S-OO6TP-5GA43-I4BRH"></script>
|
||||
</head>
|
||||
<body class="white-bg">
|
||||
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||
|
||||
Reference in New Issue
Block a user