app用户信息完善

main
linhw 2024-04-23 15:51:13 +08:00
parent f0e5266140
commit 24da9e70e3
4 changed files with 204 additions and 293 deletions

View File

@ -3,6 +3,9 @@ package com.ruoyi.app.controller;
import java.util.List;
import java.io.IOException;
import javax.servlet.http.HttpServletResponse;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
@ -30,6 +33,7 @@ import com.ruoyi.common.core.web.page.TableDataInfo;
*/
@RestController
@RequestMapping("/user")
@Api(tags = "app用户信息" , description = "app用户信息")
public class AppUserController extends BaseController
{
@Autowired
@ -40,6 +44,7 @@ public class AppUserController extends BaseController
*/
@RequiresPermissions("app:user:list")
@GetMapping("/list")
@ApiOperation(value = "app用户列表", notes = "app用户列表", httpMethod = "GET")
public TableDataInfo list(AppUser appUser)
{
startPage();
@ -53,6 +58,7 @@ public class AppUserController extends BaseController
@RequiresPermissions("app:user:export")
@Log(title = "app用户", businessType = BusinessType.EXPORT)
@PostMapping("/export")
@ApiOperation(value = "导出用户", notes = "导出用户", httpMethod = "POST")
public void export(HttpServletResponse response, AppUser appUser)
{
List<AppUser> list = appUserService.selectAppUserList(appUser);
@ -65,6 +71,7 @@ public class AppUserController extends BaseController
*/
@RequiresPermissions("app:user:query")
@GetMapping(value = "/{id}")
@ApiOperation(value = "获取app用户详细信息", notes = "获取app用户详细信息", httpMethod = "GET")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return success(appUserService.selectAppUserById(id));
@ -76,6 +83,7 @@ public class AppUserController extends BaseController
@RequiresPermissions("app:user:add")
@Log(title = "app用户", businessType = BusinessType.INSERT)
@PostMapping("/add")
@ApiOperation(value = "新增app用户", notes = "新增app用户", httpMethod = "POST")
public AjaxResult add(@RequestBody AppUser appUser)
{
return toAjax(appUserService.insertAppUser(appUser));
@ -87,6 +95,7 @@ public class AppUserController extends BaseController
@RequiresPermissions("app:user:edit")
@Log(title = "app用户", businessType = BusinessType.UPDATE)
@PutMapping("/edit")
@ApiOperation(value = "修改app用户信息", notes = "修改app用户信息", httpMethod = "PUT")
public AjaxResult edit(@RequestBody AppUser appUser)
{
return toAjax(appUserService.updateAppUser(appUser));
@ -98,6 +107,7 @@ public class AppUserController extends BaseController
@RequiresPermissions("app:user:remove")
@Log(title = "app用户", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
@ApiOperation(value = "批量删除app用户", notes = "批量删除app用户", httpMethod = "DELETE")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(appUserService.deleteAppUserByIds(ids));

View File

@ -112,6 +112,43 @@ public class AppUser extends BaseEntity
@Excel(name = "技能标签,多个用,逗号隔开")
private String skills;
/** 0:男1女 */
@Excel(name = "0:男1女")
private Long sex;
/** 出生年月 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "出生年月", width = 30, dateFormat = "yyyy-MM-dd")
private Date birthday;
/** 共享资源 */
@Excel(name = "共享资源")
private String shareResource;
/** 是否是技术人员0是1否 */
@Excel(name = "是否是技术人员0是1否")
private Long isTech;
/** 创业想法 */
@Excel(name = "创业想法")
private String idea;
/** 是否是合伙人,0是1否 */
@Excel(name = "是否是合伙人,0是1否")
private Long isPartner;
/** 业余爱好 */
@Excel(name = "业余爱好")
private String hobby;
/** 生活城市 */
@Excel(name = "生活城市")
private String city;
/** 其他信息 */
@Excel(name = "其他信息")
private String other;
public void setId(Long id)
{
this.id = id;
@ -318,6 +355,88 @@ public class AppUser extends BaseEntity
return skills;
}
public void setSex(Long sex)
{
this.sex = sex;
}
public Long getSex()
{
return sex;
}
public void setBirthday(Date birthday)
{
this.birthday = birthday;
}
public Date getBirthday()
{
return birthday;
}
public void setShareResource(String shareResource)
{
this.shareResource = shareResource;
}
public String getShareResource()
{
return shareResource;
}
public void setIsTech(Long isTech)
{
this.isTech = isTech;
}
public Long getIsTech()
{
return isTech;
}
public void setIdea(String idea)
{
this.idea = idea;
}
public String getIdea()
{
return idea;
}
public void setIsPartner(Long isPartner)
{
this.isPartner = isPartner;
}
public Long getIsPartner()
{
return isPartner;
}
public void setHobby(String hobby)
{
this.hobby = hobby;
}
public String getHobby()
{
return hobby;
}
public void setCity(String city)
{
this.city = city;
}
public String getCity()
{
return city;
}
public void setOther(String other)
{
this.other = other;
}
public String getOther()
{
return other;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
@ -345,6 +464,15 @@ public class AppUser extends BaseEntity
.append("skillId", getSkillId())
.append("jobContent", getJobContent())
.append("type", getType())
.append("sex", getSex())
.append("birthday", getBirthday())
.append("shareResource", getShareResource())
.append("isTech", getIsTech())
.append("idea", getIdea())
.append("isPartner", getIsPartner())
.append("hobby", getHobby())
.append("city", getCity())
.append("other", getOther())
.toString();
}
}

View File

@ -1,6 +1,7 @@
package com.ruoyi.app.domain.vo;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.app.domain.AppUser;
import com.ruoyi.app.domain.UserSkill;
import com.ruoyi.common.core.annotation.Excel;
import com.ruoyi.common.core.web.domain.BaseEntity;
@ -16,305 +17,14 @@ import java.util.List;
* @author wyh
* @date 2024-04-23
*/
public class AppUserVo extends BaseEntity
public class AppUserVo extends AppUser
{
private static final long serialVersionUID = 1L;
/** 用户ID */
private Long id;
/** 用户名 */
@Excel(name = "用户名")
private String username;
/** 密码 */
@Excel(name = "密码")
private String password;
/** 昵称 */
@Excel(name = "昵称")
private String nickname;
/** 邮箱 */
@Excel(name = "邮箱")
private String email;
/** 电话 */
@Excel(name = "电话")
private String phone;
/** 地址 */
@Excel(name = "地址")
private String address;
/** 头像 */
@Excel(name = "头像")
private String avatarUrl;
/** 学历 */
@Excel(name = "学历")
private String education;
/** 学校 */
@Excel(name = "学校")
private Long school;
/** 专业 */
@Excel(name = "专业")
private String major;
/** 学历开始时间 */
@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 experience;
/** 公司名称 */
@Excel(name = "公司名称")
private String companyName;
/** 行业 */
@Excel(name = "行业")
private String industry;
/** 在职时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "在职时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date jobTime;
/** 职位名称 */
@Excel(name = "职位名称")
private String jobName;
/** 职位类别 */
@Excel(name = "职位类别")
private String jobType;
/** 技能id */
@Excel(name = "技能id")
private Long skillId;
/** 工作内容 */
@Excel(name = "工作内容")
private String jobContent;
/** 权限0公开1私密 */
@Excel(name = "权限0公开1私密")
private Long type;
@Excel(name = "学校名称")
private String schoolName;
private List<UserSkill> userSkillList;
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 setPassword(String password)
{
this.password = password;
}
public String getPassword()
{
return password;
}
public void setNickname(String nickname)
{
this.nickname = nickname;
}
public String getNickname()
{
return nickname;
}
public void setEmail(String email)
{
this.email = email;
}
public String getEmail()
{
return email;
}
public void setPhone(String phone)
{
this.phone = phone;
}
public String getPhone()
{
return phone;
}
public void setAddress(String address)
{
this.address = address;
}
public String getAddress()
{
return address;
}
public void setAvatarUrl(String avatarUrl)
{
this.avatarUrl = avatarUrl;
}
public String getAvatarUrl()
{
return avatarUrl;
}
public void setEducation(String education)
{
this.education = education;
}
public String getEducation()
{
return education;
}
public void setSchool(Long school)
{
this.school = school;
}
public Long getSchool()
{
return school;
}
public void setMajor(String major)
{
this.major = major;
}
public String getMajor()
{
return major;
}
public void setStartTime(Date startTime)
{
this.startTime = startTime;
}
public Date getStartTime()
{
return startTime;
}
public void setEndTime(Date endTime)
{
this.endTime = endTime;
}
public Date getEndTime()
{
return endTime;
}
public void setExperience(String experience)
{
this.experience = experience;
}
public String getExperience()
{
return experience;
}
public void setCompanyName(String companyName)
{
this.companyName = companyName;
}
public String getCompanyName()
{
return companyName;
}
public void setIndustry(String industry)
{
this.industry = industry;
}
public String getIndustry()
{
return industry;
}
public void setJobTime(Date jobTime)
{
this.jobTime = jobTime;
}
public Date getJobTime()
{
return jobTime;
}
public void setJobName(String jobName)
{
this.jobName = jobName;
}
public String getJobName()
{
return jobName;
}
public void setJobType(String jobType)
{
this.jobType = jobType;
}
public String getJobType()
{
return jobType;
}
public void setSkillId(Long skillId)
{
this.skillId = skillId;
}
public Long getSkillId()
{
return skillId;
}
public void setJobContent(String jobContent)
{
this.jobContent = jobContent;
}
public String getJobContent()
{
return jobContent;
}
public void setType(Long type)
{
this.type = type;
}
public Long getType()
{
return type;
}
public void setUserSkillList(List<UserSkill> userSkillList) {
this.userSkillList = userSkillList;
}
@ -358,7 +68,17 @@ public class AppUserVo extends BaseEntity
.append("skillId", getSkillId())
.append("jobContent", getJobContent())
.append("type", getType())
.append("schoolName",getSchoolName())
.append("userSkillList", getUserSkillList())
.append("sex", getSex())
.append("birthday", getBirthday())
.append("shareResource", getShareResource())
.append("isTech", getIsTech())
.append("idea", getIdea())
.append("isPartner", getIsPartner())
.append("hobby", getHobby())
.append("city", getCity())
.append("other", getOther())
.toString();
}
}

View File

@ -29,6 +29,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="skillId" column="skill_id" />
<result property="jobContent" column="job_content" />
<result property="type" column="type" />
<result property="sex" column="sex" />
<result property="birthday" column="birthday" />
<result property="shareResource" column="share_resource" />
<result property="isTech" column="is_tech" />
<result property="idea" column="idea" />
<result property="isPartner" column="is_partner" />
<result property="hobby" column="hobby" />
<result property="city" column="city" />
<result property="other" column="other" />
</resultMap>
<sql id="appUserColumns">
a.id as "id",
@ -54,7 +63,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
a.job_type as "jobType",
a.skill_id as "skillId",
a.job_content as "jobContent",
a.type as "type"
a.type as "type",
a.sex as "sex",
a.birthday as "birthday",
a.share_resource as "shareResource",
a.is_tech as "isTech",
a.idea as "idea",
a.is_partner as "isPartner",
a.hobby as "hobby",
a.other as "other"
</sql>
<sql id="selectAppUserVo">
@ -85,6 +102,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="skillId != null and skillId != ''"> and skill_id = #{skillId}</if>
<if test="jobContent != null and jobContent != ''"> and job_content = #{jobContent}</if>
<if test="type != null "> and type = #{type}</if>
<if test="sex != null "> and sex = #{sex}</if>
<if test="birthday != null "> and birthday = #{birthday}</if>
<if test="shareResource != null and shareResource != ''"> and share_resource = #{shareResource}</if>
<if test="isTech != null "> and is_tech = #{isTech}</if>
<if test="idea != null and idea != ''"> and idea = #{idea}</if>
<if test="isPartner != null "> and is_partner = #{isPartner}</if>
<if test="hobby != null and hobby != ''"> and hobby = #{hobby}</if>
<if test="city != null and city != ''"> and city = #{city}</if>
<if test="other != null and other != ''"> and other = #{other}</if>
</where>
</select>
@ -123,6 +149,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="skillId != null">skill_id,</if>
<if test="jobContent != null">job_content,</if>
<if test="type != null">type,</if>
<if test="sex != null">sex,</if>
<if test="birthday != null">birthday,</if>
<if test="shareResource != null">share_resource,</if>
<if test="isTech != null">is_tech,</if>
<if test="idea != null">idea,</if>
<if test="isPartner != null">is_partner,</if>
<if test="hobby != null">hobby,</if>
<if test="city != null">city,</if>
<if test="other != null">other,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="username != null">#{username},</if>
@ -148,6 +183,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="skillId != null">#{skillId},</if>
<if test="jobContent != null">#{jobContent},</if>
<if test="type != null">#{type},</if>
<if test="sex != null">#{sex},</if>
<if test="birthday != null">#{birthday},</if>
<if test="shareResource != null">#{shareResource},</if>
<if test="isTech != null">#{isTech},</if>
<if test="idea != null">#{idea},</if>
<if test="isPartner != null">#{isPartner},</if>
<if test="hobby != null">#{hobby},</if>
<if test="city != null">#{city},</if>
<if test="other != null">#{other},</if>
</trim>
</insert>
@ -177,6 +221,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="skillId != null">skill_id = #{skillId},</if>
<if test="jobContent != null">job_content = #{jobContent},</if>
<if test="type != null">type = #{type},</if>
<if test="sex != null">sex = #{sex},</if>
<if test="birthday != null">birthday = #{birthday},</if>
<if test="shareResource != null">share_resource = #{shareResource},</if>
<if test="isTech != null">is_tech = #{isTech},</if>
<if test="idea != null">idea = #{idea},</if>
<if test="isPartner != null">is_partner = #{isPartner},</if>
<if test="hobby != null">hobby = #{hobby},</if>
<if test="city != null">city = #{city},</if>
<if test="other != null">other = #{other},</if>
</trim>
where id = #{id}
</update>