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);
|
||||
hrUserBehaviorRecordService.save(record);
|
||||
} 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);
|
||||
}
|
||||
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退役军人")
|
||||
private String keyPopulations;
|
||||
|
||||
@ApiModelProperty("岗位特征:(行政、后勤、管理、技术、销售等字典job_feature添加)")
|
||||
private String jobFeature;
|
||||
}
|
||||
|
||||
@@ -254,6 +254,9 @@ public class Job extends BaseEntity
|
||||
@ApiModelProperty("状态 0上架,1下架")
|
||||
private String jobStatus;
|
||||
|
||||
@ApiModelProperty("岗位特征:(行政、后勤、管理、技术、销售等字典job_feature添加)")
|
||||
private String jobFeature;
|
||||
|
||||
@TableField(exist = false)
|
||||
@ApiModelProperty("户外招聘会岗位审核状态")
|
||||
private String fairReviewStatus;
|
||||
|
||||
@@ -166,20 +166,17 @@ public class CompanyServiceImpl extends ServiceImpl<CompanyMapper, Company> impl
|
||||
}
|
||||
int i=companyMapper.updateById(company);
|
||||
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();
|
||||
if (!Objects.isNull(contactList)) {
|
||||
for (CompanyContact x : contactList) {
|
||||
if (x.getId() != null) {
|
||||
companyContactMapper.updateById(x);
|
||||
} else {
|
||||
x.setCompanyId(company.getCompanyId());
|
||||
companyContactMapper.insert(x);
|
||||
List<CompanyContact> contactList = company.getCompanyContactList();
|
||||
if (!Objects.isNull(contactList)) {
|
||||
for (CompanyContact x : contactList) {
|
||||
if (x.getId() != null) {
|
||||
companyContactMapper.updateById(x);
|
||||
} else {
|
||||
x.setCompanyId(company.getCompanyId());
|
||||
companyContactMapper.insert(x);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (companyNatureChanged) {
|
||||
List<Long> jobIds = jobMapper.selectList(Wrappers.<Job>lambdaQuery()
|
||||
.eq(Job::getCompanyId, company.getCompanyId()))
|
||||
|
||||
Reference in New Issue
Block a user