|
|
@@ -11,8 +11,11 @@ import com.ydtech.modules.base.controller.BaseController;
|
|
|
import com.ydtech.modules.order.entity.BasePageResult;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
+import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
|
+import java.util.ArrayList;
|
|
|
import java.util.Date;
|
|
|
+import java.util.List;
|
|
|
|
|
|
/**
|
|
|
* @author Administrator
|
|
|
@@ -68,6 +71,18 @@ public class SysUserRoleKztServiceImpl extends ServiceImpl<SysUserRoleKztMapper,
|
|
|
return new BasePageResult<>(kZTUserQueryDto.getPageNum(), page.getSize(), userPageResult.getTotal(), page.getPages(),
|
|
|
userPageResult.getRecords());
|
|
|
}
|
|
|
+
|
|
|
+ @Override
|
|
|
+ @Transactional
|
|
|
+ public void saveBatchUserRoleKzt(List<String> userIds, String roleId, String number) {
|
|
|
+ ArrayList<SysUserRoleKzt> saveObj = new ArrayList<>();
|
|
|
+ sysUserRoleKztMapper.deleteBatcgByUserId(userIds,number);
|
|
|
+ for (String userId : userIds) {
|
|
|
+ SysUserRoleKzt userRole = new SysUserRoleKzt(null, userId,Long.parseLong(roleId), number, new BaseController().getUserId(), new Date(), new BaseController().getUserId(), new Date());
|
|
|
+ saveObj.add(userRole);
|
|
|
+ }
|
|
|
+ this.saveBatch(saveObj);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
|