1.员工查询功能
2.修改 userid 字段为 Long 类型
This commit is contained in:
@@ -49,7 +49,7 @@ public class BigBrotherPageReqVO extends PageParam {
|
|||||||
private String hostDisplayId;
|
private String hostDisplayId;
|
||||||
|
|
||||||
@Schema(description = "该数据所属的账号id", example = "30487")
|
@Schema(description = "该数据所属的账号id", example = "30487")
|
||||||
private String userId;
|
private Long userId;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -62,7 +62,7 @@ public class BigBrotherRespVO {
|
|||||||
|
|
||||||
@Schema(description = "该数据所属的账号id", example = "30487")
|
@Schema(description = "该数据所属的账号id", example = "30487")
|
||||||
@ExcelProperty("该数据所属的账号id")
|
@ExcelProperty("该数据所属的账号id")
|
||||||
private String userId;
|
private Long userId;
|
||||||
|
|
||||||
@Schema(description = "创建时间")
|
@Schema(description = "创建时间")
|
||||||
@ExcelProperty("创建时间")
|
@ExcelProperty("创建时间")
|
||||||
|
|||||||
@@ -47,6 +47,9 @@ public class BigBrotherSaveReqVO {
|
|||||||
private String hostDisplayId;
|
private String hostDisplayId;
|
||||||
|
|
||||||
@Schema(description = "该数据所属的账号id", example = "30487")
|
@Schema(description = "该数据所属的账号id", example = "30487")
|
||||||
private String userId;
|
private Long userId;
|
||||||
|
|
||||||
|
@Schema(description = "操作状态", example = "30487")
|
||||||
|
private Byte operation_status;
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -104,4 +104,19 @@ public class EmployeeBigBrotherController {
|
|||||||
BeanUtils.toBean(list, EmployeeBigBrotherRespVO.class));
|
BeanUtils.toBean(list, EmployeeBigBrotherRespVO.class));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@PostMapping("/allocation")
|
||||||
|
@Operation(summary = "分配大哥给员工")
|
||||||
|
@PreAuthorize("@ss.hasPermission('server:employee-big-brother:allocation')")
|
||||||
|
public CommonResult<Boolean> createEmployeeBigBrother(@Valid @RequestBody List<EmployeeBigBrotherSaveReqVO> createReqVO) {
|
||||||
|
return success(employeeBigBrotherService.allocationEmployeeBigBrother(createReqVO));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@GetMapping("/self_page")
|
||||||
|
@Operation(summary = "获得大哥数据员工业务分页")
|
||||||
|
@PreAuthorize("@ss.hasPermission('server:employee-big-brother:query')")
|
||||||
|
public CommonResult<PageResult<EmployeeBigBrotherRespVO>> getEmployeeBigBrotherPagewithSelf(@Valid EmployeeBigBrotherPageReqVO pageReqVO) {
|
||||||
|
PageResult<EmployeeBigBrotherDO> pageResult = employeeBigBrotherService.getEmployeeBigBrotherPageWithSelf(pageReqVO);
|
||||||
|
return success(BeanUtils.toBean(pageResult, EmployeeBigBrotherRespVO.class));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -47,7 +47,7 @@ public class EmployeeBigBrotherPageReqVO extends PageParam {
|
|||||||
private String hostDisplayId;
|
private String hostDisplayId;
|
||||||
|
|
||||||
@Schema(description = "该数据所属的账号id", example = "533")
|
@Schema(description = "该数据所属的账号id", example = "533")
|
||||||
private String userId;
|
private Long userId;
|
||||||
|
|
||||||
|
|
||||||
@Schema(description = "是否洽谈", example = "2")
|
@Schema(description = "是否洽谈", example = "2")
|
||||||
|
|||||||
@@ -74,7 +74,7 @@ public class BigBrotherDO extends BaseDO {
|
|||||||
/**
|
/**
|
||||||
* 该数据所属的账号id
|
* 该数据所属的账号id
|
||||||
*/
|
*/
|
||||||
private String userId;
|
private Long userId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 该数据所属的租户id
|
* 该数据所属的租户id
|
||||||
|
|||||||
@@ -74,7 +74,7 @@ public class EmployeeBigBrotherDO extends BaseDO {
|
|||||||
/**
|
/**
|
||||||
* 该数据所属的账号id
|
* 该数据所属的账号id
|
||||||
*/
|
*/
|
||||||
private String userId;
|
private Long userId;
|
||||||
/**
|
/**
|
||||||
* 是否洽谈
|
* 是否洽谈
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -60,4 +60,7 @@ public interface EmployeeBigBrotherService {
|
|||||||
*/
|
*/
|
||||||
PageResult<EmployeeBigBrotherDO> getEmployeeBigBrotherPage(EmployeeBigBrotherPageReqVO pageReqVO);
|
PageResult<EmployeeBigBrotherDO> getEmployeeBigBrotherPage(EmployeeBigBrotherPageReqVO pageReqVO);
|
||||||
|
|
||||||
|
Boolean allocationEmployeeBigBrother(@Valid List<EmployeeBigBrotherSaveReqVO> createReqVO);
|
||||||
|
|
||||||
|
PageResult<EmployeeBigBrotherDO> getEmployeeBigBrotherPageWithSelf(@Valid EmployeeBigBrotherPageReqVO pageReqVO);
|
||||||
}
|
}
|
||||||
@@ -1,6 +1,8 @@
|
|||||||
package cn.iocoder.yudao.module.tkdata.service.employeebigbrother;
|
package cn.iocoder.yudao.module.tkdata.service.employeebigbrother;
|
||||||
|
|
||||||
import cn.hutool.core.collection.CollUtil;
|
import cn.hutool.core.collection.CollUtil;
|
||||||
|
import cn.iocoder.yudao.framework.security.core.LoginUser;
|
||||||
|
import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils;
|
||||||
import cn.iocoder.yudao.framework.tenant.core.context.TenantContextHolder;
|
import cn.iocoder.yudao.framework.tenant.core.context.TenantContextHolder;
|
||||||
import cn.iocoder.yudao.module.tkdata.controller.admin.employeebigbrother.vo.EmployeeBigBrotherPageReqVO;
|
import cn.iocoder.yudao.module.tkdata.controller.admin.employeebigbrother.vo.EmployeeBigBrotherPageReqVO;
|
||||||
import cn.iocoder.yudao.module.tkdata.controller.admin.employeebigbrother.vo.EmployeeBigBrotherSaveReqVO;
|
import cn.iocoder.yudao.module.tkdata.controller.admin.employeebigbrother.vo.EmployeeBigBrotherSaveReqVO;
|
||||||
@@ -9,6 +11,7 @@ import cn.iocoder.yudao.module.tkdata.dal.dataobject.employeebigbrother.Employee
|
|||||||
import cn.iocoder.yudao.module.tkdata.dal.mysql.employeebigbrother.EmployeeBigBrotherMapper;
|
import cn.iocoder.yudao.module.tkdata.dal.mysql.employeebigbrother.EmployeeBigBrotherMapper;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.baomidou.mybatisplus.generator.IFill;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
@@ -98,4 +101,27 @@ public class EmployeeBigBrotherServiceImpl implements EmployeeBigBrotherService
|
|||||||
return new PageResult<>(bigBrotherDOIPage.getRecords(),bigBrotherDOIPage.getTotal());
|
return new PageResult<>(bigBrotherDOIPage.getRecords(),bigBrotherDOIPage.getTotal());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Boolean allocationEmployeeBigBrother(List<EmployeeBigBrotherSaveReqVO> createReqVO) {
|
||||||
|
ArrayList<EmployeeBigBrotherDO> employeeBigBrotherDOS = new ArrayList<>();
|
||||||
|
for (EmployeeBigBrotherSaveReqVO employeeBigBrotherSaveReqVO : createReqVO) {
|
||||||
|
employeeBigBrotherDOS.add(BeanUtils.toBean(employeeBigBrotherSaveReqVO, EmployeeBigBrotherDO.class));
|
||||||
|
}
|
||||||
|
return employeeBigBrotherMapper.insertBatch(employeeBigBrotherDOS);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PageResult<EmployeeBigBrotherDO> getEmployeeBigBrotherPageWithSelf(EmployeeBigBrotherPageReqVO pageReqVO) {
|
||||||
|
pageReqVO.setTenantId(TenantContextHolder.getTenantId());
|
||||||
|
LoginUser loginUser = SecurityFrameworkUtils.getLoginUser();
|
||||||
|
if (loginUser!= null){
|
||||||
|
pageReqVO.setUserId(loginUser.getId());
|
||||||
|
IPage<EmployeeBigBrotherDO> iPage = new Page<>(pageReqVO.getPageNo(),pageReqVO.getPageSize());
|
||||||
|
IPage<EmployeeBigBrotherDO> bigBrotherDOIPage = employeeBigBrotherMapper.selectPagewithSelf(iPage, pageReqVO);
|
||||||
|
return new PageResult<>(bigBrotherDOIPage.getRecords(),bigBrotherDOIPage.getTotal());
|
||||||
|
}else{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -24,7 +24,7 @@
|
|||||||
<result column="historic_high_coins" jdbcType="INTEGER" property="historicHighCoins" />
|
<result column="historic_high_coins" jdbcType="INTEGER" property="historicHighCoins" />
|
||||||
<result column="total_gift_coins" jdbcType="INTEGER" property="totalGiftCoins" />
|
<result column="total_gift_coins" jdbcType="INTEGER" property="totalGiftCoins" />
|
||||||
<result column="host_display_id" jdbcType="VARCHAR" property="hostDisplayId" />
|
<result column="host_display_id" jdbcType="VARCHAR" property="hostDisplayId" />
|
||||||
<result column="user_id" jdbcType="VARCHAR" property="userId" />
|
<result column="user_id" jdbcType="BIGINT" property="userId" />
|
||||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||||
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
||||||
<result column="creator" jdbcType="BIGINT" property="creator" />
|
<result column="creator" jdbcType="BIGINT" property="creator" />
|
||||||
|
|||||||
@@ -24,7 +24,7 @@
|
|||||||
<result column="historic_high_coins" jdbcType="INTEGER" property="historicHighCoins" />
|
<result column="historic_high_coins" jdbcType="INTEGER" property="historicHighCoins" />
|
||||||
<result column="total_gift_coins" jdbcType="INTEGER" property="totalGiftCoins" />
|
<result column="total_gift_coins" jdbcType="INTEGER" property="totalGiftCoins" />
|
||||||
<result column="host_display_id" jdbcType="VARCHAR" property="hostDisplayId" />
|
<result column="host_display_id" jdbcType="VARCHAR" property="hostDisplayId" />
|
||||||
<result column="user_id" jdbcType="VARCHAR" property="userId" />
|
<result column="user_id" jdbcType="BIGINT" property="userId" />
|
||||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||||
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
||||||
<result column="creator" jdbcType="BIGINT" property="creator" />
|
<result column="creator" jdbcType="BIGINT" property="creator" />
|
||||||
|
|||||||
Reference in New Issue
Block a user