Merge branch 'main' of http://124.243.245.42:3000/zkr/shz-backend
This commit is contained in:
@@ -59,13 +59,8 @@ public class HrUserBehaviorRecordController extends BaseController {
|
|||||||
record.setViewNum(1);
|
record.setViewNum(1);
|
||||||
hrUserBehaviorRecordService.save(record);
|
hrUserBehaviorRecordService.save(record);
|
||||||
} else {
|
} else {
|
||||||
if (record.getViewDuration() > 0) {
|
|
||||||
// 页面离开上报:累加时长
|
|
||||||
exist.setViewDuration(exist.getViewDuration() + record.getViewDuration());
|
|
||||||
} else {
|
|
||||||
// 页面进入上报:次数+1
|
|
||||||
exist.setViewNum(exist.getViewNum() + 1);
|
exist.setViewNum(exist.getViewNum() + 1);
|
||||||
}
|
exist.setViewDuration(exist.getViewDuration() + record.getViewDuration());
|
||||||
hrUserBehaviorRecordService.updateById(exist);
|
hrUserBehaviorRecordService.updateById(exist);
|
||||||
}
|
}
|
||||||
return success();
|
return success();
|
||||||
|
|||||||
@@ -0,0 +1,74 @@
|
|||||||
|
package com.ruoyi.cms.controller.cms;
|
||||||
|
|
||||||
|
import com.ruoyi.cms.domain.msg.HrUserBehaviorRecord;
|
||||||
|
import com.ruoyi.cms.service.msg.HrUserBehaviorRecordService;
|
||||||
|
import com.ruoyi.common.annotation.Log;
|
||||||
|
import com.ruoyi.common.core.controller.BaseController;
|
||||||
|
import com.ruoyi.common.core.domain.AjaxResult;
|
||||||
|
import com.ruoyi.common.core.page.TableDataInfo;
|
||||||
|
import com.ruoyi.common.enums.BusinessType;
|
||||||
|
import com.ruoyi.common.exception.ServiceException;
|
||||||
|
import com.ruoyi.common.utils.SiteSecurityUtils;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/cms/behavior")
|
||||||
|
@Api(tags = "后台:行为记录")
|
||||||
|
public class CmsHrUserBehaviorRecordController extends BaseController {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private HrUserBehaviorRecordService hrUserBehaviorRecordService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询行为记录列表
|
||||||
|
*/
|
||||||
|
@GetMapping("/list")
|
||||||
|
@PreAuthorize("@ss.hasPermi('cms:behavior:list')")
|
||||||
|
@ApiOperation("查询行为记录列表")
|
||||||
|
public TableDataInfo list(HrUserBehaviorRecord hrUserBehaviorRecord) {
|
||||||
|
if (!SiteSecurityUtils.isLogin()) {
|
||||||
|
throw new ServiceException("用户未登录");
|
||||||
|
}
|
||||||
|
Long userId = SiteSecurityUtils.getUserId();
|
||||||
|
boolean admin = SiteSecurityUtils.isAdmin(userId);
|
||||||
|
if (!admin) {
|
||||||
|
hrUserBehaviorRecord.setActorId(userId);
|
||||||
|
} else {
|
||||||
|
hrUserBehaviorRecord.setActorId(null);
|
||||||
|
}
|
||||||
|
startPage();
|
||||||
|
List<HrUserBehaviorRecord> list = hrUserBehaviorRecordService.selectBehaviorRecordList(hrUserBehaviorRecord);
|
||||||
|
return getDataTable(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 上报浏览行为/投递行为
|
||||||
|
*/
|
||||||
|
@ApiOperation("上报浏览行为/投递行为")
|
||||||
|
@PreAuthorize("@ss.hasPermi('cms:behavior:report')")
|
||||||
|
@Log(title = "用户培训经历", businessType = BusinessType.INSERT)
|
||||||
|
@PostMapping("/report")
|
||||||
|
public AjaxResult reportBehavior(@RequestBody HrUserBehaviorRecord record) {
|
||||||
|
HrUserBehaviorRecord exist = hrUserBehaviorRecordService.getExistViewRecord(
|
||||||
|
record.getActorType(),
|
||||||
|
record.getActorId(),
|
||||||
|
record.getTargetType(),
|
||||||
|
record.getTargetId()
|
||||||
|
);
|
||||||
|
if (exist == null) {
|
||||||
|
record.setViewNum(1);
|
||||||
|
hrUserBehaviorRecordService.save(record);
|
||||||
|
} else {
|
||||||
|
exist.setViewNum(exist.getViewNum() + 1);
|
||||||
|
exist.setViewDuration(exist.getViewDuration() + record.getViewDuration());
|
||||||
|
hrUserBehaviorRecordService.updateById(exist);
|
||||||
|
}
|
||||||
|
return success();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -173,4 +173,7 @@ public class ESJobDocument
|
|||||||
|
|
||||||
@ApiModelProperty("重点人群-1农民工、2团场职工、3失业人员、4零就业家庭、5零工人员、6退役军人")
|
@ApiModelProperty("重点人群-1农民工、2团场职工、3失业人员、4零就业家庭、5零工人员、6退役军人")
|
||||||
private String keyPopulations;
|
private String keyPopulations;
|
||||||
|
|
||||||
|
@ApiModelProperty("岗位特征:(行政、后勤、管理、技术、销售等字典job_feature添加)")
|
||||||
|
private String jobFeature;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -254,6 +254,9 @@ public class Job extends BaseEntity
|
|||||||
@ApiModelProperty("状态 0上架,1下架")
|
@ApiModelProperty("状态 0上架,1下架")
|
||||||
private String jobStatus;
|
private String jobStatus;
|
||||||
|
|
||||||
|
@ApiModelProperty("岗位特征:(行政、后勤、管理、技术、销售等字典job_feature添加)")
|
||||||
|
private String jobFeature;
|
||||||
|
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
@ApiModelProperty("户外招聘会岗位审核状态")
|
@ApiModelProperty("户外招聘会岗位审核状态")
|
||||||
private String fairReviewStatus;
|
private String fairReviewStatus;
|
||||||
|
|||||||
@@ -166,9 +166,6 @@ public class CompanyServiceImpl extends ServiceImpl<CompanyMapper, Company> impl
|
|||||||
}
|
}
|
||||||
int i=companyMapper.updateById(company);
|
int i=companyMapper.updateById(company);
|
||||||
if(i>0){
|
if(i>0){
|
||||||
companyContactMapper.update(null,Wrappers.<CompanyContact>lambdaUpdate()
|
|
||||||
.eq(CompanyContact::getCompanyId, company.getCompanyId())
|
|
||||||
.set(CompanyContact::getDelFlag, Constants.Del_FLAG_DELETE));
|
|
||||||
List<CompanyContact> contactList = company.getCompanyContactList();
|
List<CompanyContact> contactList = company.getCompanyContactList();
|
||||||
if (!Objects.isNull(contactList)) {
|
if (!Objects.isNull(contactList)) {
|
||||||
for (CompanyContact x : contactList) {
|
for (CompanyContact x : contactList) {
|
||||||
|
|||||||
@@ -45,6 +45,7 @@
|
|||||||
<result property="reviewStatus" column="review_status" />
|
<result property="reviewStatus" column="review_status" />
|
||||||
<result property="isKeyPopulations" column="is_key_populations" />
|
<result property="isKeyPopulations" column="is_key_populations" />
|
||||||
<result property="keyPopulations" column="key_populations" />
|
<result property="keyPopulations" column="key_populations" />
|
||||||
|
<result property="jobFeature" column="job_feature" />
|
||||||
|
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
@@ -94,6 +95,7 @@
|
|||||||
<result property="jobStatus" column="job_status" />
|
<result property="jobStatus" column="job_status" />
|
||||||
<result property="isKeyPopulations" column="is_key_populations" />
|
<result property="isKeyPopulations" column="is_key_populations" />
|
||||||
<result property="keyPopulations" column="key_populations" />
|
<result property="keyPopulations" column="key_populations" />
|
||||||
|
<result property="jobFeature" column="job_feature" />
|
||||||
|
|
||||||
<association property="companyVo" resultMap="CompanyResult"/>
|
<association property="companyVo" resultMap="CompanyResult"/>
|
||||||
<association property="jobContactList" resultMap="JomContactResult"/>
|
<association property="jobContactList" resultMap="JomContactResult"/>
|
||||||
@@ -155,7 +157,7 @@
|
|||||||
job_location_area_code, posting_date, vacancies, latitude, longitude, "view", company_id,
|
job_location_area_code, posting_date, vacancies, latitude, longitude, "view", company_id,
|
||||||
is_hot, is_urgent, apply_num, description, is_publish, data_source, job_url, remark, del_flag,
|
is_hot, is_urgent, apply_num, description, is_publish, data_source, job_url, remark, del_flag,
|
||||||
create_by, create_time, row_id, job_category,job_type,job_address,job_status,is_key_populations,
|
create_by, create_time, row_id, job_category,job_type,job_address,job_status,is_key_populations,
|
||||||
key_populations
|
key_populations,job_feature
|
||||||
) VALUES
|
) VALUES
|
||||||
<foreach collection="list" item="job" separator=",">
|
<foreach collection="list" item="job" separator=",">
|
||||||
(
|
(
|
||||||
@@ -164,7 +166,8 @@
|
|||||||
#{job.vacancies}, #{job.latitude}, #{job.longitude}, #{job.view}, #{job.companyId},
|
#{job.vacancies}, #{job.latitude}, #{job.longitude}, #{job.view}, #{job.companyId},
|
||||||
#{job.isHot}, #{job.isUrgent}, #{job.applyNum}, #{job.description}, #{job.isPublish}, #{job.dataSource},
|
#{job.isHot}, #{job.isUrgent}, #{job.applyNum}, #{job.description}, #{job.isPublish}, #{job.dataSource},
|
||||||
#{job.jobUrl}, #{job.remark}, #{job.delFlag}, #{job.createBy}, #{job.createTime},
|
#{job.jobUrl}, #{job.remark}, #{job.delFlag}, #{job.createBy}, #{job.createTime},
|
||||||
#{job.rowId}, #{job.jobCategory},#{job.jobType},#{job.jobAddress},#{job.jobStatus},#{job.isKeyPopulations},#{job.keyPopulations}
|
#{job.rowId}, #{job.jobCategory},#{job.jobType},#{job.jobAddress},#{job.jobStatus},#{job.isKeyPopulations},
|
||||||
|
#{job.keyPopulations},#{job.jobFeature}
|
||||||
)
|
)
|
||||||
</foreach>
|
</foreach>
|
||||||
</insert>
|
</insert>
|
||||||
|
|||||||
Reference in New Issue
Block a user