This commit is contained in:
parent
b3d98c1fb8
commit
46ca0b270c
|
@ -4,10 +4,12 @@ import com.yzdx.AiInterviewer.comment.R;
|
|||
import com.yzdx.AiInterviewer.entity.JobExpectation;
|
||||
import com.yzdx.AiInterviewer.entity.Resume;
|
||||
import com.yzdx.AiInterviewer.entity.VxEntityDto.VxCompanyLikeDto;
|
||||
import com.yzdx.AiInterviewer.entity.vxEntity.VxFeedBack;
|
||||
import com.yzdx.AiInterviewer.entity.vxEntity.VxHelpEntity;
|
||||
import com.yzdx.AiInterviewer.service.ResumeService;
|
||||
import com.yzdx.AiInterviewer.service.UserService;
|
||||
import com.yzdx.AiInterviewer.service.VxService.VxCompanyLikeService;
|
||||
import com.yzdx.AiInterviewer.service.VxService.VxFeedBackService;
|
||||
import com.yzdx.AiInterviewer.service.VxService.VxHelpService;
|
||||
import com.yzdx.AiInterviewer.utiles.GetPostUntil;
|
||||
import com.yzdx.AiInterviewer.utiles.WechatUtils;
|
||||
|
@ -33,6 +35,8 @@ public class VxUserController {
|
|||
private VxCompanyLikeService vxCompanyLikeService;
|
||||
@Autowired
|
||||
private VxHelpService vxHelpService;
|
||||
@Autowired
|
||||
private VxFeedBackService vxFeedBackService;
|
||||
|
||||
|
||||
@ApiImplicitParams({
|
||||
|
@ -127,7 +131,7 @@ public class VxUserController {
|
|||
Integer rows = resumeService.writeResume( name, avatar,sex, status, graduateTime, birthday, phone,
|
||||
email, vx, personalAdvantage,
|
||||
other,education_background,jobExpectation,workExperience,projectExperience,userId);
|
||||
if(rows!=1){
|
||||
if(rows!=-2){
|
||||
return R.error("提交失败,请重新输入");
|
||||
}
|
||||
return R.success("提交简历信息成功");
|
||||
|
@ -180,19 +184,21 @@ public class VxUserController {
|
|||
}
|
||||
return R.success("提交简历信息成功");
|
||||
}
|
||||
@GetMapping("/getResume")
|
||||
|
||||
/**
|
||||
* 获取简历
|
||||
* @param userId
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/getResume")
|
||||
public R getResume(Integer userId){
|
||||
|
||||
Resume resume= resumeService.getResume(userId);
|
||||
|
||||
return R.success(resume);
|
||||
}
|
||||
/**
|
||||
* 获取简历列表
|
||||
* */
|
||||
/**
|
||||
* 添加岗位期望
|
||||
*/
|
||||
|
||||
|
||||
|
||||
// @ApiImplicitParams({
|
||||
// @ApiImplicitParam(name = "expectationType",required = true),
|
||||
|
@ -311,6 +317,43 @@ public R getResume(Integer userId){
|
|||
return userService.adminLogin(phone, encoding, password);
|
||||
}
|
||||
|
||||
/**
|
||||
* 填写反馈
|
||||
*/
|
||||
@PostMapping("/writeFeedBack")
|
||||
public R writeFeedBack(@RequestParam(required = true, value = "userid") Integer userid,
|
||||
@RequestParam(required = true, value = "imgUrl") String imgUrl,
|
||||
@RequestParam(required = true, value = "phone") String phone,
|
||||
@RequestParam(required = true, value = "content") String content){
|
||||
Integer rows=vxFeedBackService.writeFeedBack(userid,imgUrl,phone,content);
|
||||
if (rows==-2){
|
||||
return R.error("提交失败");
|
||||
}
|
||||
return R.success("提交成功");
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改反馈
|
||||
*/
|
||||
@PostMapping("/updateFeedBack")
|
||||
public R updateFeedBack(@RequestParam(required = true, value = "userid") Integer userid,
|
||||
@RequestParam(required = true, value = "imgUrl") String imgUrl,
|
||||
@RequestParam(required = true, value = "id") Integer id,
|
||||
@RequestParam(required = true, value = "phone") String phone,
|
||||
@RequestParam(required = true, value = "content") String content){
|
||||
Integer rows=vxFeedBackService.updateFeedBack(id,userid,imgUrl,phone,content);
|
||||
if (rows!=1){
|
||||
return R.error("提交失败");
|
||||
}
|
||||
return R.success("提交成功");
|
||||
}
|
||||
/**
|
||||
* 获取反馈
|
||||
*/
|
||||
@GetMapping("/getFeedBack")
|
||||
public R getFeedBack(Integer userId){
|
||||
VxFeedBack vxFeedBack= vxFeedBackService.getFeedBack(userId);
|
||||
return R.success(vxFeedBack);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,23 @@
|
|||
package com.yzdx.AiInterviewer.entity.vxEntity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.yzdx.AiInterviewer.entity.BaseEntity;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
@ApiModel("意见反馈表")
|
||||
@TableName("feedback")
|
||||
public class VxFeedBack extends BaseEntity {
|
||||
@ApiModelProperty("反馈id")
|
||||
private Integer id;
|
||||
@ApiModelProperty("用户id")
|
||||
private Integer userId;
|
||||
@ApiModelProperty("反馈内容")
|
||||
private String content;
|
||||
@ApiModelProperty("图片地址")
|
||||
private String imgUrl;
|
||||
@ApiModelProperty("联系方式")
|
||||
private String phone;
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
package com.yzdx.AiInterviewer.mapper.VxMapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.yzdx.AiInterviewer.entity.vxEntity.VxFeedBack;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
@Mapper
|
||||
public interface VxFeedBackMapper extends BaseMapper<VxFeedBack> {
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
package com.yzdx.AiInterviewer.service.VxService;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.yzdx.AiInterviewer.entity.vxEntity.VxFeedBack;
|
||||
|
||||
public interface VxFeedBackService extends IService<VxFeedBack> {
|
||||
Integer writeFeedBack(Integer userid, String imgUrl, String phone, String content);
|
||||
|
||||
Integer updateFeedBack(Integer id, Integer userid, String imgUrl, String phone, String content);
|
||||
|
||||
VxFeedBack getFeedBack(Integer userId);
|
||||
}
|
|
@ -0,0 +1,61 @@
|
|||
package com.yzdx.AiInterviewer.service.VxService.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.yzdx.AiInterviewer.entity.vxEntity.VxFeedBack;
|
||||
import com.yzdx.AiInterviewer.mapper.VxMapper.VxFeedBackMapper;
|
||||
import com.yzdx.AiInterviewer.service.VxService.VxFeedBackService;
|
||||
import com.yzdx.AiInterviewer.utiles.TimeUtil;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Service
|
||||
public class VxFeedBackServiceImpl extends ServiceImpl<VxFeedBackMapper, VxFeedBack> implements VxFeedBackService {
|
||||
@Autowired
|
||||
private VxFeedBackMapper vxFeedBackMapper;
|
||||
@Override
|
||||
public Integer writeFeedBack(Integer userid, String imgUrl, String phone, String content) {
|
||||
LambdaQueryWrapper<VxFeedBack> queryWrapper=new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(VxFeedBack::getUserId,userid);
|
||||
VxFeedBack vxFeedBack = vxFeedBackMapper.selectOne(queryWrapper);
|
||||
if(vxFeedBack!=null){
|
||||
//反馈已存在,提交失败
|
||||
return -2;
|
||||
}
|
||||
VxFeedBack vxFeedBack1=new VxFeedBack();
|
||||
vxFeedBack1.setContent(content);
|
||||
vxFeedBack1.setPhone(phone);
|
||||
vxFeedBack1.setImgUrl(imgUrl);
|
||||
vxFeedBack1.setUserId(userid);
|
||||
vxFeedBack1.setCreateUser(userid);
|
||||
vxFeedBack1.setUpdateUser(userid);
|
||||
vxFeedBack1.setCreateTime(TimeUtil.getTime());
|
||||
vxFeedBack1.setUpdateTime(TimeUtil.getTime());
|
||||
Integer row = vxFeedBackMapper.insert(vxFeedBack1);
|
||||
return row;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer updateFeedBack(Integer id, Integer userid, String imgUrl, String phone, String content) {
|
||||
VxFeedBack vxFeedBack=new VxFeedBack();
|
||||
vxFeedBack.setId(id);
|
||||
vxFeedBack.setUserId(userid);
|
||||
vxFeedBack.setCreateUser(userid);
|
||||
vxFeedBack.setUpdateUser(userid);
|
||||
vxFeedBack.setPhone(phone);
|
||||
vxFeedBack.setContent(content);
|
||||
vxFeedBack.setImgUrl(imgUrl);
|
||||
vxFeedBack.setCreateTime(TimeUtil.getTime());
|
||||
vxFeedBack.setUpdateTime(TimeUtil.getTime());
|
||||
Integer row=vxFeedBackMapper.updateById(vxFeedBack);
|
||||
return row;
|
||||
}
|
||||
|
||||
@Override
|
||||
public VxFeedBack getFeedBack(Integer userId) {
|
||||
LambdaQueryWrapper<VxFeedBack> queryWrapper=new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(VxFeedBack::getUserId,userId);
|
||||
VxFeedBack vxFeedBack = vxFeedBackMapper.selectOne(queryWrapper);
|
||||
return vxFeedBack;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue