lsw 10 hónapja
szülő
commit
b8efaeddbc

+ 75 - 0
app/components/invite/invite.vue

@@ -0,0 +1,75 @@
+<template>
+	<u-popup :show="value" @close="close()" round="15" mode="center" :closeable="true" :mask-close-able="true" :customStyle="{ width: '90%' }">
+		<view class="ppopup">
+			<u-divider text="发送面试邀请" style="margin-top: 25px"></u-divider>
+			<view class="form_group">
+				<picker :disabled="true" @click="show = true">
+					<input placeholder="请选择面试时间" v-model="item.inviteTime" :disabled="true" />
+					<view class="icon more">&#xe62b;</view>
+				</picker>
+			</view>
+			<button class="btn" @click="confirm()">确认</button>
+			<u-datetime-picker :show="show" :closeOnClickOverlay="true" :minDate="Number(new Date())" @close="show = false" @cancel="show = false" @confirm="ok"></u-datetime-picker>
+		</view>
+	</u-popup>
+</template>
+
+<script>
+export default {
+	props: {
+		value: {
+			type: Boolean,
+			default: true
+		},
+		resumeDeliverId: {
+			type: Number
+		}
+	},
+	data() {
+		return {
+			show: false,
+			item: {}
+		};
+	},
+	methods: {
+		ok(e) {
+			this.show = false;
+			this.item.inviteTime = uni.$u.timeFormat(e.value, 'yyyy-mm-dd hh:MM');
+		},
+		confirm() {
+			let rule = [{ name: 'inviteTime', checkType: 'notnull', errorMsg: '请选择面试时间' }];
+			if (!this.verify.check(this.item, rule)) {
+				uni.showModal({ content: this.verify.error, showCancel: false });
+				return false;
+			}
+			uni.showModal({
+				title: '提示',
+				content: '确定发送面试邀请',
+				success: (res) => {
+					if (res.confirm) {
+						this.item.id = this.resumeDeliverId;
+						this.http.request({
+							url: '/app/deliver/invite',
+							data: this.item,
+							method: 'POST',
+							success: (res) => {
+								uni.showToast({ title: '发送成功' });
+								this.$emit('input', false);
+							}
+						});
+					}
+				}
+			});
+		},
+		close() {
+			this.$emit('input', false);
+		}
+	}
+};
+</script>
+
+<style lang="scss">
+.ppopup {
+	padding: 20px;
+}
+</style>

+ 5 - 21
app/components/sift/sift.vue

@@ -6,23 +6,11 @@
 				<view class="title">年龄范围</view>
 				<view class="form_group" style="display: flex">
 					<view class="start">
-						<input type="number" placeholder="开始" v-model="item.minAge" maxlength="2" />
+						<input type="number" placeholder="开始" v-model="item.min" maxlength="2" />
 					</view>
 					<view class="hor">至</view>
 					<view class="start">
-						<input type="number" placeholder="结束" v-model="item.maxAge" maxlength="2" />
-					</view>
-				</view>
-			</view>
-			<view class="item">
-				<view class="title">工作经验</view>
-				<view class="form_group" style="display: flex">
-					<view class="start">
-						<input type="number" placeholder="开始" v-model="item.minExperience" maxlength="2" />
-					</view>
-					<view class="hor">至</view>
-					<view class="start">
-						<input type="number" placeholder="结束" v-model="item.maxExperience" maxlength="2" />
+						<input type="number" placeholder="结束" v-model="item.max" maxlength="2" />
 					</view>
 				</view>
 			</view>
