diff --git a/boot-nunu/src/main/java/com/softwarebr/nunu/dao/res/TalentDao.java b/boot-nunu/src/main/java/com/softwarebr/nunu/dao/res/TalentDao.java new file mode 100644 index 0000000..2044b0c --- /dev/null +++ b/boot-nunu/src/main/java/com/softwarebr/nunu/dao/res/TalentDao.java @@ -0,0 +1,11 @@ +package com.softwarebr.nunu.dao.res; + +import com.brframework.commondb.core.CommonRepository; +import com.softwarebr.nunu.entity.res.Talent; + +/** + * @author zj + * @date 2020-11-02 16:27:34 + */ +public interface TalentDao extends CommonRepository { +} diff --git a/boot-nunu/src/main/java/com/softwarebr/nunu/dto/res/TalentParamDTO.java b/boot-nunu/src/main/java/com/softwarebr/nunu/dto/res/TalentParamDTO.java new file mode 100644 index 0000000..6dae8fe --- /dev/null +++ b/boot-nunu/src/main/java/com/softwarebr/nunu/dto/res/TalentParamDTO.java @@ -0,0 +1,58 @@ +package com.softwarebr.nunu.dto.res; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * @date 2020-02-21 11:48:30 + * @author lilin + */ + +@Data +public class TalentParamDTO { + + @ApiModelProperty(value = "姓名", required = true, example = "") + private String name; + + @ApiModelProperty(value = "性别", required = true, example = "") + private String sex; + + @ApiModelProperty(value = "出生日期", required = true, example = "") + private String birthDay; + + @ApiModelProperty(value = "期望工作省份", required = true, example = "") + private Long provinceId; + + @ApiModelProperty(value = "期望工作城市", required = true, example = "") + private Long cityId; + + @ApiModelProperty(value = "期望工作区县", required = true, example = "") + private Long areaId; + + @ApiModelProperty(value = "擅长领域", required = true, example = "") + private String expertise; + + @ApiModelProperty(value = "招聘封面图", required = true, example = "") + private String coverUri; + + @ApiModelProperty(value = "工作经历", required = true, example = "") + private String empirical; + + @ApiModelProperty(value = "合作需求", required = true, example = "") + private String cooperationNeeds; + + @ApiModelProperty(value = "附件,多张以逗号,分隔", required = true, example = "") + private String annex; + + @ApiModelProperty(value = "项目联系人", required = true, example = "") + private String contact; + + @ApiModelProperty(value = "手机号码", required = true, example = "") + private String contactPhone; + + @ApiModelProperty(value = "电子邮箱", required = true, example = "") + private String email; + + @ApiModelProperty(value = "公开状态(1公开 2隐私 3平台可见)", required = true, example = "") + private Integer publicity; +} diff --git a/boot-nunu/src/main/java/com/softwarebr/nunu/entity/res/Talent.java b/boot-nunu/src/main/java/com/softwarebr/nunu/entity/res/Talent.java new file mode 100644 index 0000000..84eb0a9 --- /dev/null +++ b/boot-nunu/src/main/java/com/softwarebr/nunu/entity/res/Talent.java @@ -0,0 +1,109 @@ +package com.softwarebr.nunu.entity.res; + +import com.alibaba.fastjson.annotation.JSONField; +import io.swagger.annotations.ApiModelProperty; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +import javax.persistence.*; +import java.time.LocalDateTime; + +/** + * 人才库(简历资源) + * @date 2020-11-02 16:07:43 + * @author zj + */ + +@Entity +@Data +@NoArgsConstructor +@AllArgsConstructor +@Table(name="res_invite") +@Builder +public class Talent { + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + @ApiModelProperty(value = "id", required = true, example = "1") + private Long id; + + @JSONField(format = "yyyy-MM-dd HH:mm:ss") + @ApiModelProperty(value = "创建时间", required = true, example = "2018-03-12 21:32:33") + private LocalDateTime createDate; + + @ApiModelProperty(value = "发布者", required = true, example = "") + private Long publisher; + + @ApiModelProperty(value = "姓名", required = true, example = "") + private String name; + + @ApiModelProperty(value = "性别", required = true, example = "") + private String sex; + + @ApiModelProperty(value = "出生日期", required = true, example = "") + private String birthDay; + + @ApiModelProperty(value = "招聘省份", required = true, example = "") + private Long provinceId; + + @ApiModelProperty(value = "招聘城市", required = true, example = "") + private Long cityId; + + @ApiModelProperty(value = "招聘区县", required = true, example = "") + private Long areaId; + + @ApiModelProperty(value = "擅长领域", required = true, example = "") + @Lob + private String expertise; + + @ApiModelProperty(value = "简历封面图", required = true, example = "") + @Column(length = Integer.MAX_VALUE) + private String coverUri; + + @ApiModelProperty(value = "工作经历", required = true, example = "") + @Lob + private String empirical; + + @ApiModelProperty(value = "合作需求", required = true, example = "") + @Lob + private String cooperationNeeds; + + @ApiModelProperty(value = "附件,多张以逗号,分隔", required = true, example = "") + private String annex; + + @ApiModelProperty(value = "联系人", required = true, example = "") + private String contact; + + @ApiModelProperty(value = "手机号码", required = true, example = "") + private String contactPhone; + + @ApiModelProperty(value = "电子邮箱", required = true, example = "") + private String email; + + @ApiModelProperty(value = "公开状态(1公开 2隐私 3平台可见)", required = true, example = "") + private Integer publicity; + + @ApiModelProperty(value = "是否推荐至首页(0否 1是)", required = true, example = "") + private Integer indexType; + + @ApiModelProperty(value = "审核状态(1待审核 2审核通过 3审核不通过)", required = true, example = "") + private Integer verify; + + @ApiModelProperty(value = "审核备注", required = true, example = "") + private String verifyRemark; + + @JSONField(format = "yyyy-MM-dd HH:mm:ss") + @ApiModelProperty(value = "审核时间", required = true, example = "2018-03-12 21:32:33") + private LocalDateTime verifyDate; + + @ApiModelProperty(value = "删除标记0.已删除 1.未删除", required = true, example = "") + private Integer marker; + + @ApiModelProperty(value = "是否上架(0下架 1上架) ", required = true, example = "") + private Integer upperStatus; + + + +} \ No newline at end of file diff --git a/boot-nunu/src/main/java/com/softwarebr/nunu/json/admin/res/TalentDetailsResult.java b/boot-nunu/src/main/java/com/softwarebr/nunu/json/admin/res/TalentDetailsResult.java new file mode 100644 index 0000000..51946a6 --- /dev/null +++ b/boot-nunu/src/main/java/com/softwarebr/nunu/json/admin/res/TalentDetailsResult.java @@ -0,0 +1,98 @@ +package com.softwarebr.nunu.json.admin.res; + +import com.alibaba.fastjson.annotation.JSONField; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import javax.persistence.Column; +import javax.persistence.Lob; +import java.time.LocalDateTime; + +/** + * @date 2020-02-21 11:49:00 + * @author lilin + */ + +@Data +@ApiModel +public class TalentDetailsResult { + + + @ApiModelProperty(value = "id", required = true, example = "1") + private Long id; + + @JSONField(format = "yyyy-MM-dd HH:mm:ss") + @ApiModelProperty(value = "创建时间", required = true, example = "2018-03-12 21:32:33") + private LocalDateTime createDate; + + @ApiModelProperty(value = "姓名", required = true, example = "") + private String name; + + @ApiModelProperty(value = "性别", required = true, example = "") + private String sex; + + @ApiModelProperty(value = "出生日期", required = true, example = "") + private String birthDay; + + @ApiModelProperty(value = "招聘省份", required = true, example = "") + private String province; + + @ApiModelProperty(value = "招聘城市", required = true, example = "") + private String city; + + @ApiModelProperty(value = "招聘区县", required = true, example = "") + private String area; + + @ApiModelProperty(value = "擅长领域", required = true, example = "") + @Lob + private String expertise; + + @ApiModelProperty(value = "简历封面图", required = true, example = "") + @Column(length = Integer.MAX_VALUE) + private String coverUri; + + @ApiModelProperty(value = "工作经历", required = true, example = "") + @Lob + private String empirical; + + @ApiModelProperty(value = "合作需求", required = true, example = "") + @Lob + private String cooperationNeeds; + + @ApiModelProperty(value = "附件,多张以逗号,分隔", required = true, example = "") + private String annex; + + @ApiModelProperty(value = "联系人", required = true, example = "") + private String contact; + + @ApiModelProperty(value = "手机号码", required = true, example = "") + private String contactPhone; + + @ApiModelProperty(value = "电子邮箱", required = true, example = "") + private String email; + + @ApiModelProperty(value = "公开状态(1公开 2隐私 3平台可见)", required = true, example = "") + private Integer publicity; + + @ApiModelProperty(value = "是否推荐至首页(0否 1是)", required = true, example = "") + private Integer indexType; + + @ApiModelProperty(value = "审核状态(1待审核 2审核通过 3审核不通过)", required = true, example = "") + private Integer verify; + + @ApiModelProperty(value = "审核备注", required = true, example = "") + private String verifyRemark; + + @JSONField(format = "yyyy-MM-dd HH:mm:ss") + @ApiModelProperty(value = "审核时间", required = true, example = "2018-03-12 21:32:33") + private LocalDateTime verifyDate; + + @ApiModelProperty(value = "删除标记0.已删除 1.未删除", required = true, example = "") + private Integer marker; + + @ApiModelProperty(value = "是否上架(0下架 1上架) ", required = true, example = "") + private Integer upperStatus; + + +} diff --git a/boot-nunu/src/main/java/com/softwarebr/nunu/json/admin/res/TalentParam.java b/boot-nunu/src/main/java/com/softwarebr/nunu/json/admin/res/TalentParam.java new file mode 100644 index 0000000..eff6abb --- /dev/null +++ b/boot-nunu/src/main/java/com/softwarebr/nunu/json/admin/res/TalentParam.java @@ -0,0 +1,78 @@ +package com.softwarebr.nunu.json.admin.res; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import javax.validation.constraints.NotEmpty; +import javax.validation.constraints.NotNull; + +/** + * @date 2020-02-21 11:48:30 + * @author lilin + */ + +@Data +@ApiModel +public class TalentParam { + + @ApiModelProperty(value = "姓名", required = true, example = "") + @NotEmpty(message = "姓名不能为空") + private String name; + + @ApiModelProperty(value = "性别", required = true, example = "") + @NotEmpty(message = "性别不能为空") + private String sex; + + @ApiModelProperty(value = "出生日期", required = true, example = "") + @NotEmpty(message = "出生日期不能为空") + private String birthDay; + + @ApiModelProperty(value = "期望工作省份", required = true, example = "") + @NotNull(message = "请选择期望工作省份") + private Long provinceId; + + @ApiModelProperty(value = "期望工作城市", required = true, example = "") + @NotNull(message = "请选择期望工作城市") + private Long cityId; + + @ApiModelProperty(value = "期望工作区县", required = true, example = "") + @NotNull(message = "请选择期望工作区县") + private Long areaId; + + @ApiModelProperty(value = "擅长领域", required = true, example = "") + @NotEmpty(message = "擅长领域不能为空") + private String expertise; + + @ApiModelProperty(value = "招聘封面图", required = true, example = "") + @NotEmpty(message = "请上传招聘封面图") + private String coverUri; + + @ApiModelProperty(value = "工作经历", required = true, example = "") + @NotEmpty(message = "工作经历不能为空") + private String empirical; + + @ApiModelProperty(value = "合作需求", required = true, example = "") + @NotEmpty(message = "合作需求不能为空") + private String cooperationNeeds; + + @ApiModelProperty(value = "附件,多张以逗号,分隔", required = true, example = "") + private String annex; + + @ApiModelProperty(value = "项目联系人", required = true, example = "") + @NotEmpty(message = "项目联系人不能为空") + private String contact; + + @ApiModelProperty(value = "手机号码", required = true, example = "") + @NotEmpty(message = "手机号码不能为空") + private String contactPhone; + + @ApiModelProperty(value = "电子邮箱", required = true, example = "") + @NotEmpty(message = "电子邮箱不能为空") + private String email; + + @ApiModelProperty(value = "公开状态(1公开 2隐私 3平台可见)", required = true, example = "") + @NotNull + private Integer publicity; + +} \ No newline at end of file diff --git a/boot-nunu/src/main/java/com/softwarebr/nunu/json/admin/res/TalentQueryParam.java b/boot-nunu/src/main/java/com/softwarebr/nunu/json/admin/res/TalentQueryParam.java new file mode 100644 index 0000000..e9c96d8 --- /dev/null +++ b/boot-nunu/src/main/java/com/softwarebr/nunu/json/admin/res/TalentQueryParam.java @@ -0,0 +1,40 @@ +package com.softwarebr.nunu.json.admin.res; + +import com.brframework.commondb.annotation.param.ParamQuery; +import com.brframework.commondb.annotation.param.QueryExpression; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * @date 2020-02-21 11:48:30 + * @author lilin + */ + +@Data +@ApiModel +public class TalentQueryParam { + + @ParamQuery + @ApiModelProperty(value = "删除标记0.已删除 1.未删除", hidden = true, example = "") + private Integer marker; + + @ApiModelProperty(value = "账号", example = "") + private String account; + + @ParamQuery + @ApiModelProperty(value = "审核状态(1待审核 2审核通过 3审核不通过)", hidden = true, example = "") + private Integer verify; + + @ParamQuery + @ApiModelProperty(value = "上架状态(0下架 1上架) ", example = "") + private Integer upperStatus; + + @ApiModelProperty(value = "申请处理状态(1.待处理)", example = "") + private Integer applyStatus; + + @ParamQuery(expression = QueryExpression.in) + @ApiModelProperty(value = "序号", hidden = true, example = "") + private Long [] id; + +} \ No newline at end of file diff --git a/boot-nunu/src/main/java/com/softwarebr/nunu/json/admin/res/TalentResult.java b/boot-nunu/src/main/java/com/softwarebr/nunu/json/admin/res/TalentResult.java new file mode 100644 index 0000000..4e6a574 --- /dev/null +++ b/boot-nunu/src/main/java/com/softwarebr/nunu/json/admin/res/TalentResult.java @@ -0,0 +1,66 @@ +package com.softwarebr.nunu.json.admin.res; + +import com.alibaba.fastjson.annotation.JSONField; +import com.brframework.commoncms.annatotion.column.HideColumn; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import javax.persistence.Lob; +import java.time.LocalDateTime; + +/** + * 招聘资源 + * @date 2020-02-21 11:48:30 + * @author lilin + */ + +@Data +@ApiModel +public class TalentResult { + + @ApiModelProperty(value = "序号", required = true, example = "1") + private Long id; + + @ApiModelProperty(value = "账号", required = true, example = "") + private String name; + + @ApiModelProperty(value = "招聘封面图", required = true, example = "") + private String coverUri; + + @ApiModelProperty(value = "擅长领域", required = true, example = "") + private String expertise; + + @JSONField(format = "yyyy-MM-dd HH:mm:ss") + @ApiModelProperty(value = "时间", required = true, example = "2018-03-12 21:32:33") + private LocalDateTime createDate; + + @ApiModelProperty(value = "公开状态", required = true, example = "") + private String publicityTitle; + + @ApiModelProperty(value = "审核状态", required = true, example = "") + private String verifyTitle; + + @ApiModelProperty(value = "上架状态", required = true, example = "") + private String upperTitle; + + @ApiModelProperty(value = "待处理数量", required = true, example = "") + private Integer handleTotal; + + @ApiModelProperty(value = "是否推荐至首页(0否 1是)", required = true, example = "") + @HideColumn(selectShow = false) + private Integer indexType; + + @ApiModelProperty(value = "是否上架(0下架 1上架) ", required = true, example = "") + @HideColumn(selectShow = false) + private Integer upperStatus; + + @ApiModelProperty(value = "审核状态(1待审核 2审核通过 3审核不通过)", required = true, example = "") + @HideColumn(selectShow = false) + private Integer verify; + + @ApiModelProperty(value = "公开状态(1公开 2隐私 3平台可见)", required = true, example = "") + @HideColumn(selectShow = false) + private Integer publicity; + +} \ No newline at end of file diff --git a/boot-nunu/src/main/java/com/softwarebr/nunu/service/res/TalentService.java b/boot-nunu/src/main/java/com/softwarebr/nunu/service/res/TalentService.java new file mode 100644 index 0000000..c14b50d --- /dev/null +++ b/boot-nunu/src/main/java/com/softwarebr/nunu/service/res/TalentService.java @@ -0,0 +1,18 @@ +package com.softwarebr.nunu.service.res; + +import com.brframework.commondb.core.EntityService; +import com.softwarebr.nunu.dto.res.TalentParamDTO; +import com.softwarebr.nunu.entity.res.Talent; + +/** + * 招聘资源 + * @date 2020-02-21 11:48:30 + * @author lilin + */ + +public interface TalentService extends EntityService { + + void saveTalent(Long publisher, TalentParamDTO talentParamDTO); + + void updateTalent(Long id, TalentParamDTO talentParamDTO); +} \ No newline at end of file diff --git a/boot-nunu/src/main/java/com/softwarebr/nunu/service/res/impl/TalentServiceImpl.java b/boot-nunu/src/main/java/com/softwarebr/nunu/service/res/impl/TalentServiceImpl.java new file mode 100644 index 0000000..84974ec --- /dev/null +++ b/boot-nunu/src/main/java/com/softwarebr/nunu/service/res/impl/TalentServiceImpl.java @@ -0,0 +1,82 @@ +package com.softwarebr.nunu.service.res.impl; + +import com.brframework.common.utils.ConvertObjectUtil; +import com.brframework.commondb.core.AbstractEntityService; +import com.brframework.commondb.core.CommonRepository; +import com.brframework.commondb.core.ControllerPageHandle; +import com.brframework.commonmq.annotation.MQConfig; +import com.brframework.commonmq.core.MQClient; +import com.brframework.commonweb.exception.HandleException; +import com.google.common.base.Splitter; +import com.softwarebr.nunu.dao.res.InviteDao; +import com.softwarebr.nunu.dao.res.TalentDao; +import com.softwarebr.nunu.dto.res.InviteParamDTO; +import com.softwarebr.nunu.dto.res.TalentParamDTO; +import com.softwarebr.nunu.entity.res.Invite; +import com.softwarebr.nunu.entity.res.PropertyApply; +import com.softwarebr.nunu.entity.res.Talent; +import com.softwarebr.nunu.entity.user.Message; +import com.softwarebr.nunu.globals.MQTopics; +import com.softwarebr.nunu.globals.SystemConst; +import com.softwarebr.nunu.json.api.center.InviteDetailsResult; +import com.softwarebr.nunu.service.res.InviteService; +import com.softwarebr.nunu.service.res.PropertyApplyService; +import com.softwarebr.nunu.service.res.TalentService; +import com.softwarebr.nunu.service.user.MessageService; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.time.LocalDateTime; + +import static com.brframework.commondb.core.ControllerPageHandle.convertTo; + +/** + * 招聘资源 + * + * @author lilin + * @date 2020-02-21 11:48:30 + */ + +@Slf4j +@Service +@MQConfig +public class TalentServiceImpl extends AbstractEntityService implements TalentService { + + @Autowired + private TalentDao talentDao; + + @Override + public CommonRepository getRepository() { + return talentDao; + } + + /** + * 保存简历 + */ + @Override + public void saveTalent(Long publisher, TalentParamDTO talentParamDTO) { + + Talent talent = convertTo(talentParamDTO, Talent.class); + talent.setCreateDate(LocalDateTime.now()); + talent.setIndexType(0); + talent.setMarker(1); + talent.setUpperStatus(0); + if (publisher > 0) { + talent.setVerify(SystemConst.VERIFY_AWAIT); + } else { + talent.setVerifyDate(LocalDateTime.now()); + talent.setVerify(SystemConst.VERIFY_ADOPT); + } + talentDao.save(talent); + + } + + @Override + public void updateTalent(Long id, TalentParamDTO talentParamDTO) { + Talent talent = accessObject(id); + talent = ConvertObjectUtil.convertJavaBean(talent, talentParamDTO, true); + talentDao.save(talent); + } +} \ No newline at end of file diff --git a/boot-nunu/src/main/java/com/softwarebr/nunu/web/admin/AdminResController.java b/boot-nunu/src/main/java/com/softwarebr/nunu/web/admin/AdminResController.java index c4cf971..d225b1a 100644 --- a/boot-nunu/src/main/java/com/softwarebr/nunu/web/admin/AdminResController.java +++ b/boot-nunu/src/main/java/com/softwarebr/nunu/web/admin/AdminResController.java @@ -17,17 +17,12 @@ import com.softwarebr.nunu.domain.VerifyPageTotal; import com.softwarebr.nunu.dto.res.InviteParamDTO; import com.softwarebr.nunu.dto.res.ProjectParamDTO; import com.softwarebr.nunu.dto.res.PropertyParamDTO; -import com.softwarebr.nunu.entity.res.Invite; -import com.softwarebr.nunu.entity.res.Project; -import com.softwarebr.nunu.entity.res.Property; -import com.softwarebr.nunu.entity.res.PropertyApply; +import com.softwarebr.nunu.dto.res.TalentParamDTO; +import com.softwarebr.nunu.entity.res.*; import com.softwarebr.nunu.globals.SystemConst; import com.softwarebr.nunu.json.admin.res.*; import com.softwarebr.nunu.service.oper.AreaService; -import com.softwarebr.nunu.service.res.InviteService; -import com.softwarebr.nunu.service.res.ProjectService; -import com.softwarebr.nunu.service.res.PropertyApplyService; -import com.softwarebr.nunu.service.res.PropertyService; +import com.softwarebr.nunu.service.res.*; import com.softwarebr.nunu.service.user.MemberService; import com.softwarebr.nunu.util.AmountConversionUtil; import io.swagger.annotations.Api; @@ -66,6 +61,9 @@ public class AdminResController { private InviteService inviteService; @Autowired + private TalentService talentService; + + @Autowired private MemberService memberService; @Autowired @@ -121,6 +119,18 @@ public class AdminResController { param.setMarker(SystemConst.MARKER_STATUS_NO); } + + private void talentQueryHandle(TalentQueryParam param) { +// if (null != param.getAccount()) { +// param.setPublisher(memberService.findMemberIdByPhone(param.getAccount())); +// } +// if (null != param.getApplyStatus()) { +// param.setId(propertyApplyService.getAwaitVerifyResourceIds(PropertyApply.RESOURCE_TYPE_INVITE)); +// } + param.setVerify(SystemConst.VERIFY_ADOPT); + param.setMarker(SystemConst.MARKER_STATUS_NO); + } + @ApiOperation(value = "项目需求资源列表", notes = "项目需求资源列表", produces = "text/plain") @GetMapping("/v1/project/page") @AdminMenu(menuName = "创新资源交易区管理", order = 1, url = "TransactionReview") @@ -652,4 +662,91 @@ public class AdminResController { return JSONResult.ok(verifyPageResult); } + + + + + @ApiOperation(value = "人才库列表", notes = "人才库列表", produces = "text/plain") + @GetMapping("/v1/talent/page") + @PreAuthorize("hasRole('res-project-query')") + @PageLayout( + options = { + @CmsOption(name = "发布简历", uriMappingMethod = "inviteCreateV1") + }, + columnOptions = { + @CmsOption(name = "查看", uriMappingMethod = "getTalent"), + @CmsOption(name = "上架", uriMappingMethod = "resUpperV1"), + @CmsOption(name = "下架", uriMappingMethod = "resLowerV1"), + @CmsOption(name = "首页推荐", uriMappingMethod = "resIndexYesV1"), + @CmsOption(name = "取消推荐", uriMappingMethod = "resIndexNoV1"), + @CmsOption(name = "修改", uriMappingMethod = "talentEditV1"), + @CmsOption(name = "删除", uriMappingMethod = "talentDelV1", alert = "确定删除该记录吗?") + } + ) + public JSONResult> talentListV1(PageParam pageParam, TalentQueryParam param) { + talentQueryHandle(param); + Page page = jpaPageConvertToPage(talentService.page(pageParam, param), pageParam, InviteResult.class); + for (InviteResult inviteResult : page.getList()) { + if (inviteResult.getPublisher() > 0) { + inviteResult.setAccount(memberService.accessObject(inviteResult.getPublisher()).getPhone()); + } else { + inviteResult.setAccount("平台"); + } + inviteResult.setAddress(areaService.addressSplicing(inviteResult.getProvinceId(), inviteResult.getCityId(), inviteResult.getAreaId())); + inviteResult.setVerifyTitle(SystemConst.verifyHandle(inviteResult.getVerify())); + inviteResult.setUpperTitle(SystemConst.statusUpperHandle(inviteResult.getUpperStatus())); + inviteResult.setPublicityTitle(SystemConst.publicityHandle(inviteResult.getPublicity())); + inviteResult.setStartEndDate(String.format("%s - %s", inviteResult.getStartDate(), inviteResult.getEndDate())); + inviteResult.setHandleTotal(inviteResult.getPublicity().equals(SystemConst.PUBLICITY_PUBLIC) ? 0 : + propertyApplyService.countByVerifyStatus(PropertyApply.RESOURCE_TYPE_INVITE, inviteResult.getId()).intValue()); + } + return JSONResult.ok(page); + } + + @ApiOperation(value = "修改简历信息", notes = "修改简历信息", produces = "text/plain") + @PostMapping("/v1/talent/{id}") + @PreAuthorize("hasRole('res-project-edit-v1')") + @AOLog + @EditAlertLayout( + paddingMappingMethod = "getTalent" + ) + public JSONResult talentEditV1(@PathVariable Long id, @Valid @RequestBody TalentParam param) { + TalentParamDTO talentParamDTO = convertTo(param, TalentParamDTO.class); + talentService.updateTalent(id, talentParamDTO); + return JSONResult.ok(); + } + + @ApiOperation(value = "添加简历信息", notes = "添加简历信息", produces = "text/plain") + @PutMapping("/v1/talent/add") + @PreAuthorize("hasRole('res-project-create-v1')") + @AOLog + @EditLayout + public JSONResult talentCreateV1(@Valid @RequestBody TalentParam param) { + TalentParamDTO talentParamDTO = convertTo(param, TalentParamDTO.class); + talentService.saveTalent(-1L, talentParamDTO); + return JSONResult.ok(); + } + + @ApiOperation(value = "删除简历信息", notes = "删除简历信息", produces = "text/plain") + @DeleteMapping("/v1/talent/{id}") + @PreAuthorize("hasRole('res-project-del-v1')") + @AOLog + public JSONResult talentDelV1(@PathVariable Long id) { + talentService.removeById(id); + return JSONResult.ok(); + } + + @ApiOperation(value = "查看简历信息", notes = "查看简历信息", produces = "text/plain") + @PreAuthorize("hasRole('res-project-query')") + @GetMapping("/v1/talent/{id}") + public JSONResult getTalent(@PathVariable Long id) { + Talent talent = talentService.accessObject(id); + TalentDetailsResult talentDetailsResult = convertTo(talent, TalentDetailsResult.class); + talentDetailsResult.setArea(areaService.accessObject(talent.getAreaId()).getCityName()); + talentDetailsResult.setCity(areaService.accessObject(talent.getCityId()).getCityName()); + talentDetailsResult.setProvince(areaService.accessObject(talent.getProvinceId()).getCityName()); + + return JSONResult.ok(talentDetailsResult); + } + } \ No newline at end of file diff --git a/boot-nunu/src/main/resources/application-dev.properties b/boot-nunu/src/main/resources/application-dev.properties index b571754..ae783d4 100644 --- a/boot-nunu/src/main/resources/application-dev.properties +++ b/boot-nunu/src/main/resources/application-dev.properties @@ -78,7 +78,7 @@ oss.aliyun.default-bucket-name=lhkjy oss.aliyun.default-cdn-domain=https://lhkjy.oss-cn-shenzhen.aliyuncs.com #\u662F\u5426\u6253\u5F00swagger -swagger.enable=false +swagger.enable=true #\u8BE5JWT\u7684\u7B7E\u53D1\u8005 security.rest.admin-iss=admin -- libgit2 0.21.2