This commit is contained in:
2025-03-03 13:54:27 +08:00
parent 7d11552c32
commit a96327c890
7 changed files with 27 additions and 13 deletions

View File

@ -406,8 +406,9 @@ public class BgtProjectRecruitApplyServiceImpl extends ServicePlusImpl<BgtProjec
bgtProjectRecruitApply.setStatus("7"); bgtProjectRecruitApply.setStatus("7");
if (baseMapper.updateById(bgtProjectRecruitApply) > 0) { if (baseMapper.updateById(bgtProjectRecruitApply) > 0) {
Long appUserId = SecurityUtils.getAppUserId(); Long appUserId = SecurityUtils.getAppUserId();
BgtProjectRecruitApply by = selectByUserIdProjectRecruitApplyId(appUserId); // BgtProjectRecruitApply by = selectByUserIdProjectRecruitApplyId(appUserId);
BgtProjectRecruit appById = iBgtProjectRecruitService.getAppById(by.getUserId()); BgtProjectRecruitApply by = baseMapper.selectById(recruitApplyId);
BgtProjectRecruit appById = iBgtProjectRecruitService.getAppById(by.getRecruitId());
Map<String, String> mp = new HashMap<>(); Map<String, String> mp = new HashMap<>();
mp.put("projectName", appById.getRecruitName()); mp.put("projectName", appById.getRecruitName());
//发送取消报名的系统消息 //发送取消报名的系统消息
@ -444,15 +445,16 @@ public class BgtProjectRecruitApplyServiceImpl extends ServicePlusImpl<BgtProjec
WgzUser byUserId = wgzUserService.findByUserId(SecurityUtils.getAppUserId()); WgzUser byUserId = wgzUserService.findByUserId(SecurityUtils.getAppUserId());
//2、当前申请报名的工地信息 //2、当前申请报名的工地信息
BgtProjectRecruitApply recruitApply = queryById(req.getRecruitApplyId()); BgtProjectRecruitApply recruitApply = queryById(req.getRecruitApplyId());
BgtProjectRecruit recruit = iBgtProjectRecruitService.getAppById(recruitApply.getId()); BgtProjectRecruit recruit = iBgtProjectRecruitService.getAppById(recruitApply.getRecruitId());
//3、更新报名状态 //3、更新报名状态、及更新消息的操作状态
BgtProjectRecruitApply apply = new BgtProjectRecruitApply(); BgtProjectRecruitApply apply = new BgtProjectRecruitApply();
apply.setId(req.getRecruitApplyId()); apply.setId(req.getRecruitApplyId());
apply.setStatus(req.getStatus()); apply.setStatus(req.getStatus());
int insert = baseMapper.insert(apply); int up = baseMapper.updateById(apply);
if (insert == 0) { if (up == 0) {
throw new RuntimeException("插入数据失败!"); throw new RuntimeException("插入数据失败!");
} }
iWgzMessageService.updateById(new WgzMessage().setId(req.getMessageId()).setIsOperation("2"));
//4系统拒绝消息 //4系统拒绝消息
SysDictData typeOfWork = dictTypeService.selectDictDataByTypeAndData("type_of_work", recruit.getTypeOfWork()); SysDictData typeOfWork = dictTypeService.selectDictDataByTypeAndData("type_of_work", recruit.getTypeOfWork());
Map<String, String> mp = new HashMap<>(); Map<String, String> mp = new HashMap<>();
@ -476,7 +478,7 @@ public class BgtProjectRecruitApplyServiceImpl extends ServicePlusImpl<BgtProjec
setSenderType(USERTYPE_WGZ). setSenderType(USERTYPE_WGZ).
setSenderId(byUserId.getUserId()). setSenderId(byUserId.getUserId()).
setRecipientType(USERTYPE_BGT). setRecipientType(USERTYPE_BGT).
setRecipientId(apply.getUserId()). setRecipientId(recruit.getUserId()).
setHeadline(wgzMessage(mp, "203")). setHeadline(wgzMessage(mp, "203")).
setSubheading(wgzMessage(mp, "204")). setSubheading(wgzMessage(mp, "204")).
setTableId(apply.getId()). setTableId(apply.getId()).

View File

@ -17,6 +17,9 @@ public class WgzAppConfirmRegistrationReq implements Serializable {
@ApiModelProperty("招工ID") @ApiModelProperty("招工ID")
private Long recruitApplyId; private Long recruitApplyId;
@ApiModelProperty("消息ID")
private Long messageId;
@ApiModelProperty("3务工者同意 4务工者拒绝 ") @ApiModelProperty("3务工者同意 4务工者拒绝 ")
@Pattern(regexp = "^(3|4)$", message = "status 只能是 3 或 4") @Pattern(regexp = "^(3|4)$", message = "status 只能是 3 或 4")
private String status; private String status;

View File

@ -10,6 +10,7 @@ import lombok.experimental.Accessors;
import javax.validation.constraints.NotBlank; import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull; import javax.validation.constraints.NotNull;
import java.io.Serializable; import java.io.Serializable;
import java.time.LocalDate;
import java.util.List; import java.util.List;
@Data @Data
@ -43,7 +44,7 @@ public class WgzAppRealNameAuthenticationReq implements Serializable {
@ApiModelProperty("出生日期") @ApiModelProperty("出生日期")
@NotBlank(message = "出生日期不能为空") @NotBlank(message = "出生日期不能为空")
private String birthdate; private LocalDate birthdate;
@ApiModelProperty("身份证号码") @ApiModelProperty("身份证号码")
@NotBlank(message = "身份证号码不能为空") @NotBlank(message = "身份证号码不能为空")

View File

@ -26,6 +26,10 @@ public class WgzAppRegistrationInformationRes implements Serializable {
@ApiModelProperty("招工申请ID") @ApiModelProperty("招工申请ID")
private Long recruitApplyId; private Long recruitApplyId;
@ApiModelProperty("消息ID")
private Long messageId;
//============== //==============
@ApiModelProperty("封面图(多个逗号分隔)") @ApiModelProperty("封面图(多个逗号分隔)")
private String coverPlan; private String coverPlan;
@ -37,10 +41,10 @@ public class WgzAppRegistrationInformationRes implements Serializable {
private String recruitName; private String recruitName;
@ApiModelProperty("招工金额") @ApiModelProperty("招工金额")
private BigDecimal recruitAmount; private String recruitAmount;
@ApiModelProperty("招工数量") @ApiModelProperty("招工数量")
private Integer recruitStaffNum; private String recruitStaffNum;
@ApiModelProperty("任务名称") @ApiModelProperty("任务名称")
private String taskName; private String taskName;
@ -66,6 +70,9 @@ public class WgzAppRegistrationInformationRes implements Serializable {
@ApiModelProperty("备注") @ApiModelProperty("备注")
private String remark; private String remark;
@ApiModelProperty("是否需要操作0不需要 1需要 2已操作")
private String isOperation;
// @ApiModelProperty("附件实体数据") // @ApiModelProperty("附件实体数据")
// private List<Annex> annex; // private List<Annex> annex;

View File

@ -206,10 +206,10 @@ public class WgzMessageServiceImpl extends ServicePlusImpl<WgzMessageMapper, Wgz
//1、获取当前消息的招工ID //1、获取当前消息的招工ID
WgzMessage byId = this.getById(messageId); WgzMessage byId = this.getById(messageId);
//2、根据招工ID得到招工信息及附件 //2、根据招工ID得到招工信息及附件
WgzAppRegistrationInformationRes byRecruitIdData = baseMapper.findByRecruitIdData(byId.getId()); WgzAppRegistrationInformationRes byRecruitIdData = baseMapper.findByRecruitIdData(byId.getTableId());
// List<Annex> byUserIdAndRecruitId = annexService.findByUserIdAndRecruitId(appUserId, byId.getId(), new String[]{"1"}); // List<Annex> byUserIdAndRecruitId = annexService.findByUserIdAndRecruitId(appUserId, byId.getId(), new String[]{"1"});
// byRecruitIdData.setAnnex(null); // byRecruitIdData.setAnnex(null);
return byRecruitIdData; return byRecruitIdData.setMessageId(byId.getId()).setIsOperation(byId.getIsOperation());
} }
@Override @Override

View File

@ -125,12 +125,13 @@ public class WgzUserServiceImpl extends ServicePlusImpl<WgzUserMapper, WgzUser>
//1、查询手机号是否存在 //1、查询手机号是否存在
Integer count = baseMapper.selectCount( Integer count = baseMapper.selectCount(
new LambdaQueryWrapper<WgzUser>(). new LambdaQueryWrapper<WgzUser>().
eq(WgzUser::getPhone, wgzUser.getPhone()) eq(WgzUser::getPhone, bo.getPhone())
); );
if (count>0){ if (count>0){
throw new RuntimeException("当前手机号已存在!"); throw new RuntimeException("当前手机号已存在!");
} }
//2、组装数据 BeanUtils.copyProperties(bo,wgzUser); //2、组装数据 BeanUtils.copyProperties(bo,wgzUser);
wgzUser.setUsername(bo.getPhone());
wgzUser.setPhone(bo.getPhone()); wgzUser.setPhone(bo.getPhone());
wgzUser.setUserId(SnowflakeIdUtil.generateId()); wgzUser.setUserId(SnowflakeIdUtil.generateId());
wgzUser.setCreateBy("admin"). wgzUser.setCreateBy("admin").

Binary file not shown.

After

Width:  |  Height:  |  Size: 64 KiB