From 24da9e70e339d5e42c0ba2a2656da7b59248f2e0 Mon Sep 17 00:00:00 2001 From: linhw <5331581+linhw11@user.noreply.gitee.com> Date: Tue, 23 Apr 2024 15:51:13 +0800 Subject: [PATCH] =?UTF-8?q?app=E7=94=A8=E6=88=B7=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E5=AE=8C=E5=96=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../app/controller/AppUserController.java | 10 + .../java/com/ruoyi/app/domain/AppUser.java | 128 ++++++++ .../com/ruoyi/app/domain/vo/AppUserVo.java | 304 +----------------- .../resources/mapper/app/AppUserMapper.xml | 55 +++- 4 files changed, 204 insertions(+), 293 deletions(-) diff --git a/gan-modules/ruoyi-gan/src/main/java/com/ruoyi/app/controller/AppUserController.java b/gan-modules/ruoyi-gan/src/main/java/com/ruoyi/app/controller/AppUserController.java index da6a989..41bbf29 100644 --- a/gan-modules/ruoyi-gan/src/main/java/com/ruoyi/app/controller/AppUserController.java +++ b/gan-modules/ruoyi-gan/src/main/java/com/ruoyi/app/controller/AppUserController.java @@ -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 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)); diff --git a/gan-modules/ruoyi-gan/src/main/java/com/ruoyi/app/domain/AppUser.java b/gan-modules/ruoyi-gan/src/main/java/com/ruoyi/app/domain/AppUser.java index 23451cd..560be43 100644 --- a/gan-modules/ruoyi-gan/src/main/java/com/ruoyi/app/domain/AppUser.java +++ b/gan-modules/ruoyi-gan/src/main/java/com/ruoyi/app/domain/AppUser.java @@ -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(); } } diff --git a/gan-modules/ruoyi-gan/src/main/java/com/ruoyi/app/domain/vo/AppUserVo.java b/gan-modules/ruoyi-gan/src/main/java/com/ruoyi/app/domain/vo/AppUserVo.java index 0cdc8d2..2b6e98c 100644 --- a/gan-modules/ruoyi-gan/src/main/java/com/ruoyi/app/domain/vo/AppUserVo.java +++ b/gan-modules/ruoyi-gan/src/main/java/com/ruoyi/app/domain/vo/AppUserVo.java @@ -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 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 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(); } } diff --git a/gan-modules/ruoyi-gan/src/main/resources/mapper/app/AppUserMapper.xml b/gan-modules/ruoyi-gan/src/main/resources/mapper/app/AppUserMapper.xml index aedc61b..f5538cb 100644 --- a/gan-modules/ruoyi-gan/src/main/resources/mapper/app/AppUserMapper.xml +++ b/gan-modules/ruoyi-gan/src/main/resources/mapper/app/AppUserMapper.xml @@ -29,6 +29,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + + + + + + + + + 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" @@ -85,6 +102,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" and skill_id = #{skillId} and job_content = #{jobContent} and type = #{type} + and sex = #{sex} + and birthday = #{birthday} + and share_resource = #{shareResource} + and is_tech = #{isTech} + and idea = #{idea} + and is_partner = #{isPartner} + and hobby = #{hobby} + and city = #{city} + and other = #{other} @@ -123,6 +149,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" skill_id, job_content, type, + sex, + birthday, + share_resource, + is_tech, + idea, + is_partner, + hobby, + city, + other, #{username}, @@ -148,6 +183,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{skillId}, #{jobContent}, #{type}, + #{sex}, + #{birthday}, + #{shareResource}, + #{isTech}, + #{idea}, + #{isPartner}, + #{hobby}, + #{city}, + #{other}, @@ -177,6 +221,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" skill_id = #{skillId}, job_content = #{jobContent}, type = #{type}, + sex = #{sex}, + birthday = #{birthday}, + share_resource = #{shareResource}, + is_tech = #{isTech}, + idea = #{idea}, + is_partner = #{isPartner}, + hobby = #{hobby}, + city = #{city}, + other = #{other}, where id = #{id}