@@ -54,19 +42,15 @@ export default {
 	},
 	methods: {
 		confirm() {
-			if (parseInt(this.item.maxAge) < parseInt(this.item.minAge)) {
-				uni.showModal({ content: '开始年龄不能小于结束年龄', showCancel: false });
-				return false;
-			}
-			if (parseInt(this.item.maxExperience) < parseInt(this.item.minExperience)) {
-				uni.showModal({ content: '开始经验不能小于结束经验', showCancel: false });
+			if (parseInt(this.item.max) < parseInt(this.item.min)) {
+				uni.showModal({ content: '结束年龄不能小于开始年龄', showCancel: false });
 				return false;
 			}
 			this.$emit('input', false);
 			this.$emit('confirm', this.item);
 		},
 		clear() {
-			this.item = { maxAge: '', minAge: '', minExperience: '', maxExperience: '' };
+			this.item = { min: '', max: '' };
 			this.$forceUpdate();
 			this.$emit('confirm', this.item);
 			this.$emit('input', false);

+ 29 - 28
app/pages/job/detail.vue

@@ -78,36 +78,37 @@ export default {
 		},
 		//投递简历
 		send() {
-			uni.requestSubscribeMessage({
-				tmplIds: ['Oh-CCL-nAh6kciX0fmIU2AfldccqOr88DYl0VMg97ZI', 'Au3K-5T2Uc0P2km_Jl0QaMgdNRyjtJpBgHpeol9zRHo'],
-				complete: (c) => {
-					this.http.request({
-						url: '/app/deliver/send/' + this.item.id,
-						success: (res) => {
-							//实名认证跳转
-							if (res.data.code == 7878) {
-								uni.showModal({
-									title: '提示',
-									content: res.data.msg,
-									showCancel: false,
-									success: (res) => {
-										uni.navigateTo({ url: '/pages/user/auth' });
-									}
-								});
-								return;
+			this.http.request({
+				url: '/app/deliver/send/' + this.item.id,
+				success: (res) => {
+					//实名认证跳转
+					if (res.data.code == 7878) {
+						uni.showModal({
+							title: '提示',
+							content: res.data.msg,
+							showCancel: false,
+							success: (res) => {
+								uni.navigateTo({ url: '/pages/user/auth' });
 							}
-							//完善简历跳转
-							if (res.data.code == 7979) {
-								uni.showModal({
-									title: '提示',
-									content: res.data.msg,
-									showCancel: false,
-									success: (res) => {
-										uni.navigateTo({ url: '/pages/user/resume/index' });
-									}
-								});
-								return;
+						});
+						return;
+					}
+					//完善简历跳转
+					if (res.data.code == 7979) {
+						uni.showModal({
+							title: '提示',
+							content: res.data.msg,
+							showCancel: false,
+							success: (res) => {
+								uni.navigateTo({ url: '/pages/user/resume/index' });
 							}
+						});
+						return;
+					}
+					//通知模板订阅消息
+					uni.requestSubscribeMessage({
+						tmplIds: ['ll-qdaEgbDN4rEod0nJpsjUuSqHT9e12EniZfRPiNqM'],
+						complete: (c) => {
 							uni.showModal({ content: '投递成功,等待企业回应', showCancel: false });
 						}
 					});

+ 2 - 2
app/pages/user/index.vue

@@ -208,8 +208,8 @@ export default {
 		};
 	},
 	onShow() {
-		/* 		 		 		 	 this.user = {
-				token: 'eyJhbGciOiJIUzUxMiJ9.eyJsb2dpbl91c2VyX2tleSI6IjkwOThjOGFjLTU2OWItNGE5Yi1iYTE0LTlkYzQ4MTkyYmI0MCJ9.EBZwQ6YxN2gLIxmDoNqts5vO1IMjaqzE7tXsj68aTThvBNXhKylxv9ONucWudrsgTO0Q97UNDw-Wj3466QnJXg'
+/* 		 		 		 		 	 this.user = {
+				token: 'eyJhbGciOiJIUzUxMiJ9.eyJsb2dpbl91c2VyX2tleSI6IjZkOTE1NTNkLWE1ZjktNDU4Yy05MTM2LTU2MDc0Y2M2ZmNkZiJ9.j4mYCmtjhup6CyxxQXznMjqdWi1HoAaF2nT4PpMWTl3B3UrQMwDACrYUWctml83wg4uf43PjIPOvfkFpaUADOw'
 			};
 			uni.setStorageSync('user', this.user); */
 

+ 2 - 1
app/pages/user/resume/deliver/invite.vue

@@ -1,5 +1,5 @@
 <template>
-	<view class="main pt0">
+	<view class="main">
 		<view class="item_job" v-for="(item, index) in list" :key="index" @click="go('/pages/job/detail?id=' + item.positionId)">
 			<view class="top">
 				<view class="title omit">{{ item.title }}</view>
@@ -14,6 +14,7 @@
 				<view class="f danger" @click.stop="agree(item, 2)" v-if="item.isAccept == 0">拒绝</view>
 				<view class="f danger" v-if="item.isAccept == 2">已拒绝</view>
 				<view class="f br agree" v-if="item.isAccept == 1">已同意</view>
+				<view class="f br agree" v-if="item.isAccept == 3">面试完成</view>
 				<view class="f" @click.stop="navigation(item)" v-if="item.isAccept == 1">导航去面试</view>
 			</view>
 		</view>

+ 1 - 1
app/pages/user/resume/deliver/list.vue

@@ -1,5 +1,5 @@
 <template>
-	<view class="main pt0">
+	<view class="main">
 		<view class="item_job" v-for="(item, index) in list" :key="index" @click="go('/pages/job/detail?id=' + item.positionId)">
 			<view class="top">
 				<view class="title omit">{{ item.title }}</view>

+ 22 - 3
app/pages/user/resume/deliver/receive/list.vue

@@ -20,13 +20,15 @@
 				</view>
 				<view class="con">
 					<view class="name">{{ item.name }}</view>
-					<text class="desc">{{ item.sex }} · {{ item.age }}岁 · {{ item.experience }}年经验</text>
+					<text class="desc">{{ item.sex }} · {{ item.age }}岁</text>
 				</view>
 			</view>
 			<view class="flex">
 				<view class="f" v-if="item.state == 0">待处理</view>
-				<view class="f agree" v-if="item.state == 1 && item.isAccept == 0">已邀待对方同意</view>
-				<view class="f agree" v-if="item.state == 1 && item.isAccept == 1">对方同意面试</view>
+				<view class="f" v-if="item.state == 1 && item.isAccept == 0">已邀待对方同意</view>
+				<view class="f br" v-if="item.state == 1 && item.isAccept == 1">对方同意面试</view>
+				<view class="f agree" v-if="item.state == 1 && item.isAccept == 1" @click.stop="complete(item)">点击完成面试</view>
+				<view class="f agree" v-if="item.state == 1 && item.isAccept == 3">面试完成</view>
 				<view class="f danger" v-if="item.state == 1 && item.isAccept == 2">对方已拒绝</view>
 			</view>
 		</view>
@@ -73,6 +75,23 @@ export default {
 		go(url) {
 			uni.navigateTo({ url: url });
 		},
+		complete(item) {
+			uni.showModal({
+				title: '提示',
+				content: '确定完成面试?',
+				success: (res) => {
+					if (res.confirm) {
+						this.http.request({
+							url: '/app/deliver/complete/' + item.id,
+							success: (res) => {
+								uni.showToast({ title: '操作成功' });
+								item.isAccept = 3;
+							}
+						});
+					}
+				}
+			});
+		},
 		tabClick(e) {
 			this.param.isRead = e.isRead;
 			this.refresh();

+ 6 - 20
app/pages/user/resume/preview.vue

@@ -22,7 +22,7 @@
 			</view>
 			<view class="item">意向工作:{{ item.positionName || '' }}</view>
 		</view>
-		<button class="btn" @click="invite()">
+		<button class="btn" @click="show = true">
 			<text class="icon">&#xe6a3;</text>
 			<text>面试邀请</text>
 		</button>
@@ -30,6 +30,7 @@
 			<text class="icon">&#xe644;</text>
 			<text>拨打电话</text>
 		</button>
+		<invite v-model="show" :resumeDeliverId="resumeDeliverId"></invite>
 	</view>
 </template>
 
@@ -38,12 +39,13 @@ export default {
 	data() {
 		return {
 			ip: this.http.ip,
-			id: '',
-			item: {}
+			resumeDeliverId: 0,
+			item: {},
+			show: false
 		};
 	},
 	onLoad(e) {
-		this.id = e.id;
+		this.resumeDeliverId = e.id;
 		this.http.request({
 			url: '/app/deliver/detail/' + e.id,
 			success: (res) => {
@@ -52,22 +54,6 @@ export default {
 		});
 	},
 	methods: {
-		invite() {
-			uni.showModal({
-				title: '提示',
-				content: '确定发送面试邀请',
-				success: (res) => {
-					if (res.confirm) {
-						this.http.request({
-							url: '/app/deliver/invite/' + this.id,
-							success: (res) => {
-								uni.showToast({ title: '发送成功' });
-							}
-						});
-					}
-				}
-			});
-		},
 		call() {
 			uni.makePhoneCall({
 				phoneNumber: this.item.phone

+ 10 - 3
ruoyi-admin/src/main/java/com/ruoyi/web/work/api/Api_ResumeDeliverController.java

@@ -5,6 +5,7 @@ import com.ruoyi.common.core.page.TableDataInfo;
 import com.ruoyi.web.work.api.config.BaseController;
 import com.ruoyi.web.work.domain.ResumeDeliver;
 import com.ruoyi.web.work.domain.dto.ResumeDeliverDto;
+import com.ruoyi.web.work.domain.dto.ResumeInviteDto;
 import com.ruoyi.web.work.domain.vo.ReceiveListVo;
 import com.ruoyi.web.work.domain.vo.ReceiveVo;
 import com.ruoyi.web.work.service.IResumeDeliverService;
@@ -12,6 +13,7 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.validation.annotation.Validated;
 import org.springframework.web.bind.annotation.*;
 
+import java.text.ParseException;
 import java.util.List;
 
 /**
@@ -62,9 +64,9 @@ public class Api_ResumeDeliverController extends BaseController {
         return resumeDeliverService.detail(id);
     }
 
-    @GetMapping("/invite/{id}")
-    public AjaxResult invite(@PathVariable("id") Long id) {
-        return resumeDeliverService.invite(id);
+    @PostMapping("/invite")
+    public AjaxResult invite(@Validated @RequestBody ResumeInviteDto dto) throws ParseException {
+        return resumeDeliverService.invite(dto);
     }
 
     @GetMapping("/remove/{id}")
@@ -77,6 +79,11 @@ public class Api_ResumeDeliverController extends BaseController {
         return resumeDeliverService.send(id);
     }
 
+    @GetMapping("/complete/{id}")
+    public AjaxResult complete(@PathVariable("id") Long id) {
+        return resumeDeliverService.complete(id);
+    }
+
     @PostMapping("/agree")
     public AjaxResult agree(@Validated @RequestBody ResumeDeliverDto dto) {
         return resumeDeliverService.agree(dto);

+ 5 - 11
ruoyi-admin/src/main/java/com/ruoyi/web/work/domain/Position.java

@@ -9,11 +9,9 @@ import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 import lombok.experimental.Accessors;
 
-import javax.validation.constraints.Max;
-import javax.validation.constraints.Min;
-import javax.validation.constraints.NotBlank;
-import javax.validation.constraints.NotNull;
+import javax.validation.constraints.*;
 import java.util.Date;
+
 /**
  * @author lsw
  * @date 2024-06-07
@@ -36,6 +34,7 @@ public class Position extends BaseData {
     private Integer type;
 
     @NotBlank(message = "职位名称不能为空")
+    @Size(max = 10, message = "职位名称长度不能超过10个字符")
     @ApiModelProperty(value = "职位名称")
     private String title;
 
@@ -68,9 +67,6 @@ public class Position extends BaseData {
     @ApiModelProperty(value = "最大薪资")
     private Integer max;
 
-    @ApiModelProperty(value = "职位关键字")
-    private String tags;
-
     @ApiModelProperty(value = "城市名称")
     private String cityName;
 
@@ -123,9 +119,7 @@ public class Position extends BaseData {
     @ApiModelProperty(value = "审核备注")
     private String msg;
 
-    @ApiModelProperty(value = "状态 (0关闭 1已发布任务 2已接单 3业主已选中 4任务开始 5验收 6付款)")
-    private Integer status;
-
+    /*******************查询条件*******************/
     @TableField(exist = false)
-    private  String enterpriseName;
+    private String enterpriseName;
 }

+ 7 - 13
ruoyi-admin/src/main/java/com/ruoyi/web/work/domain/ResumeDeliver.java

@@ -10,6 +10,7 @@ import lombok.Data;
 import lombok.experimental.Accessors;
 
 import java.util.Date;
+
 /**
  * @author lsw
  * @date 2024-06-13
@@ -17,7 +18,7 @@ import java.util.Date;
 @Data
 @TableName(value = "tb_resume_deliver")
 @Accessors(chain = true)
-public class ResumeDeliver{
+public class ResumeDeliver {
     private static final long serialVersionUID = 1L;
 
     private Long id;
@@ -49,9 +50,8 @@ public class ResumeDeliver{
     @ApiModelProperty(value = "是否签订合同:0=未发送,1=已发送,2=已签订")
     private Integer isContract;
 
-    @JsonFormat(pattern = "yyyy-MM-dd HH:mm")
     @ApiModelProperty(value = "面试时间")
-    private Date inviteTime;
+    private String inviteTime;
 
     @TableField(fill = FieldFill.INSERT)
     @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@@ -61,6 +61,8 @@ public class ResumeDeliver{
     @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
     private Date updateTime;
 
+
+    /*****************查询字段*****************/
     @TableField(exist = false)
     @ApiModelProperty(value = "职位名称")
     private String title;
@@ -83,18 +85,10 @@ public class ResumeDeliver{
 
     @JsonIgnore
     @TableField(exist = false)
-    private Integer minAge;
-
-    @JsonIgnore
-    @TableField(exist = false)
-    private Integer maxAge;
-
-    @JsonIgnore
-    @TableField(exist = false)
-    private Integer minExperience;
+    private Integer min;
 
     @JsonIgnore
     @TableField(exist = false)
-    private Integer maxExperience;
+    private Integer max;
 
 }

+ 17 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/work/domain/dto/ResumeInviteDto.java

@@ -0,0 +1,17 @@
+package com.ruoyi.web.work.domain.dto;
+
+import lombok.Data;
+
+import javax.validation.constraints.NotBlank;
+import javax.validation.constraints.NotNull;
+
+@Data
+public class ResumeInviteDto {
+
+    @NotNull
+    private Long id;
+
+    @NotBlank(message = "面试时间不能为空")
+    private String inviteTime;
+
+}

+ 11 - 2
ruoyi-admin/src/main/java/com/ruoyi/web/work/service/IResumeDeliverService.java

@@ -4,9 +4,11 @@ import com.baomidou.mybatisplus.extension.service.IService;
 import com.ruoyi.common.core.domain.AjaxResult;
 import com.ruoyi.web.work.domain.ResumeDeliver;
 import com.ruoyi.web.work.domain.dto.ResumeDeliverDto;
+import com.ruoyi.web.work.domain.dto.ResumeInviteDto;
 import com.ruoyi.web.work.domain.vo.ReceiveListVo;
 import com.ruoyi.web.work.domain.vo.ReceiveVo;
 
+import java.text.ParseException;
 import java.util.List;
 
 /**
@@ -36,10 +38,17 @@ public interface IResumeDeliverService extends IService<ResumeDeliver> {
     /**
      * 企业邀请面试
      *
+     * @param dto
+     * @return
+     */
+    AjaxResult invite(ResumeInviteDto dto) throws ParseException;
+
+    /**
+     * 面试完成
      * @param id
      * @return
      */
-    AjaxResult invite(Long id);
+    AjaxResult complete(Long id);
 
 
     /**
@@ -79,5 +88,5 @@ public interface IResumeDeliverService extends IService<ResumeDeliver> {
      *
      * @param resumeDeliver
      */
-    public void sendMessage(ResumeDeliver resumeDeliver);
+    public void sendMessage(ResumeDeliver resumeDeliver) throws ParseException;
 }

+ 36 - 32
ruoyi-admin/src/main/java/com/ruoyi/web/work/service/impl/ResumeDeliverServiceImpl.java

@@ -14,6 +14,7 @@ import com.ruoyi.web.work.domain.Position;
 import com.ruoyi.web.work.domain.Resume;
 import com.ruoyi.web.work.domain.ResumeDeliver;
 import com.ruoyi.web.work.domain.dto.ResumeDeliverDto;
+import com.ruoyi.web.work.domain.dto.ResumeInviteDto;
 import com.ruoyi.web.work.domain.vo.ReceiveListVo;
 import com.ruoyi.web.work.domain.vo.ReceiveVo;
 import com.ruoyi.web.work.mapper.ResumeDeliverMapper;
@@ -22,6 +23,7 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.core.env.Environment;
 import org.springframework.stereotype.Service;
 
+import java.text.ParseException;
 import java.util.List;
 
 /**
@@ -58,14 +60,14 @@ public class ResumeDeliverServiceImpl extends ServiceImpl<ResumeDeliverMapper, R
         if (AppUtil.getUser().getIsAuthentication() != 1) {
             return AjaxResult.error(7878, "您需要实名认证才能投递简历");
         }
+        Resume resume = resumeService.getById(AppUtil.getUser().getId());
+        if (StringUtils.isEmpty(resume.getName())) {
+            return AjaxResult.error(7979, "请先完善简历再投递");
+        }
         Position position = positionService.getById(id);
         if (position == null || position.getState() != 0 || position.getAudit() != 1) {
             return AjaxResult.error("该职位不存在或已下架");
         }
-        Resume resume = resumeService.getById(AppUtil.getUser().getId());
-        if (StringUtils.isEmpty(resume.getName()) || StringUtils.isEmpty(resume.getAvatar())) {
-            return AjaxResult.error(7979, "请先完善简历再投递");
-        }
         ResumeDeliver resumeDeliver = resumeDeliverMapper.check(position.getId(), AppUtil.getUser().getId());
         if (resumeDeliver != null) {
             return AjaxResult.error("请勿重复投递简历");
@@ -75,6 +77,7 @@ public class ResumeDeliverServiceImpl extends ServiceImpl<ResumeDeliverMapper, R
         resumeDeliver.setType(position.getType());
         resumeDeliver.setPositionId(position.getId());
         resumeDeliver.setEnterpriseId(position.getUserId());
+        resumeDeliver.setOpenId(AppUtil.getUser().getOpenId());
         if (!save(resumeDeliver)) {
             throw new ServiceException("投递简历失败");
         }
@@ -95,8 +98,8 @@ public class ResumeDeliverServiceImpl extends ServiceImpl<ResumeDeliverMapper, R
     }
 
     @Override
-    public AjaxResult invite(Long id) {
-        ResumeDeliver resumeDeliver = getById(id);
+    public AjaxResult invite(ResumeInviteDto dto) throws ParseException {
+        ResumeDeliver resumeDeliver = getById(dto.getId());
         if (resumeDeliver == null || !resumeDeliver.getEnterpriseId().equals(AppUtil.getUser().getId())) {
             return AjaxResult.error("简历不存在或非法操作");
         }
@@ -110,10 +113,24 @@ public class ResumeDeliverServiceImpl extends ServiceImpl<ResumeDeliverMapper, R
             return AjaxResult.error("已发送邀请,等待求职者同意");
         }
         resumeDeliver.setState(1);
+        resumeDeliver.setInviteTime(dto.getInviteTime());
         if (!updateById(resumeDeliver)) {
-            throw new ServiceException("发面试邀请失败");
+            throw new ServiceException("发面试邀请失败");
         }
+        sendMessage(resumeDeliver);
+        return AjaxResult.success();
+    }
 
+    @Override
+    public AjaxResult complete(Long id) {
+        ResumeDeliver resumeDeliver = getById(id);
+        if (resumeDeliver == null || !resumeDeliver.getEnterpriseId().equals(AppUtil.getUser().getId())) {
+            return AjaxResult.error("简历不存在或非法操作");
+        }
+        resumeDeliver.setIsAccept(3);
+        if (!updateById(resumeDeliver)) {
+            throw new ServiceException("操作面试失败");
+        }
         return AjaxResult.success();
     }
 
@@ -154,39 +171,26 @@ public class ResumeDeliverServiceImpl extends ServiceImpl<ResumeDeliverMapper, R
     }
 
     @Override
-    public void sendMessage(ResumeDeliver resumeDeliver) {
+    public void sendMessage(ResumeDeliver resumeDeliver) throws ParseException {
         JSONObject jsonObject = JSONUtil.parseObj(HttpUtil.get("https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=" + env.getProperty("wx.appid") + "&secret=" + env.getProperty("wx.appSecret")));
         JSONObject body = new JSONObject();
         body.set("touser", resumeDeliver.getOpenId());
-        //面试邀请
+        body.set("appid", env.getProperty("wx.appid"));
+        JSONObject content = new JSONObject();
+        //面试邀请通知
         if (resumeDeliver.getState() == 1 && resumeDeliver.getIsAccept() == 0) {
             Position position = positionService.getById(resumeDeliver.getPositionId());
-            Enterprise enterprise=enterpriseService.getById(resumeDeliver.getUserId());
-            body.set("template_id", "Oh-CCL-nAh6kciX0fmIU2AfldccqOr88DYl0VMg97ZI");
-            JSONObject content = new JSONObject();
-            content.set("thing1", new JSONObject().set("value", position.getTitle()));
-            content.set("thing2", new JSONObject().set("value", position.getAddress() + position.getMph()));
-            content.set("time3", new JSONObject().set("value", DateUtils.datetoString(resumeDeliver.getInviteTime())));
-            content.set("thing4", new JSONObject().set("value", enterprise.getName()));
-        }
-
-
-/*        if (order.getState() == 3) {
-            content.set("phrase2", new JSONObject().set("value", "完成交易"));
-            content.set("time3", new JSONObject().set("value", DateUtils.dateToString(order.getOrderCompleteTime())));
-        }
-        if (order.getState() == -1) {
-            content.set("phrase2", new JSONObject().set("value", "退款成功"));
-            content.set("time3", new JSONObject().set("value", DateUtils.dateToString(order.getPayRefundTime())));
+            Enterprise enterprise = enterpriseService.getById(resumeDeliver.getUserId());
+            body.set("template_id", "ll-qdaEgbDN4rEod0nJpsjUuSqHT9e12EniZfRPiNqM");
+            body.set("page", "pages/user/resume/deliver/invite");
+            content.set("thing5", new JSONObject().set("value", enterprise.getName()));//公司名称
+            content.set("thing1", new JSONObject().set("value", position.getTitle()));//职位
+            content.set("time3", new JSONObject().set("value", DateUtils.formatDate(resumeDeliver.getInviteTime())));//面试时间
+            content.set("thing4", new JSONObject().set("value", StringUtils.truncateString(position.getAddress(), 15))); //面试地点
         }
-        content.set("character_string4", new JSONObject().set("value", order.getOrderNum()));
-        content.set("amount5", new JSONObject().set("value", order.getTotalPrice()));
         body.set("data", content);
         String result = HttpUtil.post("https://api.weixin.qq.com/cgi-bin/message/subscribe/send?access_token=" + jsonObject.getStr("access_token"), body.toString());
-        System.out.println("订单信息:" + content.toString());
-        System.out.println("订单信息:" + order.toString());
+        System.out.println("body:" + body);
         System.out.println("小程序订阅消息:" + result);
-        return result;
-        return false;*/
     }
 }

+ 1 - 2
ruoyi-admin/src/main/resources/mapper/work/ResumeDeliverMapper.xml

@@ -67,8 +67,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <if test="state != null "> and d.state = #{state}</if>
         <if test="isAccept != null "> and d.is_accept = #{isAccept}</if>
         <if test="isRead != null "> and d.is_read = #{isRead}</if>
-        <if test="minAge != null and maxAge !=null">AND r.age <![CDATA[ >= ]]> #{minAge} AND r.age <![CDATA[ <= ]]> #{maxAge}</if>
-        <if test="minExperience != null and maxExperience !=null">AND r.experience <![CDATA[ >= ]]> #{minExperience} AND r.experience <![CDATA[ <= ]]> #{maxExperience}</if>
+        <if test="min != null and max !=null">AND r.age <![CDATA[ >= ]]> #{min} AND r.age <![CDATA[ <= ]]> #{max}</if>
         ORDER BY d.id DESC
     </select>
 

+ 6 - 1
ruoyi-common/src/main/java/com/ruoyi/common/utils/DateUtils.java

@@ -74,7 +74,12 @@ public class DateUtils extends org.apache.commons.lang3.time.DateUtils {
             throw new RuntimeException(e);
         }
     }
-
+    public static String formatDate(String inputDateStr) throws ParseException {
+        SimpleDateFormat inputDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm");
+        SimpleDateFormat outputDateFormat = new SimpleDateFormat("yyyy年M月d日 HH:mm");
+        Date date = inputDateFormat.parse(inputDateStr);
+        return outputDateFormat.format(date);
+    }
     /**
      * 日期路径 即年/月/日 如2018/08/08
      */

+ 6 - 0
ruoyi-common/src/main/java/com/ruoyi/common/utils/StringUtils.java

@@ -718,6 +718,12 @@ public class StringUtils extends org.apache.commons.lang3.StringUtils {
 
         return number;
     }
+    public static String truncateString(String input, int maxLength) {
+        if (input == null || input.length() <= maxLength) {
+            return input;
+        }
+        return input.substring(0, maxLength) + "...";
+    }
     public static void main(String[] args) {
         String str="713E872756B56B4791B2C4A8873F071DE730CC46DDE4A65666AB8B01F947F7EB64F4DC09B1D42F541E53F2F2DE4BB286805D9DB9FFC5F0B66B281890B47E46732EDBD0885CA7E2163E43AA5F85E7442E7A1635BEC01F67A59B243E98346ACAFE25D2F564F219BF5D058E5FD30DEF79386C83CA024D7E21ED3C34B0AD192300A4ADE7F4B1AF65B356AD0B5B4915EC230D2C34D11578AFD70B32D6722EB2AF5ABCDA6115C3E0D9224F252D6AB309C07E2E";
         System.out.println(AESDecrypt(str));