1.修改创建租户修改租户权限时的字段
2.主播列表增加 updateTime 字段 3.新增批量修改已分配给员工的主播给其他员工
This commit is contained in:
@@ -53,6 +53,16 @@ public class EmployeeHostsController {
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@PutMapping("/batch_update")
|
||||
@Operation(summary = "批量更新员工分配主播")
|
||||
@PreAuthorize("@ss.hasPermission('server:employee-hosts:batchupdate')")
|
||||
public CommonResult<Boolean> updateEmployeeHosts(@RequestBody List<EmployeeHostsSaveReqVO> updateReqVOList) {
|
||||
employeeHostsService.batchUpdateEmployeeHosts(updateReqVOList);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除员工分配主播")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
|
||||
@@ -67,6 +67,10 @@ public class EmployeeHostsRespVO {
|
||||
@ExcelProperty("数据插入时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@Schema(description = "数据更新时间")
|
||||
@ExcelProperty("数据更新时间")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
@Schema(description = "备注", example = "1")
|
||||
private String remake;
|
||||
|
||||
|
||||
@@ -64,6 +64,10 @@ public class NewHostsRespVO {
|
||||
@ExcelProperty("数据插入时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@Schema(description = "数据更新时间")
|
||||
@ExcelProperty("数据更新时间")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
@Schema(description = "用户 Id", example = "10967")
|
||||
@ExcelProperty("用户 Id")
|
||||
private Long userId;
|
||||
|
||||
@@ -62,4 +62,6 @@ public interface EmployeeHostsService {
|
||||
Integer allocationHostsEmployee(List<EmployeeHostsSaveReqVO> hostsList);
|
||||
|
||||
PageResult<EmployeeHostsDO> getEmployeeHostsPageWithSelf(@Valid EmployeeHostsPageReqVO pageReqVO);
|
||||
|
||||
void batchUpdateEmployeeHosts(List<EmployeeHostsSaveReqVO> updateReqVOList);
|
||||
}
|
||||
@@ -136,4 +136,15 @@ public class EmployeeHostsServiceImpl implements EmployeeHostsService {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void batchUpdateEmployeeHosts(List<EmployeeHostsSaveReqVO> updateReqVOList) {
|
||||
|
||||
ArrayList<EmployeeHostsDO> employeeHostsDOS = new ArrayList<>();
|
||||
for (EmployeeHostsSaveReqVO employeeHostsSaveReqVO : updateReqVOList) {
|
||||
EmployeeHostsDO updateObj = BeanUtils.toBean(employeeHostsSaveReqVO, EmployeeHostsDO.class);
|
||||
employeeHostsDOS.add(updateObj);
|
||||
}
|
||||
employeeHostsMapper.updateBatch(employeeHostsDOS);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -62,7 +62,7 @@
|
||||
|
||||
<select id="selectPageWithXMLWithSelf" resultType="cn.iocoder.yudao.module.tkdata.dal.dataobject.employeehosts.EmployeeHostsDO">
|
||||
select ns.id,hosts_id, hosts_level, hosts_coins, Invitation_type, fans, fllowernum,
|
||||
yesterday_coins,ns.create_time, country, online_fans,hosts_kind,remake ,operation_status from server_employee_hosts ns left join server_country_info ci ON ns.country = ci.country_name
|
||||
yesterday_coins,ns.create_time, country, online_fans,hosts_kind,remake ,operation_status ,ns.update_time from server_employee_hosts ns left join server_country_info ci ON ns.country = ci.country_name
|
||||
WHERE tenant_id =#{req.tenantId,jdbcType=BIGINT}
|
||||
and ns.user_id =#{req.userId,jdbcType=BIGINT}
|
||||
<!-- 主播国家筛选 -->
|
||||
@@ -180,7 +180,7 @@
|
||||
|
||||
<select id="selectPageWithXML" resultType="cn.iocoder.yudao.module.tkdata.dal.dataobject.employeehosts.EmployeeHostsDO">
|
||||
select ns.id,hosts_id, hosts_level, hosts_coins, Invitation_type, fans, fllowernum,
|
||||
yesterday_coins,ns.create_time, country, online_fans,hosts_kind,remake ,operation_status,user_id,uid from server_employee_hosts ns left join server_country_info ci ON ns.country = ci.country_name
|
||||
yesterday_coins,ns.create_time, country, online_fans,hosts_kind,remake ,operation_status,user_id,uid,ns.update_time from server_employee_hosts ns left join server_country_info ci ON ns.country = ci.country_name
|
||||
WHERE tenant_id = #{req.tenantId,jdbcType=BIGINT}
|
||||
and deleted = 0
|
||||
<!-- 筛选员工名下主播 -->
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
|
||||
<select id="selectPageWithXML" resultType="cn.iocoder.yudao.module.tkdata.dal.dataobject.newhosts.NewHostsDO">
|
||||
select ns.id,hosts_id, hosts_level, hosts_coins, Invitation_type, fans, fllowernum,
|
||||
yesterday_coins,ns.create_time, country, online_fans,hosts_kind ,is_assigned,uid from server_new_hosts ns left join server_country_info ci ON ns.country = ci.country_name
|
||||
yesterday_coins,ns.create_time, country, online_fans,hosts_kind ,is_assigned,uid ,ns.update_time from server_new_hosts ns left join server_country_info ci ON ns.country = ci.country_name
|
||||
WHERE tenant_id =#{req.tenantId,jdbcType=BIGINT}
|
||||
and deleted = 0
|
||||
<!-- 主播国家筛选 -->
|
||||
|
||||
Reference in New Issue
Block a user