1.修改分配主播的操作逻辑
This commit is contained in:
@@ -47,7 +47,7 @@ public class EmployeeBigBrotherSaveReqVO {
|
||||
private String hostDisplayId;
|
||||
|
||||
@Schema(description = "该数据所属的账号id", example = "533")
|
||||
private String userId;
|
||||
private Long userId;
|
||||
|
||||
@Schema(description = "是否洽谈", example = "2")
|
||||
private Integer operationStatus;
|
||||
|
||||
@@ -81,5 +81,5 @@ public class BigBrotherDO extends BaseDO {
|
||||
*/
|
||||
private Long tenantId;
|
||||
|
||||
private Byte isAssigned;
|
||||
private Integer isAssigned;
|
||||
}
|
||||
@@ -8,6 +8,7 @@ import cn.iocoder.yudao.module.tkdata.controller.admin.employeebigbrother.vo.Emp
|
||||
import cn.iocoder.yudao.module.tkdata.controller.admin.employeebigbrother.vo.EmployeeBigBrotherSaveReqVO;
|
||||
import cn.iocoder.yudao.module.tkdata.dal.dataobject.bigbrother.BigBrotherDO;
|
||||
import cn.iocoder.yudao.module.tkdata.dal.dataobject.employeebigbrother.EmployeeBigBrotherDO;
|
||||
import cn.iocoder.yudao.module.tkdata.dal.mysql.bigbrother.BigBrotherMapper;
|
||||
import cn.iocoder.yudao.module.tkdata.dal.mysql.employeebigbrother.EmployeeBigBrotherMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
@@ -41,6 +42,9 @@ public class EmployeeBigBrotherServiceImpl implements EmployeeBigBrotherService
|
||||
@Resource
|
||||
private EmployeeBigBrotherMapper employeeBigBrotherMapper;
|
||||
|
||||
@Resource
|
||||
private BigBrotherMapper bigBrotherMapper;
|
||||
|
||||
@Override
|
||||
public Integer createEmployeeBigBrother(EmployeeBigBrotherSaveReqVO createReqVO) {
|
||||
// 插入
|
||||
@@ -103,11 +107,22 @@ public class EmployeeBigBrotherServiceImpl implements EmployeeBigBrotherService
|
||||
|
||||
@Override
|
||||
public Boolean allocationEmployeeBigBrother(List<EmployeeBigBrotherSaveReqVO> createReqVO) {
|
||||
|
||||
ArrayList<EmployeeBigBrotherDO> employeeBigBrotherDOS = new ArrayList<>();
|
||||
ArrayList<BigBrotherDO> bigBrotherDOS = new ArrayList<>();
|
||||
for (EmployeeBigBrotherSaveReqVO employeeBigBrotherSaveReqVO : createReqVO) {
|
||||
employeeBigBrotherDOS.add(BeanUtils.toBean(employeeBigBrotherSaveReqVO, EmployeeBigBrotherDO.class));
|
||||
BigBrotherDO bigBrotherDO = new BigBrotherDO();
|
||||
bigBrotherDO.setId(employeeBigBrotherSaveReqVO.getId());
|
||||
bigBrotherDO.setUserId(employeeBigBrotherSaveReqVO.getUserId());
|
||||
bigBrotherDO.setIsAssigned(1);
|
||||
bigBrotherDOS.add(bigBrotherDO);
|
||||
EmployeeBigBrotherDO employeeBigBrotherDO = BeanUtils.toBean(employeeBigBrotherSaveReqVO, EmployeeBigBrotherDO.class);
|
||||
employeeBigBrotherDO.setOperationStatus(0);
|
||||
employeeBigBrotherDOS.add(employeeBigBrotherDO);
|
||||
}
|
||||
return employeeBigBrotherMapper.insertBatch(employeeBigBrotherDOS);
|
||||
employeeBigBrotherMapper.insertBatch(employeeBigBrotherDOS);
|
||||
return bigBrotherMapper.updateBatch(bigBrotherDOS);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user